forked from decentraland/bevy-explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtween.proto
More file actions
107 lines (92 loc) · 2.69 KB
/
Copy pathtween.proto
File metadata and controls
107 lines (92 loc) · 2.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
syntax = "proto3";
package decentraland.sdk.components;
import "decentraland/common/vectors.proto";
import "decentraland/sdk/components/common/id.proto";
option (common.ecs_component_id) = 1102;
message PBTween {
float duration = 1; // in milliseconds
EasingFunction easing_function = 2;
oneof mode {
Move move = 3;
Rotate rotate = 4;
Scale scale = 5;
TextureMove texture_move = 8;
RotateContinuous rotate_continuous = 9;
MoveContinuous move_continuous = 10;
TextureMoveContinuous texture_move_continuous = 11;
}
optional bool playing = 6; // default true (pause or running)
optional float current_time = 7; // between 0 and 1
}
message Move {
decentraland.common.Vector3 start = 1;
decentraland.common.Vector3 end = 2;
optional bool face_direction = 3;
}
message Rotate {
decentraland.common.Quaternion start = 1;
decentraland.common.Quaternion end = 2;
}
message Scale {
decentraland.common.Vector3 start = 1;
decentraland.common.Vector3 end = 2;
}
// This tween mode allows to move the texture of a PbrMaterial or UnlitMaterial.
// You can also specify the movement type (offset or tiling)
message TextureMove {
decentraland.common.Vector2 start = 1;
decentraland.common.Vector2 end = 2;
optional TextureMovementType movement_type = 3; // default = TextureMovementType.TMT_OFFSET
}
message RotateContinuous {
decentraland.common.Quaternion direction = 1;
float speed = 2;
}
message MoveContinuous {
decentraland.common.Vector3 direction = 1;
float speed = 2;
}
message TextureMoveContinuous {
decentraland.common.Vector2 direction = 1;
float speed = 2;
optional TextureMovementType movement_type = 3; // default = TextureMovementType.TMT_OFFSET
}
enum TextureMovementType {
TMT_OFFSET = 0; // default = TextureMovementType.TMT_OFFSET
TMT_TILING = 1;
}
// Implementation guidelines for these easing functions can be found
// at https://github.com/ai/easings.net/blob/6fcd5f852a470bf1a7890e8178afa0f471d5f2ec/src/easings/easingsFunctions.ts
enum EasingFunction {
EF_LINEAR = 0; // default
EF_EASEINQUAD = 1;
EF_EASEOUTQUAD = 2;
EF_EASEQUAD = 3;
EF_EASEINSINE = 4;
EF_EASEOUTSINE = 5;
EF_EASESINE = 6;
EF_EASEINEXPO = 7;
EF_EASEOUTEXPO = 8;
EF_EASEEXPO = 9;
EF_EASEINELASTIC = 10;
EF_EASEOUTELASTIC = 11;
EF_EASEELASTIC = 12;
EF_EASEINBOUNCE = 13;
EF_EASEOUTBOUNCE = 14;
EF_EASEBOUNCE = 15;
EF_EASEINCUBIC = 16;
EF_EASEOUTCUBIC = 17;
EF_EASECUBIC = 18;
EF_EASEINQUART = 19;
EF_EASEOUTQUART = 20;
EF_EASEQUART = 21;
EF_EASEINQUINT = 22;
EF_EASEOUTQUINT = 23;
EF_EASEQUINT = 24;
EF_EASEINCIRC = 25;
EF_EASEOUTCIRC = 26;
EF_EASECIRC = 27;
EF_EASEINBACK = 28;
EF_EASEOUTBACK = 29;
EF_EASEBACK = 30;
}