sparcoon 0.2.0 → 0.3.0

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 (80) hide show
  1. package/dist/emitter/FXEmitter.Internal.d.ts +4 -0
  2. package/dist/emitter/FXEmitter.Internal.js +20 -1
  3. package/dist/emitter/FXEmitter.d.ts +4 -4
  4. package/dist/emitter/FXEmitter.js +1 -2
  5. package/dist/emitter/behavior/{FXBehaviorModule.d.ts → FXBehavior.d.ts} +1 -1
  6. package/dist/emitter/behavior/{FXBehaviorModule.js → FXBehavior.js} +2 -2
  7. package/dist/emitter/behavior/FXBehaviorDirectionalGravity.d.ts +3 -3
  8. package/dist/emitter/behavior/FXBehaviorDirectionalGravity.js +2 -2
  9. package/dist/emitter/behavior/FXBehaviorPointGravity.d.ts +2 -2
  10. package/dist/emitter/behavior/FXBehaviorPointGravity.js +2 -2
  11. package/dist/emitter/behavior/FXBehaviorScaleOverLife.d.ts +3 -3
  12. package/dist/emitter/behavior/FXBehaviorScaleOverLife.js +2 -2
  13. package/dist/emitter/behavior/FXBehaviorTorqueDamping.d.ts +3 -3
  14. package/dist/emitter/behavior/FXBehaviorTorqueDamping.js +2 -2
  15. package/dist/emitter/behavior/FXBehaviorTorqueNoise.d.ts +2 -2
  16. package/dist/emitter/behavior/FXBehaviorTorqueNoise.js +2 -2
  17. package/dist/emitter/behavior/FXBehaviorVelocityDamping.d.ts +3 -3
  18. package/dist/emitter/behavior/FXBehaviorVelocityDamping.js +2 -2
  19. package/dist/emitter/behavior/FXBehaviorVelocityNoise.d.ts +2 -2
  20. package/dist/emitter/behavior/FXBehaviorVelocityNoise.js +2 -2
  21. package/dist/emitter/spawn/{FXSpawnModule.d.ts → FXSpawn.d.ts} +1 -1
  22. package/dist/emitter/spawn/{FXSpawnModule.js → FXSpawn.js} +2 -2
  23. package/dist/emitter/spawn/FXSpawnBox.d.ts +3 -3
  24. package/dist/emitter/spawn/FXSpawnBox.js +2 -2
  25. package/dist/emitter/spawn/{FXSpawnOffset.d.ts → FXSpawnPoint.d.ts} +3 -3
  26. package/dist/emitter/spawn/{FXSpawnOffset.js → FXSpawnPoint.js} +3 -3
  27. package/dist/emitter/spawn/FXSpawnRandomLifetime.d.ts +3 -3
  28. package/dist/emitter/spawn/FXSpawnRandomLifetime.js +2 -2
  29. package/dist/emitter/spawn/FXSpawnRandomRotation.d.ts +3 -3
  30. package/dist/emitter/spawn/FXSpawnRandomRotation.js +2 -2
  31. package/dist/emitter/spawn/FXSpawnRandomScale.d.ts +3 -3
  32. package/dist/emitter/spawn/FXSpawnRandomScale.js +2 -2
  33. package/dist/emitter/spawn/FXSpawnRandomTorque.d.ts +3 -3
  34. package/dist/emitter/spawn/FXSpawnRandomTorque.js +2 -2
  35. package/dist/emitter/spawn/FXSpawnRandomVelocity.d.ts +3 -3
  36. package/dist/emitter/spawn/FXSpawnRandomVelocity.js +2 -2
  37. package/dist/emitter/spawn/FXSpawnSphere.d.ts +2 -2
  38. package/dist/emitter/spawn/FXSpawnSphere.js +2 -2
  39. package/dist/index.d.ts +11 -7
  40. package/dist/index.js +10 -7
  41. package/dist/instancedParticle/FXInstancedParticle.Internal.d.ts +0 -4
  42. package/dist/instancedParticle/FXInstancedParticle.Internal.js +1 -19
  43. package/dist/materials/FXDiffuseMaterial/FXDiffuseMaterial.Internal.d.ts +6 -8
  44. package/dist/materials/FXDiffuseMaterial/FXDiffuseMaterial.Internal.js +73 -40
  45. package/dist/materials/FXDiffuseMaterial/FXDiffuseMaterial.d.ts +11 -11
  46. package/dist/materials/FXDiffuseMaterial/FXDiffuseMaterial.js +16 -8
  47. package/dist/materials/{FXMaterial.Internal.d.ts → FXMaterial/FXMaterial.Internal.d.ts} +3 -2
  48. package/dist/materials/{FXMaterial.Internal.js → FXMaterial/FXMaterial.Internal.js} +3 -3
  49. package/dist/materials/{FXMaterial.d.ts → FXMaterial/FXMaterial.d.ts} +7 -2
  50. package/dist/materials/FXMaterial/FXMaterial.js +25 -0
  51. package/dist/materials/FXUnlitMaterial/FXUnlitMaterial.Internal.d.ts +5 -3
  52. package/dist/materials/FXUnlitMaterial/FXUnlitMaterial.Internal.js +24 -20
  53. package/dist/materials/FXUnlitMaterial/FXUnlitMaterial.d.ts +4 -9
  54. package/dist/materials/FXUnlitMaterial/FXUnlitMaterial.js +2 -5
  55. package/dist/miscellaneous/miscellaneous.d.ts +1 -0
  56. package/dist/miscellaneous/miscellaneous.js +24 -1
  57. package/dist/{materials/color-nodes → nodes/color}/FXColorOverLifeNode.d.ts +0 -1
  58. package/dist/{materials/color-nodes → nodes/color}/FXColorOverLifeNode.js +11 -11
  59. package/dist/nodes/normal/FXFlatNormalNode.d.ts +4 -0
  60. package/dist/nodes/normal/FXFlatNormalNode.js +14 -0
  61. package/dist/nodes/normal/FXNormalNode.d.ts +3 -0
  62. package/dist/nodes/normal/FXNormalNode.js +4 -0
  63. package/dist/nodes/normal/FXSphericalNormalNode.d.ts +4 -0
  64. package/dist/nodes/normal/FXSphericalNormalNode.js +19 -0
  65. package/dist/nodes/texture/FXAnimatedTextureNode.d.ts +11 -0
  66. package/dist/nodes/texture/FXAnimatedTextureNode.js +80 -0
  67. package/dist/nodes/texture/FXStaticTextureNode.d.ts +5 -0
  68. package/dist/nodes/texture/FXStaticTextureNode.js +26 -0
  69. package/dist/nodes/texture/FXTextureNode.d.ts +3 -0
  70. package/dist/nodes/texture/FXTextureNode.js +8 -0
  71. package/package.json +1 -1
  72. package/dist/materials/FXMaterial.js +0 -21
  73. package/dist/materials/color-nodes/FXAnimatedTextureNode.d.ts +0 -10
  74. package/dist/materials/color-nodes/FXAnimatedTextureNode.js +0 -41
  75. package/dist/materials/color-nodes/FXStaticTextureNode.d.ts +0 -5
  76. package/dist/materials/color-nodes/FXStaticTextureNode.js +0 -23
  77. package/dist/materials/miscellaneous.d.ts +0 -1
  78. package/dist/materials/miscellaneous.js +0 -25
  79. /package/dist/{materials/color-nodes → nodes/color}/FXColorNode.d.ts +0 -0
  80. /package/dist/{materials/color-nodes → nodes/color}/FXColorNode.js +0 -0
@@ -8,27 +8,27 @@ class FXColorOverLifeNode extends FXColorNode {
8
8
  throw new Error("FXColorOverLifeNode: colors array cannot be empty");
9
9
  }
10
10
  super();
11
- /** @internal */
11
+ this._private_gradientTexture = buildGradientTexture(colors);
12
12
  this.affectsDepth = true;
13
- /** @internal */
14
13
  this.cacheKey = "color-over-life";
15
- /** @internal */
16
14
  this.uniformDeclarations = ["uniform sampler2D u_ColorOverLife;"];
17
- /** @internal */
18
- this.colorExpression = "_fx_sampleColorOverLife(u_ColorOverLife)";
19
- this._private_gradientTexture = buildGradientTexture(colors);
20
15
  this.uniforms = {
21
16
  // eslint-disable-next-line @typescript-eslint/naming-convention
22
17
  u_ColorOverLife: { value: this._private_gradientTexture },
23
18
  };
24
19
  this.helperFunctions = `
25
- vec4 _fx_sampleColorOverLife(sampler2D tex) {
26
- float t = clamp(PARTICLE_AGE / PARTICLE_LIFETIME, 0.0, 1.0);
27
- vec4 c = texture2D(tex, vec2(t, 0.5));
28
- ${checkSRGBSupport() ? "" : "c = vec4(pow(c.rgb, vec3(2.2)), c.a);"}
29
- return c;
20
+ vec4 sampleColorOverLife(sampler2D gradientTexture) {
21
+ // Normalized particle age [0, 1] maps to the gradient texture's x-axis
22
+ float lifetimeRatio = clamp(PARTICLE_AGE / PARTICLE_LIFETIME, 0.0, 1.0);
23
+ vec4 color = texture2D(gradientTexture, vec2(lifetimeRatio, 0.5));
24
+
25
+ // Apply gamma correction when sRGB textures are not natively supported
26
+ ${checkSRGBSupport() ? "" : "color = vec4(pow(color.rgb, vec3(2.2)), color.a);"}
27
+
28
+ return color;
30
29
  }
31
30
  `;
31
+ this.colorExpression = "sampleColorOverLife(u_ColorOverLife)";
32
32
  }
33
33
  destroy() {
34
34
  this._private_gradientTexture.dispose();
@@ -0,0 +1,4 @@
1
+ import { FXNormalNode } from "./FXNormalNode";
2
+ export declare class FXFlatNormalNode extends FXNormalNode {
3
+ constructor();
4
+ }
@@ -0,0 +1,14 @@
1
+ import { FXNormalNode } from './FXNormalNode.js';
2
+
3
+ class FXFlatNormalNode extends FXNormalNode {
4
+ constructor() {
5
+ super();
6
+ this.cacheKey = "flat";
7
+ this.uniformDeclarations = [];
8
+ this.uniforms = {};
9
+ this.helperFunctions = "";
10
+ this.normalExpression = "vec3(0.0, 0.0, 1.0)";
11
+ }
12
+ }
13
+
14
+ export { FXFlatNormalNode };
@@ -0,0 +1,3 @@
1
+ export declare abstract class FXNormalNode {
2
+ destroy?(): void;
3
+ }
@@ -0,0 +1,4 @@
1
+ class FXNormalNode {
2
+ }
3
+
4
+ export { FXNormalNode };
@@ -0,0 +1,4 @@
1
+ import { FXNormalNode } from "./FXNormalNode";
2
+ export declare class FXSphericalNormalNode extends FXNormalNode {
3
+ constructor();
4
+ }
@@ -0,0 +1,19 @@
1
+ import { FXNormalNode } from './FXNormalNode.js';
2
+
3
+ class FXSphericalNormalNode extends FXNormalNode {
4
+ constructor() {
5
+ super();
6
+ this.cacheKey = "spherical";
7
+ this.uniformDeclarations = [];
8
+ this.uniforms = {};
9
+ this.helperFunctions = `
10
+ vec3 fxComputeSphericalNormal(vec2 uv) {
11
+ vec2 centeredUV = uv * 2.0 - 1.0;
12
+ return normalize(vec3(centeredUV, sqrt(max(0.0, 1.0 - dot(centeredUV, centeredUV)))));
13
+ }
14
+ `;
15
+ this.normalExpression = "fxComputeSphericalNormal(p_uv)";
16
+ }
17
+ }
18
+
19
+ export { FXSphericalNormalNode };
@@ -0,0 +1,11 @@
1
+ import type { Texture } from "three";
2
+ import { FXTextureNode } from "./FXTextureNode";
3
+ export interface FXAnimatedTextureNodeOptions {
4
+ texture: Texture;
5
+ columns: number;
6
+ rows: number;
7
+ interpolate?: boolean;
8
+ }
9
+ export declare class FXAnimatedTextureNode extends FXTextureNode {
10
+ constructor({ texture, columns, rows, interpolate }: FXAnimatedTextureNodeOptions);
11
+ }
@@ -0,0 +1,80 @@
1
+ import { checkSRGBSupport } from '../../miscellaneous/webglCapabilities.js';
2
+ import { FXTextureNode } from './FXTextureNode.js';
3
+
4
+ class FXAnimatedTextureNode extends FXTextureNode {
5
+ constructor({ texture, columns, rows, interpolate = false }) {
6
+ super();
7
+ const gammaCorrection = checkSRGBSupport()
8
+ ? ""
9
+ : "color = vec4(pow(color.rgb, vec3(2.2)), color.a);";
10
+ this.affectsDepth = true;
11
+ this.cacheKey = interpolate ? "animated-interpolated" : "animated";
12
+ this.uniformDeclarations = [
13
+ "uniform sampler2D u_AnimatedTexture;",
14
+ "uniform float u_AnimatedTextureColumns;",
15
+ "uniform float u_AnimatedTextureRows;",
16
+ ];
17
+ this.uniforms = {
18
+ // eslint-disable-next-line @typescript-eslint/naming-convention
19
+ u_AnimatedTexture: { value: texture },
20
+ // eslint-disable-next-line @typescript-eslint/naming-convention
21
+ u_AnimatedTextureColumns: { value: columns },
22
+ // eslint-disable-next-line @typescript-eslint/naming-convention
23
+ u_AnimatedTextureRows: { value: rows },
24
+ };
25
+ this.helperFunctions = interpolate
26
+ ? `
27
+ vec2 frameToUV(vec2 uv, float frame, float columns, float rows) {
28
+ float column = mod(frame, columns);
29
+ float row = floor(frame / columns);
30
+ return vec2((column + uv.x) / columns, 1.0 - (row + 1.0 - uv.y) / rows);
31
+ }
32
+
33
+ vec4 sampleAnimatedTexture(sampler2D spriteSheet, vec2 uv, float columns, float rows) {
34
+ float totalFrames = columns * rows;
35
+
36
+ // Fractional frame position drives both frame selection and blend weight
37
+ float exactFrame = PARTICLE_AGE / PARTICLE_LIFETIME * totalFrames;
38
+ float currentFrame = clamp(floor(exactFrame), 0.0, totalFrames - 1.0);
39
+ float nextFrame = clamp(currentFrame + 1.0, 0.0, totalFrames - 1.0);
40
+ float blendWeight = fract(exactFrame);
41
+
42
+ vec4 color = mix(
43
+ texture2D(spriteSheet, frameToUV(uv, currentFrame, columns, rows)),
44
+ texture2D(spriteSheet, frameToUV(uv, nextFrame, columns, rows)),
45
+ blendWeight
46
+ );
47
+
48
+ // Apply gamma correction when sRGB textures are not natively supported
49
+ ${gammaCorrection}
50
+
51
+ return color;
52
+ }
53
+ `
54
+ : `
55
+ vec4 sampleAnimatedTexture(sampler2D spriteSheet, vec2 uv, float columns, float rows) {
56
+ // Determine which frame to display based on normalized particle age
57
+ float totalFrames = columns * rows;
58
+ float frame = floor(PARTICLE_AGE / PARTICLE_LIFETIME * totalFrames);
59
+ frame = clamp(frame, 0.0, totalFrames - 1.0);
60
+
61
+ // Locate the frame's column and row in the sprite sheet grid
62
+ float column = mod(frame, columns);
63
+ float row = floor(frame / columns);
64
+
65
+ // Remap UV to the frame's tile region within the sprite sheet
66
+ vec2 frameUV = vec2((column + uv.x) / columns, 1.0 - (row + 1.0 - uv.y) / rows);
67
+ vec4 color = texture2D(spriteSheet, frameUV);
68
+
69
+ // Apply gamma correction when sRGB textures are not natively supported
70
+ ${gammaCorrection}
71
+
72
+ return color;
73
+ }
74
+ `;
75
+ this.colorExpression =
76
+ "sampleAnimatedTexture(u_AnimatedTexture, p_uv, u_AnimatedTextureColumns, u_AnimatedTextureRows)";
77
+ }
78
+ }
79
+
80
+ export { FXAnimatedTextureNode };
@@ -0,0 +1,5 @@
1
+ import type { Texture } from "three";
2
+ import { FXTextureNode } from "./FXTextureNode";
3
+ export declare class FXStaticTextureNode extends FXTextureNode {
4
+ constructor(texture: Texture);
5
+ }
@@ -0,0 +1,26 @@
1
+ import { checkSRGBSupport } from '../../miscellaneous/webglCapabilities.js';
2
+ import { FXTextureNode } from './FXTextureNode.js';
3
+
4
+ class FXStaticTextureNode extends FXTextureNode {
5
+ constructor(texture) {
6
+ super();
7
+ this.affectsDepth = true;
8
+ this.cacheKey = "static";
9
+ this.uniformDeclarations = ["uniform sampler2D u_StaticTexture;"];
10
+ this.uniforms = {
11
+ // eslint-disable-next-line @typescript-eslint/naming-convention
12
+ u_StaticTexture: { value: texture },
13
+ };
14
+ this.helperFunctions = `
15
+ vec4 sampleStaticTexture(sampler2D colorTexture, vec2 uv) {
16
+ vec4 color = texture2D(colorTexture, uv);
17
+ // Apply gamma correction when sRGB textures are not natively supported
18
+ ${checkSRGBSupport() ? "" : "color = vec4(pow(color.rgb, vec3(2.2)), color.a);"}
19
+ return color;
20
+ }
21
+ `;
22
+ this.colorExpression = "sampleStaticTexture(u_StaticTexture, p_uv)";
23
+ }
24
+ }
25
+
26
+ export { FXStaticTextureNode };
@@ -0,0 +1,3 @@
1
+ export declare abstract class FXTextureNode {
2
+ destroy?(): void;
3
+ }
@@ -0,0 +1,8 @@
1
+ class FXTextureNode {
2
+ constructor() {
3
+ /** @internal */
4
+ this.affectsDepth = false;
5
+ }
6
+ }
7
+
8
+ export { FXTextureNode };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sparcoon",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "particles",
@@ -1,21 +0,0 @@
1
- import { buildDepthMaterial } from './FXMaterial.Internal.js';
2
-
3
- class FXMaterial {
4
- constructor(options = {}) {
5
- this.colorNodes = options.colorNodes ?? [];
6
- this._private_depthAlphaTest = options.depthAlphaTest ?? 0.5;
7
- this._private_useDepthAlphaHash = options.useDepthAlphaHash ?? false;
8
- this._private_useSphericalDepth = options.useSphericalDepth ?? false;
9
- }
10
- destroy() {
11
- for (const node of this.colorNodes) {
12
- node.destroy?.();
13
- }
14
- }
15
- /** @internal */
16
- buildDepthMaterial() {
17
- return buildDepthMaterial(this.colorNodes, this._private_depthAlphaTest, this._private_useDepthAlphaHash, this._private_useSphericalDepth);
18
- }
19
- }
20
-
21
- export { FXMaterial };
@@ -1,10 +0,0 @@
1
- import type { Texture } from "three";
2
- import { FXColorNode } from "./FXColorNode";
3
- export interface FXAnimatedTextureNodeOptions {
4
- texture: Texture;
5
- cols: number;
6
- rows: number;
7
- }
8
- export declare class FXAnimatedTextureNode extends FXColorNode {
9
- constructor({ texture, cols, rows }: FXAnimatedTextureNodeOptions);
10
- }
@@ -1,41 +0,0 @@
1
- import { FXColorNode } from './FXColorNode.js';
2
-
3
- class FXAnimatedTextureNode extends FXColorNode {
4
- constructor({ texture, cols, rows }) {
5
- super();
6
- /** @internal */
7
- this.cacheKey = "animated";
8
- /** @internal */
9
- this.uniformDeclarations = [
10
- "uniform sampler2D u_AnimatedTexture;",
11
- "uniform float u_AnimatedTextureCols;",
12
- "uniform float u_AnimatedTextureRows;",
13
- ];
14
- /** @internal */
15
- this.helperFunctions = `
16
- vec4 _fx_sampleAnimated(sampler2D tex, vec2 uv, float cols, float rows) {
17
- float totalFrames = cols * rows;
18
- float frame = floor(PARTICLE_AGE / PARTICLE_LIFETIME * totalFrames);
19
- frame = clamp(frame, 0.0, totalFrames - 1.0);
20
- float col = mod(frame, cols);
21
- float row = floor(frame / cols);
22
- vec2 frameUV = vec2((col + uv.x) / cols, 1.0 - (row + 1.0 - uv.y) / rows);
23
- return texture2D(tex, frameUV);
24
- }
25
- `;
26
- /** @internal */
27
- this.colorExpression = "_fx_sampleAnimated(u_AnimatedTexture, p_uv, u_AnimatedTextureCols, u_AnimatedTextureRows)";
28
- /** @internal */
29
- this.affectsDepth = true;
30
- this.uniforms = {
31
- // eslint-disable-next-line @typescript-eslint/naming-convention
32
- u_AnimatedTexture: { value: texture },
33
- // eslint-disable-next-line @typescript-eslint/naming-convention
34
- u_AnimatedTextureCols: { value: cols },
35
- // eslint-disable-next-line @typescript-eslint/naming-convention
36
- u_AnimatedTextureRows: { value: rows },
37
- };
38
- }
39
- }
40
-
41
- export { FXAnimatedTextureNode };
@@ -1,5 +0,0 @@
1
- import type { Texture } from "three";
2
- import { FXColorNode } from "./FXColorNode";
3
- export declare class FXStaticTextureNode extends FXColorNode {
4
- constructor(texture: Texture);
5
- }
@@ -1,23 +0,0 @@
1
- import { FXColorNode } from './FXColorNode.js';
2
-
3
- class FXStaticTextureNode extends FXColorNode {
4
- constructor(texture) {
5
- super();
6
- /** @internal */
7
- this.cacheKey = "static";
8
- /** @internal */
9
- this.uniformDeclarations = ["uniform sampler2D u_StaticTexture;"];
10
- /** @internal */
11
- this.helperFunctions = "";
12
- /** @internal */
13
- this.colorExpression = "texture2D(u_StaticTexture, p_uv)";
14
- /** @internal */
15
- this.affectsDepth = true;
16
- this.uniforms = {
17
- // eslint-disable-next-line @typescript-eslint/naming-convention
18
- u_StaticTexture: { value: texture },
19
- };
20
- }
21
- }
22
-
23
- export { FXStaticTextureNode };
@@ -1 +0,0 @@
1
- export declare const PARTICLE_DEFINES = "\n #define PARTICLE_POSITION_X p_builtin[0][0]\n #define PARTICLE_POSITION_Y p_builtin[0][1]\n #define PARTICLE_POSITION_Z p_builtin[0][2]\n\n #define PARTICLE_VELOCITY_X p_builtin[0][3]\n #define PARTICLE_VELOCITY_Y p_builtin[1][0]\n #define PARTICLE_VELOCITY_Z p_builtin[1][1]\n\n #define PARTICLE_SCALE_X p_builtin[1][2]\n #define PARTICLE_SCALE_Y p_builtin[1][3]\n #define PARTICLE_SCALE_Z p_builtin[2][0]\n\n #define PARTICLE_ROTATION p_builtin[2][1]\n #define PARTICLE_TORQUE p_builtin[2][2]\n\n #define PARTICLE_LIFETIME p_builtin[2][3]\n #define PARTICLE_AGE p_builtin[3][0]\n\n #define PARTICLE_RANDOM_A p_builtin[3][1]\n #define PARTICLE_RANDOM_B p_builtin[3][2]\n #define PARTICLE_RANDOM_C p_builtin[3][3]\n";
@@ -1,25 +0,0 @@
1
- const PARTICLE_DEFINES = `
2
- #define PARTICLE_POSITION_X p_builtin[0][0]
3
- #define PARTICLE_POSITION_Y p_builtin[0][1]
4
- #define PARTICLE_POSITION_Z p_builtin[0][2]
5
-
6
- #define PARTICLE_VELOCITY_X p_builtin[0][3]
7
- #define PARTICLE_VELOCITY_Y p_builtin[1][0]
8
- #define PARTICLE_VELOCITY_Z p_builtin[1][1]
9
-
10
- #define PARTICLE_SCALE_X p_builtin[1][2]
11
- #define PARTICLE_SCALE_Y p_builtin[1][3]
12
- #define PARTICLE_SCALE_Z p_builtin[2][0]
13
-
14
- #define PARTICLE_ROTATION p_builtin[2][1]
15
- #define PARTICLE_TORQUE p_builtin[2][2]
16
-
17
- #define PARTICLE_LIFETIME p_builtin[2][3]
18
- #define PARTICLE_AGE p_builtin[3][0]
19
-
20
- #define PARTICLE_RANDOM_A p_builtin[3][1]
21
- #define PARTICLE_RANDOM_B p_builtin[3][2]
22
- #define PARTICLE_RANDOM_C p_builtin[3][3]
23
- `;
24
-
25
- export { PARTICLE_DEFINES };