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: texture mapping movement tween support #230

Merged

Conversation

AlejandroAlvarezMelucciDCL
Copy link
Contributor

@AlejandroAlvarezMelucciDCL AlejandroAlvarezMelucciDCL commented Nov 6, 2024

Copy link

github-actions bot commented Nov 6, 2024

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-11844858736.commit-f6136b4.tgz"

Copy link
Contributor

@leanmendoza leanmendoza left a comment

Choose a reason for hiding this comment

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

In function of the previous PR merged, I guess this is for manipulating the offset parameter, and for the Albedo texture in case of PBR and just texture in Unlit.
The changes looks good, I'd only add more comments to know clearly the scope and remove ambiguities.

  • Does it affect only albedo? Or it applies for every texture?
  • Maybe texture_move is just fine, but maybe you'd want more specific naming like texture_uv_offset_move? I don't know.

@AlejandroAlvarezMelucciDCL
Copy link
Contributor Author

AlejandroAlvarezMelucciDCL commented Nov 11, 2024

In function of the previous PR merged, I guess this is for manipulating the offset parameter, and for the Albedo texture in case of PBR and just texture in Unlit. The changes looks good, I'd only add more comments to know clearly the scope and remove ambiguities.

  • Does it affect only albedo? Or it applies for every texture?
  • Maybe texture_move is just fine, but maybe you'd want more specific naming like texture_uv_offset_move? I don't know.

Chech this commit: a689feb

The concerns you have are planned for the next PR where I'll cover the stretch goals of the initiative.

@leanmendoza
Copy link
Contributor

leanmendoza commented Nov 12, 2024

In function of the previous PR merged, I guess this is for manipulating the offset parameter, and for the Albedo texture in case of PBR and just texture in Unlit. The changes looks good, I'd only add more comments to know clearly the scope and remove ambiguities.

  • Does it affect only albedo? Or it applies for every texture?
  • Maybe texture_move is just fine, but maybe you'd want more specific naming like texture_uv_offset_move? I don't know.

Chech this commit: a689feb

The concerns you have are planned for the next PR where I'll cover the stretch goals of the initiative.

In that case, could we add the comments that it affects albedo and the offset?
By default every field should have a comment specifying the default behavior and default value in case of there are values (the commit you quoted)

If you intend to merge to main this without the commit you quoted, it should be appropriately documented

gonpombo8
gonpombo8 previously approved these changes Nov 14, 2024
optional decentraland.common.TextureUnion emissive_texture = 5; // default = null
optional decentraland.common.TextureUnion bump_texture = 6; // default = null

optional decentraland.common.TextureUnion alpha_texture = 4; // @deprecated Alpha textures are no longer supported on PBRMaterial and UnlitMaterial.alphaTexture should be used instead.
Copy link
Contributor

Choose a reason for hiding this comment

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

the @deprecated comment works if you put it in the same line ?
You should see this message in the scene when you put the mouse over this prop, or in the typings file.
(Asking becuase i'm not sure how its being propagated)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for sharing your concerns!
As far as I know (after reading the documentation and doing a brief research), these are just comments, they don't actually do anything and it's up to the interpreter for each language what they do with it. The generated code in the client will always have these fields.
It's actually recommended to actually remove the deprecated properties and just reserve the id numbers.
I'll let @leanmendoza provide some feedback on the subject.

Copy link
Contributor

Choose a reason for hiding this comment

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

The reserve should be put after one or two minor SDK releases. (and previously communicated the breaking change). It's not a big deal because it's breaking only dead code (assuming this functionality has already passed away).

About the comment, I think both, same line and previous line, forward the comment to generated code in the SDK. It's worth to confirm.

Copy link
Contributor

Choose a reason for hiding this comment

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

Btw, it's something that if it doesn't fit the forwarding needs, it's can be re-visited in the future without introducing breaking changes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image
Here's the generated code in the client

Comment on lines +23 to +24
optional Vector2 offset = 4; // default = Vector2.Zero; Offset for texture positioning, only works for the texture property in PbrMaterial or UnlitMaterial.
optional Vector2 tiling = 5; // default = Vector2.One; Tiling multiplier for texture repetition, only works for the texture property in PbrMaterial or UnlitMaterial.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not totally sure about keeping the extra info about other components here. For now, it's better to keep it than not having it at all

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The idea was to have that documentation for creators when working with alpha_texture, emissive_texture, bump_texture, since the tiling and offset properties would show up with the autocomplete.

Copy link
Contributor

@leanmendoza leanmendoza left a comment

Choose a reason for hiding this comment

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

Good work! Looks good to me

@AlejandroAlvarezMelucciDCL AlejandroAlvarezMelucciDCL merged commit 3fb0262 into main Nov 21, 2024
3 checks passed
@AlejandroAlvarezMelucciDCL AlejandroAlvarezMelucciDCL deleted the feat/texture-mapping-movement-tween-support branch November 21, 2024 13:45
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.

3 participants