@zcomponent/core 2.0.0-alpha.1 → 2.0.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. package/css/zcomponent.css +121 -122
  2. package/index.js +0 -3
  3. package/lib/actionbehavior.d.ts +3 -3
  4. package/lib/actionbehavior.js +20 -19
  5. package/lib/animation/animation.d.ts +13 -6
  6. package/lib/animation/animation.js +56 -43
  7. package/lib/animation/bezier.d.ts +6 -0
  8. package/lib/animation/bezier.js +8 -2
  9. package/lib/animation/clips/clip.d.ts +13 -1
  10. package/lib/animation/clips/clip.js +34 -14
  11. package/lib/animation/index.d.ts +4 -4
  12. package/lib/animation/index.js +4 -4
  13. package/lib/animation/layer.d.ts +9 -0
  14. package/lib/animation/layer.js +33 -12
  15. package/lib/animation/layerclip.d.ts +21 -0
  16. package/lib/animation/layerclip.js +82 -45
  17. package/lib/animation/tracks/cliptrack.d.ts +18 -0
  18. package/lib/animation/tracks/cliptrack.js +27 -6
  19. package/lib/animation/tracks/functiontrack.d.ts +9 -0
  20. package/lib/animation/tracks/functiontrack.js +16 -3
  21. package/lib/animation/tracks/propertytrack.d.ts +20 -1
  22. package/lib/animation/tracks/propertytrack.js +48 -11
  23. package/lib/animation/tracks/streamtrack.d.ts +18 -0
  24. package/lib/animation/tracks/streamtrack.js +44 -7
  25. package/lib/animation/tracks/track.d.ts +8 -2
  26. package/lib/animation/tracks/track.js +3 -2
  27. package/lib/behavior.js +13 -10
  28. package/lib/behaviors/ActivateState.d.ts +22 -24
  29. package/lib/behaviors/ActivateState.js +145 -35
  30. package/lib/behaviors/CallFunction.d.ts +2 -4
  31. package/lib/behaviors/CallFunction.js +69 -11
  32. package/lib/behaviors/ChangeRootScene.d.ts +35 -0
  33. package/lib/behaviors/ChangeRootScene.js +123 -0
  34. package/lib/behaviors/ConsoleLog.d.ts +6 -5
  35. package/lib/behaviors/ConsoleLog.js +95 -12
  36. package/lib/behaviors/DownloadSnapshot.d.ts +7 -12
  37. package/lib/behaviors/DownloadSnapshot.js +70 -19
  38. package/lib/behaviors/EmitComponentPropEvent.d.ts +1 -3
  39. package/lib/behaviors/EmitComponentPropEvent.js +80 -12
  40. package/lib/behaviors/LaunchURL.d.ts +5 -5
  41. package/lib/behaviors/LaunchURL.js +92 -10
  42. package/lib/behaviors/LogAnalyticsEvent.d.ts +10 -4
  43. package/lib/behaviors/LogAnalyticsEvent.js +88 -7
  44. package/lib/behaviors/PauseLayerClip.d.ts +7 -9
  45. package/lib/behaviors/PauseLayerClip.js +89 -21
  46. package/lib/behaviors/PlayLayerClip.d.ts +35 -32
  47. package/lib/behaviors/PlayLayerClip.js +202 -48
  48. package/lib/behaviors/PlaySound.d.ts +19 -25
  49. package/lib/behaviors/PlaySound.js +122 -28
  50. package/lib/behaviors/SetLayerOff.d.ts +7 -9
  51. package/lib/behaviors/SetLayerOff.js +88 -21
  52. package/lib/behaviors/ShareSnapshot.d.ts +5 -9
  53. package/lib/behaviors/ShareSnapshot.js +70 -17
  54. package/lib/behaviors/ShowTextAlert.d.ts +16 -29
  55. package/lib/behaviors/ShowTextAlert.js +116 -48
  56. package/lib/behaviors/TakeSnapshot.d.ts +22 -26
  57. package/lib/behaviors/TakeSnapshot.js +131 -56
  58. package/lib/behaviors/ToggleLayerClips.d.ts +45 -62
  59. package/lib/behaviors/ToggleLayerClips.js +233 -64
  60. package/lib/behaviors/stream/PauseStream.d.ts +5 -16
  61. package/lib/behaviors/stream/PauseStream.js +94 -34
  62. package/lib/behaviors/stream/PlayStream.d.ts +14 -27
  63. package/lib/behaviors/stream/PlayStream.js +123 -34
  64. package/lib/behaviors/stream/SeekStream.d.ts +8 -18
  65. package/lib/behaviors/stream/SeekStream.js +97 -31
  66. package/lib/behaviors/stream/StopStream.d.ts +6 -15
  67. package/lib/behaviors/stream/StopStream.js +89 -27
  68. package/lib/component.d.ts +36 -13
  69. package/lib/component.js +237 -151
  70. package/lib/components/AnimatedLoader.d.ts +51 -0
  71. package/lib/components/AnimatedLoader.js +159 -0
  72. package/lib/components/Audio.d.ts +35 -37
  73. package/lib/components/Audio.js +264 -151
  74. package/lib/components/AudioLayerSettings.d.ts +13 -11
  75. package/lib/components/AudioLayerSettings.js +76 -18
  76. package/lib/components/Children.d.ts +2 -1
  77. package/lib/components/Children.js +66 -13
  78. package/lib/components/ConditionalConstruct.d.ts +44 -0
  79. package/lib/components/ConditionalConstruct.js +142 -0
  80. package/lib/components/DefaultCookieConsent.d.ts +53 -73
  81. package/lib/components/DefaultCookieConsent.js +382 -264
  82. package/lib/components/DefaultLoader.d.ts +40 -28
  83. package/lib/components/DefaultLoader.js +198 -46
  84. package/lib/components/Gamepad.d.ts +5 -26
  85. package/lib/components/Gamepad.js +201 -65
  86. package/lib/components/LoaderScope.d.ts +15 -0
  87. package/lib/components/LoaderScope.js +71 -0
  88. package/lib/components/LongLoad.d.ts +11 -15
  89. package/lib/components/LongLoad.js +89 -34
  90. package/lib/components/SnapshotUI.d.ts +19 -24
  91. package/lib/components/SnapshotUI.js +202 -105
  92. package/lib/context.d.ts +23 -5
  93. package/lib/context.js +12 -6
  94. package/lib/contexts/analyticscontext.d.ts +12 -2
  95. package/lib/contexts/analyticscontext.js +68 -10
  96. package/lib/contexts/audiocontextcontext.d.ts +1 -1
  97. package/lib/contexts/audiocontextcontext.js +9 -8
  98. package/lib/contexts/canvascontext.d.ts +32 -18
  99. package/lib/contexts/canvascontext.js +195 -120
  100. package/lib/contexts/cookieconsentcontext.d.ts +38 -28
  101. package/lib/contexts/cookieconsentcontext.js +35 -32
  102. package/lib/contexts/documentflagmanager.js +15 -11
  103. package/lib/contexts/environmentcontext.d.ts +22 -6
  104. package/lib/contexts/environmentcontext.js +135 -21
  105. package/lib/contexts/gamepadcontext.d.ts +29 -26
  106. package/lib/contexts/gamepadcontext.js +46 -46
  107. package/lib/contexts/gesturecontext.d.ts +31 -6
  108. package/lib/contexts/gesturecontext.js +110 -85
  109. package/lib/contexts/globaltagcontext.d.ts +1 -1
  110. package/lib/contexts/globaltagcontext.js +8 -11
  111. package/lib/contexts/loadcontext.d.ts +45 -8
  112. package/lib/contexts/loadcontext.js +232 -82
  113. package/lib/contexts/orientationcontext.d.ts +13 -15
  114. package/lib/contexts/orientationcontext.js +150 -67
  115. package/lib/contexts/rootcomponentscontext.d.ts +16 -0
  116. package/lib/contexts/rootcomponentscontext.js +65 -0
  117. package/lib/contexts/snapshotContext.d.ts +0 -3
  118. package/lib/contexts/snapshotContext.js +78 -23
  119. package/lib/contexts/tagcontext.d.ts +5 -5
  120. package/lib/contexts/tagcontext.js +16 -16
  121. package/lib/contexts/textalertcontext.d.ts +1 -5
  122. package/lib/contexts/textalertcontext.js +1 -5
  123. package/lib/contexts/usereventcontext.d.ts +1 -1
  124. package/lib/contexts/usereventcontext.js +12 -12
  125. package/lib/data/animation.d.ts +10 -2
  126. package/lib/data/change.d.ts +1 -1
  127. package/lib/data/change.js +7 -0
  128. package/lib/data/core.d.ts +9 -1
  129. package/lib/data/index.d.ts +1 -1
  130. package/lib/data/index.js +1 -1
  131. package/lib/decorators.d.ts +348 -0
  132. package/lib/decorators.js +239 -0
  133. package/lib/decoratorutils.d.ts +3 -0
  134. package/lib/decoratorutils.js +8 -0
  135. package/lib/emitter.d.ts +15 -2
  136. package/lib/emitter.js +15 -6
  137. package/lib/entity.d.ts +43 -25
  138. package/lib/entity.js +104 -71
  139. package/lib/event.d.ts +2 -1
  140. package/lib/event.js +1 -4
  141. package/lib/groups.d.ts +18 -0
  142. package/lib/groups.js +19 -0
  143. package/lib/icons.d.ts +3372 -0
  144. package/lib/icons.js +1 -0
  145. package/lib/index.d.ts +18 -13
  146. package/lib/index.js +17 -13
  147. package/lib/inflate.d.ts +7 -7
  148. package/lib/inflate.js +5 -5
  149. package/lib/observable.d.ts +9 -2
  150. package/lib/observable.js +5 -4
  151. package/lib/observe.d.ts +18 -0
  152. package/lib/observe.js +177 -0
  153. package/lib/profile.d.ts +9 -5
  154. package/lib/profile.js +27 -17
  155. package/lib/selectors.d.ts +1 -1
  156. package/lib/selectors.js +5 -4
  157. package/lib/types.d.ts +161 -19
  158. package/lib/types.js +22 -1
  159. package/lib/values/values.d.ts +7 -8
  160. package/lib/values/values.js +1 -2
  161. package/lib/values/valuesmutator.d.ts +4 -1
  162. package/lib/values/valuesmutator.js +10 -8
  163. package/lib/zcomponent.d.ts +21 -10
  164. package/lib/zcomponent.js +717 -540
  165. package/package.json +84 -67
  166. package/lib/behaviors/ChangeCursor.d.ts +0 -39
  167. package/lib/behaviors/ChangeCursor.js +0 -44
@@ -1,243 +1,242 @@
1
1
  .zcomponent-defaultloader {
2
- position: fixed;
3
- font-family: sans-serif;
4
- color: white;
5
- background-color: black;
6
- display: flex;
7
- align-items: center;
8
- justify-content: center;
9
- background-size: cover;
10
- background-position: center center;
2
+ position: fixed;
3
+ font-family: sans-serif;
4
+ color: white;
5
+ background-color: black;
6
+ display: flex;
7
+ align-items: center;
8
+ justify-content: center;
9
+ background-size: cover;
10
+ background-position: center center;
11
11
  }
12
12
 
13
13
  #zcomponent-defaultloader-container {
14
- text-align: center;
14
+ text-align: center;
15
15
  }
16
16
 
17
17
  #zcomponent-defaultloader-subtitle {
18
- margin-bottom: 32px;
18
+ margin-bottom: 32px;
19
19
  }
20
20
 
21
21
  #zcomponent-defaultloader-progress {
22
- position: relative;
23
- width: 300px;
24
- background-color: #333;
25
- height: 12px;
26
- border-radius: 6px;
27
- margin: 0 auto;
22
+ position: relative;
23
+ width: 300px;
24
+ background-color: #333;
25
+ height: 12px;
26
+ border-radius: 6px;
27
+ margin: 0 auto;
28
28
  }
29
29
 
30
30
  #zcomponent-defaultloader-progress-percentage {
31
- position: relative;
32
- background-color: white;
33
- height: 12px;
34
- border-radius: 6px;
31
+ position: relative;
32
+ background-color: white;
33
+ height: 12px;
34
+ border-radius: 6px;
35
35
  }
36
36
 
37
37
  #zcomponent-overlay {
38
- position: fixed;
39
- top: 0;
40
- left: 0;
41
- pointer-events: none;
42
- overflow: hidden;
38
+ position: fixed;
39
+ top: 0;
40
+ left: 0;
41
+ pointer-events: none;
42
+ overflow: hidden;
43
43
  }
44
44
 
45
45
  #zcomponent-overlay > * {
46
- pointer-events: auto;
47
- position: absolute;
46
+ pointer-events: auto;
47
+ position: absolute;
48
48
  }
49
49
 
50
-
51
50
  .zcomponent-align {
52
- position: absolute;
53
- transform-origin: 0 0;
51
+ position: absolute;
52
+ transform-origin: 0 0;
54
53
  }
55
54
 
56
55
  .zcomponent-h-left {
57
- left: 0px;
56
+ left: 0px;
58
57
  }
59
58
 
60
59
  .zcomponent-h-left-safe {
61
- left: env(safe-area-inset-left, 0px);
60
+ left: env(safe-area-inset-left, 0px);
62
61
  }
63
62
 
64
63
  .zcomponent-h-center {
65
- left: 50%;
64
+ left: 50%;
66
65
  }
67
66
 
68
67
  .zcomponent-h-right {
69
- right: 0px;
68
+ right: 0px;
70
69
  }
71
70
 
72
71
  .zcomponent-h-right-safe {
73
- right: env(safe-area-inset-right, 0px);
72
+ right: env(safe-area-inset-right, 0px);
74
73
  }
75
74
 
76
75
  .zcomponent-v-top {
77
- top: 0px;
76
+ top: 0px;
78
77
  }
79
78
 
80
79
  .zcomponent-v-top-safe {
81
- top: env(safe-area-inset-top, 0px);
80
+ top: env(safe-area-inset-top, 0px);
82
81
  }
83
82
 
84
83
  .zcomponent-v-center {
85
- top: 50%;
84
+ top: 50%;
86
85
  }
87
86
 
88
87
  .zcomponent-v-bottom {
89
- bottom: 0px;
88
+ bottom: 0px;
90
89
  }
91
90
 
92
91
  .zcomponent-v-bottom-safe {
93
- bottom: env(safe-area-inset-bottom, 0px);
92
+ bottom: env(safe-area-inset-bottom, 0px);
94
93
  }
95
94
 
96
95
  :xr-overlay .zcomponent-v-top-safe {
97
- top: 45px;
96
+ top: 45px;
98
97
  }
99
98
 
100
99
  .zcomponent-hc-v {
101
- transform: translate(-50%, 0);
100
+ transform: translate(-50%, 0);
102
101
  }
103
102
 
104
103
  .zcomponent-h-vc {
105
- transform: translate(0%, -50%);
104
+ transform: translate(0%, -50%);
106
105
  }
107
106
 
108
107
  .zcomponent-h-v {
109
- transform: translate(0%, 0%);
108
+ transform: translate(0%, 0%);
110
109
  }
111
110
 
112
111
  .zcomponent-hc-vc {
113
- transform: translate(-50%, -50%);
112
+ transform: translate(-50%, -50%);
114
113
  }
115
114
 
116
115
  .zcomponent-textalert-container {
117
- position: absolute;
118
- bottom: 30px;
119
- left: 50%;
120
- transform: translate(-50%, 0);
121
- display: flex;
122
- flex-direction: column;
123
- justify-content: end;
124
- align-items: center;
125
- row-gap: 24px;
126
- max-width: 80%;
116
+ position: absolute;
117
+ bottom: 30px;
118
+ left: 50%;
119
+ transform: translate(-50%, 0);
120
+ display: flex;
121
+ flex-direction: column;
122
+ justify-content: end;
123
+ align-items: center;
124
+ row-gap: 24px;
125
+ max-width: 80%;
127
126
  }
128
127
 
129
128
  .zcomponent-textalert {
130
- transition: opacity 0.5s;
131
- background-color: black;
132
- border-radius: 10px;
133
- padding: 20px;
134
- color: white;
135
- font-family: sans-serif;
136
- opacity: 0;
137
- text-align: center;
129
+ transition: opacity 0.5s;
130
+ background-color: black;
131
+ border-radius: 10px;
132
+ padding: 20px;
133
+ color: white;
134
+ font-family: sans-serif;
135
+ opacity: 0;
136
+ text-align: center;
138
137
  }
139
138
 
140
139
  .zcomponent-textalert-shown {
141
- opacity: 1;
140
+ opacity: 1;
142
141
  }
143
142
 
144
143
  .zcomponent-cookieconsent {
145
- z-index: 10000000;
146
- position: fixed;
147
- top: 0;
148
- left: 0;
149
- width: 100%;
150
- height: 100%;
151
- background: rgba(0, 0, 0, 0.7);
152
- display: flex;
153
- flex-direction: column;
154
- align-items: center;
144
+ z-index: 10000000;
145
+ position: fixed;
146
+ top: 0;
147
+ left: 0;
148
+ width: 100%;
149
+ height: 100%;
150
+ background: rgba(0, 0, 0, 0.7);
151
+ display: flex;
152
+ flex-direction: column;
153
+ align-items: center;
155
154
  }
156
155
 
157
156
  #zcomponent-cookieconsent-panel {
158
- background: white;
159
- border-top-left-radius: 8px;
160
- border-top-right-radius: 8px;
161
- margin-top: auto;
162
- max-width: 500px;
163
- font-family: sans-serif;
164
- padding: 24px;
165
- margin-left: 24px;
166
- margin-right: 24px;
167
- max-height: 80%;
168
- overflow: scroll;
157
+ background: white;
158
+ border-top-left-radius: 8px;
159
+ border-top-right-radius: 8px;
160
+ margin-top: auto;
161
+ max-width: 500px;
162
+ font-family: sans-serif;
163
+ padding: 24px;
164
+ margin-left: 24px;
165
+ margin-right: 24px;
166
+ max-height: 80%;
167
+ overflow: scroll;
169
168
  }
170
169
 
171
170
  #zcomponent-cookieconsent-panel > h1 {
172
- font-size: 24px;
171
+ font-size: 24px;
173
172
  }
174
173
 
175
174
  #zcomponent-cookieconsent-panel button {
176
- padding: 12px 24px;
177
- background: none;
178
- border: 2px solid black;
179
- border-radius: 4px;
180
- color: black;
175
+ padding: 12px 24px;
176
+ background: none;
177
+ border: 2px solid black;
178
+ border-radius: 4px;
179
+ color: black;
181
180
  }
182
181
 
183
182
  #zcomponent-cookieconsent-panel button {
184
- padding: 12px 24px;
185
- background: none;
186
- border: 2px solid black;
187
- border-radius: 4px;
188
- color: black;
189
- display: block;
190
- outline: none;
183
+ padding: 12px 24px;
184
+ background: none;
185
+ border: 2px solid black;
186
+ border-radius: 4px;
187
+ color: black;
188
+ display: block;
189
+ outline: none;
191
190
  }
192
191
 
193
192
  #zcomponent-cookieconsent-panel #zcomponent-cookieconsent-settings {
194
- padding: 0;
195
- border: 0;
196
- background: none;
197
- font-weight: bold;
198
- text-decoration: underline;
199
- padding-top: 12px;
193
+ padding: 0;
194
+ border: 0;
195
+ background: none;
196
+ font-weight: bold;
197
+ text-decoration: underline;
198
+ padding-top: 12px;
200
199
  }
201
200
 
202
201
  .zcomponent-cookieconsent-type {
203
- position: relative;
202
+ position: relative;
204
203
  }
205
204
 
206
205
  .zcomponent-cookieconsent-type input {
207
- float: right;
208
- /* top: 0px; */
209
- /* right: 0px; */
210
- width: 32px;
211
- height: 32px;
206
+ float: right;
207
+ /* top: 0px; */
208
+ /* right: 0px; */
209
+ width: 32px;
210
+ height: 32px;
212
211
  }
213
212
 
214
213
  #zcomponent-cookieconsent-panel h3 {
215
- margin-bottom: 6px;
214
+ margin-bottom: 6px;
216
215
  }
217
216
 
218
217
  #zcomponent-cookieconsent-panel h5 {
219
- margin-bottom: 6px;
218
+ margin-bottom: 6px;
220
219
  }
221
220
 
222
221
  #zcomponent-cookieconsent-panel #zcomponent-cookieconsent-save {
223
- padding-top: 12px;
222
+ padding-top: 12px;
224
223
  }
225
224
 
226
225
  #zcomponent-cookieconsent-panel ul {
227
- list-style-type: none;
226
+ list-style-type: none;
228
227
  }
229
228
 
230
229
  #zcomponent-cookieconsent-privacypolicy {
231
- padding-bottom: 12px;
230
+ padding-bottom: 12px;
232
231
  }
233
232
 
234
233
  :root {
235
- --safe-area-inset-left: env(safe-area-inset-left, 0px);
236
- --safe-area-inset-right: env(safe-area-inset-right, 0px);
237
- --safe-area-inset-top: env(safe-area-inset-top, 0px);
238
- --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
234
+ --safe-area-inset-left: env(safe-area-inset-left, 0px);
235
+ --safe-area-inset-right: env(safe-area-inset-right, 0px);
236
+ --safe-area-inset-top: env(safe-area-inset-top, 0px);
237
+ --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
239
238
  }
240
239
 
241
240
  :xr-overlay {
242
- --safe-area-inset-top: 45px;
243
- }
241
+ --safe-area-inset-top: 45px;
242
+ }
package/index.js CHANGED
@@ -1,4 +1 @@
1
- /* eslint-disable n/no-unsupported-features/es-syntax */
2
- /* eslint-disable n/no-missing-import */
3
-
4
1
  export * from './lib';
@@ -4,13 +4,13 @@ import { ContextManager } from './context';
4
4
  export interface ActionBehaviorConstructorProps {
5
5
  /**
6
6
  * The event to listen to in the node that this behavior is attached to. It should be the full name of the event, e.g. "onClick".
7
- * @zprop
7
+ *
8
8
  * @zvalues events
9
9
  */
10
10
  event: string;
11
11
  /**
12
- * @zprop
13
- * @zdefault false
12
+ *
13
+ * @default false
14
14
  */
15
15
  runAtEditTime: boolean;
16
16
  }
@@ -5,6 +5,7 @@ import { Event } from './event';
5
5
  * Base class for all behaviors that perform an action in response to an event.
6
6
  */
7
7
  export class ActionBehavior extends Behavior {
8
+ constructorProps;
8
9
  /**
9
10
  * Creates an instance of ActionBehavior.
10
11
  * @param contextManager The current ContextManager
@@ -14,26 +15,26 @@ export class ActionBehavior extends Behavior {
14
15
  constructor(contextManager, instance, constructorProps) {
15
16
  super(contextManager, instance);
16
17
  this.constructorProps = constructorProps;
17
- this._updateRegistration = () => {
18
- const evt = this.instance[this.constructorProps.event];
19
- if (evt instanceof Event) {
20
- this.unregister(evt, this._perform);
21
- if (this.enabledResolved.value && (!isEditTime(this.contextManager) || this.constructorProps.runAtEditTime === true)) {
22
- this.register(evt, this._perform);
23
- }
24
- }
25
- };
26
- this._perform = (...args) => {
27
- if (!this.enabledResolved.value)
28
- return;
29
- this.perform(...args);
30
- const e = args[0];
31
- if (e && typeof e === 'object' && typeof e['stopPropagation'] === 'function') {
32
- e['stopPropagation'].call(e);
33
- }
34
- };
35
18
  const env = contextManager.get(EnvironmentContext);
36
19
  this.register(env.editTime, this._updateRegistration, { bindWhenDisabled: true });
37
- this.register(this.enabledResolved, this._updateRegistration, { bindWhenDisabled: true });
20
+ this.observe(this, 'enabledResolved', this._updateRegistration, { bindWhenDisabled: true });
38
21
  }
22
+ _updateRegistration = () => {
23
+ const evt = this.instance[this.constructorProps.event];
24
+ if (evt instanceof Event) {
25
+ this.unregister(evt, this._perform);
26
+ if (this.enabledResolved && (!isEditTime(this.contextManager) || this.constructorProps.runAtEditTime === true)) {
27
+ this.register(evt, this._perform);
28
+ }
29
+ }
30
+ };
31
+ _perform = (...args) => {
32
+ if (!this.enabledResolved)
33
+ return;
34
+ this.perform(...args);
35
+ const e = args[0];
36
+ if (e && typeof e === 'object' && typeof e['stopPropagation'] === 'function') {
37
+ e['stopPropagation'].call(e);
38
+ }
39
+ };
39
40
  }
@@ -1,11 +1,11 @@
1
- import { Layer } from './layer';
2
- import { Observable } from '../observable';
3
1
  import { Event } from '../event';
4
- import { LayerClip } from './layerclip';
5
- import { Clip } from './clips/clip';
2
+ import { Observable } from '../observable';
6
3
  import { AnimationState } from './animationstate';
7
- import { Track } from './tracks/track';
8
4
  import { Bezier } from './bezier';
5
+ import { Clip } from './clips/clip';
6
+ import { Layer } from './layer';
7
+ import { LayerClip } from './layerclip';
8
+ import { Track } from './tracks/track';
9
9
  /** @internal */
10
10
  export declare enum AnimationEvents {
11
11
  onLayerClipNotActive = "onLayerClipNotActive",
@@ -22,6 +22,7 @@ export declare class Animation {
22
22
  private _initialize;
23
23
  /**
24
24
  * @internal
25
+ * @default true
25
26
  */
26
27
  _FIX_SERIALIZE: boolean;
27
28
  /**
@@ -63,6 +64,9 @@ export declare class Animation {
63
64
  * Observable indicating whether there are any layers.
64
65
  */
65
66
  hasLayers: Observable<boolean, never>;
67
+ /**
68
+ * @default []
69
+ */
66
70
  private _layers;
67
71
  private _spotlightLayer?;
68
72
  /**
@@ -71,7 +75,10 @@ export declare class Animation {
71
75
  timeSource: (() => number) | undefined;
72
76
  private _entityPaths;
73
77
  private _defaultValuesByPath;
74
- /** @internal */
78
+ /**
79
+ * @internal
80
+ * @default []
81
+ */
75
82
  _pendingEvents: {
76
83
  evt: AnimationEvents;
77
84
  args: any[];
@@ -1,5 +1,5 @@
1
- import { Observable } from '../observable';
2
1
  import { Event } from '../event';
2
+ import { Observable } from '../observable';
3
3
  import { LayerClip } from './layerclip';
4
4
  /** @internal */
5
5
  export var AnimationEvents;
@@ -15,54 +15,67 @@ export var AnimationEvents;
15
15
  * Ensures proper initialization, disposal, and entity property influence, and emits events based on animation progression.
16
16
  */
17
17
  export class Animation {
18
+ _initialize;
19
+ /**
20
+ * @internal
21
+ * @default true
22
+ */
23
+ _FIX_SERIALIZE = true;
24
+ /**
25
+ * Collection of layers indexed by ID.
26
+ */
27
+ layers = Object.create(null);
28
+ /**
29
+ * Collection of clips indexed by ID.
30
+ */
31
+ clips = Object.create(null);
32
+ curves = Object.create(null);
33
+ onTick = new Event();
34
+ onLayerClipNotActive = new Event();
35
+ onLayerClipActive = new Event();
36
+ onLayerClipState = new Event();
37
+ /**
38
+ * Map for quick access to animation elements by ID.
39
+ */
40
+ clipByID = new Map();
41
+ /**
42
+ * Map for quick access to animation elements by ID.
43
+ */
44
+ layerByID = new Map();
45
+ /**
46
+ * Map for quick access to animation elements by ID.
47
+ */
48
+ layerClipByID = new Map();
49
+ /**
50
+ * Map for quick access to animation elements by ID.
51
+ */
52
+ trackByID = new Map();
53
+ /**
54
+ * Observable indicating whether there are any layers.
55
+ */
56
+ hasLayers = new Observable(false);
57
+ /**
58
+ * @default []
59
+ */
60
+ _layers = [];
61
+ _spotlightLayer;
62
+ /**
63
+ * Source of time for the animation.
64
+ */
65
+ timeSource;
66
+ _entityPaths = new Map();
67
+ _defaultValuesByPath = new Map();
68
+ /**
69
+ * @internal
70
+ * @default []
71
+ */
72
+ _pendingEvents = [];
18
73
  /**
19
74
  * Creates an instance of Animation.
20
75
  * @param _initialize Whether to initialize the animation. Defaults to true.
21
76
  */
22
77
  constructor(_initialize = true) {
23
78
  this._initialize = _initialize;
24
- /**
25
- * @internal
26
- */
27
- this._FIX_SERIALIZE = true;
28
- /**
29
- * Collection of layers indexed by ID.
30
- */
31
- this.layers = Object.create(null);
32
- /**
33
- * Collection of clips indexed by ID.
34
- */
35
- this.clips = Object.create(null);
36
- this.curves = Object.create(null);
37
- this.onTick = new Event();
38
- this.onLayerClipNotActive = new Event();
39
- this.onLayerClipActive = new Event();
40
- this.onLayerClipState = new Event();
41
- /**
42
- * Map for quick access to animation elements by ID.
43
- */
44
- this.clipByID = new Map();
45
- /**
46
- * Map for quick access to animation elements by ID.
47
- */
48
- this.layerByID = new Map();
49
- /**
50
- * Map for quick access to animation elements by ID.
51
- */
52
- this.layerClipByID = new Map();
53
- /**
54
- * Map for quick access to animation elements by ID.
55
- */
56
- this.trackByID = new Map();
57
- /**
58
- * Observable indicating whether there are any layers.
59
- */
60
- this.hasLayers = new Observable(false);
61
- this._layers = [];
62
- this._entityPaths = new Map();
63
- this._defaultValuesByPath = new Map();
64
- /** @internal */
65
- this._pendingEvents = [];
66
79
  }
67
80
  /**
68
81
  * Serializes the current state of the animation.
@@ -4,7 +4,13 @@ export type Easing = keyof typeof predefinedCurve | null | Bezier;
4
4
  * Cass to generate and evaluate multiple Bezier curve segments based on provided control points.
5
5
  */
6
6
  export declare class Bezier {
7
+ /**
8
+ * @default []
9
+ */
7
10
  private _curves;
11
+ /**
12
+ * @default []
13
+ */
8
14
  private _curveEvaluator;
9
15
  /**
10
16
  * Creates an instance of Bezier.
@@ -53,13 +53,19 @@ function BezierFactory(p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) {
53
53
  * Cass to generate and evaluate multiple Bezier curve segments based on provided control points.
54
54
  */
55
55
  export class Bezier {
56
+ /**
57
+ * @default []
58
+ */
59
+ _curves = [];
60
+ /**
61
+ * @default []
62
+ */
63
+ _curveEvaluator = [];
56
64
  /**
57
65
  * Creates an instance of Bezier.
58
66
  * @param curves An array of control points for each Bezier curve segment.
59
67
  */
60
68
  constructor(curves) {
61
- this._curves = [];
62
- this._curveEvaluator = [];
63
69
  this.updateCurves(curves);
64
70
  }
65
71
  /**
@@ -28,11 +28,23 @@ export declare class Clip {
28
28
  * Optional default parameters for fading animation properties.
29
29
  */
30
30
  defaultFadeParameters?: Partial<Data.FadeParameters>;
31
- /** @internal */
31
+ /**
32
+ * @internal
33
+ * @default []
34
+ */
32
35
  _streamTracks: (StreamTrack | ClipTrack | FunctionTrack)[];
36
+ /**
37
+ * @default []
38
+ */
33
39
  private _influencedPaths;
34
40
  private _tracksByPath;
41
+ /**
42
+ * @default false
43
+ */
35
44
  private _tracksByPathDirty;
45
+ /**
46
+ * @default []
47
+ */
36
48
  private _tracks;
37
49
  /**
38
50
  * Creates an instance of Clip.