@3driseai/3drise-core 1.0.18 → 1.0.20

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 (146) hide show
  1. package/dist/animations/index.d.ts +2 -0
  2. package/dist/animations/index.d.ts.map +1 -0
  3. package/dist/animations/index.js +1 -0
  4. package/dist/animations/trackGenerators.d.ts +140 -0
  5. package/dist/animations/trackGenerators.d.ts.map +1 -0
  6. package/dist/animations/trackGenerators.js +443 -0
  7. package/dist/autoAnimate/bounds.d.ts +7 -0
  8. package/dist/autoAnimate/bounds.d.ts.map +1 -0
  9. package/dist/autoAnimate/bounds.js +23 -0
  10. package/dist/autoAnimate/composer.d.ts +30 -0
  11. package/dist/autoAnimate/composer.d.ts.map +1 -0
  12. package/dist/autoAnimate/composer.js +251 -0
  13. package/dist/autoAnimate/describeScene.d.ts +105 -0
  14. package/dist/autoAnimate/describeScene.d.ts.map +1 -0
  15. package/dist/autoAnimate/describeScene.js +165 -0
  16. package/dist/autoAnimate/draft.d.ts +59 -0
  17. package/dist/autoAnimate/draft.d.ts.map +1 -0
  18. package/dist/autoAnimate/draft.js +2 -0
  19. package/dist/autoAnimate/index.d.ts +14 -0
  20. package/dist/autoAnimate/index.d.ts.map +1 -0
  21. package/dist/autoAnimate/index.js +9 -0
  22. package/dist/autoAnimate/recipes.d.ts +87 -0
  23. package/dist/autoAnimate/recipes.d.ts.map +1 -0
  24. package/dist/autoAnimate/recipes.js +224 -0
  25. package/dist/autoAnimate/rng.d.ts +10 -0
  26. package/dist/autoAnimate/rng.d.ts.map +1 -0
  27. package/dist/autoAnimate/rng.js +16 -0
  28. package/dist/autoAnimate/sceneAnalyzer.d.ts +7 -0
  29. package/dist/autoAnimate/sceneAnalyzer.d.ts.map +1 -0
  30. package/dist/autoAnimate/sceneAnalyzer.js +291 -0
  31. package/dist/autoAnimate/types.d.ts +124 -0
  32. package/dist/autoAnimate/types.d.ts.map +1 -0
  33. package/dist/autoAnimate/types.js +1 -0
  34. package/dist/autoAnimate/validator.d.ts +10 -0
  35. package/dist/autoAnimate/validator.d.ts.map +1 -0
  36. package/dist/autoAnimate/validator.js +59 -0
  37. package/dist/data/effectsDefaults.d.ts +4 -0
  38. package/dist/data/effectsDefaults.d.ts.map +1 -1
  39. package/dist/data/effectsDefaults.js +393 -2
  40. package/dist/data/gridsDefaults.d.ts +5 -0
  41. package/dist/data/gridsDefaults.d.ts.map +1 -0
  42. package/dist/data/gridsDefaults.js +290 -0
  43. package/dist/data/index.d.ts +1 -0
  44. package/dist/data/index.d.ts.map +1 -1
  45. package/dist/data/index.js +1 -0
  46. package/dist/data/particlesDefaults.d.ts +3 -1
  47. package/dist/data/particlesDefaults.d.ts.map +1 -1
  48. package/dist/data/particlesDefaults.js +78 -0
  49. package/dist/environment/cloudConfigs.d.ts +313 -0
  50. package/dist/environment/cloudConfigs.d.ts.map +1 -0
  51. package/dist/environment/cloudConfigs.js +342 -0
  52. package/dist/environment/index.d.ts +5 -0
  53. package/dist/environment/index.d.ts.map +1 -0
  54. package/dist/environment/index.js +6 -0
  55. package/dist/environment/landscapeConfigs.d.ts +220 -0
  56. package/dist/environment/landscapeConfigs.d.ts.map +1 -0
  57. package/dist/environment/landscapeConfigs.js +256 -0
  58. package/dist/environment/oceanConfigs.d.ts +293 -0
  59. package/dist/environment/oceanConfigs.d.ts.map +1 -0
  60. package/dist/environment/oceanConfigs.js +380 -0
  61. package/dist/environment/terrainConfigs.d.ts +254 -0
  62. package/dist/environment/terrainConfigs.d.ts.map +1 -0
  63. package/dist/environment/terrainConfigs.js +292 -0
  64. package/dist/index.d.ts +4 -0
  65. package/dist/index.d.ts.map +1 -1
  66. package/dist/index.js +4 -0
  67. package/dist/properties/index.d.ts +4 -0
  68. package/dist/properties/index.d.ts.map +1 -0
  69. package/dist/properties/index.js +3 -0
  70. package/dist/properties/registry.d.ts +44 -0
  71. package/dist/properties/registry.d.ts.map +1 -0
  72. package/dist/properties/registry.js +343 -0
  73. package/dist/properties/tables/effectsProperties.d.ts +40 -0
  74. package/dist/properties/tables/effectsProperties.d.ts.map +1 -0
  75. package/dist/properties/tables/effectsProperties.js +512 -0
  76. package/dist/properties/tables/geometryProperties.d.ts +38 -0
  77. package/dist/properties/tables/geometryProperties.d.ts.map +1 -0
  78. package/dist/properties/tables/geometryProperties.js +91 -0
  79. package/dist/properties/tables/getPropertyConfig.d.ts +3 -0
  80. package/dist/properties/tables/getPropertyConfig.d.ts.map +1 -0
  81. package/dist/properties/tables/getPropertyConfig.js +16 -0
  82. package/dist/properties/tables/gridProperties.d.ts +6 -0
  83. package/dist/properties/tables/gridProperties.d.ts.map +1 -0
  84. package/dist/properties/tables/gridProperties.js +121 -0
  85. package/dist/properties/tables/index.d.ts +9 -0
  86. package/dist/properties/tables/index.d.ts.map +1 -0
  87. package/dist/properties/tables/index.js +8 -0
  88. package/dist/properties/tables/lightProperties.d.ts +14 -0
  89. package/dist/properties/tables/lightProperties.d.ts.map +1 -0
  90. package/dist/properties/tables/lightProperties.js +263 -0
  91. package/dist/properties/tables/materialBounds.d.ts +33 -0
  92. package/dist/properties/tables/materialBounds.d.ts.map +1 -0
  93. package/dist/properties/tables/materialBounds.js +180 -0
  94. package/dist/properties/tables/optionalProperties.d.ts +83 -0
  95. package/dist/properties/tables/optionalProperties.d.ts.map +1 -0
  96. package/dist/properties/tables/optionalProperties.js +710 -0
  97. package/dist/properties/tables/particlesProperties.d.ts +17 -0
  98. package/dist/properties/tables/particlesProperties.d.ts.map +1 -0
  99. package/dist/properties/tables/particlesProperties.js +334 -0
  100. package/dist/properties/types.d.ts +43 -0
  101. package/dist/properties/types.d.ts.map +1 -0
  102. package/dist/properties/types.js +12 -0
  103. package/dist/services/AnimationsManager.d.ts +6 -106
  104. package/dist/services/AnimationsManager.d.ts.map +1 -1
  105. package/dist/services/AnimationsManager.js +5 -391
  106. package/dist/services/SceneActions.d.ts +17 -3
  107. package/dist/services/SceneActions.d.ts.map +1 -1
  108. package/dist/services/SceneActions.js +12 -8
  109. package/dist/services/ShadersLibrary.d.ts +1 -1
  110. package/dist/services/ShadersLibrary.d.ts.map +1 -1
  111. package/dist/services/index.d.ts +1 -2
  112. package/dist/services/index.d.ts.map +1 -1
  113. package/dist/shaders/WallpaperGridMaterial.d.ts.map +1 -1
  114. package/dist/shaders/WallpaperGridMaterial.js +6 -1
  115. package/dist/three/GalleryLayoutV.d.ts.map +1 -1
  116. package/dist/three/GalleryLayoutV.js +0 -10
  117. package/dist/three/SceneBuilderV.d.ts.map +1 -1
  118. package/dist/three/SceneBuilderV.js +1 -7
  119. package/dist/types/actions.d.ts +8 -1
  120. package/dist/types/actions.d.ts.map +1 -1
  121. package/dist/types/actions.js +0 -4
  122. package/dist/types/animations.d.ts +0 -51
  123. package/dist/types/animations.d.ts.map +1 -1
  124. package/dist/types/generativeEffects.d.ts +0 -4
  125. package/dist/types/generativeEffects.d.ts.map +1 -1
  126. package/dist/types/generativeParticles.d.ts +175 -2
  127. package/dist/types/generativeParticles.d.ts.map +1 -1
  128. package/dist/types/objectSettings.d.ts +96 -17
  129. package/dist/types/objectSettings.d.ts.map +1 -1
  130. package/dist/types/scene3d.d.ts +3 -3
  131. package/dist/types/scene3d.d.ts.map +1 -1
  132. package/dist/types/types.d.ts +3 -2
  133. package/dist/types/types.d.ts.map +1 -1
  134. package/dist/utils/generativeAnimatable.d.ts +1 -1
  135. package/dist/utils/generativeAnimatable.d.ts.map +1 -1
  136. package/dist/utils/generativeAnimatable.js +7 -1
  137. package/dist/utils/getAnimatableProperties.d.ts +12 -1
  138. package/dist/utils/getAnimatableProperties.d.ts.map +1 -1
  139. package/dist/utils/getAnimatableProperties.js +35 -138
  140. package/dist/utils/index.d.ts +1 -0
  141. package/dist/utils/index.d.ts.map +1 -1
  142. package/dist/utils/index.js +1 -0
  143. package/dist/utils/objectEffects.d.ts +6 -0
  144. package/dist/utils/objectEffects.d.ts.map +1 -0
  145. package/dist/utils/objectEffects.js +5 -0
  146. package/package.json +1 -1
@@ -1,399 +1,13 @@
1
- import gsap from 'gsap';
2
1
  import { applyEasing, gsapEasingMap } from '../utils/easingUtils.js';
3
2
  /**
4
- * AnimationsManager
5
- * Execution-only manager for animation playback.
6
- * Sequence data lives in Redux - this class only handles execution.
3
+ * AnimationsManager — the path registry (PathCreator, path animation) and the
4
+ * progress helpers per-object animations use.
5
+ *
6
+ * Sequence playback moved to Animations V2 (viewer `animationsV2/ClipsRuntime`);
7
+ * the V1 sequence player, its GSAP timelines and its step events are gone.
7
8
  */
8
9
  class AnimationsManager {
9
- // Runtime state for actively playing sequences
10
- activeSequences = new Map();
11
10
  paths = new Map([]);
12
- timelines = new Map();
13
- eventListeners = new Map();
14
- constructor() {
15
- // Initialize event listener sets
16
- this.eventListeners.set('sequenceStart', new Set());
17
- this.eventListeners.set('sequenceEnd', new Set());
18
- this.eventListeners.set('stepStart', new Set());
19
- this.eventListeners.set('stepEnd', new Set());
20
- }
21
- /**
22
- * Add an event listener
23
- */
24
- on(eventType, listener) {
25
- const listeners = this.eventListeners.get(eventType);
26
- if (listeners) {
27
- listeners.add(listener);
28
- }
29
- }
30
- /**
31
- * Remove an event listener
32
- */
33
- off(eventType, listener) {
34
- const listeners = this.eventListeners.get(eventType);
35
- if (listeners) {
36
- listeners.delete(listener);
37
- }
38
- }
39
- /**
40
- * Emit an event
41
- */
42
- emit(event) {
43
- const listeners = this.eventListeners.get(event.type);
44
- if (listeners) {
45
- listeners.forEach(listener => {
46
- try {
47
- listener(event);
48
- }
49
- catch (error) {
50
- console.error(`Error in animation event listener for ${event.type}:`, error);
51
- }
52
- });
53
- }
54
- }
55
- /**
56
- * @deprecated Sequences are now managed in Redux. Use playSequence(sequence) directly.
57
- * This method is kept for backwards compatibility during migration.
58
- */
59
- addSequence(sequence) {
60
- console.warn('AnimationsManager.addSequence is deprecated. Sequences are managed in Redux.');
61
- // Store for backwards compatibility
62
- this.activeSequences.set(sequence.id, {
63
- ...sequence,
64
- currentStep: 0,
65
- isPlaying: false,
66
- isPaused: false,
67
- progress: 0,
68
- });
69
- return this.activeSequences.get(sequence.id);
70
- }
71
- /**
72
- * @deprecated Sequences are now managed in Redux.
73
- */
74
- removeSequence(sequenceId) {
75
- console.warn('AnimationsManager.removeSequence is deprecated. Sequences are managed in Redux.');
76
- this.stopSequence(sequenceId);
77
- this.activeSequences.delete(sequenceId);
78
- this.timelines.delete(sequenceId);
79
- }
80
- /**
81
- * Get an actively playing sequence's runtime state
82
- */
83
- getSequence(sequenceId) {
84
- return this.activeSequences.get(sequenceId);
85
- }
86
- /**
87
- * @deprecated Sequences are now managed in Redux. Use Redux selectors instead.
88
- */
89
- getAllSequences() {
90
- console.warn('AnimationsManager.getAllSequences is deprecated. Use Redux selectors.');
91
- return Array.from(this.activeSequences.values());
92
- }
93
- // updateSequence(sequenceId: string, updates: Partial<AnimationSequence>): void {
94
- // const sequence = this.sequences.get(sequenceId);
95
- // if (sequence) {
96
- // Object.assign(sequence, updates);
97
- // }
98
- // }
99
- /**
100
- * Execute a single animation step with multiple transitions
101
- * Returns a GSAP timeline for this step
102
- */
103
- executeStep(step, stepTimeline, sequence, stepIndex) {
104
- const { duration, ease = 'power2.out' } = step;
105
- const stagger = step.stagger || 0;
106
- // Total GSAP timeline duration must cover the last staggered transition finishing.
107
- // last object starts at (n-1)*stagger, runs for `duration` seconds.
108
- const totalDuration = duration + (step.transitions.length > 1 ? (step.transitions.length) * stagger : 0);
109
- // Emit step start event with step data
110
- stepTimeline.call(() => {
111
- this.emit({
112
- type: 'stepStart',
113
- sequenceId: sequence.id,
114
- sequence,
115
- step,
116
- stepIndex,
117
- });
118
- }, undefined, 0); // Call at the start of the step timeline
119
- // console.log('Executing step', stepIndex, 'of sequence', sequence.id, 'with duration', duration, 'stagger', stagger, 'totalDuration', totalDuration);
120
- stepTimeline.to({}, { duration: totalDuration, ease: ease });
121
- // Emit step end event
122
- stepTimeline.call(() => {
123
- this.emit({
124
- type: 'stepEnd',
125
- sequenceId: sequence.id,
126
- sequence,
127
- step,
128
- stepIndex,
129
- });
130
- if (step.onComplete) {
131
- step.onComplete();
132
- }
133
- });
134
- }
135
- /**
136
- * Play an animation sequence
137
- * @param sequenceOrId - Either a full AnimationSequence object or a sequence ID (for backwards compat)
138
- * @param options - Playback options
139
- */
140
- async playSequence(sequenceOrId, options = {}) {
141
- // Support both sequence object and ID for backwards compatibility
142
- let sequence;
143
- let originalSequence; // Keep original for yoyo/loop callbacks
144
- let sequenceId;
145
- if (typeof sequenceOrId === 'string') {
146
- // ID passed - look up in activeSequences (backwards compat)
147
- const found = this.activeSequences.get(sequenceOrId);
148
- if (!found) {
149
- console.warn(`Animation sequence with ID ${sequenceOrId} not found. Pass sequence data directly.`);
150
- return;
151
- }
152
- originalSequence = found;
153
- sequence = options.reverse ? this.reverseSteps(found) : found;
154
- sequenceId = sequenceOrId;
155
- }
156
- else {
157
- // Sequence object passed directly (preferred)
158
- originalSequence = sequenceOrId;
159
- sequence = options.reverse ? this.reverseSteps(sequenceOrId) : sequenceOrId;
160
- sequenceId = sequence.id;
161
- }
162
- // console.log('Playing sequence:', sequenceId, options);
163
- // Stop existing timeline if any
164
- this.stopSequence(sequenceId);
165
- // Store in activeSequences for runtime state tracking
166
- const runtimeSequence = {
167
- ...sequence,
168
- isPlaying: true,
169
- isPaused: false,
170
- currentStep: options.startStep || 0,
171
- progress: 0,
172
- };
173
- this.activeSequences.set(sequenceId, runtimeSequence);
174
- // console.log({sequence});
175
- // Create main timeline
176
- // When yoyo is enabled, we handle looping manually via callbacks
177
- // When yoyo is disabled, we can use GSAP's repeat for loop
178
- const useGsapRepeat = originalSequence.loop && !originalSequence.yoyo;
179
- const mainTimeline = gsap.timeline({
180
- paused: false,
181
- repeat: useGsapRepeat ? -1 : 0,
182
- onStart: () => {
183
- // Emit sequence start event
184
- this.emit({
185
- type: 'sequenceStart',
186
- sequenceId,
187
- sequence: runtimeSequence,
188
- });
189
- },
190
- onUpdate: () => {
191
- const progress = mainTimeline.progress();
192
- // console.log(progress);
193
- runtimeSequence.progress = progress;
194
- },
195
- onComplete: () => {
196
- runtimeSequence.isPlaying = false;
197
- runtimeSequence.currentStep = 0;
198
- runtimeSequence.progress = 1;
199
- // Emit sequence end event
200
- this.emit({
201
- type: 'sequenceEnd',
202
- sequenceId,
203
- sequence: runtimeSequence,
204
- });
205
- if (originalSequence.yoyo) {
206
- if (!options._isYoyoReturn) {
207
- // Just finished the first pass, play the return leg (reversed)
208
- this.playSequence(originalSequence, {
209
- ...options,
210
- reverse: true,
211
- _isYoyoReturn: true,
212
- });
213
- }
214
- else if (originalSequence.loop) {
215
- // Finished the return leg and loop is true, start fresh (forward)
216
- this.playSequence(originalSequence, {
217
- ...options,
218
- reverse: false,
219
- _isYoyoReturn: false,
220
- });
221
- }
222
- // If _isYoyoReturn and loop is false, we're done (no replay)
223
- }
224
- if (options.onComplete) {
225
- options.onComplete();
226
- }
227
- },
228
- });
229
- // Add forward steps to timeline
230
- for (let i = 0; i < sequence.steps.length; i++) {
231
- const step = sequence.steps[i];
232
- const delay = step.delay || 0;
233
- // Create a nested timeline for each step
234
- const stepTimeline = gsap.timeline({
235
- onStart: () => {
236
- runtimeSequence.currentStep = i;
237
- }
238
- });
239
- // Execute the step (this will add tweens to stepTimeline and emit events)
240
- this.executeStep(step, stepTimeline, sequence, i);
241
- // Add the step timeline to the main timeline
242
- if (delay > 0) {
243
- mainTimeline.add(stepTimeline, `+=${delay}`);
244
- }
245
- else {
246
- mainTimeline.add(stepTimeline);
247
- }
248
- }
249
- // Apply speed multiplier if provided
250
- if (options.speed !== undefined && options.speed > 0) {
251
- mainTimeline.timeScale(options.speed);
252
- }
253
- this.timelines.set(sequenceId, mainTimeline);
254
- }
255
- /**
256
- * Pause an animation sequence
257
- */
258
- pauseSequence(sequenceId) {
259
- const timeline = this.timelines.get(sequenceId);
260
- const sequence = this.activeSequences.get(sequenceId);
261
- if (timeline && sequence) {
262
- timeline.pause();
263
- sequence.isPaused = true;
264
- sequence.isPlaying = false;
265
- }
266
- }
267
- /**
268
- * Resume a paused animation sequence
269
- */
270
- resumeSequence(sequenceId) {
271
- const timeline = this.timelines.get(sequenceId);
272
- const sequence = this.activeSequences.get(sequenceId);
273
- if (timeline && sequence) {
274
- timeline.resume();
275
- sequence.isPaused = false;
276
- sequence.isPlaying = true;
277
- }
278
- }
279
- /**
280
- * Stop an animation sequence
281
- */
282
- stopSequence(sequenceId) {
283
- const timeline = this.timelines.get(sequenceId);
284
- const sequence = this.activeSequences.get(sequenceId);
285
- if (timeline) {
286
- timeline.kill();
287
- this.timelines.delete(sequenceId);
288
- }
289
- if (sequence) {
290
- sequence.isPlaying = false;
291
- sequence.isPaused = false;
292
- sequence.currentStep = 0;
293
- sequence.progress = 0;
294
- // Clean up from activeSequences when stopped
295
- this.activeSequences.delete(sequenceId);
296
- }
297
- }
298
- /**
299
- * Stop all animation sequences
300
- */
301
- stopAllSequences() {
302
- this.activeSequences.forEach((_, sequenceId) => {
303
- this.stopSequence(sequenceId);
304
- });
305
- }
306
- /**
307
- * @deprecated Use Redux to update sequences. This only affects runtime state.
308
- */
309
- updateSequence(sequenceId, updates) {
310
- console.warn('AnimationsManager.updateSequence is deprecated. Use Redux.');
311
- const sequence = this.activeSequences.get(sequenceId);
312
- if (sequence) {
313
- Object.assign(sequence, updates);
314
- }
315
- }
316
- /**
317
- * Check if a sequence is playing
318
- */
319
- isSequencePlaying(sequenceId) {
320
- const sequence = this.activeSequences.get(sequenceId);
321
- return sequence?.isPlaying || false;
322
- }
323
- /**
324
- * Check if a sequence is paused
325
- */
326
- isSequencePaused(sequenceId) {
327
- const sequence = this.activeSequences.get(sequenceId);
328
- return sequence?.isPaused || false;
329
- }
330
- /**
331
- * Seek to a specific progress point in the animation (0-1)
332
- */
333
- seekToProgress(sequenceId, progress) {
334
- const timeline = this.timelines.get(sequenceId);
335
- const sequence = this.activeSequences.get(sequenceId);
336
- if (timeline && sequence) {
337
- const clampedProgress = Math.max(0, Math.min(1, progress));
338
- timeline.progress(clampedProgress);
339
- sequence.progress = clampedProgress;
340
- }
341
- }
342
- /**
343
- * Go to the start of the animation
344
- */
345
- goToStart(sequenceId) {
346
- this.seekToProgress(sequenceId, 0);
347
- }
348
- /**
349
- * Go to the end of the animation
350
- */
351
- goToEnd(sequenceId) {
352
- this.seekToProgress(sequenceId, 1);
353
- }
354
- /**
355
- * Get the current progress of a sequence (0-1)
356
- */
357
- getProgress(sequenceId) {
358
- const timeline = this.timelines.get(sequenceId);
359
- return timeline?.progress() || 0;
360
- }
361
- /**
362
- * Clear all active sequences and timelines
363
- */
364
- clear() {
365
- this.stopAllSequences();
366
- this.activeSequences.clear();
367
- this.timelines.clear();
368
- }
369
- reverseSteps(sequence) {
370
- // Create a deep copy of the sequence
371
- const reversedSequence = {
372
- ...sequence,
373
- id: sequence.id,
374
- steps: [...sequence.steps].reverse().map(step => {
375
- // Deep copy the step
376
- const reversedStep = {
377
- ...step,
378
- transitions: step.transitions.map(transition => {
379
- // Deep copy the transition
380
- const { properties } = transition;
381
- // Ensure we maintain the correct structure with from and to properties
382
- const reversedProperties = {
383
- from: properties.to || {},
384
- to: properties.from || {},
385
- };
386
- return {
387
- ...transition,
388
- properties: reversedProperties,
389
- };
390
- }),
391
- };
392
- return reversedStep;
393
- }),
394
- };
395
- return reversedSequence;
396
- }
397
11
  /**
398
12
  * Get progress based on start time and duration (uses wall-clock time like GSAP)
399
13
  * @param startTime - The timestamp when animation started (from performance.now() or Date.now())
@@ -1,24 +1,38 @@
1
1
  import type { ActionSequence } from '../types/actions';
2
2
  import { type SettingsPatch } from '../utils/settingsPatch';
3
3
  type Listener = () => void;
4
- export type SceneActionsEvent = {
4
+ export type SceneActionsEvent =
5
+ /** `reapplied`: it was already applied (patches moved to the top). `runEffects`: false for a patch-only preview. */
6
+ {
5
7
  type: 'applied';
6
8
  actionId: string;
9
+ action: ActionSequence;
10
+ reapplied: boolean;
11
+ runEffects: boolean;
7
12
  } | {
8
13
  type: 'reverted';
9
14
  actionId: string;
10
- } | {
15
+ action: ActionSequence;
16
+ }
17
+ /** `actions`: those that were applied until now. */
18
+ | {
11
19
  type: 'reset';
20
+ actions: ActionSequence[];
12
21
  };
22
+ export interface ApplyActionOptions {
23
+ /** Run the action's effects (default true). The editor previews patches only. */
24
+ effects?: boolean;
25
+ }
13
26
  declare class SceneActions {
14
27
  private stacks;
15
28
  private merged;
29
+ /** Applied actions, by id — the definition as it was applied (for revert events). */
16
30
  private applied;
17
31
  private stateListeners;
18
32
  private eventListeners;
19
33
  private version;
20
34
  /** Apply an action. Re-applying moves its patches to the top of each stack. */
21
- applyAction(action: ActionSequence): void;
35
+ applyAction(action: ActionSequence, options?: ApplyActionOptions): void;
22
36
  /** Remove an action's patches from every element it touched. */
23
37
  revertAction(actionOrId: ActionSequence | string): void;
24
38
  /** Apply when not applied, revert when applied. Returns true when it applied. */
@@ -1 +1 @@
1
- {"version":3,"file":"SceneActions.d.ts","sourceRoot":"","sources":["../../src/services/SceneActions.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAA0B,KAAK,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEpF,KAAK,QAAQ,GAAG,MAAM,IAAI,CAAC;AAE3B,MAAM,MAAM,iBAAiB,GACvB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACrC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACtC;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAOxB,cAAM,YAAY;IACd,OAAO,CAAC,MAAM,CAAmC;IACjD,OAAO,CAAC,MAAM,CAAgD;IAC9D,OAAO,CAAC,OAAO,CAAqB;IACpC,OAAO,CAAC,cAAc,CAAoC;IAC1D,OAAO,CAAC,cAAc,CAAiD;IACvE,OAAO,CAAC,OAAO,CAAK;IAEpB,+EAA+E;IAC/E,WAAW,CAAC,MAAM,EAAE,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M,YAAY,cAAqB,CAAC;AACxC,eAAe,YAAY,CAAC"}
@@ -2,12 +2,14 @@ import { composeSettingsPatches } from '../utils/settingsPatch.js';
2
2
  class SceneActions {
3
3
  stacks = new Map();
4
4
  merged = new Map();
5
- applied = new Set();
5
+ /** Applied actions, by id — the definition as it was applied (for revert events). */
6
+ applied = new Map();
6
7
  stateListeners = new Map();
7
8
  eventListeners = new Set();
8
9
  version = 0;
9
10
  /** Apply an action. Re-applying moves its patches to the top of each stack. */
10
- applyAction(action) {
11
+ applyAction(action, options = {}) {
12
+ const reapplied = this.applied.has(action.id);
11
13
  const touched = this.removeEntries(action.id);
12
14
  for (const target of action.targets ?? []) {
13
15
  if (!target?.state || !target.patch || Object.keys(target.patch).length === 0)
@@ -17,17 +19,18 @@ class SceneActions {
17
19
  this.stacks.set(target.state, stack);
18
20
  touched.add(target.state);
19
21
  }
20
- this.applied.add(action.id);
21
- this.commit(touched, { type: 'applied', actionId: action.id });
22
+ this.applied.set(action.id, action);
23
+ this.commit(touched, { type: 'applied', actionId: action.id, action, reapplied, runEffects: options.effects !== false });
22
24
  }
23
25
  /** Remove an action's patches from every element it touched. */
24
26
  revertAction(actionOrId) {
25
27
  const actionId = typeof actionOrId === 'string' ? actionOrId : actionOrId.id;
26
- if (!this.applied.has(actionId))
28
+ const action = this.applied.get(actionId);
29
+ if (!action)
27
30
  return;
28
31
  const touched = this.removeEntries(actionId);
29
32
  this.applied.delete(actionId);
30
- this.commit(touched, { type: 'reverted', actionId });
33
+ this.commit(touched, { type: 'reverted', actionId, action });
31
34
  }
32
35
  /** Apply when not applied, revert when applied. Returns true when it applied. */
33
36
  toggleAction(action) {
@@ -42,14 +45,15 @@ class SceneActions {
42
45
  return this.applied.has(actionId);
43
46
  }
44
47
  getAppliedActionIds() {
45
- return Array.from(this.applied);
48
+ return Array.from(this.applied.keys());
46
49
  }
47
50
  /** Drop every patch (project load, "reset" in the editor). */
48
51
  reset() {
49
52
  const touched = new Set(this.stacks.keys());
53
+ const actions = Array.from(this.applied.values());
50
54
  this.stacks.clear();
51
55
  this.applied.clear();
52
- this.commit(touched, { type: 'reset' });
56
+ this.commit(touched, { type: 'reset', actions });
53
57
  }
54
58
  /** The merged patch for one element — stable identity until it changes. */
55
59
  getPatch(state) {
@@ -1,4 +1,4 @@
1
- import type { OptionalProperty } from "../utils/optionalProperties";
1
+ import type { OptionalProperty } from "../properties/tables/optionalProperties";
2
2
  import type { UniformDefinition } from "../types/types";
3
3
  export type CustomShaderSettings = {
4
4
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ShadersLibrary.d.ts","sourceRoot":"","sources":["../../src/services/ShadersLibrary.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,MAAM,MAAM,oBAAoB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AA+wBhC,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;GAS1B,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,MAAM,MAAM,KAAG,oBAAoB,GAAG;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,CAAC;QACP,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC;QACb,YAAY,EAAE,MAAM,CAAC;KACxB,GAAG;QACA,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC;QACb,YAAY,EAAE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ACxB,GAAG;QACA,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC;QACb,YAAY,EAAE,MAAM,EAAE,CAAC;KAC1B,GAAG;QACA,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC;QACb,YAAY,EAAE,MAAM,CAAC;KACxB,CAAC,EAAE,CAAC;IACL,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CACpB,CAAC,EAEL,CAAC;AACF,eAAO,MAAM,qBAAqB,GAAI,MAAM,MAAM,KAAG,gBAAgB,EAgBpE,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import texturesManager from './TexturesManager';
2
2
  export type { MaterialDefinition, MaterialInstance, MaterialVariant, ShaderSource, UniformInfo, } from './MaterialRegistry';
3
3
  export type { FontInfo } from './FontManager';
4
- export type { AnimationEvent, AnimationEventType } from './AnimationsManager';
5
4
  export type { SkyTimeState, TimeOfDayLabel } from './SkySystemManager';
6
5
  export { MaterialRegistry, default as MaterialRegistryAPI } from './MaterialRegistry';
7
6
  export * from '../utils/MaterialCompiler';
@@ -17,5 +16,5 @@ export { SkySystemManager, skySystemManager } from './SkySystemManager';
17
16
  export { CubeCameraManager, cubeCameraManager } from './CubeCameraManager';
18
17
  export { default as SceneStore } from './SceneStore';
19
18
  export { default as SceneActions } from './SceneActions';
20
- export type { SceneActionsEvent } from './SceneActions';
19
+ export type { SceneActionsEvent, ApplyActionOptions } from './SceneActions';
21
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,eAAe,EAAE,YAAY,EAAE,WAAW,GAAG,MAAM,oBAAoB,CAA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E,YAAY,CAAC;IACnB,uCAAuC;IACvC,IAAI,EAAE,YAAY,CAAC;IACnB,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,4CAA4C;IAC5C,QAAQ,EAAE,YAAY,CAAC;IACvB,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,KAAK,EAAE,YAAY,CAAC;IACpB,qDAAqD;IACrD,MAAM,EAAE,YAAY,CAAC;IACrB,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,OAAO,QAAQ,oBAAoB,CAAC;IAChC,UAAU,aAAa;QACnB,qBAAqB,EAAE,aAAa,CAAC,gBAAgB,CAAC,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAAC;KACnG;CACJ;AAED,eAAO,MAAM,6BAA6B,EAAE,6BA8C3C,CAAC;AAwVF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkDjC,CAAC"}
@@ -68,7 +68,12 @@ const vertex = /* glsl */ `
68
68
  return fract(p.x * p.y);
69
69
  }
70
70
 
71
-
71
+ // Farris' recipe: a lattice-periodic motif m(q) summed over the coset
72
+ // representatives g of a wallpaper group, F(p) = sum_g m(g.q), q = B^-1 p.
73
+ // For any h in the group, {g h} runs over the same cosets, and m ignores
74
+ // lattice translations, so F(h.p) = F(p) exactly: the picture has precisely
75
+ // the group's mirrors, glides and rotation centres, and tiles seamlessly.
76
+ // Level sets of F are the lines; its value bands are the cells.
72
77
  uniform vec2 u_wave[6];
73
78
  uniform mat2 u_RA[12];
74
79
  uniform vec2 u_TA[12];
@@ -1 +1 @@
1
- {"version":3,"file":"GalleryLayoutV.d.ts","sourceRoot":"","sources":["../../src/three/GalleryLayoutV.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK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C;gBACJ,MAAM,EAAE,KAAK,CAAC,QAAQ,EAAE,aAAa,EAAE,qBAAqB,EAAE,OAAO,GAAE,qBAA0B;IAQ7G,OAAO,CAAC,KAAK;IA0Bb,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,GAAE,MAAc,GAAG,IAAI;IAGpD,mBAAmB,CAAC,aAAa,EAAE,qBAAqB,GAAG,IAAI;IAK/D,OAAO,CAAC,eAAe,GAAE,OAAc,GAAG,IAAI;CAWjD"}
@@ -2,7 +2,6 @@ import * as THREE from 'three';
2
2
  import { updateCurrentLayoutSettings } from '../utils/galleriesUtils.js';
3
3
  import { FrameV } from './FrameV.js';
4
4
  import { ImageGeometryV } from './ImageGeometryV.js';
5
- import { EffectsGeneratorV } from './EffectsGeneratorV.js';
6
5
  export class GalleryLayoutV {
7
6
  parent;
8
7
  group;
@@ -44,15 +43,6 @@ export class GalleryLayoutV {
44
43
  this.imageGeos.push(ig);
45
44
  }
46
45
  }
47
- if (this.createdObject.effects) {
48
- for (const effectSettings of this.createdObject.effects) {
49
- if (effectSettings.enabled) {
50
- const fxParent = new THREE.Group();
51
- this.group.add(fxParent);
52
- this.effects.push(new EffectsGeneratorV(fxParent, effectSettings));
53
- }
54
- }
55
- }
56
46
  }
57
47
  update(elapsed, delta = 0.016) {
58
48
  this.effects.forEach(fx => fx.update(elapsed, delta));
@@ -1 +1 @@
1
- {"version":3,"file":"SceneBuilderV.d.ts","sourceRoot":"","sources":["../../src/three/SceneBuilderV.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAUvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,MAAM,WAAW,oBAAoB;IACjC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC9B;AAGD,qBAAa,aAAa;IACtB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAA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AAC,kBAAkB,CAAQ;IAClC,OAAO,CAAC,UAAU,CAAM;IACxB,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,cAAc,CAAQ;IAC9B,OAAO,CAAC,KAAK,CAAqB;gBACtB,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,GAAE,oBAAyB;IAuG5F,OAAO,CAAC,SAAS;IAuBjB,OAAO,CAAC,WAAW;IA8EnB,OAAO,CAAC,OAAO;IASf,OAAO,CAAC,YAAY;IASpB,OAAO,IAAI,IAAI;CAWlB"}
@@ -144,13 +144,7 @@ export class SceneBuilderV {
144
144
  if (createdObject.type !== 'group') {
145
145
  this.buildObject(createdObject, group);
146
146
  }
147
- // Per-object effects — EffectsGeneratorV needs the scene as parent
148
- if (createdObject.effects?.length) {
149
- createdObject.effects.forEach((effect) => {
150
- // const fx = new EffectsGeneratorV(this.scene, effect);
151
- // this.updatables.push(fx as unknown as Updatable);
152
- });
153
- }
147
+ // Object effects (createdObject.effects) run on the viewer's operations runtime — not in the vanilla build.
154
148
  children.forEach((child) => this.buildNode(child, group));
155
149
  }
156
150
  buildObject(obj, parent) {
@@ -1,3 +1,4 @@
1
+ import type { OperationEffect } from './objectSettings';
1
2
  /**
2
3
  * Action Types
3
4
  * Defines the structure for UI actions that can trigger animations, toggle elements, or load projects
@@ -28,7 +29,7 @@ export type ActionsSet = {
28
29
  };
29
30
  /**
30
31
  * One element an action changes: `state` addresses it (a scene object id, or one of
31
- * 'camera' | 'sky' | 'ocean' | 'clouds'), and `patch` is a deep partial of that
32
+ * 'camera' | 'sky' | 'ocean' | 'clouds' | 'terrain'), and `patch` is a deep partial of that
32
33
  * element's own settings — `{ materialSettings: { materialVariant: 'Glass' } }`,
33
34
  * `{ config: { intensity: 4 } }`, `{ meshSettings: { position: [0, 2, 0] } }`.
34
35
  */
@@ -54,6 +55,12 @@ export interface ActionSequence {
54
55
  key?: string;
55
56
  description?: string;
56
57
  targets: ActionTarget[];
58
+ /**
59
+ * Operations run when the action is applied, undone when it is reverted
60
+ * (glow, fade, zoom to…). Patches change what elements ARE; effects are what
61
+ * HAPPENS to objects. Patches are applied first.
62
+ */
63
+ effects?: OperationEffect[];
57
64
  assetId?: string | null;
58
65
  /** Runtime only */
59
66
  isDirty?: boolean;