@soonspacejs/plugin-flow 2.14.2 → 2.14.4
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.
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { Object3D } from 'three';
|
|
2
1
|
import { FlowParser } from '../FlowParser';
|
|
3
2
|
import { NodeGlobalType, NodeType } from '../types';
|
|
4
3
|
import { Node } from './Node';
|
|
5
4
|
declare class EmissiveNode extends Node {
|
|
6
5
|
constructor(parser: FlowParser, node: NodeType);
|
|
7
|
-
filterEmissiveObject(objectsValue: Object3D[] | Object3D): Object3D<import('three').Object3DEventMap>[];
|
|
8
6
|
exec(global: NodeGlobalType): Promise<void>;
|
|
9
7
|
}
|
|
10
8
|
export { EmissiveNode, };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { Object3D } from 'three';
|
|
2
1
|
import { FlowParser } from '../FlowParser';
|
|
3
2
|
import { NodeGlobalType, NodeType } from '../types';
|
|
4
3
|
import { Node } from './Node';
|
|
5
4
|
declare class HighlightNode extends Node {
|
|
6
5
|
constructor(parser: FlowParser, node: NodeType);
|
|
7
|
-
filterHighlightObject(objectsValue: Object3D[] | Object3D): Object3D<import('three').Object3DEventMap>[];
|
|
8
6
|
exec(global: NodeGlobalType): Promise<void>;
|
|
9
7
|
}
|
|
10
8
|
export { HighlightNode, };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { Object3D } from 'three';
|
|
2
1
|
import { FlowParser } from '../FlowParser';
|
|
3
2
|
import { NodeGlobalType, NodeType } from '../types';
|
|
4
3
|
import { Node } from './Node';
|
|
5
4
|
declare class OpacityNode extends Node {
|
|
6
5
|
constructor(parser: FlowParser, node: NodeType);
|
|
7
|
-
filterOpacityObject(objectsValue: Object3D[] | Object3D): Object3D<import('three').Object3DEventMap>[];
|
|
8
6
|
exec(global: NodeGlobalType): Promise<void>;
|
|
9
7
|
}
|
|
10
8
|
export { OpacityNode, };
|
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Vector3 as
|
|
1
|
+
import { Vector3 as I, Euler as D, EventDispatcher as z } from "three";
|
|
2
2
|
import T from "soonspacejs";
|
|
3
3
|
import { AnimationPlayer as k } from "umanager-animation-parser";
|
|
4
4
|
import { InteractionType as L, InteractionObsType as j, FlowParser as Y, InteractionAction as $ } from "@soonspacejs/plugin-flow";
|
|
@@ -167,38 +167,38 @@ class tt extends f {
|
|
|
167
167
|
t && s && this.writeContext(l(s.value), l(t.value));
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
-
const { objectHandle:
|
|
171
|
-
class
|
|
170
|
+
const { objectHandle: ss } = T.utils;
|
|
171
|
+
class st extends f {
|
|
172
172
|
constructor(t, s) {
|
|
173
173
|
super(t, s);
|
|
174
174
|
}
|
|
175
|
-
filterHighlightObject(
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
}
|
|
175
|
+
// filterHighlightObject ( objectsValue: Object3D[] | Object3D ) {
|
|
176
|
+
// const objects: Object3D[] = []
|
|
177
|
+
// objectHandle( objectsValue, obj => {
|
|
178
|
+
// if ( !this.ssp.viewport.scener.selectedObjects.highlight.has( obj ) ) {
|
|
179
|
+
// objects.push( obj )
|
|
180
|
+
// }
|
|
181
|
+
// } )
|
|
182
|
+
// return objects
|
|
183
|
+
// }
|
|
181
184
|
async exec(t) {
|
|
182
185
|
const s = this.findProp("objects", [n.READ_CTX, n.LOCAL]), i = this.findProp("color", [n.READ_CTX, n.LOCAL]), o = this.findProp("opacity", [n.READ_CTX, n.LOCAL]), a = await t.getTarget?.(this);
|
|
183
186
|
if (s && i && o) {
|
|
184
187
|
const c = this.getValue(s, a), h = this.getValue(i), u = this.getValue(o);
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
this.ssp.unHighlightShow(d);
|
|
189
|
-
});
|
|
190
|
-
}
|
|
188
|
+
c && (this.ssp.highlightShow(c, { color: h, opacity: u }), this.cleanSets.add(() => {
|
|
189
|
+
this.ssp.unHighlightShow(c);
|
|
190
|
+
}));
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
const { objectHandle:
|
|
195
|
-
class
|
|
194
|
+
const { objectHandle: et } = T.utils;
|
|
195
|
+
class it extends f {
|
|
196
196
|
constructor(t, s) {
|
|
197
197
|
super(t, s);
|
|
198
198
|
}
|
|
199
199
|
filterUnHighlightObject(t) {
|
|
200
200
|
const s = [];
|
|
201
|
-
return
|
|
201
|
+
return et(t, (i) => {
|
|
202
202
|
this.ssp.viewport.scener.selectedObjects.highlight.has(i) && s.push(i);
|
|
203
203
|
}), s;
|
|
204
204
|
}
|
|
@@ -208,45 +208,46 @@ class ot extends f {
|
|
|
208
208
|
const o = this.getValue(s, i);
|
|
209
209
|
if (o) {
|
|
210
210
|
const a = this.filterUnHighlightObject(o);
|
|
211
|
-
this.ssp.unHighlightShow(a)
|
|
212
|
-
this.ssp.highlightShow(a);
|
|
213
|
-
});
|
|
211
|
+
this.ssp.unHighlightShow(a);
|
|
214
212
|
}
|
|
215
213
|
}
|
|
216
214
|
}
|
|
217
215
|
}
|
|
218
|
-
const { objectHandle:
|
|
219
|
-
class
|
|
216
|
+
const { objectHandle: ot } = T.utils;
|
|
217
|
+
class nt extends f {
|
|
220
218
|
constructor(t, s) {
|
|
221
219
|
super(t, s);
|
|
222
220
|
}
|
|
223
|
-
filterOpacityObject(
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
}
|
|
221
|
+
// filterOpacityObject ( objectsValue: Object3D[] | Object3D ) {
|
|
222
|
+
// const objects: Object3D[] = []
|
|
223
|
+
// objectHandle( objectsValue, obj => {
|
|
224
|
+
// if ( !this.ssp.viewport.scener.selectedObjects.opacity.has( obj ) ) {
|
|
225
|
+
// objects.push( obj )
|
|
226
|
+
// }
|
|
227
|
+
// } )
|
|
228
|
+
// return objects
|
|
229
|
+
// }
|
|
229
230
|
async exec(t) {
|
|
230
231
|
const s = this.findProp("objects", [n.READ_CTX, n.LOCAL]), i = this.findProp("color", [n.READ_CTX, n.LOCAL]), o = this.findProp("opacity", [n.READ_CTX, n.LOCAL]), a = await t.getTarget?.(this);
|
|
231
232
|
if (s && i && o) {
|
|
232
233
|
const c = this.getValue(s, a), h = this.getValue(i), u = this.getValue(o);
|
|
233
234
|
if (c) {
|
|
234
|
-
const
|
|
235
|
-
this.ssp.opacityShow(
|
|
236
|
-
this.ssp.unOpacityShow(
|
|
235
|
+
const C = ot(c, (d) => d);
|
|
236
|
+
this.ssp.opacityShow(C, { color: h, opacity: u }), this.cleanSets.add(() => {
|
|
237
|
+
this.ssp.unOpacityShow(C);
|
|
237
238
|
});
|
|
238
239
|
}
|
|
239
240
|
}
|
|
240
241
|
}
|
|
241
242
|
}
|
|
242
|
-
const { objectHandle:
|
|
243
|
-
class
|
|
243
|
+
const { objectHandle: at } = T.utils;
|
|
244
|
+
class ct extends f {
|
|
244
245
|
constructor(t, s) {
|
|
245
246
|
super(t, s);
|
|
246
247
|
}
|
|
247
248
|
filterUnOpacityObject(t) {
|
|
248
249
|
const s = [];
|
|
249
|
-
return
|
|
250
|
+
return at(t, (i) => {
|
|
250
251
|
this.ssp.viewport.scener.selectedObjects.opacity.has(i) && s.push(i);
|
|
251
252
|
}), s;
|
|
252
253
|
}
|
|
@@ -256,51 +257,49 @@ class rt extends f {
|
|
|
256
257
|
const o = this.getValue(s, i);
|
|
257
258
|
if (o) {
|
|
258
259
|
const a = this.filterUnOpacityObject(o);
|
|
259
|
-
this.ssp.unOpacityShow(a)
|
|
260
|
-
this.ssp.opacityShow(a);
|
|
261
|
-
});
|
|
260
|
+
this.ssp.unOpacityShow(a);
|
|
262
261
|
}
|
|
263
262
|
}
|
|
264
263
|
}
|
|
265
264
|
}
|
|
266
|
-
const { objectHandle:
|
|
267
|
-
class
|
|
265
|
+
const { objectHandle: es } = T.utils;
|
|
266
|
+
class rt extends f {
|
|
268
267
|
constructor(t, s) {
|
|
269
268
|
super(t, s);
|
|
270
269
|
}
|
|
271
|
-
filterEmissiveObject(
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
}
|
|
270
|
+
// filterEmissiveObject ( objectsValue: Object3D[] | Object3D ) {
|
|
271
|
+
// const objects: Object3D[] = []
|
|
272
|
+
// objectHandle( objectsValue, obj => {
|
|
273
|
+
// if ( !this.ssp.viewport.scener.selectedObjects.emissive.has( obj ) ) {
|
|
274
|
+
// objects.push( obj )
|
|
275
|
+
// }
|
|
276
|
+
// } )
|
|
277
|
+
// return objects
|
|
278
|
+
// }
|
|
277
279
|
async exec(t) {
|
|
278
280
|
const s = this.findProp("objects", [n.READ_CTX, n.LOCAL]), i = this.findProp("color", [n.READ_CTX, n.LOCAL]), o = this.findProp("baseColor", [n.READ_CTX, n.LOCAL]), a = this.findProp("minOpacity", [n.READ_CTX, n.LOCAL]), c = this.findProp("maxOpacity", [n.READ_CTX, n.LOCAL]), h = this.findProp("duration", [n.READ_CTX, n.LOCAL]), u = await t.getTarget?.(this);
|
|
279
281
|
if (s && i && o && a && c && h) {
|
|
280
|
-
const
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
this.ssp.unEmissiveShow(A);
|
|
291
|
-
});
|
|
292
|
-
}
|
|
282
|
+
const C = this.getValue(s, u), d = this.getValue(i), P = this.getValue(o), x = this.getValue(a), p = this.getValue(c), A = this.getValue(h);
|
|
283
|
+
C && (this.ssp.emissiveShow(C, {
|
|
284
|
+
color: d,
|
|
285
|
+
baseColor: P,
|
|
286
|
+
minOpacity: x,
|
|
287
|
+
maxOpacity: p,
|
|
288
|
+
duration: A
|
|
289
|
+
}), this.cleanSets.add(() => {
|
|
290
|
+
this.ssp.unEmissiveShow(C);
|
|
291
|
+
}));
|
|
293
292
|
}
|
|
294
293
|
}
|
|
295
294
|
}
|
|
296
|
-
const { objectHandle:
|
|
297
|
-
class
|
|
295
|
+
const { objectHandle: lt } = T.utils;
|
|
296
|
+
class ht extends f {
|
|
298
297
|
constructor(t, s) {
|
|
299
298
|
super(t, s);
|
|
300
299
|
}
|
|
301
300
|
filterUnEmissiveObject(t) {
|
|
302
301
|
const s = [];
|
|
303
|
-
return
|
|
302
|
+
return lt(t, (i) => {
|
|
304
303
|
this.ssp.viewport.scener.selectedObjects.emissive.has(i) && s.push(i);
|
|
305
304
|
}), s;
|
|
306
305
|
}
|
|
@@ -310,15 +309,13 @@ class dt extends f {
|
|
|
310
309
|
const o = this.getValue(s, i);
|
|
311
310
|
if (o) {
|
|
312
311
|
const a = this.filterUnEmissiveObject(o);
|
|
313
|
-
this.ssp.unEmissiveShow(a)
|
|
314
|
-
this.ssp.emissiveShow(a);
|
|
315
|
-
});
|
|
312
|
+
this.ssp.unEmissiveShow(a);
|
|
316
313
|
}
|
|
317
314
|
}
|
|
318
315
|
}
|
|
319
316
|
}
|
|
320
317
|
const y = Symbol("meshCache");
|
|
321
|
-
class
|
|
318
|
+
class ut extends f {
|
|
322
319
|
constructor(t, s) {
|
|
323
320
|
super(t, s);
|
|
324
321
|
}
|
|
@@ -328,18 +325,18 @@ class pt extends f {
|
|
|
328
325
|
const o = this.findProp("mesh", n.LOCAL), a = this.findProp("out", n.WRITE_CTX);
|
|
329
326
|
if (o && a) {
|
|
330
327
|
let c = null;
|
|
331
|
-
const h = l(o.value), u = l(a.value),
|
|
332
|
-
if (
|
|
333
|
-
c =
|
|
328
|
+
const h = l(o.value), u = l(a.value), C = t[y][h];
|
|
329
|
+
if (C) {
|
|
330
|
+
c = C;
|
|
334
331
|
return;
|
|
335
332
|
}
|
|
336
|
-
const
|
|
337
|
-
|
|
333
|
+
const d = _(i, h);
|
|
334
|
+
d && (c = d, t[y][h] = d), this.writeContext(u, c);
|
|
338
335
|
}
|
|
339
336
|
}
|
|
340
337
|
}
|
|
341
338
|
const M = Symbol("meshesCache");
|
|
342
|
-
class
|
|
339
|
+
class dt extends f {
|
|
343
340
|
constructor(t, s) {
|
|
344
341
|
super(t, s);
|
|
345
342
|
}
|
|
@@ -349,19 +346,19 @@ class ft extends f {
|
|
|
349
346
|
const o = this.findProp("meshes", n.LOCAL), a = this.findProp("out", n.WRITE_CTX);
|
|
350
347
|
if (o && a) {
|
|
351
348
|
const c = [], h = l(o.value), u = l(a.value);
|
|
352
|
-
h.forEach((
|
|
353
|
-
const
|
|
354
|
-
if (
|
|
355
|
-
c.push(
|
|
349
|
+
h.forEach((C) => {
|
|
350
|
+
const d = t[M][C];
|
|
351
|
+
if (d) {
|
|
352
|
+
c.push(d);
|
|
356
353
|
return;
|
|
357
354
|
}
|
|
358
|
-
const P = _(i,
|
|
359
|
-
P && (c.push(P), t[M][
|
|
355
|
+
const P = _(i, C);
|
|
356
|
+
P && (c.push(P), t[M][C] = P);
|
|
360
357
|
}), this.writeContext(u, c);
|
|
361
358
|
}
|
|
362
359
|
}
|
|
363
360
|
}
|
|
364
|
-
class
|
|
361
|
+
class pt extends f {
|
|
365
362
|
constructor(t, s) {
|
|
366
363
|
super(t, s);
|
|
367
364
|
}
|
|
@@ -373,7 +370,7 @@ class Ct extends f {
|
|
|
373
370
|
}
|
|
374
371
|
}
|
|
375
372
|
}
|
|
376
|
-
class
|
|
373
|
+
class ft extends f {
|
|
377
374
|
constructor(t, s) {
|
|
378
375
|
super(t, s);
|
|
379
376
|
}
|
|
@@ -381,11 +378,11 @@ class Ot extends f {
|
|
|
381
378
|
const t = this.findProp("models", n.LOCAL), s = this.findProp("out", n.WRITE_CTX);
|
|
382
379
|
if (t && s) {
|
|
383
380
|
const i = l(t.value), o = l(s.value);
|
|
384
|
-
this.writeContext(o,
|
|
381
|
+
this.writeContext(o, kt(this.ssp, i));
|
|
385
382
|
}
|
|
386
383
|
}
|
|
387
384
|
}
|
|
388
|
-
class
|
|
385
|
+
class Ct extends f {
|
|
389
386
|
constructor(t, s) {
|
|
390
387
|
super(t, s);
|
|
391
388
|
}
|
|
@@ -397,7 +394,7 @@ class At extends f {
|
|
|
397
394
|
}
|
|
398
395
|
}
|
|
399
396
|
}
|
|
400
|
-
class
|
|
397
|
+
class At extends f {
|
|
401
398
|
constructor(t, s) {
|
|
402
399
|
super(t, s);
|
|
403
400
|
}
|
|
@@ -421,7 +418,7 @@ class gt extends f {
|
|
|
421
418
|
}
|
|
422
419
|
}
|
|
423
420
|
const { objectHandle: X } = T.utils;
|
|
424
|
-
class
|
|
421
|
+
class Ot extends f {
|
|
425
422
|
constructor(t, s) {
|
|
426
423
|
super(t, s);
|
|
427
424
|
}
|
|
@@ -447,7 +444,7 @@ class Pt extends f {
|
|
|
447
444
|
}
|
|
448
445
|
}
|
|
449
446
|
const { objectHandle: U } = T.utils;
|
|
450
|
-
class
|
|
447
|
+
class gt extends f {
|
|
451
448
|
constructor(t, s) {
|
|
452
449
|
super(t, s);
|
|
453
450
|
}
|
|
@@ -472,8 +469,8 @@ class Tt extends f {
|
|
|
472
469
|
}
|
|
473
470
|
}
|
|
474
471
|
}
|
|
475
|
-
const { objectHandle:
|
|
476
|
-
class
|
|
472
|
+
const { objectHandle: S } = T.utils;
|
|
473
|
+
class Pt extends f {
|
|
477
474
|
constructor(t, s) {
|
|
478
475
|
super(t, s);
|
|
479
476
|
}
|
|
@@ -482,43 +479,43 @@ class Et extends f {
|
|
|
482
479
|
if (s && i && o) {
|
|
483
480
|
const c = this.getValue(s, a), h = this.getValue(i), u = this.getValue(o);
|
|
484
481
|
if (c) {
|
|
485
|
-
const
|
|
486
|
-
|
|
487
|
-
|
|
482
|
+
const C = [];
|
|
483
|
+
S(c, (p) => {
|
|
484
|
+
C.push(p.position.clone());
|
|
488
485
|
});
|
|
489
|
-
const P = (p,
|
|
486
|
+
const P = (p, A) => {
|
|
490
487
|
switch (h) {
|
|
491
488
|
case "x":
|
|
492
|
-
p.setX(
|
|
489
|
+
p.setX(A.x);
|
|
493
490
|
break;
|
|
494
491
|
case "y":
|
|
495
|
-
p.setY(
|
|
492
|
+
p.setY(A.y);
|
|
496
493
|
break;
|
|
497
494
|
case "z":
|
|
498
|
-
p.setZ(
|
|
495
|
+
p.setZ(A.z);
|
|
499
496
|
break;
|
|
500
497
|
}
|
|
501
498
|
};
|
|
502
499
|
await (async () => {
|
|
503
|
-
const p =
|
|
504
|
-
const
|
|
500
|
+
const p = S(c, async (A) => {
|
|
501
|
+
const O = A.position.clone();
|
|
505
502
|
switch (h) {
|
|
506
503
|
case "x":
|
|
507
|
-
await this.ssp.animation(
|
|
504
|
+
await this.ssp.animation(O, new I().set(O.x + u, O.y, O.z), { duration: 800 }, (g) => P(A.position, g));
|
|
508
505
|
break;
|
|
509
506
|
case "y":
|
|
510
|
-
await this.ssp.animation(
|
|
507
|
+
await this.ssp.animation(O, new I().set(O.x, O.y + u, O.z), { duration: 800 }, (g) => P(A.position, g));
|
|
511
508
|
break;
|
|
512
509
|
case "z":
|
|
513
|
-
await this.ssp.animation(
|
|
510
|
+
await this.ssp.animation(O, new I().set(O.x, O.y, O.z + u), { duration: 800 }, (g) => P(A.position, g));
|
|
514
511
|
break;
|
|
515
512
|
}
|
|
516
513
|
});
|
|
517
514
|
p instanceof Array ? await Promise.all(p) : await p, this.ssp.render();
|
|
518
515
|
})(), this.cleanSets.add(() => {
|
|
519
516
|
let p = 0;
|
|
520
|
-
|
|
521
|
-
|
|
517
|
+
S(c, (A) => {
|
|
518
|
+
A.position.copy(C[p++]);
|
|
522
519
|
});
|
|
523
520
|
});
|
|
524
521
|
}
|
|
@@ -526,7 +523,7 @@ class Et extends f {
|
|
|
526
523
|
}
|
|
527
524
|
}
|
|
528
525
|
const { objectHandle: v } = T.utils;
|
|
529
|
-
class
|
|
526
|
+
class Tt extends f {
|
|
530
527
|
constructor(t, s) {
|
|
531
528
|
super(t, s);
|
|
532
529
|
}
|
|
@@ -535,51 +532,51 @@ class wt extends f {
|
|
|
535
532
|
if (s && i && o) {
|
|
536
533
|
const c = this.getValue(s, a), h = this.getValue(i), u = this.getValue(o);
|
|
537
534
|
if (c) {
|
|
538
|
-
const
|
|
535
|
+
const C = [];
|
|
539
536
|
v(c, (p) => {
|
|
540
|
-
|
|
537
|
+
C.push(p.scale.clone());
|
|
541
538
|
});
|
|
542
|
-
const P = (p,
|
|
539
|
+
const P = (p, A) => {
|
|
543
540
|
switch (h) {
|
|
544
541
|
case "x":
|
|
545
|
-
p.setX(
|
|
542
|
+
p.setX(A.x);
|
|
546
543
|
break;
|
|
547
544
|
case "y":
|
|
548
|
-
p.setY(
|
|
545
|
+
p.setY(A.y);
|
|
549
546
|
break;
|
|
550
547
|
case "z":
|
|
551
|
-
p.setZ(
|
|
548
|
+
p.setZ(A.z);
|
|
552
549
|
break;
|
|
553
550
|
}
|
|
554
551
|
};
|
|
555
552
|
await (async () => {
|
|
556
|
-
const p = v(c, async (
|
|
557
|
-
const
|
|
553
|
+
const p = v(c, async (A) => {
|
|
554
|
+
const O = A.scale.clone();
|
|
558
555
|
switch (h) {
|
|
559
556
|
case "x":
|
|
560
|
-
await this.ssp.animation(
|
|
557
|
+
await this.ssp.animation(O, new I().set(O.x * u, O.y, O.z), { duration: 800 }, (g) => P(A.scale, g));
|
|
561
558
|
break;
|
|
562
559
|
case "y":
|
|
563
|
-
await this.ssp.animation(
|
|
560
|
+
await this.ssp.animation(O, new I().set(O.x, O.y * u, O.z), { duration: 800 }, (g) => P(A.scale, g));
|
|
564
561
|
break;
|
|
565
562
|
case "z":
|
|
566
|
-
await this.ssp.animation(
|
|
563
|
+
await this.ssp.animation(O, new I().set(O.x, O.y, O.z * u), { duration: 800 }, (g) => P(A.scale, g));
|
|
567
564
|
break;
|
|
568
565
|
}
|
|
569
566
|
});
|
|
570
567
|
p instanceof Array ? await Promise.all(p) : await p, this.ssp.render();
|
|
571
568
|
})(), this.cleanSets.add(() => {
|
|
572
569
|
let p = 0;
|
|
573
|
-
v(c, (
|
|
574
|
-
|
|
570
|
+
v(c, (A) => {
|
|
571
|
+
A.scale.copy(C[p++]);
|
|
575
572
|
});
|
|
576
573
|
});
|
|
577
574
|
}
|
|
578
575
|
}
|
|
579
576
|
}
|
|
580
577
|
}
|
|
581
|
-
const { objectHandle:
|
|
582
|
-
class
|
|
578
|
+
const { objectHandle: V } = T.utils;
|
|
579
|
+
class Et extends f {
|
|
583
580
|
constructor(t, s) {
|
|
584
581
|
super(t, s);
|
|
585
582
|
}
|
|
@@ -588,50 +585,50 @@ class Lt extends f {
|
|
|
588
585
|
if (s && i && o) {
|
|
589
586
|
const c = this.getValue(s, a), h = this.getValue(i), u = this.getValue(o);
|
|
590
587
|
if (c) {
|
|
591
|
-
const
|
|
592
|
-
|
|
593
|
-
|
|
588
|
+
const C = [];
|
|
589
|
+
V(c, (p) => {
|
|
590
|
+
C.push(p.rotation.clone());
|
|
594
591
|
});
|
|
595
|
-
const P = (p,
|
|
592
|
+
const P = (p, A) => {
|
|
596
593
|
switch (h) {
|
|
597
594
|
case "x":
|
|
598
|
-
p.x =
|
|
595
|
+
p.x = A.x;
|
|
599
596
|
break;
|
|
600
597
|
case "y":
|
|
601
|
-
p.y =
|
|
598
|
+
p.y = A.y;
|
|
602
599
|
break;
|
|
603
600
|
case "z":
|
|
604
|
-
p.z =
|
|
601
|
+
p.z = A.z;
|
|
605
602
|
break;
|
|
606
603
|
}
|
|
607
604
|
};
|
|
608
605
|
await (async () => {
|
|
609
|
-
const p = u / 180 * Math.PI,
|
|
610
|
-
const g =
|
|
606
|
+
const p = u / 180 * Math.PI, A = V(c, async (O) => {
|
|
607
|
+
const g = O.rotation.clone();
|
|
611
608
|
switch (h) {
|
|
612
609
|
case "x":
|
|
613
|
-
await this.ssp.animation(g, new
|
|
610
|
+
await this.ssp.animation(g, new D().set(g.x + p, g.y, g.z), { duration: 800 }, (m) => P(O.rotation, m));
|
|
614
611
|
break;
|
|
615
612
|
case "y":
|
|
616
|
-
await this.ssp.animation(g, new
|
|
613
|
+
await this.ssp.animation(g, new D().set(g.x, g.y + p, g.z), { duration: 800 }, (m) => P(O.rotation, m));
|
|
617
614
|
break;
|
|
618
615
|
case "z":
|
|
619
|
-
await this.ssp.animation(g, new
|
|
616
|
+
await this.ssp.animation(g, new D().set(g.x, g.y, g.z + p), { duration: 800 }, (m) => P(O.rotation, m));
|
|
620
617
|
break;
|
|
621
618
|
}
|
|
622
619
|
});
|
|
623
|
-
|
|
620
|
+
A instanceof Array ? await Promise.all(A) : await A, this.ssp.render();
|
|
624
621
|
})(), this.cleanSets.add(() => {
|
|
625
622
|
let p = 0;
|
|
626
|
-
|
|
627
|
-
|
|
623
|
+
V(c, (A) => {
|
|
624
|
+
A.rotation.copy(C[p++]);
|
|
628
625
|
});
|
|
629
626
|
});
|
|
630
627
|
}
|
|
631
628
|
}
|
|
632
629
|
}
|
|
633
630
|
}
|
|
634
|
-
class
|
|
631
|
+
class wt extends f {
|
|
635
632
|
constructor(t, s) {
|
|
636
633
|
super(t, s);
|
|
637
634
|
}
|
|
@@ -643,7 +640,7 @@ class bt extends f {
|
|
|
643
640
|
}
|
|
644
641
|
}
|
|
645
642
|
}
|
|
646
|
-
class
|
|
643
|
+
class Lt extends f {
|
|
647
644
|
constructor(t, s) {
|
|
648
645
|
super(t, s);
|
|
649
646
|
}
|
|
@@ -667,7 +664,7 @@ class It extends f {
|
|
|
667
664
|
}
|
|
668
665
|
}
|
|
669
666
|
}
|
|
670
|
-
class
|
|
667
|
+
class mt extends f {
|
|
671
668
|
constructor(t, s) {
|
|
672
669
|
super(t, s);
|
|
673
670
|
}
|
|
@@ -679,7 +676,7 @@ class Nt extends f {
|
|
|
679
676
|
}
|
|
680
677
|
}
|
|
681
678
|
}
|
|
682
|
-
class
|
|
679
|
+
class Nt extends f {
|
|
683
680
|
constructor(t, s) {
|
|
684
681
|
super(t, s);
|
|
685
682
|
}
|
|
@@ -691,7 +688,7 @@ class _t extends f {
|
|
|
691
688
|
}
|
|
692
689
|
}
|
|
693
690
|
}
|
|
694
|
-
class
|
|
691
|
+
class bt extends f {
|
|
695
692
|
constructor(t, s) {
|
|
696
693
|
super(t, s);
|
|
697
694
|
}
|
|
@@ -699,19 +696,19 @@ class xt extends f {
|
|
|
699
696
|
const t = this.findProp("value", n.LOCAL), s = this.findProp("object", n.LOCAL), i = this.findProp("out", n.WRITE_CTX), o = this.findProp("extraction", n.LOCAL);
|
|
700
697
|
if (t && i && o && s) {
|
|
701
698
|
const a = l(o.value), c = l(i.value), h = l(s.value), u = this.getValue(s);
|
|
702
|
-
let
|
|
699
|
+
let C = l(t.value);
|
|
703
700
|
if (this.ctx._userDataMap) {
|
|
704
|
-
const
|
|
705
|
-
|
|
701
|
+
const d = this.ctx._userDataMap.get(h);
|
|
702
|
+
d && (C = d[a]);
|
|
706
703
|
} else if (u && u.userData.properties) {
|
|
707
|
-
const
|
|
708
|
-
|
|
704
|
+
const d = u.userData.properties.find((P) => P.key === a);
|
|
705
|
+
d && d.value !== void 0 && (C = d.value);
|
|
709
706
|
}
|
|
710
|
-
this.writeContext(c,
|
|
707
|
+
this.writeContext(c, C);
|
|
711
708
|
}
|
|
712
709
|
}
|
|
713
710
|
}
|
|
714
|
-
class
|
|
711
|
+
class _t extends f {
|
|
715
712
|
constructor(t, s) {
|
|
716
713
|
super(t, s);
|
|
717
714
|
}
|
|
@@ -726,7 +723,7 @@ class yt extends f {
|
|
|
726
723
|
}
|
|
727
724
|
}
|
|
728
725
|
}
|
|
729
|
-
class
|
|
726
|
+
class xt extends f {
|
|
730
727
|
constructor(t, s) {
|
|
731
728
|
super(t, s);
|
|
732
729
|
}
|
|
@@ -738,7 +735,7 @@ class Mt extends f {
|
|
|
738
735
|
}
|
|
739
736
|
}
|
|
740
737
|
}
|
|
741
|
-
class
|
|
738
|
+
class yt extends f {
|
|
742
739
|
constructor(t, s) {
|
|
743
740
|
super(t, s);
|
|
744
741
|
}
|
|
@@ -750,7 +747,7 @@ class St extends f {
|
|
|
750
747
|
}
|
|
751
748
|
}
|
|
752
749
|
}
|
|
753
|
-
class
|
|
750
|
+
class Mt extends f {
|
|
754
751
|
constructor(t, s) {
|
|
755
752
|
super(t, s);
|
|
756
753
|
}
|
|
@@ -767,7 +764,7 @@ class Dt extends f {
|
|
|
767
764
|
}
|
|
768
765
|
}
|
|
769
766
|
}
|
|
770
|
-
class
|
|
767
|
+
class Dt extends f {
|
|
771
768
|
constructor(t, s) {
|
|
772
769
|
super(t, s);
|
|
773
770
|
}
|
|
@@ -792,7 +789,7 @@ class vt extends f {
|
|
|
792
789
|
}
|
|
793
790
|
}
|
|
794
791
|
}
|
|
795
|
-
class
|
|
792
|
+
class St extends f {
|
|
796
793
|
constructor(t, s) {
|
|
797
794
|
super(t, s);
|
|
798
795
|
}
|
|
@@ -815,15 +812,15 @@ class Ht extends f {
|
|
|
815
812
|
}
|
|
816
813
|
}
|
|
817
814
|
}
|
|
818
|
-
const
|
|
819
|
-
async function
|
|
815
|
+
const N = /* @__PURE__ */ new Map();
|
|
816
|
+
async function vt(e, t, s) {
|
|
820
817
|
const { id: i, keyframes: o } = s, a = new k(e, t);
|
|
821
|
-
|
|
818
|
+
N.has(i) || N.set(i, /* @__PURE__ */ new Set()), N.get(i)?.add(a), await a.play(o);
|
|
822
819
|
}
|
|
823
820
|
function B(e) {
|
|
824
|
-
|
|
821
|
+
N.get(e)?.forEach((t) => t.stop()), N.get(e)?.clear();
|
|
825
822
|
}
|
|
826
|
-
class
|
|
823
|
+
class Vt extends f {
|
|
827
824
|
constructor(t, s) {
|
|
828
825
|
super(t, s);
|
|
829
826
|
}
|
|
@@ -834,11 +831,11 @@ class Rt extends f {
|
|
|
834
831
|
if (a) {
|
|
835
832
|
const u = await t.getAnimations?.(this, a, c);
|
|
836
833
|
if (u) {
|
|
837
|
-
const
|
|
838
|
-
|
|
839
|
-
const
|
|
840
|
-
await
|
|
841
|
-
B(
|
|
834
|
+
const C = u.find((d) => d.id === c);
|
|
835
|
+
C && await W(async () => {
|
|
836
|
+
const d = a.matrix.clone();
|
|
837
|
+
await vt(this.ssp, a, C), this.cleanSets.add(() => {
|
|
838
|
+
B(C.id), a && d.decompose(a.position, a.quaternion, a.scale);
|
|
842
839
|
});
|
|
843
840
|
}, h);
|
|
844
841
|
}
|
|
@@ -846,7 +843,7 @@ class Rt extends f {
|
|
|
846
843
|
}
|
|
847
844
|
}
|
|
848
845
|
}
|
|
849
|
-
class
|
|
846
|
+
class Ht extends f {
|
|
850
847
|
constructor(t, s) {
|
|
851
848
|
super(t, s);
|
|
852
849
|
}
|
|
@@ -858,15 +855,15 @@ class jt extends f {
|
|
|
858
855
|
}
|
|
859
856
|
}
|
|
860
857
|
}
|
|
861
|
-
const
|
|
862
|
-
async function
|
|
858
|
+
const b = /* @__PURE__ */ new Map();
|
|
859
|
+
async function Rt(e, t, s) {
|
|
863
860
|
const { id: i, keyframes: o } = s, a = new k(e, t);
|
|
864
|
-
|
|
861
|
+
b.has(i) || b.set(i, /* @__PURE__ */ new Set()), b.get(i)?.add(a), await a.play(o);
|
|
865
862
|
}
|
|
866
863
|
function G(e) {
|
|
867
|
-
|
|
864
|
+
b.get(e)?.forEach((t) => t.stop()), b.get(e)?.clear();
|
|
868
865
|
}
|
|
869
|
-
class
|
|
866
|
+
class jt extends f {
|
|
870
867
|
constructor(t, s) {
|
|
871
868
|
super(t, s);
|
|
872
869
|
}
|
|
@@ -877,14 +874,14 @@ class Ut extends f {
|
|
|
877
874
|
if (a) {
|
|
878
875
|
const u = await t.getComponentAnimations?.(this, a, c);
|
|
879
876
|
if (u) {
|
|
880
|
-
const
|
|
881
|
-
if (
|
|
882
|
-
let
|
|
883
|
-
s.valueType === "Mesh" ?
|
|
884
|
-
if (
|
|
885
|
-
const P =
|
|
886
|
-
await
|
|
887
|
-
G(
|
|
877
|
+
const C = u.find((d) => d.id === c);
|
|
878
|
+
if (C) {
|
|
879
|
+
let d = null;
|
|
880
|
+
s.valueType === "Mesh" ? d = a : s.valueType === "Model" && (d = _(a, C.refId)), d && await W(async () => {
|
|
881
|
+
if (d) {
|
|
882
|
+
const P = d.matrix.clone();
|
|
883
|
+
await Rt(this.ssp, d, C), this.cleanSets.add(() => {
|
|
884
|
+
G(C.id), d && P.decompose(d.position, d.quaternion, d.scale);
|
|
888
885
|
});
|
|
889
886
|
}
|
|
890
887
|
}, h);
|
|
@@ -894,7 +891,7 @@ class Ut extends f {
|
|
|
894
891
|
}
|
|
895
892
|
}
|
|
896
893
|
}
|
|
897
|
-
class
|
|
894
|
+
class Xt extends f {
|
|
898
895
|
constructor(t, s) {
|
|
899
896
|
super(t, s);
|
|
900
897
|
}
|
|
@@ -906,7 +903,7 @@ class kt extends f {
|
|
|
906
903
|
}
|
|
907
904
|
}
|
|
908
905
|
}
|
|
909
|
-
function
|
|
906
|
+
function Ut(e, t) {
|
|
910
907
|
switch (t.type) {
|
|
911
908
|
case r.START:
|
|
912
909
|
return new Z(e, t);
|
|
@@ -915,77 +912,77 @@ function Bt(e, t) {
|
|
|
915
912
|
case r.NUMBER:
|
|
916
913
|
return new tt(e, t);
|
|
917
914
|
case r.HIGHLIGHT:
|
|
918
|
-
return new
|
|
915
|
+
return new st(e, t);
|
|
919
916
|
case r.UN_HIGHLIGHT:
|
|
920
|
-
return new
|
|
917
|
+
return new it(e, t);
|
|
921
918
|
case r.OPACITY:
|
|
922
|
-
return new
|
|
919
|
+
return new nt(e, t);
|
|
923
920
|
case r.UN_OPACITY:
|
|
924
|
-
return new
|
|
921
|
+
return new ct(e, t);
|
|
925
922
|
case r.EMISSIVE:
|
|
926
|
-
return new
|
|
923
|
+
return new rt(e, t);
|
|
927
924
|
case r.UN_EMISSIVE:
|
|
928
|
-
return new
|
|
925
|
+
return new ht(e, t);
|
|
929
926
|
// 获取对象
|
|
930
927
|
case r.MESH:
|
|
931
|
-
return new
|
|
928
|
+
return new ut(e, t);
|
|
932
929
|
case r.MESHES:
|
|
933
|
-
return new
|
|
930
|
+
return new dt(e, t);
|
|
934
931
|
case r.MODEL:
|
|
935
|
-
return new
|
|
932
|
+
return new pt(e, t);
|
|
936
933
|
case r.MODELS:
|
|
937
|
-
return new
|
|
934
|
+
return new ft(e, t);
|
|
938
935
|
case r.SPACE:
|
|
939
|
-
return new
|
|
936
|
+
return new Lt(e, t);
|
|
940
937
|
case r.SPACES:
|
|
941
938
|
return new It(e, t);
|
|
942
939
|
case r.POIS:
|
|
943
|
-
return new _t(e, t);
|
|
944
|
-
case r.POI:
|
|
945
940
|
return new Nt(e, t);
|
|
941
|
+
case r.POI:
|
|
942
|
+
return new mt(e, t);
|
|
946
943
|
case r.PATH:
|
|
947
|
-
return new
|
|
944
|
+
return new xt(e, t);
|
|
948
945
|
case r.PATHS:
|
|
949
|
-
return new
|
|
946
|
+
return new yt(e, t);
|
|
950
947
|
// 逻辑节点
|
|
951
948
|
case r.DELAY:
|
|
952
|
-
return new
|
|
949
|
+
return new Ct(e, t);
|
|
953
950
|
case r.CONDITION_NODE:
|
|
954
|
-
return new
|
|
951
|
+
return new At(e, t);
|
|
955
952
|
// 显示隐藏
|
|
956
953
|
case r.SHOW:
|
|
957
|
-
return new
|
|
954
|
+
return new Ot(e, t);
|
|
958
955
|
case r.HIDE:
|
|
959
|
-
return new
|
|
956
|
+
return new gt(e, t);
|
|
960
957
|
// 动画相关
|
|
961
958
|
case r.CLIP_ANIMATION:
|
|
962
|
-
return new
|
|
959
|
+
return new Dt(e, t);
|
|
963
960
|
case r.UN_CLIP_ANIMATION:
|
|
964
|
-
return new
|
|
961
|
+
return new St(e, t);
|
|
965
962
|
case r.TWEEN_ANIMATION:
|
|
966
|
-
return new
|
|
963
|
+
return new Vt(e, t);
|
|
967
964
|
case r.UN_TWEEN_ANIMATION:
|
|
968
|
-
return new
|
|
965
|
+
return new Ht(e, t);
|
|
969
966
|
case r.COMPONENT_TWEEN_ANIMATION:
|
|
970
|
-
return new
|
|
967
|
+
return new jt(e, t);
|
|
971
968
|
case r.UN_COMPONENT_TWEEN_ANIMATION:
|
|
972
|
-
return new
|
|
969
|
+
return new Xt(e, t);
|
|
973
970
|
// 移动
|
|
974
971
|
case r.TRANSLATE:
|
|
975
|
-
return new
|
|
972
|
+
return new Pt(e, t);
|
|
976
973
|
case r.ROTATE:
|
|
977
|
-
return new
|
|
974
|
+
return new Et(e, t);
|
|
978
975
|
case r.SCALE:
|
|
979
|
-
return new
|
|
976
|
+
return new Tt(e, t);
|
|
980
977
|
case r.FLY_TO:
|
|
981
|
-
return new
|
|
978
|
+
return new wt(e, t);
|
|
982
979
|
// 数据处理节点
|
|
983
980
|
case r.DATA_EXTRACTION:
|
|
984
|
-
return new
|
|
981
|
+
return new bt(e, t);
|
|
985
982
|
case r.DATA_FILTER:
|
|
986
|
-
return new
|
|
983
|
+
return new _t(e, t);
|
|
987
984
|
case r.USER_DATA_NODE:
|
|
988
|
-
return new
|
|
985
|
+
return new Mt(e, t);
|
|
989
986
|
default:
|
|
990
987
|
return new f(e, t);
|
|
991
988
|
}
|
|
@@ -996,7 +993,7 @@ function l(e) {
|
|
|
996
993
|
async function W(e, t) {
|
|
997
994
|
t ? await e() : e();
|
|
998
995
|
}
|
|
999
|
-
function
|
|
996
|
+
function kt(e, t) {
|
|
1000
997
|
return t.map((s) => e.getObjectById(s)).filter(Boolean);
|
|
1001
998
|
}
|
|
1002
999
|
function E(e, t, s) {
|
|
@@ -1017,8 +1014,8 @@ function _(e, t) {
|
|
|
1017
1014
|
}
|
|
1018
1015
|
return null;
|
|
1019
1016
|
}
|
|
1020
|
-
const { utils: { sleep:
|
|
1021
|
-
class
|
|
1017
|
+
const { utils: { sleep: Bt } } = T;
|
|
1018
|
+
class Gt extends z {
|
|
1022
1019
|
ssp;
|
|
1023
1020
|
flow;
|
|
1024
1021
|
nodes;
|
|
@@ -1052,7 +1049,7 @@ class Ft extends z {
|
|
|
1052
1049
|
this.clear();
|
|
1053
1050
|
const { nodes: t, edges: s } = this.flow;
|
|
1054
1051
|
t.forEach((i) => {
|
|
1055
|
-
const o =
|
|
1052
|
+
const o = Ut(this, i);
|
|
1056
1053
|
this.addNode(o);
|
|
1057
1054
|
}), s.forEach((i) => {
|
|
1058
1055
|
const o = new K(i);
|
|
@@ -1076,7 +1073,7 @@ class Ft extends z {
|
|
|
1076
1073
|
async debug(t = {}, s = 1500) {
|
|
1077
1074
|
const i = this.onNodeAfter;
|
|
1078
1075
|
this.onNodeAfter = async (o) => {
|
|
1079
|
-
await
|
|
1076
|
+
await Bt(s), i?.(o);
|
|
1080
1077
|
}, await this.run(t);
|
|
1081
1078
|
}
|
|
1082
1079
|
/**
|
|
@@ -1103,14 +1100,14 @@ class Ft extends z {
|
|
|
1103
1100
|
this.stop(), this.cleanup();
|
|
1104
1101
|
}
|
|
1105
1102
|
}
|
|
1106
|
-
class
|
|
1103
|
+
class Wt extends Gt {
|
|
1107
1104
|
flow;
|
|
1108
1105
|
constructor(t, s) {
|
|
1109
1106
|
super(t, s), this.flow = s;
|
|
1110
1107
|
}
|
|
1111
1108
|
}
|
|
1112
|
-
const R = (e, t) => e.userData.key === t ? e : e.parent ? R(e.parent, t) : !1, { groupBy:
|
|
1113
|
-
class
|
|
1109
|
+
const R = (e, t) => e.userData.key === t ? e : e.parent ? R(e.parent, t) : !1, { groupBy: Ft, asyncRunWithCode: zt } = T.utils;
|
|
1110
|
+
class Yt {
|
|
1114
1111
|
ssp;
|
|
1115
1112
|
interaction;
|
|
1116
1113
|
flows;
|
|
@@ -1120,7 +1117,7 @@ class Kt {
|
|
|
1120
1117
|
status = "ready";
|
|
1121
1118
|
target;
|
|
1122
1119
|
constructor(t, s, i, o) {
|
|
1123
|
-
this.ssp = t, this.interaction = s, this.flows = i, this.flowsMap =
|
|
1120
|
+
this.ssp = t, this.interaction = s, this.flows = i, this.flowsMap = Ft(i, "id"), this.options = o || {}, this.init();
|
|
1124
1121
|
}
|
|
1125
1122
|
init() {
|
|
1126
1123
|
switch (this.interaction.type) {
|
|
@@ -1174,7 +1171,7 @@ class Kt {
|
|
|
1174
1171
|
const o = this.flowsMap.get(i);
|
|
1175
1172
|
if (o) {
|
|
1176
1173
|
const a = new Y(this.ssp, o[0]);
|
|
1177
|
-
a.parse(),
|
|
1174
|
+
a.parse(), zt(
|
|
1178
1175
|
() => a.run({
|
|
1179
1176
|
getTarget: s,
|
|
1180
1177
|
getAnimations: this.options.getAnimations,
|
|
@@ -1248,13 +1245,13 @@ class Kt {
|
|
|
1248
1245
|
this.disposables.forEach((t) => t());
|
|
1249
1246
|
}
|
|
1250
1247
|
}
|
|
1251
|
-
var
|
|
1252
|
-
const { groupBy:
|
|
1253
|
-
class is extends
|
|
1248
|
+
var $t = /* @__PURE__ */ ((e) => (e.GLOBAL = "GLOBAL", e.SELF = "SELF", e.OTHER = "OTHER", e))($t || {}), F = /* @__PURE__ */ ((e) => (e.FLOW = "FLOW", e.ANIMATION = "ANIMATION", e.DELAY = "DELAY", e))(F || {}), H = /* @__PURE__ */ ((e) => (e.GLOBAL = "GLOBAL", e.INSTANCE = "INSTANCE", e.FAMILY = "FAMILY", e))(H || {}), w = /* @__PURE__ */ ((e) => (e.MOUSE_CLICK = "MOUSE_CLICK", e.MOUSE_DB_CLICK = "MOUSE_DB_CLICK", e.MOUSE_RIGHT_CLICK = "MOUSE_RIGHT_CLICK", e.THING_PROP_CHANGE = "THING_PROP_CHANGE", e.THING_EVENT = "THING_EVENT", e.LOADED = "LOADED", e.MODEL_PROP_CHANGE = "MODEL_PROP_CHANGE", e))(w || {});
|
|
1249
|
+
const { groupBy: Kt, asyncRunWithCode: Jt } = T.utils;
|
|
1250
|
+
class is extends Yt {
|
|
1254
1251
|
flows;
|
|
1255
1252
|
flowsMap;
|
|
1256
1253
|
constructor(t, s, i, o) {
|
|
1257
|
-
super(t, s, i, o), this.flows = i, this.flowsMap =
|
|
1254
|
+
super(t, s, i, o), this.flows = i, this.flowsMap = Kt(i, "id");
|
|
1258
1255
|
}
|
|
1259
1256
|
init() {
|
|
1260
1257
|
switch (this.interaction.type) {
|
|
@@ -1284,9 +1281,9 @@ class is extends Kt {
|
|
|
1284
1281
|
// 获取交互触发的Mesh
|
|
1285
1282
|
async getComponentObsTarget(t) {
|
|
1286
1283
|
const { obsType: s, obsTargets: i } = this.interaction;
|
|
1287
|
-
if (s ===
|
|
1284
|
+
if (s === H.GLOBAL)
|
|
1288
1285
|
return null;
|
|
1289
|
-
if (s ===
|
|
1286
|
+
if (s === H.INSTANCE) {
|
|
1290
1287
|
const o = i?.map((a) => {
|
|
1291
1288
|
const c = E(this.ssp, a);
|
|
1292
1289
|
return c || console.warn("Component Target not found:", a), c;
|
|
@@ -1314,8 +1311,8 @@ class is extends Kt {
|
|
|
1314
1311
|
t.forEach((i) => {
|
|
1315
1312
|
const o = this.flowsMap.get(i);
|
|
1316
1313
|
if (o) {
|
|
1317
|
-
const a = new
|
|
1318
|
-
a.parse(),
|
|
1314
|
+
const a = new Wt(this.ssp, o[0]);
|
|
1315
|
+
a.parse(), Jt(
|
|
1319
1316
|
() => a.run({
|
|
1320
1317
|
getTarget: s
|
|
1321
1318
|
})
|
|
@@ -1358,15 +1355,15 @@ class is extends Kt {
|
|
|
1358
1355
|
}
|
|
1359
1356
|
}
|
|
1360
1357
|
export {
|
|
1361
|
-
|
|
1358
|
+
Wt as ComponentFlowParser,
|
|
1362
1359
|
is as ComponentTrigger,
|
|
1363
|
-
|
|
1360
|
+
Gt as FlowParser,
|
|
1364
1361
|
F as InteractionAction,
|
|
1365
|
-
|
|
1366
|
-
|
|
1362
|
+
$t as InteractionActionType,
|
|
1363
|
+
H as InteractionObsType,
|
|
1367
1364
|
w as InteractionType,
|
|
1368
1365
|
f as Node,
|
|
1369
1366
|
n as NodePropTypeEnum,
|
|
1370
1367
|
r as NodeTypeEnum,
|
|
1371
|
-
|
|
1368
|
+
Yt as Trigger
|
|
1372
1369
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soonspacejs/plugin-flow",
|
|
3
3
|
"pluginName": "FlowPlugin",
|
|
4
|
-
"version": "2.14.
|
|
4
|
+
"version": "2.14.4",
|
|
5
5
|
"description": "FlowPlugin plugin for SoonSpace.js",
|
|
6
6
|
"main": "dist/index.esm.js",
|
|
7
7
|
"module": "dist/index.esm.js",
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
],
|
|
14
14
|
"author": "xunwei",
|
|
15
15
|
"license": "UNLICENSED",
|
|
16
|
-
"gitHead": "
|
|
16
|
+
"gitHead": "c3a7ad593a3a6ee4c78136138f79459fc47f198b",
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"soonspacejs": "2.14.
|
|
18
|
+
"soonspacejs": "2.14.4",
|
|
19
19
|
"umanager-animation-parser": "^0.0.6"
|
|
20
20
|
}
|
|
21
21
|
}
|