Skip to content

Commit c7c5922

Browse files
Improved documentation. Added support for texture tween
1 parent 674a324 commit c7c5922

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

proto/decentraland/common/texture.proto

+2-4
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@ message Texture {
2020
optional TextureFilterMode filter_mode = 3; // default = FilterMode.Bilinear
2121

2222
// Final uv = offset + (input_uv * tiling)
23-
// Offset for texture positioning.
24-
optional Vector2 offset = 4; // default = Vector2.Zero
25-
// Tiling multiplier for texture repetition.
26-
optional Vector2 tiling = 5; // default = Vector2.One
23+
optional Vector2 offset = 4; // default = Vector2.Zero; Offset for texture positioning, only works for the texture property in PbrMaterial or UnlitMaterial.
24+
optional Vector2 tiling = 5; // default = Vector2.One; Tiling multiplier for texture repetition, only works for the texture property in PbrMaterial or UnlitMaterial.
2725
}
2826

2927
message AvatarTexture {

proto/decentraland/sdk/components/material.proto

+6-7
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,18 @@ message PBMaterial {
2222
optional float alpha_test = 2; // default = 0.5. range value: from 0 to 1
2323
optional bool cast_shadows = 3; // default = true
2424
optional decentraland.common.Color4 diffuse_color = 4; // default = white;
25-
optional decentraland.common.TextureUnion alpha_texture = 5; // default = null
25+
optional decentraland.common.TextureUnion alpha_texture = 5; // default = null. Note that tilling and offset properties are ignored for this texture.
2626
}
2727

2828
message PbrMaterial {
2929
optional decentraland.common.TextureUnion texture = 1; // default = null
3030

3131
optional float alpha_test = 2; // default = 0.5. range value: from 0 to 1
3232
optional bool cast_shadows = 3; // default = true
33-
// @deprecated Alpha textures are no longer supported on PBRMaterial and UnlitMaterial.alphaTexture should be used instead.
34-
optional decentraland.common.TextureUnion alpha_texture = 4; // default = null
35-
optional decentraland.common.TextureUnion emissive_texture = 5; // default = null
36-
optional decentraland.common.TextureUnion bump_texture = 6; // default = null
33+
34+
optional decentraland.common.TextureUnion alpha_texture = 4; // @deprecated Alpha textures are no longer supported on PBRMaterial and UnlitMaterial.alphaTexture should be used instead.
35+
optional decentraland.common.TextureUnion emissive_texture = 5; // default = null. Note that tilling and offset properties are ignored for this texture.
36+
optional decentraland.common.TextureUnion bump_texture = 6; // default = null. Note that tilling and offset properties are ignored for this texture.
3737

3838
optional decentraland.common.Color4 albedo_color = 7; // default = white;
3939
optional decentraland.common.Color3 emissive_color = 8; // default = black;
@@ -54,5 +54,4 @@ message PBMaterial {
5454
UnlitMaterial unlit = 1;
5555
PbrMaterial pbr = 2;
5656
}
57-
58-
}
57+
}

proto/decentraland/sdk/components/tween.proto

+7
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,16 @@ message Scale {
3939
}
4040

4141
// This tween mode allows to move the texture of a PbrMaterial or UnlitMaterial.
42+
// You can also specify the movement type (offset or tiling)
4243
message TextureMove {
4344
decentraland.common.Vector2 start = 1;
4445
decentraland.common.Vector2 end = 2;
46+
optional TextureMovementType movement_type = 3; // default = TextureMovementType.TMT_OFFSET
47+
}
48+
49+
enum TextureMovementType {
50+
TMT_OFFSET = 0; // default = TextureMovementType.TMT_OFFSET
51+
TMT_TILING = 1;
4552
}
4653

4754
// Implementation guidelines for these easing functions can be found

0 commit comments

Comments
 (0)