-
Notifications
You must be signed in to change notification settings - Fork 20
feat: dynamic lights #234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
feat: dynamic lights #234
Changes from 12 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
5018cb8
Initial draft of LightSource component
AlejandroAlvarezMelucciDCL bade865
Merge branch 'main' into feat/dynamic-lights
AlejandroAlvarezMelucciDCL f228c65
Fixed conflicting ids
AlejandroAlvarezMelucciDCL 2b6aa15
Refactor structure
AlejandroAlvarezMelucciDCL 56a67a4
Fixed ids
AlejandroAlvarezMelucciDCL 7034d13
Removed unused property and adjusted ids again
AlejandroAlvarezMelucciDCL a1b1862
Fixed color reference
AlejandroAlvarezMelucciDCL 3c63509
Fixed lowecase to oneof name
AlejandroAlvarezMelucciDCL 649389b
Test to fix proto builds
AlejandroAlvarezMelucciDCL 77138f9
Renamed file to properly generate classes with the intended name
AlejandroAlvarezMelucciDCL e9cba8b
Updated documentation
AlejandroAlvarezMelucciDCL 8c46c02
Merge branch 'main' into feat/dynamic-lights
AlejandroAlvarezMelucciDCL 0ef8a3c
Added cookie field
AlejandroAlvarezMelucciDCL 1020ea7
Added missing import
AlejandroAlvarezMelucciDCL f0aede8
Fixed proper type reference
AlejandroAlvarezMelucciDCL 728a3ac
Set optional properties, improved documentation
AlejandroAlvarezMelucciDCL 64bf6eb
Updated shadow mask type to TextureUnion
AlejandroAlvarezMelucciDCL 35c385b
Reordered properties to support different defaults on different messages
AlejandroAlvarezMelucciDCL File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| syntax = "proto3"; | ||
| package decentraland.sdk.components; | ||
| import "decentraland/sdk/components/common/id.proto"; | ||
| import "decentraland/common/colors.proto"; | ||
| option (common.ecs_component_id) = 1079; | ||
|
|
||
| message PBLightSource { | ||
| bool active = 4; // default = true | ||
| decentraland.common.Color3 color = 1; // default = Color.white | ||
| float brightness = 2; // range from 1 (dim) to 100,000 (very bright), expressed in Lumens for Point and Spot | ||
| float range = 3; // default = 10, expressed in meters | ||
| ShadowType shadow = 5; // default = ShadowType.ST_NONE | ||
|
|
||
| oneof type { | ||
| Point point = 6; | ||
| Spot spot = 7; | ||
| } | ||
|
|
||
| message Point {} | ||
|
|
||
| message Spot { | ||
| float inner_angle = 1; // default = 21.8. Inner angle can't be higher than outer angle, otherwise will default to same value. Min value is 0 | ||
| float outer_angle = 2; // default = 30. Outer angle can't be lower than inner angle, otherwise will inner angle will be set to same value. Max value is 179 | ||
| } | ||
|
|
||
| enum ShadowType { | ||
| ST_NONE = 0; | ||
| ST_SOFT = 1; | ||
| ST_HARD = 2; | ||
| } | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We believe that the default value of
rangeshould be based onbrightness. The default could be equation using brightness as a value.Additionally, if you want to implement this with a "default" value, you should mark it as
optional float range = 3.Only "optional" values can have default values, which are not required to be specified in the SDK (you will receive
undefinedornullin Unity, and you need to interpret that as the default).