Skip to content

Commit e3a1a5f

Browse files
authored
Merge branch 'main' into feat/gltf-node
2 parents cdacfbd + 3fb0262 commit e3a1a5f

3 files changed

Lines changed: 24 additions & 9 deletions

File tree

‎proto/decentraland/common/texture.proto‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ message Texture {
1818
string src = 1;
1919
optional TextureWrapMode wrap_mode = 2; // default = TextureWrapMode.Clamp
2020
optional TextureFilterMode filter_mode = 3; // default = FilterMode.Bilinear
21-
optional Vector2 offset = 4; // default = Vector2.Zero
22-
optional Vector2 tiling = 5; // default = Vector2.Zero
21+
22+
// Final uv = offset + (input_uv * tiling)
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.
2325
}
2426

2527
message AvatarTexture {

‎proto/decentraland/sdk/components/material.proto‎

Lines changed: 6 additions & 7 deletions
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‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ message PBTween {
1515
Move move = 3;
1616
Rotate rotate = 4;
1717
Scale scale = 5;
18+
TextureMove texture_move = 8;
1819
}
1920

2021
optional bool playing = 6; // default true (pause or running)
@@ -37,6 +38,19 @@ message Scale {
3738
decentraland.common.Vector3 end = 2;
3839
}
3940

41+
// This tween mode allows to move the texture of a PbrMaterial or UnlitMaterial.
42+
// You can also specify the movement type (offset or tiling)
43+
message TextureMove {
44+
decentraland.common.Vector2 start = 1;
45+
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;
52+
}
53+
4054
// Implementation guidelines for these easing functions can be found
4155
// at https://github.com/ai/easings.net/blob/6fcd5f852a470bf1a7890e8178afa0f471d5f2ec/src/easings/easingsFunctions.ts
4256
enum EasingFunction {

0 commit comments

Comments
 (0)