Skip to content
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

feat: dynamic lights #234

Merged
merged 18 commits into from
Feb 4, 2025
Merged

Conversation

AlejandroAlvarezMelucciDCL
Copy link
Contributor

@AlejandroAlvarezMelucciDCL AlejandroAlvarezMelucciDCL commented Dec 10, 2024

Copy link

github-actions bot commented Jan 10, 2025

Test this pull request

  • The @dcl/protocol package can be tested in scenes by running
    npm install "https://sdk-team-cdn.decentraland.org/@dcl/protocol/branch//dcl-protocol-1.0.0-13043868109.commit-ba5dc44.tgz"

@AlejandroAlvarezMelucciDCL AlejandroAlvarezMelucciDCL marked this pull request as ready for review January 23, 2025 14:19
Copy link
Member

@kuruk-mm kuruk-mm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Some minor changes

What are hard/soft shadows?

I would recommend to copy some comments or use similar architecture from:
https://github.com/decentraland/protocol/blob/591a12ff93bb27fbda09c333764a83852adbfafa/proto/decentraland/sdk/components/light.proto

Also, can we update the light source ADR, at least with the parts that affects it?
decentraland/adr#276

Comment on lines 8 to 12
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
Copy link
Member

@kuruk-mm kuruk-mm Jan 25, 2025

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 range should be based on brightness. 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 undefined or null in Unity, and you need to interpret that as the default).

@AlejandroAlvarezMelucciDCL
Copy link
Contributor Author

Looks great! Some minor changes

What are hard/soft shadows?

I would recommend to copy some comments or use similar architecture from: https://github.com/decentraland/protocol/blob/591a12ff93bb27fbda09c333764a83852adbfafa/proto/decentraland/sdk/components/light.proto

@kuruk-mm Can you re-review the documentation I added? Is that clear enough?

@AlejandroAlvarezMelucciDCL AlejandroAlvarezMelucciDCL changed the base branch from main to experimental January 29, 2025 17:32
@AlejandroAlvarezMelucciDCL AlejandroAlvarezMelucciDCL merged commit 5fbeb3c into experimental Feb 4, 2025
3 checks passed
@AlejandroAlvarezMelucciDCL AlejandroAlvarezMelucciDCL deleted the feat/dynamic-lights branch February 4, 2025 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants