@woosh/meep-engine 2.94.4 → 2.94.6
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.
- package/build/meep.cjs +47 -9
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +47 -9
- package/editor/ecs/component/editors/ecs/Trail2DEditor.js +1 -1
- package/package.json +1 -1
- package/src/core/binary/BitSet.spec.js +14 -12
- package/src/core/geom/2d/aabb/AABB2.d.ts +5 -0
- package/src/core/geom/2d/aabb/AABB2.d.ts.map +1 -1
- package/src/core/geom/2d/aabb/AABB2.js +34 -4
- package/src/core/geom/3d/util/make_justified_point_grid.d.ts +2 -1
- package/src/core/geom/3d/util/make_justified_point_grid.d.ts.map +1 -1
- package/src/core/geom/3d/util/make_justified_point_grid.js +6 -3
- package/src/core/geom/vec3/v3_distance_sqr.d.ts.map +1 -1
- package/src/core/geom/vec3/v3_distance_sqr.js +4 -1
- package/src/core/math/clamp.js +1 -1
- package/src/core/math/clamp01.d.ts +5 -0
- package/src/core/math/clamp01.d.ts.map +1 -1
- package/src/core/math/clamp01.js +6 -0
- package/src/engine/EngineConfiguration.d.ts.map +1 -1
- package/src/engine/EngineConfiguration.js +7 -0
- package/src/engine/EngineHarness.d.ts.map +1 -1
- package/src/engine/EngineHarness.js +0 -3
- package/src/engine/animation/AnimationUtils.d.ts.map +1 -1
- package/src/engine/animation/AnimationUtils.js +2 -1
- package/src/engine/ecs/System.d.ts.map +1 -1
- package/src/engine/ecs/System.js +6 -0
- package/src/engine/ecs/util/hideEntityGracefully.d.ts.map +1 -1
- package/src/engine/ecs/util/hideEntityGracefully.js +12 -11
- package/src/engine/graphics/ecs/trail2d/Trail2D.d.ts +10 -6
- package/src/engine/graphics/ecs/trail2d/Trail2D.d.ts.map +1 -1
- package/src/engine/graphics/ecs/trail2d/Trail2D.js +61 -13
- package/src/engine/graphics/ecs/trail2d/Trail2DFlags.d.ts +8 -0
- package/src/engine/graphics/ecs/trail2d/Trail2DFlags.d.ts.map +1 -0
- package/src/engine/graphics/ecs/trail2d/Trail2DFlags.js +10 -0
- package/src/engine/graphics/ecs/trail2d/Trail2DSystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/trail2d/Trail2DSystem.js +14 -33
- package/src/engine/graphics/ecs/trail2d/makeGradientTrail.d.ts.map +1 -1
- package/src/engine/graphics/ecs/trail2d/makeGradientTrail.js +2 -1
- package/src/engine/graphics/ecs/trail2d/prototypeTrail2D.d.ts +2 -0
- package/src/engine/graphics/ecs/trail2d/prototypeTrail2D.d.ts.map +1 -0
- package/src/engine/graphics/ecs/trail2d/prototypeTrail2D.js +65 -0
- package/src/engine/graphics/sh3/path_tracer/prototypePathTracer.js +1 -1
- package/src/engine/graphics/trail/x/RibbonX.d.ts +2 -2
- package/src/engine/graphics/trail/x/RibbonX.d.ts.map +1 -1
- package/src/engine/graphics/trail/x/RibbonX.js +16 -8
- package/src/engine/graphics/trail/x/simulator/RibbonXFixedPhysicsSimulator.d.ts.map +1 -1
- package/src/engine/graphics/trail/x/simulator/RibbonXFixedPhysicsSimulator.js +2 -1
package/build/meep.module.js
CHANGED
|
@@ -1720,7 +1720,7 @@ function dispatchViaProxy(handlers, args) {
|
|
|
1720
1720
|
}
|
|
1721
1721
|
|
|
1722
1722
|
/**
|
|
1723
|
-
*
|
|
1723
|
+
* Constrain a value to lie between specified min/max values
|
|
1724
1724
|
* @param {number} value
|
|
1725
1725
|
* @param {number} min
|
|
1726
1726
|
* @param {number} max
|
|
@@ -68377,6 +68377,12 @@ class System {
|
|
|
68377
68377
|
|
|
68378
68378
|
}
|
|
68379
68379
|
|
|
68380
|
+
/**
|
|
68381
|
+
* @readonly
|
|
68382
|
+
* @type {boolean}
|
|
68383
|
+
*/
|
|
68384
|
+
System.prototype.isSystem = true;
|
|
68385
|
+
|
|
68380
68386
|
/**
|
|
68381
68387
|
* Fixed update function, every step happens with the same exact time increment
|
|
68382
68388
|
* useful for systems that must have a fixed time step to be predictable and stable, such as physics
|
|
@@ -74307,7 +74313,10 @@ function returnTrue() {
|
|
|
74307
74313
|
* @param {number} z1
|
|
74308
74314
|
* @returns {number}
|
|
74309
74315
|
*/
|
|
74310
|
-
function v3_distance_sqr(
|
|
74316
|
+
function v3_distance_sqr(
|
|
74317
|
+
x0, y0, z0,
|
|
74318
|
+
x1, y1, z1
|
|
74319
|
+
) {
|
|
74311
74320
|
const x = x0 - x1;
|
|
74312
74321
|
const y = y0 - y1;
|
|
74313
74322
|
const z = z0 - z1;
|
|
@@ -79723,10 +79732,24 @@ class AABB2 {
|
|
|
79723
79732
|
* @param {Vector2} result
|
|
79724
79733
|
*/
|
|
79725
79734
|
getCenter(result) {
|
|
79726
|
-
result.set(
|
|
79727
|
-
|
|
79728
|
-
|
|
79729
|
-
|
|
79735
|
+
result.set(this.centerX, this.centerY);
|
|
79736
|
+
}
|
|
79737
|
+
|
|
79738
|
+
/**
|
|
79739
|
+
*
|
|
79740
|
+
* @return {number}
|
|
79741
|
+
*/
|
|
79742
|
+
get centerX() {
|
|
79743
|
+
return (this.x0 + this.x1) * 0.5;
|
|
79744
|
+
}
|
|
79745
|
+
|
|
79746
|
+
/**
|
|
79747
|
+
*
|
|
79748
|
+
* @return {number}
|
|
79749
|
+
*/
|
|
79750
|
+
get centerY() {
|
|
79751
|
+
|
|
79752
|
+
return (this.y0 + this.y1) * 0.5
|
|
79730
79753
|
}
|
|
79731
79754
|
|
|
79732
79755
|
/**
|
|
@@ -79737,6 +79760,14 @@ class AABB2 {
|
|
|
79737
79760
|
return this.x1 - this.x0;
|
|
79738
79761
|
}
|
|
79739
79762
|
|
|
79763
|
+
/**
|
|
79764
|
+
*
|
|
79765
|
+
* @return {number}
|
|
79766
|
+
*/
|
|
79767
|
+
get width() {
|
|
79768
|
+
return this.getWidth();
|
|
79769
|
+
}
|
|
79770
|
+
|
|
79740
79771
|
/**
|
|
79741
79772
|
*
|
|
79742
79773
|
* @returns {number}
|
|
@@ -79745,6 +79776,14 @@ class AABB2 {
|
|
|
79745
79776
|
return this.y1 - this.y0;
|
|
79746
79777
|
}
|
|
79747
79778
|
|
|
79779
|
+
/**
|
|
79780
|
+
*
|
|
79781
|
+
* @return {number}
|
|
79782
|
+
*/
|
|
79783
|
+
get height() {
|
|
79784
|
+
return this.getHeight();
|
|
79785
|
+
}
|
|
79786
|
+
|
|
79748
79787
|
/**
|
|
79749
79788
|
*
|
|
79750
79789
|
* @param {Number} x0
|
|
@@ -103935,6 +103974,7 @@ class EngineConfiguration {
|
|
|
103935
103974
|
* @returns {boolean}
|
|
103936
103975
|
*/
|
|
103937
103976
|
addSystem(system) {
|
|
103977
|
+
|
|
103938
103978
|
this.systems.push(system);
|
|
103939
103979
|
|
|
103940
103980
|
return true;
|
|
@@ -103944,6 +103984,7 @@ class EngineConfiguration {
|
|
|
103944
103984
|
* @param {System} systems
|
|
103945
103985
|
*/
|
|
103946
103986
|
addManySystems(...systems) {
|
|
103987
|
+
|
|
103947
103988
|
systems.forEach(s => this.addSystem(s));
|
|
103948
103989
|
}
|
|
103949
103990
|
|
|
@@ -115303,9 +115344,6 @@ class EngineHarness {
|
|
|
115303
115344
|
terrain.splat.resize(1, 1, 1);
|
|
115304
115345
|
terrain.splat.fillLayerWeights(0, 255);
|
|
115305
115346
|
|
|
115306
|
-
terrain.build(engine.assetManager);
|
|
115307
|
-
|
|
115308
|
-
|
|
115309
115347
|
const eb = new Entity();
|
|
115310
115348
|
|
|
115311
115349
|
eb.add(new Transform());
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { Trail2DFlags } from "../../../../../src/engine/graphics/ecs/trail2d/Trail2DFlags.js";
|
|
1
2
|
import { BitFlagsEditor } from "../common/BitFlagsEditor.js";
|
|
2
|
-
import { Trail2DFlags } from "../../../../../src/engine/graphics/ecs/trail2d/Trail2D.js";
|
|
3
3
|
import { ObjectEditor } from "../primitive/ObjectEditor.js";
|
|
4
4
|
|
|
5
5
|
export class Trail2DEditor extends ObjectEditor {
|
package/package.json
CHANGED
|
@@ -432,7 +432,18 @@ test('copy with only bit 33 set', () => {
|
|
|
432
432
|
expect(b.size()).toBe(34);
|
|
433
433
|
});
|
|
434
434
|
|
|
435
|
-
test('
|
|
435
|
+
test('shift right by 1', () => {
|
|
436
|
+
const s = new BitSet();
|
|
437
|
+
|
|
438
|
+
s.set(0, true);
|
|
439
|
+
|
|
440
|
+
s.shift_right(1, 0, 1);
|
|
441
|
+
|
|
442
|
+
expect(s.get(0)).toBe(true);
|
|
443
|
+
expect(s.get(1)).toBe(true);
|
|
444
|
+
});
|
|
445
|
+
|
|
446
|
+
test.skip('performance, next set from 0', () => {
|
|
436
447
|
const s = new BitSet();
|
|
437
448
|
|
|
438
449
|
s.set(1024, true);
|
|
@@ -441,7 +452,8 @@ test('performance, next set from 0', () => {
|
|
|
441
452
|
const v = s.nextSetBit(0);
|
|
442
453
|
}
|
|
443
454
|
});
|
|
444
|
-
|
|
455
|
+
|
|
456
|
+
test.skip('performance, next clear from 0', () => {
|
|
445
457
|
const s = new BitSet();
|
|
446
458
|
|
|
447
459
|
for (let i = 0; i < 1024; i++) {
|
|
@@ -454,13 +466,3 @@ test('performance, next clear from 0', () => {
|
|
|
454
466
|
});
|
|
455
467
|
|
|
456
468
|
|
|
457
|
-
test('shift right by 1', () => {
|
|
458
|
-
const s = new BitSet();
|
|
459
|
-
|
|
460
|
-
s.set(0, true);
|
|
461
|
-
|
|
462
|
-
s.shift_right(1, 0, 1);
|
|
463
|
-
|
|
464
|
-
expect(s.get(0)).toBe(true);
|
|
465
|
-
expect(s.get(1)).toBe(true);
|
|
466
|
-
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AABB2.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/2d/aabb/AABB2.js"],"names":[],"mappings":";AAkBA;;;GAGG;AACH;IACI;;;;;;OAMG;IACH,gEA+BC;IApBG;;;OAGG;IACH,WAAY;IACZ;;;OAGG;IACH,WAAY;IACZ;;;OAGG;IACH,WAAY;IACZ;;;OAGG;IACH,WAAY;IAGhB;;;OAGG;IACH,WAFW,MAAM,QAIhB;IAED;;;OAGG;IACH,aAFW,MAAM,QAIhB;IAED;;;OAGG;IACH,gBAFW,MAAM,EAAE,QA8BlB;IAED;;;OAGG;IACH,sBAFW,MAAM,QAShB;IAED;;;;;OAKG;IACH,sBAJW,KAAK,UACL,KAAK,GACH,OAAO,CAcnB;IAED;;;;OAIG;IACH,qBAHW,KAAK,GACH,OAAO,CAcnB;IAED;;;;;;;OAOG;IACH,0EAMC;IAED;;;;OAIG;IACH,qBAHW,MAAM,KACN,MAAM,QAKhB;IAED;;;OAGG;IACH,QAFa,MAAM,CAIlB;IAED;;;OAGG;IACH,QAFa,MAAM,CAIlB;IAED;;;;;;OAMG;IACH,0BALW,OAAO,MACP,OAAO,UACP,OAAO,GACL,OAAO,CA0BnB;IAED;;;;OAIG;IACH,kCAHW,OAAO,UACP,OAAO,QAmBjB;IAED;;;;OAIG;IACH,wBAHW,KAAK,GACH,MAAM,CAIlB;IAED;;;;;;;OAOG;IACH,sBANW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,GACJ,MAAM,CA4BlB;IAED;;;OAGG;IACH,eAFa,MAAM,CASlB;IAED;;;OAGG;IACH,sBAFY,MAAM,CAYjB;IAED;;;;;OAKG;IACH,iBAJW,MAAM,KACN,MAAM,GACJ,OAAO,CAInB;IAED;;;OAGG;IACH,mBAFW,KAAK,QAIf;IAED;;;OAGG;IACH,kBAFW,OAAO,
|
|
1
|
+
{"version":3,"file":"AABB2.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/2d/aabb/AABB2.js"],"names":[],"mappings":";AAkBA;;;GAGG;AACH;IACI;;;;;;OAMG;IACH,gEA+BC;IApBG;;;OAGG;IACH,WAAY;IACZ;;;OAGG;IACH,WAAY;IACZ;;;OAGG;IACH,WAAY;IACZ;;;OAGG;IACH,WAAY;IAGhB;;;OAGG;IACH,WAFW,MAAM,QAIhB;IAED;;;OAGG;IACH,aAFW,MAAM,QAIhB;IAED;;;OAGG;IACH,gBAFW,MAAM,EAAE,QA8BlB;IAED;;;OAGG;IACH,sBAFW,MAAM,QAShB;IAED;;;;;OAKG;IACH,sBAJW,KAAK,UACL,KAAK,GACH,OAAO,CAcnB;IAED;;;;OAIG;IACH,qBAHW,KAAK,GACH,OAAO,CAcnB;IAED;;;;;;;OAOG;IACH,0EAMC;IAED;;;;OAIG;IACH,qBAHW,MAAM,KACN,MAAM,QAKhB;IAED;;;OAGG;IACH,QAFa,MAAM,CAIlB;IAED;;;OAGG;IACH,QAFa,MAAM,CAIlB;IAED;;;;;;OAMG;IACH,0BALW,OAAO,MACP,OAAO,UACP,OAAO,GACL,OAAO,CA0BnB;IAED;;;;OAIG;IACH,kCAHW,OAAO,UACP,OAAO,QAmBjB;IAED;;;;OAIG;IACH,wBAHW,KAAK,GACH,MAAM,CAIlB;IAED;;;;;;;OAOG;IACH,sBANW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,GACJ,MAAM,CA4BlB;IAED;;;OAGG;IACH,eAFa,MAAM,CASlB;IAED;;;OAGG;IACH,sBAFY,MAAM,CAYjB;IAED;;;;;OAKG;IACH,iBAJW,MAAM,KACN,MAAM,GACJ,OAAO,CAInB;IAED;;;OAGG;IACH,mBAFW,KAAK,QAIf;IAED;;;OAGG;IACH,kBAFW,OAAO,QAIjB;IAED;;;OAGG;IACH,sBAEC;IAED;;;OAGG;IACH,sBAGC;IAED;;;OAGG;IACH,YAFa,MAAM,CAIlB;IAED;;;OAGG;IACH,oBAEC;IAED;;;OAGG;IACH,aAFa,MAAM,CAIlB;IAED;;;OAGG;IACH,qBAEC;IAED;;;;;;;OAOG;IACH,0DAiBC;IAED;;;;OAIG;IACH,eAHW,MAAM,KACN,MAAM,QAOhB;IAED;;;;OAIG;IACH,aAHW,MAAM,UACN,MAAM,QAIhB;IAED;;;OAGG;IACH,SAFa,KAAK,CAIjB;IAED;;;;OAIG;IACH,YAHW,KAAK,GACH,KAAK,CAIjB;IAED;;;;OAIG;IACH,cAHW,KAAK,GACH,OAAO,CAOnB;IAED;;;;;;OAMG;IACH,UALW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,QAQhB;IAED;;;;;;OAMG;IACH,uBALW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,QAsBhB;IAED;;OAEG;IACH,oCAEC;IAED,mBAEC;IAED;;;;;MAOC;IAED,0BAEC;CACJ;;;qBAqCS,KAAK;qBAML,KAAK;;oBA9kBK,kBAAkB;AAsiBtC;;;;;;;GAOG;AACH,gDANW,KAAK,MACL,KAAK,MACL,OAAO,MACP,OAAO,GACL,OAAO,CAsBnB"}
|
|
@@ -359,10 +359,24 @@ class AABB2 {
|
|
|
359
359
|
* @param {Vector2} result
|
|
360
360
|
*/
|
|
361
361
|
getCenter(result) {
|
|
362
|
-
result.set(
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
362
|
+
result.set(this.centerX, this.centerY);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
*
|
|
367
|
+
* @return {number}
|
|
368
|
+
*/
|
|
369
|
+
get centerX() {
|
|
370
|
+
return (this.x0 + this.x1) * 0.5;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
*
|
|
375
|
+
* @return {number}
|
|
376
|
+
*/
|
|
377
|
+
get centerY() {
|
|
378
|
+
|
|
379
|
+
return (this.y0 + this.y1) * 0.5
|
|
366
380
|
}
|
|
367
381
|
|
|
368
382
|
/**
|
|
@@ -373,6 +387,14 @@ class AABB2 {
|
|
|
373
387
|
return this.x1 - this.x0;
|
|
374
388
|
}
|
|
375
389
|
|
|
390
|
+
/**
|
|
391
|
+
*
|
|
392
|
+
* @return {number}
|
|
393
|
+
*/
|
|
394
|
+
get width() {
|
|
395
|
+
return this.getWidth();
|
|
396
|
+
}
|
|
397
|
+
|
|
376
398
|
/**
|
|
377
399
|
*
|
|
378
400
|
* @returns {number}
|
|
@@ -381,6 +403,14 @@ class AABB2 {
|
|
|
381
403
|
return this.y1 - this.y0;
|
|
382
404
|
}
|
|
383
405
|
|
|
406
|
+
/**
|
|
407
|
+
*
|
|
408
|
+
* @return {number}
|
|
409
|
+
*/
|
|
410
|
+
get height() {
|
|
411
|
+
return this.getHeight();
|
|
412
|
+
}
|
|
413
|
+
|
|
384
414
|
/**
|
|
385
415
|
*
|
|
386
416
|
* @param {Number} x0
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @param {AABB3} aabb3
|
|
5
5
|
* @param {number} spacing
|
|
6
6
|
* @param {function(x:number,y:number,z:number)} callback
|
|
7
|
+
* @returns {number} total number of points placed
|
|
7
8
|
*/
|
|
8
|
-
export function make_justified_point_grid(aabb3: AABB3, spacing: number, callback: any):
|
|
9
|
+
export function make_justified_point_grid(aabb3: AABB3, spacing: number, callback: any): number;
|
|
9
10
|
//# sourceMappingURL=make_justified_point_grid.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"make_justified_point_grid.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/util/make_justified_point_grid.js"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"make_justified_point_grid.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/util/make_justified_point_grid.js"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,iEAJW,MAAM,kBAEJ,MAAM,CAyBlB"}
|
|
@@ -6,12 +6,13 @@ import { max2 } from "../../../math/max2.js";
|
|
|
6
6
|
* @param {AABB3} aabb3
|
|
7
7
|
* @param {number} spacing
|
|
8
8
|
* @param {function(x:number,y:number,z:number)} callback
|
|
9
|
+
* @returns {number} total number of points placed
|
|
9
10
|
*/
|
|
10
11
|
export function make_justified_point_grid(aabb3, spacing, callback) {
|
|
11
12
|
|
|
12
|
-
const steps_x = Math.ceil(aabb3.getExtentsX() / spacing);
|
|
13
|
-
const steps_y = Math.ceil(aabb3.getExtentsY() / spacing);
|
|
14
|
-
const steps_z = Math.ceil(aabb3.getExtentsZ() / spacing);
|
|
13
|
+
const steps_x = max2(1, Math.ceil(aabb3.getExtentsX() / spacing));
|
|
14
|
+
const steps_y = max2(1, Math.ceil(aabb3.getExtentsY() / spacing));
|
|
15
|
+
const steps_z = max2(1, Math.ceil(aabb3.getExtentsZ() / spacing));
|
|
15
16
|
|
|
16
17
|
const spacing_x = aabb3.getExtentsX() / max2(1, steps_x - 1);
|
|
17
18
|
const spacing_y = aabb3.getExtentsY() / max2(1, steps_y - 1);
|
|
@@ -28,4 +29,6 @@ export function make_justified_point_grid(aabb3, spacing, callback) {
|
|
|
28
29
|
}
|
|
29
30
|
}
|
|
30
31
|
}
|
|
32
|
+
|
|
33
|
+
return steps_x * steps_y * steps_z;
|
|
31
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v3_distance_sqr.d.ts","sourceRoot":"","sources":["../../../../../src/core/geom/vec3/v3_distance_sqr.js"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,oCARW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,GACJ,MAAM,
|
|
1
|
+
{"version":3,"file":"v3_distance_sqr.d.ts","sourceRoot":"","sources":["../../../../../src/core/geom/vec3/v3_distance_sqr.js"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,oCARW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,GACJ,MAAM,CAWlB"}
|
package/src/core/math/clamp.js
CHANGED
|
@@ -6,4 +6,9 @@
|
|
|
6
6
|
* @returns {number}
|
|
7
7
|
*/
|
|
8
8
|
export function clamp01(value: number): number;
|
|
9
|
+
/**
|
|
10
|
+
* Shortcut following GLSL naming, see {@link clamp01}
|
|
11
|
+
* @type {function(number): number}
|
|
12
|
+
*/
|
|
13
|
+
export const saturate: (arg0: number) => number;
|
|
9
14
|
//# sourceMappingURL=clamp01.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clamp01.d.ts","sourceRoot":"","sources":["../../../../src/core/math/clamp01.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,+BAHW,MAAM,GACJ,MAAM,CAUlB"}
|
|
1
|
+
{"version":3,"file":"clamp01.d.ts","sourceRoot":"","sources":["../../../../src/core/math/clamp01.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,+BAHW,MAAM,GACJ,MAAM,CAUlB;AAED;;;GAGG;AACH,8BAFmB,MAAM,KAAG,MAAM,CAEF"}
|
package/src/core/math/clamp01.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EngineConfiguration.d.ts","sourceRoot":"","sources":["../../../src/engine/EngineConfiguration.js"],"names":[],"mappings":"AAGA;IAEI;;;OAGG;IACH,gBAAa;IAEb;;;OAGG;IACH,gBAAa;IAEb;;;OAGG;IACH,kBAAe;IAEf;;;OAGG;IACH,SAFU,IAAI,MAAM,mBAAkB,CAElB;IAEpB;;;;OAIG;IACH,gBAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;;OAIG;IACH,mBAHW,MAAM,mCAWhB;IAED;;;;OAIG;IACH,wBAHW,MAAM,oBAWhB;IAED;;;;OAIG;IACH,wCAFa,OAAO,CAQnB;IAED;;;;OAIG;IACH,2BAFa,OAAO,
|
|
1
|
+
{"version":3,"file":"EngineConfiguration.d.ts","sourceRoot":"","sources":["../../../src/engine/EngineConfiguration.js"],"names":[],"mappings":"AAGA;IAEI;;;OAGG;IACH,gBAAa;IAEb;;;OAGG;IACH,gBAAa;IAEb;;;OAGG;IACH,kBAAe;IAEf;;;OAGG;IACH,SAFU,IAAI,MAAM,mBAAkB,CAElB;IAEpB;;;;OAIG;IACH,gBAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;;OAIG;IACH,mBAHW,MAAM,mCAWhB;IAED;;;;OAIG;IACH,wBAHW,MAAM,oBAWhB;IAED;;;;OAIG;IACH,wCAFa,OAAO,CAQnB;IAED;;;;OAIG;IACH,2BAFa,OAAO,CAUnB;IAED;;OAEG;IACH,yCAKC;IAED;;;;OAIG;IACH,yDAFa,OAAO,CAMnB;IAED;;;OAGG;IACH,qCAmDC;CACJ"}
|
|
@@ -85,6 +85,10 @@ export class EngineConfiguration {
|
|
|
85
85
|
* @returns {boolean}
|
|
86
86
|
*/
|
|
87
87
|
addSystem(system) {
|
|
88
|
+
assert.defined(system, 'system');
|
|
89
|
+
assert.notNull(system, 'system');
|
|
90
|
+
assert.equal(system.isSystem, true, "system.isSystem !== true");
|
|
91
|
+
|
|
88
92
|
this.systems.push(system);
|
|
89
93
|
|
|
90
94
|
return true;
|
|
@@ -94,6 +98,9 @@ export class EngineConfiguration {
|
|
|
94
98
|
* @param {System} systems
|
|
95
99
|
*/
|
|
96
100
|
addManySystems(...systems) {
|
|
101
|
+
assert.defined(systems, "systems");
|
|
102
|
+
assert.isArray(systems, "systems");
|
|
103
|
+
|
|
97
104
|
systems.forEach(s => this.addSystem(s));
|
|
98
105
|
}
|
|
99
106
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EngineHarness.d.ts","sourceRoot":"","sources":["../../../src/engine/EngineHarness.js"],"names":[],"mappings":"AAsDA;IAmBI;;;OAGG;IACH,6BAFW,MAAM,QAYhB;IAkED;;;;;;;;;;;;;OAaG;IACH;QAZyB,MAAM,EAApB,MAAM;QACyB,GAAG;QAClB,MAAM,GAAtB,OAAO;QACQ,QAAQ,GAAvB,MAAM;QACS,KAAK,GAApB,MAAM;QACS,GAAG,GAAlB,MAAM;QACU,QAAQ,GAAxB,OAAO;QACQ,WAAW,GAA1B,MAAM;QACS,WAAW,GAA1B,MAAM;QACS,WAAW,GAA1B,MAAM;QACJ,MAAM,CA+DlB;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,oQAnBW,MAAM,iBAmFhB;IAGD;;;;;;OAMG;IACH;QALyB,MAAM,EAApB,MAAM;QACyB,GAAG;QACnB,mBAAmB,GAAlC,MAAM;QACU,UAAU,GAA1B,OAAO;sBAqDjB;IAED;;;;;;;OAOG;IACH;QAN0B,YAAY,GAA3B,MAAM;QACQ,MAAM,EAApB,MAAM;QACS,WAAW,GAA1B,MAAM;QACyB,GAAG;QAChC,MAAM,CA2ClB;IAGD;;;;;;;;;;;OAWG;IACH,mGAVW,MAAM,GAQJ,OAAO,
|
|
1
|
+
{"version":3,"file":"EngineHarness.d.ts","sourceRoot":"","sources":["../../../src/engine/EngineHarness.js"],"names":[],"mappings":"AAsDA;IAmBI;;;OAGG;IACH,6BAFW,MAAM,QAYhB;IAkED;;;;;;;;;;;;;OAaG;IACH;QAZyB,MAAM,EAApB,MAAM;QACyB,GAAG;QAClB,MAAM,GAAtB,OAAO;QACQ,QAAQ,GAAvB,MAAM;QACS,KAAK,GAApB,MAAM;QACS,GAAG,GAAlB,MAAM;QACU,QAAQ,GAAxB,OAAO;QACQ,WAAW,GAA1B,MAAM;QACS,WAAW,GAA1B,MAAM;QACS,WAAW,GAA1B,MAAM;QACJ,MAAM,CA+DlB;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,oQAnBW,MAAM,iBAmFhB;IAGD;;;;;;OAMG;IACH;QALyB,MAAM,EAApB,MAAM;QACyB,GAAG;QACnB,mBAAmB,GAAlC,MAAM;QACU,UAAU,GAA1B,OAAO;sBAqDjB;IAED;;;;;;;OAOG;IACH;QAN0B,YAAY,GAA3B,MAAM;QACQ,MAAM,EAApB,MAAM;QACS,WAAW,GAA1B,MAAM;QACyB,GAAG;QAChC,MAAM,CA2ClB;IAGD;;;;;;;;;;;OAWG;IACH,mGAVW,MAAM,GAQJ,OAAO,CAuDnB;IAvbG;;;OAGG;IACH,QAFU,MAAM,CAEiC;IAMjD;;;OAGG;IACH,YAFU,eAAQ,IAAI,CAET;IAmBjB;;;;OAIG;IACH,8DAJmB,mBAAmB,UAAQ,MAAM,WAEvC,QAAQ,MAAM,CAAC,CA2D3B;CAyVJ;;IAID;;;OAGG;IACH,uCAMC;;mBAhfkB,aAAa;oCACI,0BAA0B;oBAX1C,yBAAyB;mBAK1B,iBAAiB;oBAEhB,8BAA8B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnimationUtils.d.ts","sourceRoot":"","sources":["../../../../src/engine/animation/AnimationUtils.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AnimationUtils.d.ts","sourceRoot":"","sources":["../../../../src/engine/animation/AnimationUtils.js"],"names":[],"mappings":"AAsBA;;;;;GAKG;AACH,uDAJW,MAAM,6CA2BhB;AAED;;;;;GAKG;AACH,yDAJW,MAAM,6CA6DhB;AAGD;;;;;GAKG;AACH,gDAJW,MAAM,6CAmChB;AAED;;;;;;;;GAQG;AACH;;;;;;iBAoFC"}
|
|
@@ -6,7 +6,8 @@ import { Transform } from "../ecs/transform/Transform.js";
|
|
|
6
6
|
import { removeComponentsExcept } from "../ecs/util/removeComponentsExcept.js";
|
|
7
7
|
import { createSound, createTimer } from "../EntityCreator.js";
|
|
8
8
|
import Mesh from "../graphics/ecs/mesh/Mesh.js";
|
|
9
|
-
import Trail2D
|
|
9
|
+
import Trail2D from "../graphics/ecs/trail2d/Trail2D.js";
|
|
10
|
+
import { Trail2DFlags } from "../graphics/ecs/trail2d/Trail2DFlags.js";
|
|
10
11
|
import { ParticleEmitter } from "../graphics/particles/particular/engine/emitter/ParticleEmitter.js";
|
|
11
12
|
import { ParticleEmitterFlag } from "../graphics/particles/particular/engine/emitter/ParticleEmitterFlag.js";
|
|
12
13
|
import { SequenceBehavior } from "../intelligence/behavior/composite/SequenceBehavior.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"System.d.ts","sourceRoot":"","sources":["../../../../src/engine/ecs/System.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"System.d.ts","sourceRoot":"","sources":["../../../../src/engine/ecs/System.js"],"names":[],"mappings":"0BAiKU,MAAM;;;;;;;;AAtJhB;;;GAGG;AACH;IAEI;;;OAGG;IACH,uCAAqB;IAErB;;;OAGG;IACH,gBAFU,cAAe,WAAW,CAAC,CAEU;IAE/C;;;OAGG;IACH,oBAAkB;IAElB;;;;;;;;OAQG;IACH,iBAFU,6BAA6B,CAElB;IAGrB;;OAEG;IACH,mCAcC;IAED;;;;OAIG;IACH,oCAFY,MAAM,CA8BjB;IAED,0EAGC;IAED,2EAEC;IAED,wCAEC;IAED,0CAEC;IAIL;;;OAGG;IACH,mBAFU,OAAO,CAEQ;IAEzB;;;;OAIG;IACH,yBAA4B;IAG5B;;;OAGG;IACH,oBAAuB;CApBtB;;;;AA2DD;;;;GAIG;AACH,wDAFa,MAAM,CAKlB;0BAjLyB,mCAAmC;qBADxC,6BAA6B"}
|
package/src/engine/ecs/System.js
CHANGED
|
@@ -118,6 +118,12 @@ class System {
|
|
|
118
118
|
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
+
/**
|
|
122
|
+
* @readonly
|
|
123
|
+
* @type {boolean}
|
|
124
|
+
*/
|
|
125
|
+
System.prototype.isSystem = true;
|
|
126
|
+
|
|
121
127
|
/**
|
|
122
128
|
* Fixed update function, every step happens with the same exact time increment
|
|
123
129
|
* useful for systems that must have a fixed time step to be predictable and stable, such as physics
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hideEntityGracefully.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/util/hideEntityGracefully.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hideEntityGracefully.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/util/hideEntityGracefully.js"],"names":[],"mappings":"AAkKA;;;;;;GAMG;AACH,8GAFY,MAAM,CAmCjB"}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TransitionPropertyVectorXBehavior
|
|
3
|
+
} from "../../../../../model/game/story/behaviors/generic/TransitionPropertyVectorXBehavior.js";
|
|
4
|
+
import { TweenVector1Behavior } from "../../../../../model/game/util/behavior/TweenVector1Behavior.js";
|
|
5
|
+
import { TweenVector3Behavior } from "../../../../../model/game/util/behavior/TweenVector3Behavior.js";
|
|
1
6
|
import { max2 } from "../../../core/math/max2.js";
|
|
2
7
|
import { min2 } from "../../../core/math/min2.js";
|
|
8
|
+
import { Light } from "../../graphics/ecs/light/Light.js";
|
|
9
|
+
import Mesh, { MeshFlags } from "../../graphics/ecs/mesh/Mesh.js";
|
|
10
|
+
import Trail2D from "../../graphics/ecs/trail2d/Trail2D.js";
|
|
11
|
+
import { Trail2DFlags } from "../../graphics/ecs/trail2d/Trail2DFlags.js";
|
|
3
12
|
import { ParticleEmitter } from "../../graphics/particles/particular/engine/emitter/ParticleEmitter.js";
|
|
4
13
|
import { ParticleEmitterFlag } from "../../graphics/particles/particular/engine/emitter/ParticleEmitterFlag.js";
|
|
5
|
-
import Trail2D, { Trail2DFlags } from "../../graphics/ecs/trail2d/Trail2D.js";
|
|
6
|
-
import { Transform } from "../transform/Transform.js";
|
|
7
|
-
import Mesh, { MeshFlags } from "../../graphics/ecs/mesh/Mesh.js";
|
|
8
|
-
import { TweenVector3Behavior } from "../../../../../model/game/util/behavior/TweenVector3Behavior.js";
|
|
9
|
-
import { BehaviorComponent } from "../../intelligence/behavior/ecs/BehaviorComponent.js";
|
|
10
14
|
import { SequenceBehavior } from "../../intelligence/behavior/composite/SequenceBehavior.js";
|
|
15
|
+
import { BehaviorComponent } from "../../intelligence/behavior/ecs/BehaviorComponent.js";
|
|
11
16
|
import { DieBehavior } from "../../intelligence/behavior/ecs/DieBehavior.js";
|
|
12
|
-
import { SoundEmitter } from "../../sound/ecs/emitter/SoundEmitter.js";
|
|
13
|
-
import { TweenVector1Behavior } from "../../../../../model/game/util/behavior/TweenVector1Behavior.js";
|
|
14
17
|
import { DelayBehavior } from "../../intelligence/behavior/util/DelayBehavior.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
TransitionPropertyVectorXBehavior
|
|
18
|
-
} from "../../../../../model/game/story/behaviors/generic/TransitionPropertyVectorXBehavior.js";
|
|
18
|
+
import { SoundEmitter } from "../../sound/ecs/emitter/SoundEmitter.js";
|
|
19
|
+
import { Transform } from "../transform/Transform.js";
|
|
19
20
|
|
|
20
21
|
/**
|
|
21
22
|
* @readonly
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
export type Trail2DFlags = number;
|
|
2
|
-
export namespace Trail2DFlags {
|
|
3
|
-
let Spawning: number;
|
|
4
|
-
let Aging: number;
|
|
5
|
-
let Built: number;
|
|
6
|
-
}
|
|
7
1
|
export default Trail2D;
|
|
8
2
|
declare class Trail2D {
|
|
9
3
|
static fromJSON(json: any): Trail2D;
|
|
@@ -120,6 +114,15 @@ declare class Trail2D {
|
|
|
120
114
|
* @param {Trail2D} other
|
|
121
115
|
*/
|
|
122
116
|
equals(other: Trail2D): boolean;
|
|
117
|
+
/**
|
|
118
|
+
*
|
|
119
|
+
* @param {number} x
|
|
120
|
+
* @param {number} y
|
|
121
|
+
* @param {number} z
|
|
122
|
+
* @param {number} head_age
|
|
123
|
+
* @returns {boolean}
|
|
124
|
+
*/
|
|
125
|
+
updateHead(x: number, y: number, z: number, head_age: number): boolean;
|
|
123
126
|
}
|
|
124
127
|
declare namespace Trail2D {
|
|
125
128
|
export let typeName: string;
|
|
@@ -131,5 +134,6 @@ import Vector3 from "../../../../core/geom/Vector3.js";
|
|
|
131
134
|
import { RibbonX } from "../../trail/x/RibbonX.js";
|
|
132
135
|
import { RibbonXMaterialSpec } from "../../trail/x/RibbonXMaterialSpec.js";
|
|
133
136
|
import { BvhClient } from "../../../../core/bvh2/bvh3/BvhClient.js";
|
|
137
|
+
import { Trail2DFlags } from "./Trail2DFlags.js";
|
|
134
138
|
import { makeGradientTrail } from "./makeGradientTrail.js";
|
|
135
139
|
//# sourceMappingURL=Trail2D.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Trail2D.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/ecs/trail2d/Trail2D.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Trail2D.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/ecs/trail2d/Trail2D.js"],"names":[],"mappings":";AAwBA;IAkJI,oCAMC;IAtJD;;;OAGG;IACH,QAFU,MAAM,CAES;IAEzB;;;OAGG;IACH,OAFU,MAAM,CAEM;IAEtB;;;OAGG;IACH,MAFU,MAAM,CAEP;IAET;;;OAGG;IACH,eAFU,MAAM,CAEE;IAElB;;;OAGG;IACH,qBAFU,MAAM,CAEQ;IAExB;;;OAGG;IACH,gBAFU,OAAO,CAEe;IAEhC;;;;OAIG;IACH,iBAFU,OAAO,CAEM;IAEvB;;;OAGG;IACH,QAFU,OAAO,GAAC,IAAI,CAER;IAEd;;;OAGG;IACH,UAFU,mBAAmB,CAEQ;IAErC;;;OAGG;IACH,cAFU,SAAS,CAEG;IAEtB;;;OAGG;IACH,cAAsB;IAEtB,gBAQC;IAMD,4BAEC;IAND,yBAEC;IAMD;;;;OAIG;IACH,cAHW,MAAM,GAAC,YAAY,GACjB,IAAI,CAIhB;IAED;;;;OAIG;IACH,gBAHW,MAAM,GAAC,YAAY,GACjB,IAAI,CAIhB;IAED;;;;OAIG;IACH,gBAHW,MAAM,GAAC,YAAY,SACnB,OAAO,QAQjB;IAED;;;;OAIG;IACH,cAHW,MAAM,GAAC,YAAY,GACjB,OAAO,CAInB;IAED;;;OAGG;IACH,qBAFW,MAAM,QAehB;IADG,kHAAgB;IAWpB;;;;;;;;;;;aAcC;IAGD;;;;;;MAQC;IAED;;;OAGG;IACH,cAFW,OAAO,WASjB;IAED;;;;;;;OAOG;IACH,cANW,MAAM,KACN,MAAM,KACN,MAAM,YACN,MAAM,GACJ,OAAO,CA0CnB;CAEJ;;;;;;oBArQmB,kCAAkC;oBADlC,kCAAkC;wBAK9B,0BAA0B;oCACd,sCAAsC;0BAPhD,yCAAyC;6BAStC,mBAAmB;kCADd,wBAAwB"}
|
|
@@ -6,27 +6,22 @@
|
|
|
6
6
|
import { BvhClient } from "../../../../core/bvh2/bvh3/BvhClient.js";
|
|
7
7
|
import Vector3 from "../../../../core/geom/Vector3.js";
|
|
8
8
|
import Vector4 from "../../../../core/geom/Vector4.js";
|
|
9
|
+
import { clamp01 } from "../../../../core/math/clamp01.js";
|
|
9
10
|
import ThreeFactory from "../../three/ThreeFactory.js";
|
|
11
|
+
import { RIBBON_ATTRIBUTE_ADDRESS_AGE } from "../../trail/x/ribbon_attributes_spec.js";
|
|
10
12
|
import { RibbonX } from "../../trail/x/RibbonX.js";
|
|
11
13
|
import { RibbonXMaterialSpec } from "../../trail/x/RibbonXMaterialSpec.js";
|
|
12
14
|
import { makeGradientTrail } from "./makeGradientTrail.js";
|
|
15
|
+
import { Trail2DFlags } from "./Trail2DFlags.js";
|
|
13
16
|
|
|
14
|
-
|
|
15
|
-
* @readonly
|
|
16
|
-
* @enum {number}
|
|
17
|
-
*/
|
|
18
|
-
export const Trail2DFlags = {
|
|
19
|
-
Spawning: 1,
|
|
20
|
-
Aging: 2,
|
|
21
|
-
Built: 4,
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
const DEFAULT_FLAGS = Trail2DFlags.Spawning | Trail2DFlags.Aging;
|
|
17
|
+
const DEFAULT_FLAGS = Trail2DFlags.Spawning | Trail2DFlags.Aging | Trail2DFlags.BoundsNeedUpdate;
|
|
25
18
|
|
|
26
19
|
const DEFAULT_MAX_AGE = 5;
|
|
27
20
|
|
|
28
21
|
const DEFAULT_WIDTH = 1;
|
|
29
22
|
|
|
23
|
+
const v3_array = new Float32Array(3);
|
|
24
|
+
|
|
30
25
|
class Trail2D {
|
|
31
26
|
|
|
32
27
|
/**
|
|
@@ -97,9 +92,13 @@ class Trail2D {
|
|
|
97
92
|
flags = DEFAULT_FLAGS;
|
|
98
93
|
|
|
99
94
|
dispose() {
|
|
100
|
-
if (this.ribbon
|
|
101
|
-
|
|
95
|
+
if (this.ribbon === null) {
|
|
96
|
+
// nothing to dispose
|
|
97
|
+
return;
|
|
102
98
|
}
|
|
99
|
+
|
|
100
|
+
this.ribbon.dispose();
|
|
101
|
+
this.ribbon = null;
|
|
103
102
|
}
|
|
104
103
|
|
|
105
104
|
get textureURL() {
|
|
@@ -217,6 +216,55 @@ class Trail2D {
|
|
|
217
216
|
;
|
|
218
217
|
}
|
|
219
218
|
|
|
219
|
+
/**
|
|
220
|
+
*
|
|
221
|
+
* @param {number} x
|
|
222
|
+
* @param {number} y
|
|
223
|
+
* @param {number} z
|
|
224
|
+
* @param {number} head_age
|
|
225
|
+
* @returns {boolean}
|
|
226
|
+
*/
|
|
227
|
+
updateHead(x, y, z, head_age) {
|
|
228
|
+
const ribbon = this.ribbon;
|
|
229
|
+
|
|
230
|
+
const maxAge = this.maxAge;
|
|
231
|
+
|
|
232
|
+
const refitTimeDelta = maxAge / ribbon.getCount();
|
|
233
|
+
|
|
234
|
+
let head_index = ribbon.getHeadIndex();
|
|
235
|
+
ribbon.getPointPosition(v3_array, head_index);
|
|
236
|
+
|
|
237
|
+
const head_position_changed = x !== v3_array[0]
|
|
238
|
+
|| y !== v3_array[1]
|
|
239
|
+
|| z !== v3_array[2];
|
|
240
|
+
|
|
241
|
+
if (this.timeSinceLastUpdate >= refitTimeDelta) {
|
|
242
|
+
|
|
243
|
+
if (
|
|
244
|
+
head_position_changed
|
|
245
|
+
) {
|
|
246
|
+
// make sure that this is a new position before rotating new segment
|
|
247
|
+
this.timeSinceLastUpdate = 0;
|
|
248
|
+
|
|
249
|
+
// rotating segment
|
|
250
|
+
ribbon.rotate();
|
|
251
|
+
|
|
252
|
+
head_index = ribbon.getHeadIndex();
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
if (head_position_changed) {
|
|
257
|
+
ribbon.setPointPosition(head_index, x, y, z);
|
|
258
|
+
|
|
259
|
+
this.setFlag(Trail2DFlags.BoundsNeedUpdate);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
// set head to fresh value
|
|
263
|
+
ribbon.setPointAttribute_Scalar(head_index, RIBBON_ATTRIBUTE_ADDRESS_AGE, head_age);
|
|
264
|
+
ribbon.setPointAlpha(head_index, clamp01(head_age / maxAge));
|
|
265
|
+
|
|
266
|
+
return head_position_changed;
|
|
267
|
+
}
|
|
220
268
|
|
|
221
269
|
}
|
|
222
270
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Trail2DFlags.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/ecs/trail2d/Trail2DFlags.js"],"names":[],"mappings":"2BAEU,MAAM"}
|