@woosh/meep-engine 2.120.3 → 2.120.5

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 (35) hide show
  1. package/README.md +36 -9
  2. package/editor/Editor.d.ts.map +1 -1
  3. package/editor/SelectionVisualizer.d.ts.map +1 -1
  4. package/editor/actions/concrete/ComponentAddAction.d.ts.map +1 -1
  5. package/editor/actions/concrete/EntityCreateAction.d.ts.map +1 -1
  6. package/editor/actions/concrete/SelectionAddAction.d.ts.map +1 -0
  7. package/editor/actions/concrete/SelectionClearAction.d.ts.map +1 -0
  8. package/editor/actions/concrete/TransformModifyAction.d.ts.map +1 -0
  9. package/editor/enableEditor.d.ts.map +1 -1
  10. package/package.json +1 -1
  11. package/src/core/geom/3d/mat4/decompose_matrix_4_array.d.ts +7 -3
  12. package/src/core/geom/3d/mat4/decompose_matrix_4_array.d.ts.map +1 -1
  13. package/src/core/geom/3d/mat4/decompose_matrix_4_array.js +2 -2
  14. package/src/core/geom/3d/ray/Ray3.d.ts +11 -0
  15. package/src/core/geom/3d/ray/Ray3.d.ts.map +1 -1
  16. package/src/core/geom/3d/ray/Ray3.js +25 -0
  17. package/src/core/model/stat/Stat.d.ts.map +1 -1
  18. package/src/core/model/stat/Stat.js +38 -19
  19. package/src/engine/Clock.d.ts +14 -3
  20. package/src/engine/Clock.d.ts.map +1 -1
  21. package/src/engine/Clock.js +14 -3
  22. package/src/engine/ecs/Entity.d.ts.map +1 -1
  23. package/src/engine/ecs/Entity.js +6 -0
  24. package/editor/actions/concrete/ActionUpdateTexture.d.ts +0 -12
  25. package/editor/actions/concrete/ActionUpdateTexture.d.ts.map +0 -1
  26. package/editor/actions/concrete/ArrayCopyAction.d.ts +0 -20
  27. package/editor/actions/concrete/ArrayCopyAction.d.ts.map +0 -1
  28. package/editor/actions/concrete/ComponentRemoveAction.d.ts +0 -11
  29. package/editor/actions/concrete/ComponentRemoveAction.d.ts.map +0 -1
  30. package/editor/actions/concrete/ModifyPatchSampler2DAction.d.ts.map +0 -1
  31. package/editor/actions/concrete/ModifyPatchTextureArray2DAction.d.ts +0 -38
  32. package/editor/actions/concrete/PaintTerrainOverlayAction.d.ts +0 -23
  33. package/editor/actions/concrete/PatchTerrainHeightAction.d.ts +0 -19
  34. package/editor/actions/concrete/SelectionRemoveAction.d.ts +0 -10
  35. package/editor/actions/concrete/WriteGridValueAction.d.ts +0 -15
package/README.md CHANGED
@@ -20,20 +20,49 @@ Most of the test code is significantly larger than the code that is being tested
20
20
 
21
21
  ## Features
22
22
 
23
+ ---
24
+ ## Input
25
+ * Touch / Mouse / Keyboard device support
26
+ * Unified abstraction of input, offering both query and event-driven APIs
27
+ * Input binding implementation via `InputController` component
28
+
29
+ ## Rendering & Lighting
23
30
  ### Automatic instancing
24
31
  This will minimize the number of draw calls and improve performance.
25
- ### Decals
26
- Decals in meep are done on the GPU, and as a result you can have a lot of them in your scene. The most I tested in a single scene is 1,000,000 which works quite well. Decals are useful for bullet holes, blood splatter and various scene decorations such as signs and scuff marks.
27
32
  ### Clustered lighting, aka Forward+
28
33
  Meep implements clustered lighting technique which allows you to have a pretty much an unlimited number of point lights in your scene. All the other light types are supported as well, but only point lights are clustered for now. Point lights are useful for various effects, like muzzle flashes, grenade explosions, torches, etc.
34
+ ### Terrain
35
+ The terrain engine is chunk-based, which means that terrain is split into rectangular pieces internally, and they are built on-the-fly inside a web-worker based on camera position. Terrain is automatically culled based on camera position, so you're only drawing the chunks that are in view. Terrain supports layers just like Unity, but unlike Unity - Meep supports up to 256 layers of terrain instead of 4.
36
+ ### Path tracer
37
+ Pure JS implementation of a path tracer, using engine's BVH (See Physics section)
38
+
39
+ ## Visual Effects
40
+ ### Decals
41
+ Decals in meep are done on the GPU, and as a result you can have a lot of them in your scene. The most I tested in a single scene is 1,000,000 which works quite well. Decals are useful for bullet holes, blood splatter and various scene decorations such as signs and scuff marks.
29
42
  ### Particles
30
43
  Meep's particle engine ("Particular") is optimized for game development needs, this means supporting complex effects and being able to spawn/destroy many particle systems every frame. There are a lot of particle engines out there, but they tend to have costly spawning routines, take up a lot of draw calls and not manage memory well, which leads to pretty poor performance in games. My particle engine supports full particle lighting as well, and soft particles. On top of that - all particles are automatically atlassed in the background and are compiled with just 4 shaders. This means that no matter how many particle effects you have - there will be no shader switching and no texture switching, and there will be no delays associated with shader compilation. Particles are culled, so particle systems that are off-screen are not rendered and simulation for them can be paused to save CPU resources (this is automatic behavior)
31
44
  ### Trails
32
45
  Meep implements a fairly complex trail system, where a trail can be attached to an entity, and it will create a trail behind.
33
- ### Terrain
34
- The terrain engine is chunk-based, which means that terrain is split into rectangular pieces internally, and they are built on-the-fly inside a web-worker based on camera position. Terrain is automatically culled based on camera position, so you're only drawing the chunks that are in view. Terrain supports layers just like Unity, but unlike Unity - Meep supports up to 256 layers of terrain instead of 4.
46
+
47
+ ## Audio
35
48
  ### Sound engine
36
49
  Meep has a custom sound engine which is culled and has custom attenuation, this allows scenes to have 1000s of positional audio sources without any extra cost in terms of performance
50
+
51
+ ## Physics
52
+ ### High performance spatial index
53
+ Meep features a BVH (bounding volume hierarchy) implementation optimized for speed and memory usage that provides a wide variety of spatial queries, such as:
54
+ * Ray
55
+ * Box
56
+ * Sphere
57
+ * Planar
58
+ * Frustum
59
+ * Point intersection
60
+ * Point distance
61
+ ### Inverse kinematics
62
+ * Meep has 2 very useful IK solvers to fix foot position for characters on uneven terrain or stairs, aligning both the position and orientation of character feet. This works for hands as well if you want and is not limited to bipeds, the system works just as well for, say, spiders.
63
+ * Highly optimized FABRIK inverse kinematics solver for more complex IK use cases
64
+
65
+ ## Other
37
66
  ### Asset streaming
38
67
  Meep in general is a web-first engine, all assets are streamed, meaning that the engine is up and running even before any models/texture are loaded, and you're free to decide when to let the player see your level, wait until everything is loaded or drop them in as soon as you can. There is a pre-loader module in case you want to load some assets in bulk before starting the game.
39
68
  ### AI tools
@@ -44,11 +73,9 @@ including, but not limited to:
44
73
  * state optimization (useful for decision-making)
45
74
  * grid-based path finding (optimized for 10,000s of queries per second)
46
75
  * resource allocation solver (useful for planning, given certain resources such as bullets/grenades/money/health - plan what actions to take to optimize your chances of winning)
47
- * and a number of other useful tools to complement AI development.
48
- ### Inverse kinematics
49
- Meep has 2 very useful IK solvers to fix foot position for characters on uneven terrain or stairs, aligning both the position and orientation of character feet. This works for hands as well if you want and is not limited to bipeds, the system works just as well for, say, spiders.
76
+ * and a number of other useful tools to complement development of game AI and other intelligent behavior use cases.
50
77
  ### High-performance serialization
51
- Extremely compact serialization system. You can save/load your scenes from files. This serialization system supports format changes, so as you develop your game - old saves will be supported and the system will automatically upgrade them to the most recent version, so the player doesn't have to lose any data.
78
+ Extremely compact binary serialization system. You can save/load your scenes from files. This serialization system supports format changes, so as you develop your game - old saves will be supported and the system will automatically upgrade them to the most recent version, so the player doesn't have to lose any data.
52
79
  ### Achievements
53
80
  Achievements work with Blackboard components and are very easy to define. There is an abstraction system that helps connect your achievements to various platforms such as Steam or XBox (you'd have to implement that binding yourself though), by default it comes with a browser backend, storing data in IndexedDB. I also have bindings for Steam and NewGrounds that I can share.
54
81
  ### UI system
@@ -58,4 +85,4 @@ You're free to use it or not, the engine works just fine without it. The system
58
85
  For more information, please refer to the documentation
59
86
 
60
87
  ---
61
- Copyright © 2024 Company Named Limited, All Rights Reserved
88
+ Copyright © 2025 Company Named Limited, All Rights Reserved
@@ -1 +1 @@
1
- {"version":3,"file":"Editor.d.ts","sourceRoot":"","sources":["Editor.js"],"names":[],"mappings":";AAwYA;;;;;GAKG;AACH,gCA+MC;;IA9MG,6BAAwC;IACxC,uBAAkC;IAClC,qBAA2B;IAC3B,oCAAwC;IACxC,0CAAyD;IACzD,yBAAoC;IAEpC;;;OAGG;IACH,sBAFU,IAAI,GAAG,aAAa,CAEO;IAIrC,qBAAuC;IAEvC,uCAAkD;IAElD,iBAAgB;IAEhB,kBAAoB;IAsLpB;yBAvBW,aAAa;MAyBvB;IAGL,mBAaC;IANG,uBAAyB;IAEzB,cAAmC;IAGnC,oBAAsB;IAG1B;;;OAGG;IACH,+BA2BC;IAED;;;OAGG;IACH,sCAgDC;IA3CG,eAAoB;IA6CxB;;;OAGG;IACH,wCAmBC;IAED,6BAMC;IAED,eA+BC;IAED;;;;OAIG;IACH,6BAFa,OAAO,CAInB;;8BA5sB6B,4BAA4B;uBAEnC,8BAA8B;iBA5DpC,qCAAqC;gCAatB,6CAA6C;oCA8CzC,0BAA0B;4BAFlC,0BAA0B;mBA1CnC,6BAA6B;+BAyCjB,6BAA6B;uBAMrC,sBAAsB"}
1
+ {"version":3,"file":"Editor.d.ts","sourceRoot":"","sources":["Editor.js"],"names":[],"mappings":";AAwYA;;;;;GAKG;AACH,gCA+MC;;IA9MG,6BAAwC;IACxC,uBAAkC;IAClC,qBAA2B;IAC3B,oCAAwC;IACxC,0CAAyD;IACzD,yBAAoC;IAEpC;;;OAGG;IACH,sBAFU,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAEO;IAIrC,qBAAuC;IAEvC,uCAAkD;IAElD,iBAAgB;IAEhB,kBAAoB;IAsLpB;yBAvBW,aAAa;MAyBvB;IAGL,mBAaC;IANG,uBAAyB;IAEzB,cAAmC;IAGnC,oBAAsB;IAG1B;;;OAGG;IACH,oBAFW,GAAG,QA6Bb;IAED;;;OAGG;IACH,eAFW,MAAM,iBAkDhB;IA3CG,eAAoB;IA6CxB;;;OAGG;IACH,2BAFW,KAAK,QAqBf;IAED,6BAMC;IAED,eA+BC;IAED;;;;OAIG;IACH,uBAHW,GAAG,GACD,OAAO,CAInB;;8BA5sB6B,4BAA4B;uBAEnC,8BAA8B;iBA5DpC,qCAAqC;gCAatB,6CAA6C;oCA8CzC,0BAA0B;4BAFlC,0BAA0B;mBA1CnC,6BAA6B;+BAyCjB,6BAA6B;uBAMrC,sBAAsB"}
@@ -1 +1 @@
1
- {"version":3,"file":"SelectionVisualizer.d.ts","sourceRoot":"","sources":["SelectionVisualizer.js"],"names":[],"mappings":"AA8EA;IACI;;;;OAIG;IACH,4BAiDC;IAhDG,eAAoB;IAWN,aAAwB;IA4BtC;;;MAGC;IAED,0BAGC;IAGL,gBAQC;IAED,iBASC;CACJ;sBA3JgC,OAAO;8BAEV,4CAA4C"}
1
+ {"version":3,"file":"SelectionVisualizer.d.ts","sourceRoot":"","sources":["SelectionVisualizer.js"],"names":[],"mappings":"AA8EA;IACI;;;;OAIG;IACH,oBAHW,MAAM,EAoDhB;IAhDG,eAAoB;IAWN,aAAwB;IA4BtC;;;MAGC;IAED,0BAGC;IAGL,gBAQC;IAED,iBASC;CACJ;sBA3JgC,OAAO;8BAEV,4CAA4C"}
@@ -1 +1 @@
1
- {"version":3,"file":"ComponentAddAction.d.ts","sourceRoot":"","sources":["ComponentAddAction.js"],"names":[],"mappings":";AAEA;IACI,yCASC;IAPG,YAAoB;IACpB,eAA0B;IAC1B;;;OAGG;IACH,gCAAmB;IAGvB,kCAqBC;IAED,mCAGC;CACJ;uBAzCsB,0CAA0C"}
1
+ {"version":3,"file":"ComponentAddAction.d.ts","sourceRoot":"","sources":["ComponentAddAction.js"],"names":[],"mappings":";AAEA;IACI,yCASC;IAPG,YAAoB;IACpB,eAA0B;IAC1B;;;OAGG;IACH,SAFU,sBAAsB,CAEb;IAGvB,kCAqBC;IAED,mCAGC;CACJ;uBAzCsB,0CAA0C"}
@@ -1 +1 @@
1
- {"version":3,"file":"EntityCreateAction.d.ts","sourceRoot":"","sources":["EntityCreateAction.js"],"names":[],"mappings":";AAEA;IACI,cAaC;IAXG;;;OAGG;IACH,QAFU,MAAM,GAAC,IAAI,CAEH;IAElB;;;OAGG;IACH,4BAAe;IAGnB,kCAkBC;IAED,mCAEC;CACJ;uBAzCsB,0CAA0C"}
1
+ {"version":3,"file":"EntityCreateAction.d.ts","sourceRoot":"","sources":["EntityCreateAction.js"],"names":[],"mappings":";AAEA;IACI,cAaC;IAXG;;;OAGG;IACH,QAFU,MAAM,GAAC,IAAI,CAEH;IAElB;;;OAGG;IACH,KAFU,sBAAsB,CAEjB;IAGnB,kCAkBC;IAED,mCAEC;CACJ;uBAzCsB,0CAA0C"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectionAddAction.d.ts","sourceRoot":"","sources":["SelectionAddAction.js"],"names":[],"mappings":";AAGA;IACI;;;;OAIG;IACH,sBAHW,GAAG,EAAE,EAWf;IANG,cAAoB;IACpB;;;OAGG;IACH,UAFU,GAAG,EAAE,CAES;IAG5B,kCAMC;IAED,mCAEC;CACJ;uBA9BsB,0CAA0C"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectionClearAction.d.ts","sourceRoot":"","sources":["SelectionClearAction.js"],"names":[],"mappings":";AAEA;IACI,cAGC;IADG,cAAoB;IAGxB,kCAGC;IAED,mCAEC;CACJ;uBAhBsB,0CAA0C"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TransformModifyAction.d.ts","sourceRoot":"","sources":["TransformModifyAction.js"],"names":[],"mappings":";AAGA;IACI;;;;;OAKG;IACH,mCAHW,SAAS,EASnB;IAHG,cAAoB;IACpB,oBAAwB;IACxB,YAAoB;IAqBxB,mCAMC;CACJ;uBA1CsB,0CAA0C;0BADvC,gDAAgD"}
@@ -1 +1 @@
1
- {"version":3,"file":"enableEditor.d.ts","sourceRoot":"","sources":["enableEditor.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,qEAHoB,MAAM;;;;YACkD,MAAM;EAsEjF;mBA5EkB,aAAa"}
1
+ {"version":3,"file":"enableEditor.d.ts","sourceRoot":"","sources":["enableEditor.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,qCAJW,MAAM,mBACN,CAAS,IAAM,EAAN,MAAM,KAAE,GAAC,GAChB;IAAC,MAAM,WAAU;IAAC,OAAO,WAAW;IAAC,MAAM,WAAW;IAAC,MAAM,EAAE,MAAM,CAAA;CAAC,CAsElF;mBA5EkB,aAAa"}
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "description": "Fully featured ECS game engine written in JavaScript",
6
6
  "type": "module",
7
7
  "author": "Alexander Goldring",
8
- "version": "2.120.3",
8
+ "version": "2.120.5",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -1,9 +1,13 @@
1
1
  /**
2
2
  *
3
3
  * @param {number[]} mat4
4
- * @param {Vector3} position
4
+ * @param {Vector3|{set(x:number,y:number,z:number)}} position
5
5
  * @param {Quaternion} rotation
6
- * @param {Vector3} scale
6
+ * @param {Vector3|{set(x:number,y:number,z:number)}} scale
7
7
  */
8
- export function decompose_matrix_4_array(mat4: number[], position: Vector3, rotation: Quaternion, scale: Vector3): void;
8
+ export function decompose_matrix_4_array(mat4: number[], position: Vector3 | {
9
+ set(x: number, y: number, z: number): any;
10
+ }, rotation: Quaternion, scale: Vector3 | {
11
+ set(x: number, y: number, z: number): any;
12
+ }): void;
9
13
  //# sourceMappingURL=decompose_matrix_4_array.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"decompose_matrix_4_array.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/mat4/decompose_matrix_4_array.js"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,+CALW,MAAM,EAAE,YACR,OAAO,YACP,UAAU,SACV,OAAO,QA0DjB"}
1
+ {"version":3,"file":"decompose_matrix_4_array.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/mat4/decompose_matrix_4_array.js"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,+CALW,MAAM,EAAE,YACR,OAAO,GAAC;IAAC,GAAG,CAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,MAAM,OAAC;CAAC,YACzC,UAAU,SACV,OAAO,GAAC;IAAC,GAAG,CAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,MAAM,OAAC;CAAC,QA0DnD"}
@@ -3,9 +3,9 @@ import { v3_length } from "../../vec3/v3_length.js";
3
3
  /**
4
4
  *
5
5
  * @param {number[]} mat4
6
- * @param {Vector3} position
6
+ * @param {Vector3|{set(x:number,y:number,z:number)}} position
7
7
  * @param {Quaternion} rotation
8
- * @param {Vector3} scale
8
+ * @param {Vector3|{set(x:number,y:number,z:number)}} scale
9
9
  */
10
10
  export function decompose_matrix_4_array(mat4, position, rotation, scale) {
11
11
  const m11 = mat4[0];
@@ -94,5 +94,16 @@ export class Ray3 extends Float32Array<ArrayBuffer> {
94
94
  * @returns {boolean}
95
95
  */
96
96
  equals(other: Ray3): boolean;
97
+ /**
98
+ * Compute `t` value for a given point in 3d space.
99
+ * This is the distance along the direction from origin of the ray
100
+ * Value will be negative if the ray is pointing away from the point
101
+ * PRECONDITION: ray direction must be normalized
102
+ * @param {number} x
103
+ * @param {number} y
104
+ * @param {number} z
105
+ * @returns {number}
106
+ */
107
+ computeSignedDistance(x: number, y: number, z: number): number;
97
108
  }
98
109
  //# sourceMappingURL=Ray3.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Ray3.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/ray/Ray3.js"],"names":[],"mappings":"AASA;;;GAGG;AACH;IA0MI;;;;;;;;;;OAUG;IACH,sBATW,MAAM,YACN,MAAM,YACN,MAAM,eACN,MAAM,eACN,MAAM,eACN,MAAM,UACN,MAAM,GACL,IAAI,CAqBf;IAvOD,cAKC;IAMD,iBAEC;IAND,gBAEC;IAGG,OAAW;IAOf;;;OAGG;IACH,cAFW,MAAM,EAAE,GAAC,YAAY,EAI/B;IAVD,cAMW,MAAM,EAAE,GAAC,YAAY,CAJ/B;IAUD,uBAEC;IAED,uBAEC;IAED,uBAEC;IAGD;;;;;OAKG;IACH,aAJW,MAAM,KACN,MAAM,KACN,MAAM,QAUhB;IAHG,UAAW;IACX,UAAW;IACX,UAAW;IAQf;;;OAGG;IACH,iBAFW,MAAM,EAAE,GAAC,YAAY,EAI/B;IAVD,iBAMW,MAAM,EAAE,GAAC,YAAY,CAJ/B;IAWD,0BAEC;IAED,0BAEC;IAED,0BAEC;IAED;;;;;OAKG;IACH,gBAJW,MAAM,KACN,MAAM,KACN,MAAM,QAUhB;IAHG,UAAW;IACX,UAAW;IACX,UAAW;IAGf,2BAEC;IAED;;;;;;;OAOG;IACH,gCANW,MAAM,KACN,MAAM,KACN,MAAM,aACN,MAAM,EAAE,GAAC,YAAY,GAAC,IAAI,sBAC1B,MAAM,EAAE,GAAC,YAAY,GAAC,IAAI,QA6BpC;IAED;;;OAGG;IACH,uBAFW,MAAM,QAMhB;IAED;;;OAGG;IACH,iBAFW,MAAM,EAAE,GAAC,IAAI,GAAC,YAAY,QAepC;IAED;;;OAGG;IACH,SAFa,IAAI,CAQhB;IAED;;;OAGG;IACH,YAFW,IAAI,QAId;IAED,eAEC;IAED;;;;OAIG;IACH,cAHW,IAAI,GACF,OAAO,CAInB;CAiCJ"}
1
+ {"version":3,"file":"Ray3.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/ray/Ray3.js"],"names":[],"mappings":"AAUA;;;GAGG;AACH;IAkOI;;;;;;;;;;OAUG;IACH,sBATW,MAAM,YACN,MAAM,YACN,MAAM,eACN,MAAM,eACN,MAAM,eACN,MAAM,UACN,MAAM,GACL,IAAI,CAqBf;IA/PD,cAKC;IAMD,iBAEC;IAND,gBAEC;IAGG,OAAW;IAOf;;;OAGG;IACH,cAFW,MAAM,EAAE,GAAC,YAAY,EAI/B;IAVD,cAMW,MAAM,EAAE,GAAC,YAAY,CAJ/B;IAUD,uBAEC;IAED,uBAEC;IAED,uBAEC;IAGD;;;;;OAKG;IACH,aAJW,MAAM,KACN,MAAM,KACN,MAAM,QAUhB;IAHG,UAAW;IACX,UAAW;IACX,UAAW;IAQf;;;OAGG;IACH,iBAFW,MAAM,EAAE,GAAC,YAAY,EAI/B;IAVD,iBAMW,MAAM,EAAE,GAAC,YAAY,CAJ/B;IAWD,0BAEC;IAED,0BAEC;IAED,0BAEC;IAED;;;;;OAKG;IACH,gBAJW,MAAM,KACN,MAAM,KACN,MAAM,QAUhB;IAHG,UAAW;IACX,UAAW;IACX,UAAW;IAGf,2BAEC;IAED;;;;;;;OAOG;IACH,gCANW,MAAM,KACN,MAAM,KACN,MAAM,aACN,MAAM,EAAE,GAAC,YAAY,GAAC,IAAI,sBAC1B,MAAM,EAAE,GAAC,YAAY,GAAC,IAAI,QA6BpC;IAED;;;OAGG;IACH,uBAFW,MAAM,QAMhB;IAED;;;OAGG;IACH,iBAFW,MAAM,EAAE,GAAC,IAAI,GAAC,YAAY,QAepC;IAED;;;OAGG;IACH,SAFa,IAAI,CAQhB;IAED;;;OAGG;IACH,YAFW,IAAI,QAId;IAED,eAEC;IAED;;;;OAIG;IACH,cAHW,IAAI,GACF,OAAO,CAInB;IAED;;;;;;;;;OASG;IACH,yBALW,MAAM,KACN,MAAM,KACN,MAAM,GACJ,MAAM,CAclB;CAiCJ"}
@@ -4,6 +4,7 @@ import { array_range_equal_strict } from "../../../collection/array/array_range_
4
4
  import { computeHashFloatArray } from "../../../math/hash/computeHashFloatArray.js";
5
5
  import { v3_array_matrix4_rotate } from "../../vec3/v3_array_matrix4_rotate.js";
6
6
  import { v3_array_normalize } from "../../vec3/v3_array_normalize.js";
7
+ import { v3_dot } from "../../vec3/v3_dot.js";
7
8
  import { v3_matrix4_multiply } from "../../vec3/v3_matrix4_multiply.js";
8
9
  import { ray3_interval_array_apply_matrix4 } from "./ray3_interval_array_apply_matrix4.js";
9
10
 
@@ -213,6 +214,30 @@ export class Ray3 extends Float32Array {
213
214
  return array_range_equal_strict(this, 0, other, 0, 7);
214
215
  }
215
216
 
217
+ /**
218
+ * Compute `t` value for a given point in 3d space.
219
+ * This is the distance along the direction from origin of the ray
220
+ * Value will be negative if the ray is pointing away from the point
221
+ * PRECONDITION: ray direction must be normalized
222
+ * @param {number} x
223
+ * @param {number} y
224
+ * @param {number} z
225
+ * @returns {number}
226
+ */
227
+ computeSignedDistance(x, y, z) {
228
+ assert.isNumber(x, 'x');
229
+ assert.isNumber(y, 'y');
230
+ assert.isNumber(z, 'z');
231
+
232
+ // localize point to ray's origin
233
+ const _x = x - this.origin_x;
234
+ const _y = y - this.origin_y;
235
+ const _z = z - this.origin_z;
236
+
237
+ // we assume that direction is normalized
238
+ return v3_dot(_x, _y, _z, this.direction_x, this.direction_y, this.direction_z);
239
+ }
240
+
216
241
  /**
217
242
  *
218
243
  * @param {number} origin_x
@@ -1 +1 @@
1
- {"version":3,"file":"Stat.d.ts","sourceRoot":"","sources":["../../../../../src/core/model/stat/Stat.js"],"names":[],"mappings":";AASA;IAiPI;;;;;OAKG;IACH,6BAJW,MAAM,aACN,IAAI,CAAC,cAAc,CAAC,GAClB,MAAM,CAoBlB;IAxQD;;;OAGG;IACH,mBAHW,MAAM,EAoChB;IA5BG;;;OAGG;IACH,IAFU,MAAM,CAEL;IAEX;;;OAGG;IACH,MAFU,OAAO,CAEa;IAE9B;;;;OAIG;IACH,6BAA6B;IAE7B,eAA+B;IAI/B;;;OAGG;IACH,aAFU,CAAS,IAAM,EAAN,MAAM,KAAG,MAAM,CAEE;IAGxC;;;OAGG;IACH,uBAFa,MAAM,CAAC,cAAc,CAAC,CAIlC;IAED;;;OAGG;IACH,yBAFa,MAAM,CAAC,cAAc,CAAC,CAIlC;IAED;;OAEG;IACH,uBAEC;IAUD;;;OAGG;IACH,YAFa,MAAM,CAIlB;IAED;;;OAGG;IACH,YAFa,MAAM,CAIlB;IAED,oBAUC;IAED;;;OAGG;IACH,gBAFa,MAAM,CAIlB;IAED;;;OAGG;IACH,gBAFW,MAAM,QAIhB;IAED;;;OAGG;IACH,gBAFY,cAAc,EAAE,CAI3B;IAED;;;OAGG;IACH,iBAFW,cAAc,QAMxB;IAED;;;;OAIG;IACH,iBAHW,cAAc,GACb,OAAO,CAIlB;IAED;;;;OAIG;IACH,oBAHW,cAAc,GACZ,OAAO,CAQnB;IAED;;;;OAIG;IACH,cAHW,IAAI,GACF,OAAO,CASnB;IAED;;;OAGG;IACH,YAFW,IAAI,QAOd;IAED;;;OAGG;IACH,gBAFW,IAAI,QAId;IAED;;;;OAIG;IACH,iCAHW,CAAS,IAAM,EAAN,MAAM,KAAE,MAAM,KACvB,MAAM,QAKhB;IAED;;OAEG;IACH,wCAFW,IAAI,QAmBd;IAED;;;MAKC;IAED,0BAIC;IAED;;;OAGG;IACH,iBAFa,MAAM,CAIlB;IAqDL;;;OAGG;IACH,iBAFU,OAAO,CAEI;CA9BpB;;;QAOe,8BAHD,MAAM,GACL,MAAM,CAIjB;QACK,kCAEL;QAMS,gCAHC,MAAM,GACJ,CAAS,IAAM,EAAN,MAAM,KAAG,MAAM,CAMpC;;;;oBAtSe,uBAAuB;2BAIhB,qBAAqB;iBAN/B,+BAA+B;sBAC1B,yBAAyB"}
1
+ {"version":3,"file":"Stat.d.ts","sourceRoot":"","sources":["../../../../../src/core/model/stat/Stat.js"],"names":[],"mappings":";AASA;;;;;;;GAOG;AACH;IAyPI;;;;;OAKG;IACH,6BAJW,MAAM,aACN,IAAI,CAAC,cAAc,CAAC,GAClB,MAAM,CAoBlB;IA3PD;;;OAGG;IACH,oBAHW,MAAM,EAuBhB;IA7CD;;;OAGG;IACH,IAFU,MAAM,CAET;IAEP;;;;;;OAMG;IACH,6BAAyB;IAEzB;;;OAGG;IACH,aAFU,CAAS,IAAM,EAAN,MAAM,KAAG,MAAM,CAEF;IAY5B;;;OAGG;IACH,MAFU,OAAO,CAEa;IAE9B;;;OAGG;IACH,OAFU,OAAO,CAEc;IAMnC;;;OAGG;IACH,uBAFa,MAAM,CAAC,cAAc,CAAC,CAIlC;IAED;;;OAGG;IACH,yBAFa,MAAM,CAAC,cAAc,CAAC,CAIlC;IAED;;OAEG;IACH,uBAEC;IAUD;;;OAGG;IACH,YAFa,MAAM,CAIlB;IAED;;;OAGG;IACH,YAFa,MAAM,CAIlB;IAED,oBAUC;IAED;;;OAGG;IACH,gBAFa,MAAM,CAIlB;IAED;;;OAGG;IACH,gBAFW,MAAM,QAIhB;IAED;;;OAGG;IACH,gBAFY,cAAc,EAAE,CAI3B;IAED;;;OAGG;IACH,iBAFW,cAAc,QAMxB;IAED;;;;OAIG;IACH,iBAHW,cAAc,GACb,OAAO,CAIlB;IAED;;;;OAIG;IACH,oBAHW,cAAc,GACZ,OAAO,CAQnB;IAED;;;;OAIG;IACH,cAHW,IAAI,GACF,OAAO,CASnB;IAED;;;OAGG;IACH,YAFW,IAAI,QAOd;IAED;;;OAGG;IACH,gBAFW,IAAI,QAId;IAED;;;;OAIG;IACH,iCAHW,CAAS,IAAM,EAAN,MAAM,KAAE,MAAM,KACvB,MAAM,QAKhB;IAED;;OAEG;IACH,wCAFW,IAAI,QAmBd;IAED;;;MAKC;IAED,0BAIC;IAED;;;OAGG;IACH,iBAFa,MAAM,CAIlB;IAwDL;;;OAGG;IACH,iBAFU,OAAO,CAEI;CAjCpB;;;QAOe,8BAHD,MAAM,GACL,MAAM,CAIjB;QACK,kCAEL;QAMS,gCAHC,MAAM,GACJ,CAAS,IAAM,EAAN,MAAM,KAAG,MAAM,CAMpC;;;;oBAtTe,uBAAuB;2BAIhB,qBAAqB;iBAN/B,+BAA+B;sBAC1B,yBAAyB"}
@@ -7,44 +7,60 @@ import { epsilonEquals } from "../../math/epsilonEquals.js";
7
7
  import { max2 } from "../../math/max2.js";
8
8
  import LinearModifier from "./LinearModifier.js";
9
9
 
10
+ /**
11
+ * Modifiable statistic.
12
+ * Allows non-destructive linear arithmetic.
13
+ * Useful when we wish to be able to reverse part or the whole of the computation
14
+ *
15
+ * Main purpose of the class is to facilitate implementation of RPG-like stats, such as maximum health, or armor.
16
+ * These stats can then be modified by various skills, equipment and effects. Each such modification will be added as a separate {@link LinearModifier} and can be reversed by removing the modifier.
17
+ */
10
18
  class Stat extends Number {
11
19
  /**
12
- * @param {number} value
20
+ * Unique identifier of a stat, such a health, armor etc.
21
+ * @type {number}
22
+ */
23
+ id = 0;
24
+
25
+ /**
26
+ * List of modifiers.
27
+ * Order has no influence on final computed value
28
+ * @private
29
+ * @readonly
30
+ * @type {List<LinearModifier>}
31
+ */
32
+ __modifiers = new List();
33
+
34
+ /**
35
+ *
36
+ * @type {function(number): number}
37
+ */
38
+ postprocess = Stat.Process.NONE;
39
+
40
+ /**
41
+ * @param {number} [value]
13
42
  * @constructor
14
43
  */
15
- constructor(value) {
44
+ constructor(value=0) {
16
45
  super();
17
46
 
18
47
  assert.isNumber(value, "value");
19
48
 
20
- /**
21
- * Unique identifier of a stat, such a health, armor etc.
22
- * @type {number}
23
- */
24
- this.id = 0;
25
49
 
26
50
  /**
27
- *
51
+ * Base value that will be affected by modifiers
28
52
  * @type {Vector1}
29
53
  */
30
54
  this.base = new Vector1(value);
31
55
 
32
56
  /**
33
- * @private
34
- * @readonly
35
- * @type {List<LinearModifier>}
57
+ * Final computed value. Do not modify this directly
58
+ * @type {Vector1}
36
59
  */
37
- this.__modifiers = new List();
38
-
39
60
  this.value = new Vector1(value);
40
61
 
41
62
  this.base.onChanged.add(this.updateValue, this);
42
63
 
43
- /**
44
- *
45
- * @type {function(number): number}
46
- */
47
- this.postprocess = Stat.Process.NONE;
48
64
  }
49
65
 
50
66
  /**
@@ -287,7 +303,7 @@ Stat.Process = {
287
303
  return v;
288
304
  },
289
305
  /**
290
- * Clamp lowest value forcing the result to always be >= value
306
+ * Clamp the lowest value forcing the result to always be >= value
291
307
  * @param {number} value
292
308
  * @returns {function(number): number}
293
309
  */
@@ -296,6 +312,9 @@ Stat.Process = {
296
312
  return max2(value, v);
297
313
  }
298
314
  },
315
+ /**
316
+ * Allows us to chain multiple effects
317
+ */
299
318
  chain: chain
300
319
  };
301
320
 
@@ -1,16 +1,24 @@
1
1
  export default Clock;
2
+ /**
3
+ * Construct for keeping track of time
4
+ */
2
5
  declare class Clock {
3
6
  /**
4
- *
7
+ * In seconds
5
8
  * @type {number}
6
9
  * @private
7
10
  */
8
11
  private __lastMeasurement;
9
12
  /**
10
- *
13
+ * In seconds
11
14
  * @type {number}
12
15
  */
13
16
  elapsedTime: number;
17
+ /**
18
+ * Timestamp when {@link getDelta} was last called
19
+ * In seconds
20
+ * @type {number}
21
+ */
14
22
  timeAtDelta: number;
15
23
  /**
16
24
  *
@@ -20,6 +28,8 @@ declare class Clock {
20
28
  private __isRunning;
21
29
  /**
22
30
  * how fast clock ticks in relation to real time
31
+ * Allows us to slow down or speed up flow of time via modifiers, see {@link Stat} for details
32
+ * Default speed is x1, i.e. - unmodified
23
33
  * @type {Stat}
24
34
  */
25
35
  speed: Stat;
@@ -47,7 +57,8 @@ declare class Clock {
47
57
  */
48
58
  updateElapsedTime(): number;
49
59
  /**
50
- *
60
+ * Time elapsed so far, since the clock was started
61
+ * Only counts time while running
51
62
  * @return {number}
52
63
  */
53
64
  getElapsedTime(): number;
@@ -1 +1 @@
1
- {"version":3,"file":"Clock.d.ts","sourceRoot":"","sources":["../../../src/engine/Clock.js"],"names":[],"mappings":";AAcA;IAEI;;;;OAIG;IACH,0BAAsB;IAEtB;;;OAGG;IACH,aAFU,MAAM,CAEA;IAEhB,oBAAgB;IAEhB;;;;OAIG;IACH,oBAAoB;IAGpB;;;OAGG;IACH,OAFU,IAAI,CAEM;IAMpB;;;OAGG;IACH,kBAFW,MAAM,EAIhB;IAED;;;OAGG;IACH,kBAFa,MAAM,CAIlB;IAED,cAIC;IAED,aAEC;IAED,cAIC;IAED;;;OAGG;IACH,YAFa,MAAM,CAOlB;IAED;;;OAGG;IACH,qBAFa,MAAM,CAOlB;IAED;;;OAGG;IACH,kBAFY,MAAM,CAIjB;IAED,cAGC;CACJ;iBAnHgB,4BAA4B"}
1
+ {"version":3,"file":"Clock.d.ts","sourceRoot":"","sources":["../../../src/engine/Clock.js"],"names":[],"mappings":";AAcA;;GAEG;AACH;IAEI;;;;OAIG;IACH,0BAAsB;IAEtB;;;OAGG;IACH,aAFU,MAAM,CAEA;IAEhB;;;;OAIG;IACH,aAFU,MAAM,CAEA;IAEhB;;;;OAIG;IACH,oBAAoB;IAGpB;;;;;OAKG;IACH,OAFU,IAAI,CAEM;IAMpB;;;OAGG;IACH,kBAFW,MAAM,EAIhB;IAED;;;OAGG;IACH,kBAFa,MAAM,CAIlB;IAED,cAIC;IAED,aAEC;IAED,cAIC;IAED;;;OAGG;IACH,YAFa,MAAM,CAOlB;IAED;;;OAGG;IACH,qBAFa,MAAM,CAOlB;IAED;;;;OAIG;IACH,kBAFY,MAAM,CAIjB;IAED,cAGC;CACJ;iBA9HgB,4BAA4B"}
@@ -12,21 +12,29 @@ function updateElapsedTime(clock) {
12
12
  clock.elapsedTime += delta;
13
13
  }
14
14
 
15
+ /**
16
+ * Construct for keeping track of time
17
+ */
15
18
  class Clock {
16
19
 
17
20
  /**
18
- *
21
+ * In seconds
19
22
  * @type {number}
20
23
  * @private
21
24
  */
22
25
  __lastMeasurement = 0;
23
26
 
24
27
  /**
25
- *
28
+ * In seconds
26
29
  * @type {number}
27
30
  */
28
31
  elapsedTime = 0;
29
32
 
33
+ /**
34
+ * Timestamp when {@link getDelta} was last called
35
+ * In seconds
36
+ * @type {number}
37
+ */
30
38
  timeAtDelta = 0;
31
39
 
32
40
  /**
@@ -39,6 +47,8 @@ class Clock {
39
47
 
40
48
  /**
41
49
  * how fast clock ticks in relation to real time
50
+ * Allows us to slow down or speed up flow of time via modifiers, see {@link Stat} for details
51
+ * Default speed is x1, i.e. - unmodified
42
52
  * @type {Stat}
43
53
  */
44
54
  speed = new Stat(1);
@@ -102,7 +112,8 @@ class Clock {
102
112
  }
103
113
 
104
114
  /**
105
- *
115
+ * Time elapsed so far, since the clock was started
116
+ * Only counts time while running
106
117
  * @return {number}
107
118
  */
108
119
  getElapsedTime() {
@@ -1 +1 @@
1
- {"version":3,"file":"Entity.d.ts","sourceRoot":"","sources":["../../../../src/engine/ecs/Entity.js"],"names":[],"mappings":";AAgBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH;IAgaI;;;;;OAKG;IACH,+BAJW,MAAM,WACN,sBAAsB,GACpB,MAAM,CAgBlB;IAlbD;;;OAGG;IACH,oBAFU,eAAe,CAES;IAWlC;;;OAGG;IACH,UAFW,MAAM,EAIhB;IAdD;;;OAGG;IACH,UAFa,MAAM,CAIlB;IAmBD;;;OAGG;IACH,kBAFW,MAAM,EAIhB;IAfD;;;OAGG;IACH,kBAFa,MAAM,CAIlB;IAWD;;;;OAIG;IACH,2BAAgB;IAQhB;;;OAGG;IACH,SAFU,sBAAsB,CAEjB;IAEf;;;OAGG;IACH,OAFU,WAAW,GAAC,MAAM,CAEN;IAEtB;;;OAGG;IACH,gBAAgB;IAEhB;;OAEG;IACH;;MAEE;IAUF;;;OAGG;IACH,eAFW,MAAM,GAAC,WAAW,QAI5B;IAED;;;;OAIG;IACH,cAHW,MAAM,GAAC,WAAW,GAChB,OAAO,CAMnB;IAED;;;OAGG;IACH,gBAFW,MAAM,GAAC,WAAW,QAI5B;IAED;;;OAGG;IACH,eAFa,OAAO,CAInB;IAED;;OAEG;IACH,4BAQC;IAED;;;OAGG;IACH,aAFY,MAAM,CAIjB;IAED;;;;OAIG;IACH,IAJa,CAAC,qBACH,CAAC,GACC,MAAM,CAiBlB;IAED;;;;OAIG;IACH,aAJa,CAAC,SACH,CAAC,GACC,OAAO,CAInB;IAED;;;;OAIG;IACH,aAJa,CAAC,SACH,KAAK,CAAC,CAAC,CAAC,GACN,CAAC,GAAC,IAAI,CAclB;IAED;;;;;OAKG;IACH,iBAJa,CAAC,SACH,KAAK,CAAC,CAAC,CAAC,GACN,CAAC,CAUb;IAED;;;;OAIG;IACH,kCAFa,GAAC,GAAC,IAAI,CA0BlB;IAED;;;;OAIG;IACH,qBAHW,MAAM,UACN,GAAC,QAQX;IAED;;;OAGG;IACH,wBAFW,MAAM,gBAiBhB;IAED;;;;;;OAMG;IACH,4BALW,MAAM,gCAEN,GAAC,GACC,MAAM,CAalB;IAED;;;;;;OAMG;IACH,+BALW,MAAM,gCAEN,GAAC,GACC,MAAM,CAyBlB;IAED;;;OAGG;IACH,WAFa,OAAO,CAwBnB;IAED;;;;OAIG;IACH,eAFW,sBAAsB,GADpB,MAAM,CAyDlB;IAyBL;;;;OAIG;IACH,mBAFU,OAAO,CAEQ;;CAPxB;gCA7e+B,sBAAsB;4BAD1B,kBAAkB;mBAF3B,oCAAoC"}
1
+ {"version":3,"file":"Entity.d.ts","sourceRoot":"","sources":["../../../../src/engine/ecs/Entity.js"],"names":[],"mappings":";AAgBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH;IAsaI;;;;;OAKG;IACH,+BAJW,MAAM,WACN,sBAAsB,GACpB,MAAM,CAgBlB;IAxbD;;;OAGG;IACH,oBAFU,eAAe,CAES;IAWlC;;;OAGG;IACH,UAFW,MAAM,EAIhB;IAdD;;;OAGG;IACH,UAFa,MAAM,CAIlB;IAmBD;;;OAGG;IACH,kBAFW,MAAM,EAIhB;IAfD;;;OAGG;IACH,kBAFa,MAAM,CAIlB;IAWD;;;;OAIG;IACH,2BAAgB;IAQhB;;;OAGG;IACH,SAFU,sBAAsB,CAEjB;IAEf;;;OAGG;IACH,OAFU,WAAW,GAAC,MAAM,CAEN;IAEtB;;;OAGG;IACH,gBAAgB;IAEhB;;OAEG;IACH;;MAEE;IAUF;;;OAGG;IACH,eAFW,MAAM,GAAC,WAAW,QAI5B;IAED;;;;OAIG;IACH,cAHW,MAAM,GAAC,WAAW,GAChB,OAAO,CAMnB;IAED;;;OAGG;IACH,gBAFW,MAAM,GAAC,WAAW,QAI5B;IAED;;;OAGG;IACH,eAFa,OAAO,CAInB;IAED;;OAEG;IACH,4BAQC;IAED;;;OAGG;IACH,aAFY,MAAM,CAIjB;IAED;;;;OAIG;IACH,IAJa,CAAC,qBACH,CAAC,GACC,MAAM,CAuBlB;IAED;;;;OAIG;IACH,aAJa,CAAC,SACH,CAAC,GACC,OAAO,CAInB;IAED;;;;OAIG;IACH,aAJa,CAAC,SACH,KAAK,CAAC,CAAC,CAAC,GACN,CAAC,GAAC,IAAI,CAclB;IAED;;;;;OAKG;IACH,iBAJa,CAAC,SACH,KAAK,CAAC,CAAC,CAAC,GACN,CAAC,CAUb;IAED;;;;OAIG;IACH,kCAFa,GAAC,GAAC,IAAI,CA0BlB;IAED;;;;OAIG;IACH,qBAHW,MAAM,UACN,GAAC,QAQX;IAED;;;OAGG;IACH,wBAFW,MAAM,gBAiBhB;IAED;;;;;;OAMG;IACH,4BALW,MAAM,gCAEN,GAAC,GACC,MAAM,CAalB;IAED;;;;;;OAMG;IACH,+BALW,MAAM,gCAEN,GAAC,GACC,MAAM,CAyBlB;IAED;;;OAGG;IACH,WAFa,OAAO,CAwBnB;IAED;;;;OAIG;IACH,eAFW,sBAAsB,GADpB,MAAM,CAyDlB;IAyBL;;;;OAIG;IACH,mBAFU,OAAO,CAEQ;;CAPxB;gCAnf+B,sBAAsB;4BAD1B,kBAAkB;mBAF3B,oCAAoC"}
@@ -217,7 +217,13 @@ class Entity {
217
217
  this.components.push(componentInstance);
218
218
 
219
219
  if (this.getFlag(EntityFlags.Built)) {
220
+
220
221
  //already built, add component to entity
222
+
223
+ if (this.getFlag(EntityFlags.RegisterComponents)) {
224
+ this.dataset.registerComponentType(componentInstance.constructor)
225
+ }
226
+
221
227
  this.dataset.addComponentToEntity(this.id, componentInstance);
222
228
  }
223
229
 
@@ -1,12 +0,0 @@
1
- export class ActionUpdateTexture extends Action<any> {
2
- /**
3
- *
4
- * @param {THREE.Texture} texture
5
- */
6
- constructor(texture: THREE.Texture);
7
- __texture: import("three").Texture;
8
- apply(context: any): Promise<void>;
9
- revert(context: any): Promise<void>;
10
- }
11
- import { Action } from "../../../src/core/process/undo/Action.js";
12
- //# sourceMappingURL=ActionUpdateTexture.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ActionUpdateTexture.d.ts","sourceRoot":"","sources":["ActionUpdateTexture.js"],"names":[],"mappings":"AAEA;IACI;;;OAGG;IACH,qBAFW,MAAM,OAAO,EAMvB;IADG,mCAAwB;IAG5B,mCAEC;IAED,oCAEC;CACJ;uBApBsB,0CAA0C"}
@@ -1,20 +0,0 @@
1
- export class ArrayCopyAction extends Action<any> {
2
- /**
3
- * @template T
4
- * @param {ArrayLike<T>|T[]|Uint8Array|Float32Array} source
5
- * @param {ArrayLike<T>|T[]|Uint8Array|Float32Array} destination
6
- */
7
- constructor(source: Uint8Array | Float32Array | ArrayLike<T> | T[], destination: Uint8Array | Float32Array | ArrayLike<T> | T[]);
8
- __source: Uint8Array | Float32Array | ArrayLike<T> | T[];
9
- __destination: Uint8Array | Float32Array | ArrayLike<T> | T[];
10
- /**
11
- *
12
- * @type {ArrayLike<T>|null}
13
- * @private
14
- */
15
- private __restore_value;
16
- apply(context: any): Promise<void>;
17
- revert(context: any): Promise<void>;
18
- }
19
- import { Action } from "../../../src/core/process/undo/Action.js";
20
- //# sourceMappingURL=ArrayCopyAction.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ArrayCopyAction.d.ts","sourceRoot":"","sources":["ArrayCopyAction.js"],"names":[],"mappings":"AAGA;IACI;;;;OAIG;IACH,iIAYC;IATG,yDAAsB;IACtB,8DAAgC;IAEhC;;;;OAIG;IACH,wBAA2B;IAG/B,mCAUC;IAED,oCAEC;CACJ;uBAtCsB,0CAA0C"}
@@ -1,11 +0,0 @@
1
- export default ComponentRemoveAction;
2
- declare class ComponentRemoveAction extends Action<any> {
3
- constructor(entity: any, componentType: any);
4
- entity: any;
5
- componentType: any;
6
- component: any;
7
- apply(editor: any): Promise<void>;
8
- revert(editor: any): Promise<void>;
9
- }
10
- import { Action } from "../../../src/core/process/undo/Action.js";
11
- //# sourceMappingURL=ComponentRemoveAction.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ComponentRemoveAction.d.ts","sourceRoot":"","sources":["ComponentRemoveAction.js"],"names":[],"mappings":";AAEA;IACI,6CAMC;IAHG,YAAoB;IACpB,mBAAkC;IAClC,eAAqB;IAGzB,kCAcC;IAED,mCAGC;CACJ;uBA/BsB,0CAA0C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ModifyPatchSampler2DAction.d.ts","sourceRoot":"","sources":["ModifyPatchSampler2DAction.js"],"names":[],"mappings":"AAMA;IACI;;;;OAIG;IACH,qBAHW,SAAS,UACT,MAAM,EAAE,EAkClB;IA7BG;;;;OAIG;IACH,kBAAwB;IAExB;;;;OAIG;IACH,iBAAsB;IAKtB;;;OAGG;IACH,aAFU,SAAS,CAEkD;IAErE;;;;OAIG;IACH,oBAAqE;IAGzE,uBAEC;IAED,gBAEC;IAED,gBAEC;IAED;;;;;;OAMG;IACH,gBALW,MAAM,KACN,MAAM,YACN,MAAM,GACJ,MAAM,CAmBlB;IAED,uBAEC;IAGD,mCAiBC;IAED,oCAWC;CACJ;uBAxHsB,0CAA0C;0BACvC,2DAA2D"}
@@ -1,38 +0,0 @@
1
- export class ModifyPatchTextureArray2DAction extends Action<any> {
2
- /**
3
- *
4
- * @param {number[]|Uint8Array|Uint32Array|Float32Array} data
5
- * @param {number[]} data_resolution
6
- * @param {number[]} bounds
7
- */
8
- constructor(data: number[] | Uint8Array | Uint32Array | Float32Array, data_resolution: number[], bounds: number[]);
9
- __data: number[] | Uint8Array | Uint32Array | Float32Array;
10
- __data_resolution: number[];
11
- __bounds: number[];
12
- /**
13
- * @type {ArrayLike<number>}
14
- * @private
15
- */
16
- private __patch_new;
17
- /**
18
- * @type {ArrayLike<number>}
19
- * @private
20
- */
21
- private __patch_old;
22
- /**
23
- *
24
- * @param {number} center_x
25
- * @param {number} center_y
26
- * @param {Sampler2D} stamp
27
- * @param {number} layer_index
28
- * @param {number} weight
29
- * @param {number} clamp_min
30
- * @param {number} clamp_max
31
- */
32
- applyWeightStampToLayer(center_x: number, center_y: number, stamp: Sampler2D, layer_index: number, weight: number, clamp_min?: number, clamp_max?: number): void;
33
- get patch_data(): ArrayLike<number>;
34
- apply(context: any): Promise<void>;
35
- revert(context: any): Promise<void>;
36
- }
37
- import { Action } from "../../../src/core/process/undo/Action.js";
38
- //# sourceMappingURL=ModifyPatchTextureArray2DAction.d.ts.map
@@ -1,23 +0,0 @@
1
- export default PaintTerrainOverlayAction;
2
- declare class PaintTerrainOverlayAction extends Action<any> {
3
- /**
4
- *
5
- * @param {number} entity
6
- * @param {number} x
7
- * @param {number} y
8
- * @param {Vector4} color
9
- * @constructor
10
- */
11
- constructor(entity: number, x: number, y: number, color: Vector4);
12
- entity: number;
13
- x: number;
14
- y: number;
15
- color: Vector4;
16
- overlay: any;
17
- oldColor: Vector4;
18
- apply(editor: any): Promise<void>;
19
- revert(editor: any): Promise<void>;
20
- }
21
- import { Action } from "../../../src/core/process/undo/Action.js";
22
- import Vector4 from "../../../src/core/geom/Vector4.js";
23
- //# sourceMappingURL=PaintTerrainOverlayAction.d.ts.map
@@ -1,19 +0,0 @@
1
- export class PatchTerrainHeightAction extends ModifyPatchSampler2DAction {
2
- /**
3
- *
4
- * @param {Terrain} terrain
5
- * @param {number} x
6
- * @param {number} y
7
- * @param {number} width
8
- * @param {number} height
9
- */
10
- constructor(terrain: Terrain, x: number, y: number, width: number, height: number);
11
- /**
12
- *
13
- * @type {Terrain}
14
- */
15
- terrain: Terrain;
16
- updateTerrain(): Promise<void>;
17
- }
18
- import { ModifyPatchSampler2DAction } from "./ModifyPatchSampler2DAction.js";
19
- //# sourceMappingURL=PatchTerrainHeightAction.d.ts.map
@@ -1,10 +0,0 @@
1
- export default SelectionRemoveAction;
2
- declare class SelectionRemoveAction extends Action<any> {
3
- constructor(entities: any);
4
- oldState: any;
5
- entities: any;
6
- apply(editor: any): Promise<void>;
7
- revert(editor: any): Promise<void>;
8
- }
9
- import { Action } from "../../../src/core/process/undo/Action.js";
10
- //# sourceMappingURL=SelectionRemoveAction.d.ts.map
@@ -1,15 +0,0 @@
1
- export default WriteGridValueAction;
2
- declare class WriteGridValueAction extends Action<any> {
3
- constructor(entity: any, x: any, y: any, value: any);
4
- entity: any;
5
- x: any;
6
- y: any;
7
- value: any;
8
- obstacle: GridObstacle;
9
- oldValue: number;
10
- apply(editor: any): Promise<void>;
11
- revert(editor: any): Promise<void>;
12
- }
13
- import { Action } from "../../../src/core/process/undo/Action.js";
14
- import GridObstacle from "../../../src/engine/grid/obstacle/GridObstacle.js";
15
- //# sourceMappingURL=WriteGridValueAction.d.ts.map