@codexo/exojs-particles 0.12.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.
- package/LICENSE +21 -0
- package/README.md +129 -0
- package/dist/esm/ParticleSystem.d.ts +212 -0
- package/dist/esm/ParticleSystem.js +570 -0
- package/dist/esm/ParticleSystem.js.map +1 -0
- package/dist/esm/distributions/BoxArea.d.ts +17 -0
- package/dist/esm/distributions/BoxArea.js +48 -0
- package/dist/esm/distributions/BoxArea.js.map +1 -0
- package/dist/esm/distributions/CircleArea.d.ts +19 -0
- package/dist/esm/distributions/CircleArea.js +33 -0
- package/dist/esm/distributions/CircleArea.js.map +1 -0
- package/dist/esm/distributions/ColorGradient.d.ts +40 -0
- package/dist/esm/distributions/ColorGradient.js +72 -0
- package/dist/esm/distributions/ColorGradient.js.map +1 -0
- package/dist/esm/distributions/ConeDirection.d.ts +28 -0
- package/dist/esm/distributions/ConeDirection.js +44 -0
- package/dist/esm/distributions/ConeDirection.js.map +1 -0
- package/dist/esm/distributions/Constant.d.ts +17 -0
- package/dist/esm/distributions/Constant.js +35 -0
- package/dist/esm/distributions/Constant.js.map +1 -0
- package/dist/esm/distributions/Curve.d.ts +30 -0
- package/dist/esm/distributions/Curve.js +53 -0
- package/dist/esm/distributions/Curve.js.map +1 -0
- package/dist/esm/distributions/Distribution.d.ts +45 -0
- package/dist/esm/distributions/LineSegment.d.ts +15 -0
- package/dist/esm/distributions/LineSegment.js +27 -0
- package/dist/esm/distributions/LineSegment.js.map +1 -0
- package/dist/esm/distributions/Range.d.ts +12 -0
- package/dist/esm/distributions/Range.js +19 -0
- package/dist/esm/distributions/Range.js.map +1 -0
- package/dist/esm/distributions/VectorRange.d.ts +20 -0
- package/dist/esm/distributions/VectorRange.js +31 -0
- package/dist/esm/distributions/VectorRange.js.map +1 -0
- package/dist/esm/distributions/index.d.ts +12 -0
- package/dist/esm/gpu/ParticleGpuState.d.ts +57 -0
- package/dist/esm/gpu/ParticleGpuState.js +535 -0
- package/dist/esm/gpu/ParticleGpuState.js.map +1 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +32 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/modules/AlphaFadeOverLifetime.d.ts +24 -0
- package/dist/esm/modules/AlphaFadeOverLifetime.js +64 -0
- package/dist/esm/modules/AlphaFadeOverLifetime.js.map +1 -0
- package/dist/esm/modules/ApplyForce.d.ts +20 -0
- package/dist/esm/modules/ApplyForce.js +48 -0
- package/dist/esm/modules/ApplyForce.js.map +1 -0
- package/dist/esm/modules/AttractToPoint.d.ts +27 -0
- package/dist/esm/modules/AttractToPoint.js +73 -0
- package/dist/esm/modules/AttractToPoint.js.map +1 -0
- package/dist/esm/modules/BurstSpawn.d.ts +53 -0
- package/dist/esm/modules/BurstSpawn.js +93 -0
- package/dist/esm/modules/BurstSpawn.js.map +1 -0
- package/dist/esm/modules/ColorOverLifetime.d.ts +22 -0
- package/dist/esm/modules/ColorOverLifetime.js +65 -0
- package/dist/esm/modules/ColorOverLifetime.js.map +1 -0
- package/dist/esm/modules/ColorOverSpeed.d.ts +27 -0
- package/dist/esm/modules/ColorOverSpeed.js +86 -0
- package/dist/esm/modules/ColorOverSpeed.js.map +1 -0
- package/dist/esm/modules/DeathModule.d.ts +24 -0
- package/dist/esm/modules/DeathModule.js +25 -0
- package/dist/esm/modules/DeathModule.js.map +1 -0
- package/dist/esm/modules/Drag.d.ts +20 -0
- package/dist/esm/modules/Drag.js +43 -0
- package/dist/esm/modules/Drag.js.map +1 -0
- package/dist/esm/modules/OrbitalForce.d.ts +28 -0
- package/dist/esm/modules/OrbitalForce.js +65 -0
- package/dist/esm/modules/OrbitalForce.js.map +1 -0
- package/dist/esm/modules/RateSpawn.d.ts +41 -0
- package/dist/esm/modules/RateSpawn.js +75 -0
- package/dist/esm/modules/RateSpawn.js.map +1 -0
- package/dist/esm/modules/RepelFromPoint.d.ts +24 -0
- package/dist/esm/modules/RepelFromPoint.js +76 -0
- package/dist/esm/modules/RepelFromPoint.js.map +1 -0
- package/dist/esm/modules/RotateOverLifetime.d.ts +20 -0
- package/dist/esm/modules/RotateOverLifetime.js +41 -0
- package/dist/esm/modules/RotateOverLifetime.js.map +1 -0
- package/dist/esm/modules/ScaleOverLifetime.d.ts +26 -0
- package/dist/esm/modules/ScaleOverLifetime.js +59 -0
- package/dist/esm/modules/ScaleOverLifetime.js.map +1 -0
- package/dist/esm/modules/SpawnModule.d.ts +30 -0
- package/dist/esm/modules/SpawnModule.js +31 -0
- package/dist/esm/modules/SpawnModule.js.map +1 -0
- package/dist/esm/modules/SpawnOnDeath.d.ts +24 -0
- package/dist/esm/modules/SpawnOnDeath.js +47 -0
- package/dist/esm/modules/SpawnOnDeath.js.map +1 -0
- package/dist/esm/modules/Turbulence.d.ts +30 -0
- package/dist/esm/modules/Turbulence.js +122 -0
- package/dist/esm/modules/Turbulence.js.map +1 -0
- package/dist/esm/modules/UpdateModule.d.ts +95 -0
- package/dist/esm/modules/UpdateModule.js +66 -0
- package/dist/esm/modules/UpdateModule.js.map +1 -0
- package/dist/esm/modules/VelocityOverLifetime.d.ts +30 -0
- package/dist/esm/modules/VelocityOverLifetime.js +84 -0
- package/dist/esm/modules/VelocityOverLifetime.js.map +1 -0
- package/dist/esm/modules/WgslContribution.d.ts +81 -0
- package/dist/esm/modules/WgslContribution.js +34 -0
- package/dist/esm/modules/WgslContribution.js.map +1 -0
- package/dist/esm/modules/index.d.ts +22 -0
- package/dist/esm/particlesBuildInfo.d.ts +15 -0
- package/dist/esm/particlesBuildInfo.js +8 -0
- package/dist/esm/particlesBuildInfo.js.map +1 -0
- package/dist/esm/particlesExtension.d.ts +24 -0
- package/dist/esm/particlesExtension.js +49 -0
- package/dist/esm/particlesExtension.js.map +1 -0
- package/dist/esm/public.d.ts +9 -0
- package/dist/esm/register.d.ts +1 -0
- package/dist/esm/register.js +43 -0
- package/dist/esm/register.js.map +1 -0
- package/dist/esm/renderers/WebGl2ParticleRenderer.d.ts +45 -0
- package/dist/esm/renderers/WebGl2ParticleRenderer.js +325 -0
- package/dist/esm/renderers/WebGl2ParticleRenderer.js.map +1 -0
- package/dist/esm/renderers/WebGpuParticleRenderer.d.ts +48 -0
- package/dist/esm/renderers/WebGpuParticleRenderer.js +553 -0
- package/dist/esm/renderers/WebGpuParticleRenderer.js.map +1 -0
- package/dist/esm/renderers/glsl/particle.frag.js +4 -0
- package/dist/esm/renderers/glsl/particle.frag.js.map +1 -0
- package/dist/esm/renderers/glsl/particle.vert.js +4 -0
- package/dist/esm/renderers/glsl/particle.vert.js.map +1 -0
- package/package.json +55 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compute the byte size of a uniform struct from its declared fields,
|
|
3
|
+
* respecting WGSL std140-like alignment rules. Each field aligns to its
|
|
4
|
+
* natural alignment; the struct itself rounds to its largest alignment.
|
|
5
|
+
*
|
|
6
|
+
* Used by the codegen to size the system's combined uniform buffer.
|
|
7
|
+
*/
|
|
8
|
+
const wgslUniformByteSize = (fields) => {
|
|
9
|
+
let offset = 0;
|
|
10
|
+
let maxAlign = 4;
|
|
11
|
+
for (const field of fields) {
|
|
12
|
+
const { size, align } = wgslFieldLayout(field.type);
|
|
13
|
+
offset = Math.ceil(offset / align) * align;
|
|
14
|
+
offset += size;
|
|
15
|
+
maxAlign = Math.max(maxAlign, align);
|
|
16
|
+
}
|
|
17
|
+
return Math.ceil(offset / maxAlign) * maxAlign;
|
|
18
|
+
};
|
|
19
|
+
/** Per-WGSL-primitive size and alignment in bytes. */
|
|
20
|
+
const wgslFieldLayout = (type) => {
|
|
21
|
+
switch (type) {
|
|
22
|
+
case 'f32':
|
|
23
|
+
case 'i32':
|
|
24
|
+
case 'u32':
|
|
25
|
+
return { size: 4, align: 4 };
|
|
26
|
+
case 'vec2<f32>':
|
|
27
|
+
return { size: 8, align: 8 };
|
|
28
|
+
case 'vec4<f32>':
|
|
29
|
+
return { size: 16, align: 16 };
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export { wgslFieldLayout, wgslUniformByteSize };
|
|
34
|
+
//# sourceMappingURL=WgslContribution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WgslContribution.js","sources":["../../../../src/modules/WgslContribution.ts"],"sourcesContent":[null],"names":[],"mappings":"AAwEA;;;;;;AAMG;AACI,MAAM,mBAAmB,GAAG,CAAC,MAAmC,KAAY;IACjF,IAAI,MAAM,GAAG,CAAC;IACd,IAAI,QAAQ,GAAG,CAAC;AAEhB,IAAA,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;AAC1B,QAAA,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC;QAEnD,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,GAAG,KAAK;QAC1C,MAAM,IAAI,IAAI;QACd,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC;IACtC;IAEA,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,GAAG,QAAQ;AAChD;AAEA;AACO,MAAM,eAAe,GAAG,CAAC,IAAmB,KAAqC;IACtF,QAAQ,IAAI;AACV,QAAA,KAAK,KAAK;AACV,QAAA,KAAK,KAAK;AACV,QAAA,KAAK,KAAK;YACR,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE;AAC9B,QAAA,KAAK,WAAW;YACd,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE;AAC9B,QAAA,KAAK,WAAW;YACd,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;;AAEpC;;;;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { AlphaFadeOverLifetime } from './AlphaFadeOverLifetime';
|
|
2
|
+
export { ApplyForce } from './ApplyForce';
|
|
3
|
+
export { AttractToPoint } from './AttractToPoint';
|
|
4
|
+
export type { BurstSchedule, BurstSpawnConfig } from './BurstSpawn';
|
|
5
|
+
export { BurstSpawn } from './BurstSpawn';
|
|
6
|
+
export { ColorOverLifetime } from './ColorOverLifetime';
|
|
7
|
+
export { ColorOverSpeed } from './ColorOverSpeed';
|
|
8
|
+
export { DeathModule } from './DeathModule';
|
|
9
|
+
export { Drag } from './Drag';
|
|
10
|
+
export { OrbitalForce } from './OrbitalForce';
|
|
11
|
+
export type { RateSpawnConfig } from './RateSpawn';
|
|
12
|
+
export { RateSpawn } from './RateSpawn';
|
|
13
|
+
export { RepelFromPoint } from './RepelFromPoint';
|
|
14
|
+
export { RotateOverLifetime } from './RotateOverLifetime';
|
|
15
|
+
export { ScaleOverLifetime } from './ScaleOverLifetime';
|
|
16
|
+
export { SpawnModule } from './SpawnModule';
|
|
17
|
+
export { SpawnOnDeath } from './SpawnOnDeath';
|
|
18
|
+
export { Turbulence } from './Turbulence';
|
|
19
|
+
export { UpdateModule } from './UpdateModule';
|
|
20
|
+
export { VelocityOverLifetime } from './VelocityOverLifetime';
|
|
21
|
+
export type { WgslContribution, WgslPrimitive, WgslTextureBinding, WgslUniformField } from './WgslContribution';
|
|
22
|
+
export { wgslFieldLayout, wgslUniformByteSize } from './WgslContribution';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Immutable compile-time build metadata for `@codexo/exojs-particles`.
|
|
3
|
+
*
|
|
4
|
+
* `development` mirrors the `__DEV__` compile-time constant and is statically
|
|
5
|
+
* replaced before tree shaking. `version` is the exact `package.json` version
|
|
6
|
+
* of the Particles package at build time. `revision` is the short
|
|
7
|
+
* source-control revision (appended with `-dirty` when uncommitted changes are
|
|
8
|
+
* present) or `"unknown"` when no revision information is available.
|
|
9
|
+
*/
|
|
10
|
+
export interface ParticlesBuildInfo {
|
|
11
|
+
readonly version: string;
|
|
12
|
+
readonly revision: string;
|
|
13
|
+
readonly development: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const particlesBuildInfo: ParticlesBuildInfo;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"particlesBuildInfo.js","sources":["../../../src/particlesBuildInfo.ts"],"sourcesContent":[null],"names":[],"mappings":"AAeO,MAAM,kBAAkB,GAAuB,MAAM,CAAC,MAAM,CAAC;AAClE,IAAA,OAAO,EAAE,QAAW;AACpB,IAAA,QAAQ,EAAE,SAAY;AACtB,IAAA,WAAW,EAAE,KAAO;AACrB,CAAA;;;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Extension } from '@codexo/exojs/extensions';
|
|
2
|
+
/** Options for {@link createParticlesExtension}. */
|
|
3
|
+
export interface ParticlesExtensionOptions {
|
|
4
|
+
/** WebGL2 particle renderer batch size. Default: 8192. */
|
|
5
|
+
readonly batchSize?: number;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Default immutable Particles extension descriptor.
|
|
9
|
+
* Use with `ApplicationOptions.extensions` or call
|
|
10
|
+
* `import '@codexo/exojs-particles/register'` for global auto-registration.
|
|
11
|
+
*/
|
|
12
|
+
export declare const particlesExtension: Extension;
|
|
13
|
+
/**
|
|
14
|
+
* Create a Particles extension with custom configuration.
|
|
15
|
+
* Returns an application-local descriptor — safe to pass to one
|
|
16
|
+
* `Application` only. For shared use, prefer {@link particlesExtension}.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const ext = createParticlesExtension({ batchSize: 4096 });
|
|
21
|
+
* const app = new Application({ extensions: [ext] });
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare function createParticlesExtension(options?: ParticlesExtensionOptions): Extension;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { RenderBackendType } from '@codexo/exojs/rendering';
|
|
2
|
+
import { ParticleSystem } from './ParticleSystem.js';
|
|
3
|
+
import { WebGl2ParticleRenderer } from './renderers/WebGl2ParticleRenderer.js';
|
|
4
|
+
import { WebGpuParticleRenderer } from './renderers/WebGpuParticleRenderer.js';
|
|
5
|
+
|
|
6
|
+
function buildParticlesRendererBinding(batchSize) {
|
|
7
|
+
return {
|
|
8
|
+
targets: [ParticleSystem],
|
|
9
|
+
create(backend) {
|
|
10
|
+
if (backend.backendType === RenderBackendType.WebGl2) {
|
|
11
|
+
return new WebGl2ParticleRenderer(batchSize);
|
|
12
|
+
}
|
|
13
|
+
if (backend.backendType === RenderBackendType.WebGpu) {
|
|
14
|
+
return new WebGpuParticleRenderer();
|
|
15
|
+
}
|
|
16
|
+
return undefined;
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Default immutable Particles extension descriptor.
|
|
22
|
+
* Use with `ApplicationOptions.extensions` or call
|
|
23
|
+
* `import '@codexo/exojs-particles/register'` for global auto-registration.
|
|
24
|
+
*/
|
|
25
|
+
const particlesExtension = Object.freeze({
|
|
26
|
+
id: '@codexo/exojs-particles',
|
|
27
|
+
renderers: [buildParticlesRendererBinding(8192)],
|
|
28
|
+
});
|
|
29
|
+
/**
|
|
30
|
+
* Create a Particles extension with custom configuration.
|
|
31
|
+
* Returns an application-local descriptor — safe to pass to one
|
|
32
|
+
* `Application` only. For shared use, prefer {@link particlesExtension}.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* const ext = createParticlesExtension({ batchSize: 4096 });
|
|
37
|
+
* const app = new Application({ extensions: [ext] });
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
function createParticlesExtension(options = {}) {
|
|
41
|
+
const batchSize = options.batchSize ?? 8192;
|
|
42
|
+
return {
|
|
43
|
+
id: '@codexo/exojs-particles',
|
|
44
|
+
renderers: [buildParticlesRendererBinding(batchSize)],
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { createParticlesExtension, particlesExtension };
|
|
49
|
+
//# sourceMappingURL=particlesExtension.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"particlesExtension.js","sources":["../../../src/particlesExtension.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAcA,SAAS,6BAA6B,CAAC,SAAiB,EAAA;IACtD,OAAO;QACL,OAAO,EAAE,CAAC,cAAc,CAAC;AACzB,QAAA,MAAM,CAAC,OAAsB,EAAA;YAC3B,IAAI,OAAO,CAAC,WAAW,KAAK,iBAAiB,CAAC,MAAM,EAAE;AACpD,gBAAA,OAAO,IAAI,sBAAsB,CAAC,SAAS,CAAC;YAC9C;YAEA,IAAI,OAAO,CAAC,WAAW,KAAK,iBAAiB,CAAC,MAAM,EAAE;gBACpD,OAAO,IAAI,sBAAsB,EAAE;YACrC;AAEA,YAAA,OAAO,SAAS;QAClB,CAAC;KACF;AACH;AAEA;;;;AAIG;AACI,MAAM,kBAAkB,GAAc,MAAM,CAAC,MAAM,CAAC;AACzD,IAAA,EAAE,EAAE,yBAAyB;AAC7B,IAAA,SAAS,EAAE,CAAC,6BAA6B,CAAC,IAAI,CAAC,CAAC;AACjD,CAAA;AAED;;;;;;;;;;AAUG;AACG,SAAU,wBAAwB,CAAC,OAAA,GAAqC,EAAE,EAAA;AAC9E,IAAA,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,IAAI;IAE3C,OAAO;AACL,QAAA,EAAE,EAAE,yBAAyB;AAC7B,QAAA,SAAS,EAAE,CAAC,6BAA6B,CAAC,SAAS,CAAC,CAAC;KACtD;AACH;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type { Extension, RendererBinding } from '@codexo/exojs/extensions';
|
|
2
|
+
export type { ParticlesExtensionOptions } from './particlesExtension';
|
|
3
|
+
export { createParticlesExtension, particlesExtension } from './particlesExtension';
|
|
4
|
+
export * from './distributions';
|
|
5
|
+
export * from './modules';
|
|
6
|
+
export type { ParticlesBuildInfo } from './particlesBuildInfo';
|
|
7
|
+
export { particlesBuildInfo } from './particlesBuildInfo';
|
|
8
|
+
export { ParticleSystem } from './ParticleSystem';
|
|
9
|
+
export type { ParticleSystemOptions } from './ParticleSystem';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './public';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ExtensionRegistry } from '@codexo/exojs/extensions';
|
|
2
|
+
import { particlesExtension } from './particlesExtension.js';
|
|
3
|
+
export { createParticlesExtension } from './particlesExtension.js';
|
|
4
|
+
export { BoxArea } from './distributions/BoxArea.js';
|
|
5
|
+
export { CircleArea } from './distributions/CircleArea.js';
|
|
6
|
+
export { ColorGradient } from './distributions/ColorGradient.js';
|
|
7
|
+
export { ConeDirection } from './distributions/ConeDirection.js';
|
|
8
|
+
export { Constant } from './distributions/Constant.js';
|
|
9
|
+
export { Curve } from './distributions/Curve.js';
|
|
10
|
+
export { LineSegment } from './distributions/LineSegment.js';
|
|
11
|
+
export { Range } from './distributions/Range.js';
|
|
12
|
+
export { VectorRange } from './distributions/VectorRange.js';
|
|
13
|
+
export { AlphaFadeOverLifetime } from './modules/AlphaFadeOverLifetime.js';
|
|
14
|
+
export { ApplyForce } from './modules/ApplyForce.js';
|
|
15
|
+
export { AttractToPoint } from './modules/AttractToPoint.js';
|
|
16
|
+
export { BurstSpawn } from './modules/BurstSpawn.js';
|
|
17
|
+
export { ColorOverLifetime } from './modules/ColorOverLifetime.js';
|
|
18
|
+
export { ColorOverSpeed } from './modules/ColorOverSpeed.js';
|
|
19
|
+
export { DeathModule } from './modules/DeathModule.js';
|
|
20
|
+
export { Drag } from './modules/Drag.js';
|
|
21
|
+
export { OrbitalForce } from './modules/OrbitalForce.js';
|
|
22
|
+
export { RateSpawn } from './modules/RateSpawn.js';
|
|
23
|
+
export { RepelFromPoint } from './modules/RepelFromPoint.js';
|
|
24
|
+
export { RotateOverLifetime } from './modules/RotateOverLifetime.js';
|
|
25
|
+
export { ScaleOverLifetime } from './modules/ScaleOverLifetime.js';
|
|
26
|
+
export { SpawnModule } from './modules/SpawnModule.js';
|
|
27
|
+
export { SpawnOnDeath } from './modules/SpawnOnDeath.js';
|
|
28
|
+
export { Turbulence } from './modules/Turbulence.js';
|
|
29
|
+
export { UpdateModule } from './modules/UpdateModule.js';
|
|
30
|
+
export { VelocityOverLifetime } from './modules/VelocityOverLifetime.js';
|
|
31
|
+
export { wgslFieldLayout, wgslUniformByteSize } from './modules/WgslContribution.js';
|
|
32
|
+
export { particlesBuildInfo } from './particlesBuildInfo.js';
|
|
33
|
+
export { ParticleSystem } from './ParticleSystem.js';
|
|
34
|
+
|
|
35
|
+
// @codexo/exojs-particles/register — explicit registration entry.
|
|
36
|
+
// Importing this entry registers the default particlesExtension descriptor
|
|
37
|
+
// in the global ExtensionRegistry. Subsequently constructed Applications
|
|
38
|
+
// that use global defaults will receive the Particles extension.
|
|
39
|
+
// This is the only side-effectful entry in this package.
|
|
40
|
+
ExtensionRegistry.register(particlesExtension);
|
|
41
|
+
|
|
42
|
+
export { particlesExtension };
|
|
43
|
+
//# sourceMappingURL=register.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register.js","sources":["../../../src/register.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AAMA,iBAAiB,CAAC,QAAQ,CAAC,kBAAkB,CAAC;;;;"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ParticleSystem } from '#ParticleSystem';
|
|
2
|
+
import { AbstractWebGl2Renderer } from '@codexo/exojs/rendering';
|
|
3
|
+
import type { WebGl2Backend } from '@codexo/exojs/rendering';
|
|
4
|
+
export declare class WebGl2ParticleRenderer extends AbstractWebGl2Renderer<ParticleSystem> {
|
|
5
|
+
/**
|
|
6
|
+
* The particle system's transform is bound as a `u_systemTransform` uniform and
|
|
7
|
+
* each particle is positioned system-locally, so this renderer never reads the
|
|
8
|
+
* shared {@link TransformBuffer}; the render-group upload boundary skips writing
|
|
9
|
+
* transform records for particle draws.
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
readonly _consumesSharedTransform = false;
|
|
13
|
+
private readonly _shader;
|
|
14
|
+
private readonly _batchSize;
|
|
15
|
+
private readonly _instanceData;
|
|
16
|
+
private readonly _instanceFloat32;
|
|
17
|
+
private readonly _instanceUint32;
|
|
18
|
+
private _instanceCount;
|
|
19
|
+
private _currentTexture;
|
|
20
|
+
private _currentBlendMode;
|
|
21
|
+
private _currentView;
|
|
22
|
+
private _currentViewId;
|
|
23
|
+
private _instanceBuffer;
|
|
24
|
+
private _indexBuffer;
|
|
25
|
+
private _vao;
|
|
26
|
+
private _connection;
|
|
27
|
+
constructor(batchSize: number);
|
|
28
|
+
render(system: ParticleSystem): this;
|
|
29
|
+
/**
|
|
30
|
+
* Compute (uvMin, uvMax) pairs for every declared frame on the system.
|
|
31
|
+
* Pulled lazily and cached per (system, texture-version) to avoid the
|
|
32
|
+
* arithmetic in the hot pack loop. Falls back to a single entry from
|
|
33
|
+
* `system.textureFrame` when no atlas is declared.
|
|
34
|
+
*/
|
|
35
|
+
private _computeFrameUvs;
|
|
36
|
+
private _uvMinsScratch;
|
|
37
|
+
private _uvMaxsScratch;
|
|
38
|
+
flush(): void;
|
|
39
|
+
protected onConnect(backend: WebGl2Backend): void;
|
|
40
|
+
protected onDisconnect(): void;
|
|
41
|
+
destroy(): void;
|
|
42
|
+
private _createConnection;
|
|
43
|
+
private _createBufferRuntime;
|
|
44
|
+
private _createVaoRuntime;
|
|
45
|
+
}
|
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
import { AbstractWebGl2Renderer, Shader, RenderingPrimitives, createWebGl2ShaderProgram, WebGl2RenderBuffer, BufferTypes, BufferUsage, WebGl2VertexArrayObject } from '@codexo/exojs/rendering';
|
|
2
|
+
import fragmentSource from './glsl/particle.frag.js';
|
|
3
|
+
import vertexSource from './glsl/particle.vert.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Instanced particle renderer for WebGL2.
|
|
7
|
+
*
|
|
8
|
+
* One ParticleSystem = one batch. Each `render(system)` flushes any
|
|
9
|
+
* pending batch, sets the system-level uniforms (transform, local
|
|
10
|
+
* bounds, texture), and packs every active particle into the per-instance
|
|
11
|
+
* buffer. The next `flush()` issues a single `drawElementsInstanced`.
|
|
12
|
+
*
|
|
13
|
+
* Per-instance layout (40 bytes per particle, 6 attributes):
|
|
14
|
+
* ```
|
|
15
|
+
* translation f32x2 (offset 0, 8 bytes) particle position (system-local)
|
|
16
|
+
* scale f32x2 (offset 8, 8 bytes)
|
|
17
|
+
* rotation f32 (offset 16, 4 bytes) degrees
|
|
18
|
+
* color u8x4 (offset 20, 4 bytes) RGBA tint, normalised
|
|
19
|
+
* uvMin f32x2 (offset 24, 8 bytes) pre-resolved frame uvMin
|
|
20
|
+
* uvMax f32x2 (offset 32, 8 bytes) pre-resolved frame uvMax
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* UVs are baked per-particle so the system can carry an atlas of frames
|
|
24
|
+
* — `system.frames` declares the rectangles; each particle's
|
|
25
|
+
* `textureIndex` selects one. The pack loop resolves frame-rectangle to
|
|
26
|
+
* UVs once per particle per frame; no per-instance shader-side indexing
|
|
27
|
+
* needed.
|
|
28
|
+
*/
|
|
29
|
+
const instanceStrideBytes = 40;
|
|
30
|
+
const wordsPerInstance = instanceStrideBytes / Uint32Array.BYTES_PER_ELEMENT;
|
|
31
|
+
const indicesPerQuad = 6;
|
|
32
|
+
const quadIndices = new Uint16Array([0, 1, 2, 0, 2, 3]);
|
|
33
|
+
class WebGl2ParticleRenderer extends AbstractWebGl2Renderer {
|
|
34
|
+
/**
|
|
35
|
+
* The particle system's transform is bound as a `u_systemTransform` uniform and
|
|
36
|
+
* each particle is positioned system-locally, so this renderer never reads the
|
|
37
|
+
* shared {@link TransformBuffer}; the render-group upload boundary skips writing
|
|
38
|
+
* transform records for particle draws.
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
_consumesSharedTransform = false;
|
|
42
|
+
_shader;
|
|
43
|
+
_batchSize;
|
|
44
|
+
_instanceData;
|
|
45
|
+
_instanceFloat32;
|
|
46
|
+
_instanceUint32;
|
|
47
|
+
_instanceCount = 0;
|
|
48
|
+
_currentTexture = null;
|
|
49
|
+
_currentBlendMode = null;
|
|
50
|
+
_currentView = null;
|
|
51
|
+
_currentViewId = -1;
|
|
52
|
+
_instanceBuffer = null;
|
|
53
|
+
_indexBuffer = null;
|
|
54
|
+
_vao = null;
|
|
55
|
+
_connection = null;
|
|
56
|
+
constructor(batchSize) {
|
|
57
|
+
super();
|
|
58
|
+
this._batchSize = batchSize;
|
|
59
|
+
this._shader = new Shader(vertexSource, fragmentSource);
|
|
60
|
+
this._instanceData = new ArrayBuffer(batchSize * instanceStrideBytes);
|
|
61
|
+
this._instanceFloat32 = new Float32Array(this._instanceData);
|
|
62
|
+
this._instanceUint32 = new Uint32Array(this._instanceData);
|
|
63
|
+
}
|
|
64
|
+
render(system) {
|
|
65
|
+
const backend = this.getBackend();
|
|
66
|
+
const { texture, blendMode } = system;
|
|
67
|
+
const textureChanged = texture !== this._currentTexture;
|
|
68
|
+
const blendModeChanged = blendMode !== this._currentBlendMode;
|
|
69
|
+
// System transform / texture / UV / local-bounds are uniforms, so
|
|
70
|
+
// mixing systems in one batch is invalid. Flush any prior system
|
|
71
|
+
// before setting up this one.
|
|
72
|
+
this.flush();
|
|
73
|
+
if (textureChanged) {
|
|
74
|
+
this._currentTexture = texture;
|
|
75
|
+
backend.bindTexture(texture);
|
|
76
|
+
}
|
|
77
|
+
if (blendModeChanged) {
|
|
78
|
+
this._currentBlendMode = blendMode;
|
|
79
|
+
backend.setBlendMode(blendMode);
|
|
80
|
+
}
|
|
81
|
+
// System-level uniforms are set before packing so the eventual
|
|
82
|
+
// flush() can sync them in one go.
|
|
83
|
+
const localBounds = system.vertices;
|
|
84
|
+
this._shader.getUniform('u_systemTransform').setValue(system.getGlobalTransform().toArray(false));
|
|
85
|
+
this._shader.getUniform('u_localBounds').setValue(localBounds);
|
|
86
|
+
const f32 = this._instanceFloat32;
|
|
87
|
+
const u32 = this._instanceUint32;
|
|
88
|
+
const { posX, posY, scaleX, scaleY, rotations, color, textureIndex, alive } = system;
|
|
89
|
+
const limit = Math.min(system.liveCount, this._batchSize);
|
|
90
|
+
// Pre-compute frame UVs from system.frames + texture; falls back
|
|
91
|
+
// to the system.textureFrame when no atlas is declared.
|
|
92
|
+
const { uvMins, uvMaxs } = this._computeFrameUvs(system);
|
|
93
|
+
const frameCount = uvMins.length / 2;
|
|
94
|
+
const fallbackFrame = frameCount > 0 ? 0 : 0;
|
|
95
|
+
let writeIndex = 0;
|
|
96
|
+
for (let i = 0; i < limit; i++) {
|
|
97
|
+
// Skip dead slots in GPU-mode systems where the live range can
|
|
98
|
+
// contain holes.
|
|
99
|
+
if (alive[i] === 0) {
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
const offset = writeIndex * wordsPerInstance;
|
|
103
|
+
const frame = textureIndex[i] < frameCount ? textureIndex[i] : fallbackFrame;
|
|
104
|
+
const uvBase = frame * 2;
|
|
105
|
+
f32[offset + 0] = posX[i];
|
|
106
|
+
f32[offset + 1] = posY[i];
|
|
107
|
+
f32[offset + 2] = scaleX[i];
|
|
108
|
+
f32[offset + 3] = scaleY[i];
|
|
109
|
+
f32[offset + 4] = rotations[i];
|
|
110
|
+
u32[offset + 5] = color[i];
|
|
111
|
+
f32[offset + 6] = uvMins[uvBase + 0];
|
|
112
|
+
f32[offset + 7] = uvMins[uvBase + 1];
|
|
113
|
+
f32[offset + 8] = uvMaxs[uvBase + 0];
|
|
114
|
+
f32[offset + 9] = uvMaxs[uvBase + 1];
|
|
115
|
+
writeIndex++;
|
|
116
|
+
}
|
|
117
|
+
this._instanceCount = writeIndex;
|
|
118
|
+
return this;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Compute (uvMin, uvMax) pairs for every declared frame on the system.
|
|
122
|
+
* Pulled lazily and cached per (system, texture-version) to avoid the
|
|
123
|
+
* arithmetic in the hot pack loop. Falls back to a single entry from
|
|
124
|
+
* `system.textureFrame` when no atlas is declared.
|
|
125
|
+
*/
|
|
126
|
+
_computeFrameUvs(system) {
|
|
127
|
+
const frames = system.frames;
|
|
128
|
+
const tex = system.texture;
|
|
129
|
+
const texW = tex.width;
|
|
130
|
+
const texH = tex.height;
|
|
131
|
+
const flipY = tex.flipY;
|
|
132
|
+
const count = frames.length === 0 ? 1 : frames.length;
|
|
133
|
+
// Re-allocate scratch when capacity grows.
|
|
134
|
+
if (this._uvMinsScratch.length < count * 2) {
|
|
135
|
+
this._uvMinsScratch = new Float32Array(count * 2);
|
|
136
|
+
this._uvMaxsScratch = new Float32Array(count * 2);
|
|
137
|
+
}
|
|
138
|
+
const mins = this._uvMinsScratch;
|
|
139
|
+
const maxs = this._uvMaxsScratch;
|
|
140
|
+
if (frames.length === 0) {
|
|
141
|
+
const f = system.textureFrame;
|
|
142
|
+
const minU = f.left / texW;
|
|
143
|
+
const maxU = f.right / texW;
|
|
144
|
+
const topV = f.top / texH;
|
|
145
|
+
const bottomV = f.bottom / texH;
|
|
146
|
+
mins[0] = minU;
|
|
147
|
+
mins[1] = flipY ? bottomV : topV;
|
|
148
|
+
maxs[0] = maxU;
|
|
149
|
+
maxs[1] = flipY ? topV : bottomV;
|
|
150
|
+
return { uvMins: mins, uvMaxs: maxs };
|
|
151
|
+
}
|
|
152
|
+
for (let i = 0; i < frames.length; i++) {
|
|
153
|
+
const f = frames[i];
|
|
154
|
+
const o = i * 2;
|
|
155
|
+
const minU = f.left / texW;
|
|
156
|
+
const maxU = f.right / texW;
|
|
157
|
+
const topV = f.top / texH;
|
|
158
|
+
const bottomV = f.bottom / texH;
|
|
159
|
+
mins[o + 0] = minU;
|
|
160
|
+
mins[o + 1] = flipY ? bottomV : topV;
|
|
161
|
+
maxs[o + 0] = maxU;
|
|
162
|
+
maxs[o + 1] = flipY ? topV : bottomV;
|
|
163
|
+
}
|
|
164
|
+
return { uvMins: mins, uvMaxs: maxs };
|
|
165
|
+
}
|
|
166
|
+
_uvMinsScratch = new Float32Array(2);
|
|
167
|
+
_uvMaxsScratch = new Float32Array(2);
|
|
168
|
+
flush() {
|
|
169
|
+
const backend = this.getBackendOrNull();
|
|
170
|
+
const instanceBuffer = this._instanceBuffer;
|
|
171
|
+
const indexBuffer = this._indexBuffer;
|
|
172
|
+
const vao = this._vao;
|
|
173
|
+
if (this._instanceCount === 0 || backend === null || instanceBuffer === null || indexBuffer === null || vao === null) {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
const view = backend.view;
|
|
177
|
+
if (this._currentView !== view || this._currentViewId !== view.updateId) {
|
|
178
|
+
this._currentView = view;
|
|
179
|
+
this._currentViewId = view.updateId;
|
|
180
|
+
this._shader.getUniform('u_projection').setValue(view.getTransform().toArray(false));
|
|
181
|
+
}
|
|
182
|
+
this._shader.sync();
|
|
183
|
+
backend.bindVertexArrayObject(vao);
|
|
184
|
+
instanceBuffer.upload(this._instanceFloat32.subarray(0, this._instanceCount * wordsPerInstance));
|
|
185
|
+
vao.drawInstanced(indicesPerQuad, 0, this._instanceCount, RenderingPrimitives.Triangles);
|
|
186
|
+
backend.stats.batches++;
|
|
187
|
+
backend.stats.drawCalls++;
|
|
188
|
+
this._instanceCount = 0;
|
|
189
|
+
}
|
|
190
|
+
onConnect(backend) {
|
|
191
|
+
const gl = backend.context;
|
|
192
|
+
this._shader.connect(createWebGl2ShaderProgram(gl));
|
|
193
|
+
this._connection = this._createConnection(gl);
|
|
194
|
+
this._indexBuffer = new WebGl2RenderBuffer(BufferTypes.ElementArrayBuffer, quadIndices, BufferUsage.StaticDraw).connect(this._createBufferRuntime(this._connection));
|
|
195
|
+
this._instanceBuffer = new WebGl2RenderBuffer(BufferTypes.ArrayBuffer, this._instanceData, BufferUsage.DynamicDraw).connect(this._createBufferRuntime(this._connection));
|
|
196
|
+
this._shader.sync();
|
|
197
|
+
this._vao = new WebGl2VertexArrayObject()
|
|
198
|
+
.addIndex(this._indexBuffer)
|
|
199
|
+
.addAttribute(this._instanceBuffer, this._shader.getAttribute('a_translation'), gl.FLOAT, false, instanceStrideBytes, 0, false, 1)
|
|
200
|
+
.addAttribute(this._instanceBuffer, this._shader.getAttribute('a_scale'), gl.FLOAT, false, instanceStrideBytes, 8, false, 1)
|
|
201
|
+
.addAttribute(this._instanceBuffer, this._shader.getAttribute('a_rotation'), gl.FLOAT, false, instanceStrideBytes, 16, false, 1)
|
|
202
|
+
.addAttribute(this._instanceBuffer, this._shader.getAttribute('a_color'), gl.UNSIGNED_BYTE, true, instanceStrideBytes, 20, false, 1)
|
|
203
|
+
.addAttribute(this._instanceBuffer, this._shader.getAttribute('a_uvMin'), gl.FLOAT, false, instanceStrideBytes, 24, false, 1)
|
|
204
|
+
.addAttribute(this._instanceBuffer, this._shader.getAttribute('a_uvMax'), gl.FLOAT, false, instanceStrideBytes, 32, false, 1)
|
|
205
|
+
.connect(this._createVaoRuntime(this._connection));
|
|
206
|
+
}
|
|
207
|
+
onDisconnect() {
|
|
208
|
+
this._shader.disconnect();
|
|
209
|
+
this._instanceBuffer?.destroy();
|
|
210
|
+
this._instanceBuffer = null;
|
|
211
|
+
this._indexBuffer?.destroy();
|
|
212
|
+
this._indexBuffer = null;
|
|
213
|
+
this._vao?.destroy();
|
|
214
|
+
this._vao = null;
|
|
215
|
+
this._connection = null;
|
|
216
|
+
this._currentTexture = null;
|
|
217
|
+
this._currentBlendMode = null;
|
|
218
|
+
this._currentView = null;
|
|
219
|
+
this._currentViewId = -1;
|
|
220
|
+
this._instanceCount = 0;
|
|
221
|
+
}
|
|
222
|
+
destroy() {
|
|
223
|
+
this.disconnect();
|
|
224
|
+
this._shader.destroy();
|
|
225
|
+
}
|
|
226
|
+
_createConnection(gl) {
|
|
227
|
+
const vaoHandle = gl.createVertexArray();
|
|
228
|
+
if (vaoHandle === null) {
|
|
229
|
+
throw new Error('WebGl2ParticleRenderer: could not create vertex array object.');
|
|
230
|
+
}
|
|
231
|
+
return {
|
|
232
|
+
gl,
|
|
233
|
+
buffers: new Map(),
|
|
234
|
+
vaoHandle,
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
_createBufferRuntime(connection) {
|
|
238
|
+
const handle = connection.gl.createBuffer();
|
|
239
|
+
if (handle === null) {
|
|
240
|
+
throw new Error('WebGl2ParticleRenderer: could not create render buffer.');
|
|
241
|
+
}
|
|
242
|
+
return {
|
|
243
|
+
bind: (buffer) => {
|
|
244
|
+
connection.gl.bindBuffer(buffer.type, handle);
|
|
245
|
+
},
|
|
246
|
+
upload: (buffer, offset) => {
|
|
247
|
+
const gl = connection.gl;
|
|
248
|
+
const data = buffer.data;
|
|
249
|
+
const state = connection.buffers.get(buffer);
|
|
250
|
+
gl.bindBuffer(buffer.type, handle);
|
|
251
|
+
if (state && state.dataByteLength >= data.byteLength) {
|
|
252
|
+
gl.bufferSubData(buffer.type, offset, data);
|
|
253
|
+
state.dataByteLength = data.byteLength;
|
|
254
|
+
}
|
|
255
|
+
else {
|
|
256
|
+
gl.bufferData(buffer.type, data, buffer.usage);
|
|
257
|
+
connection.buffers.set(buffer, { handle, dataByteLength: data.byteLength });
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
destroy: (buffer) => {
|
|
261
|
+
connection.gl.deleteBuffer(handle);
|
|
262
|
+
connection.buffers.delete(buffer);
|
|
263
|
+
buffer.disconnect();
|
|
264
|
+
},
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
_createVaoRuntime(connection) {
|
|
268
|
+
let appliedVersion = -1;
|
|
269
|
+
return {
|
|
270
|
+
bind: (vao) => {
|
|
271
|
+
const gl = connection.gl;
|
|
272
|
+
gl.bindVertexArray(connection.vaoHandle);
|
|
273
|
+
if (appliedVersion !== vao.version) {
|
|
274
|
+
let lastBuffer = null;
|
|
275
|
+
for (const attribute of vao.attributes) {
|
|
276
|
+
if (lastBuffer !== attribute.buffer) {
|
|
277
|
+
attribute.buffer.bind();
|
|
278
|
+
lastBuffer = attribute.buffer;
|
|
279
|
+
}
|
|
280
|
+
if (attribute.integer) {
|
|
281
|
+
gl.vertexAttribIPointer(attribute.location, attribute.size, attribute.type, attribute.stride, attribute.start);
|
|
282
|
+
}
|
|
283
|
+
else {
|
|
284
|
+
gl.vertexAttribPointer(attribute.location, attribute.size, attribute.type, attribute.normalized, attribute.stride, attribute.start);
|
|
285
|
+
}
|
|
286
|
+
gl.enableVertexAttribArray(attribute.location);
|
|
287
|
+
gl.vertexAttribDivisor(attribute.location, attribute.divisor);
|
|
288
|
+
}
|
|
289
|
+
if (vao.indexBuffer) {
|
|
290
|
+
vao.indexBuffer.bind();
|
|
291
|
+
}
|
|
292
|
+
appliedVersion = vao.version;
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
unbind: () => {
|
|
296
|
+
connection.gl.bindVertexArray(null);
|
|
297
|
+
},
|
|
298
|
+
draw: (vao, size, start, type) => {
|
|
299
|
+
const gl = connection.gl;
|
|
300
|
+
if (vao.indexBuffer) {
|
|
301
|
+
gl.drawElements(type, size, gl.UNSIGNED_SHORT, start);
|
|
302
|
+
}
|
|
303
|
+
else {
|
|
304
|
+
gl.drawArrays(type, start, size);
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
drawInstanced: (vao, count, start, instanceCount, type) => {
|
|
308
|
+
const gl = connection.gl;
|
|
309
|
+
if (vao.indexBuffer) {
|
|
310
|
+
gl.drawElementsInstanced(type, count, gl.UNSIGNED_SHORT, start, instanceCount);
|
|
311
|
+
}
|
|
312
|
+
else {
|
|
313
|
+
gl.drawArraysInstanced(type, start, count, instanceCount);
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
destroy: (vao) => {
|
|
317
|
+
connection.gl.deleteVertexArray(connection.vaoHandle);
|
|
318
|
+
vao.disconnect();
|
|
319
|
+
},
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
export { WebGl2ParticleRenderer };
|
|
325
|
+
//# sourceMappingURL=WebGl2ParticleRenderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebGl2ParticleRenderer.js","sources":["../../../../src/renderers/WebGl2ParticleRenderer.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAeA;;;;;;;;;;;;;;;;;;;;;;;AAuBG;AAEH,MAAM,mBAAmB,GAAG,EAAE;AAC9B,MAAM,gBAAgB,GAAG,mBAAmB,GAAG,WAAW,CAAC,iBAAiB;AAC5E,MAAM,cAAc,GAAG,CAAC;AACxB,MAAM,WAAW,GAAG,IAAI,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAQjD,MAAO,sBAAuB,SAAQ,sBAAsC,CAAA;AAChF;;;;;;AAMG;IACa,wBAAwB,GAAG,KAAK;AAE/B,IAAA,OAAO;AACP,IAAA,UAAU;AACV,IAAA,aAAa;AACb,IAAA,gBAAgB;AAChB,IAAA,eAAe;IAExB,cAAc,GAAG,CAAC;IAClB,eAAe,GAAmB,IAAI;IACtC,iBAAiB,GAAsB,IAAI;IAC3C,YAAY,GAAgB,IAAI;IAChC,cAAc,GAAG,EAAE;IAEnB,eAAe,GAA8B,IAAI;IACjD,YAAY,GAA8B,IAAI;IAC9C,IAAI,GAAmC,IAAI;IAC3C,WAAW,GAAsC,IAAI;AAE7D,IAAA,WAAA,CAAmB,SAAiB,EAAA;AAClC,QAAA,KAAK,EAAE;AAEP,QAAA,IAAI,CAAC,UAAU,GAAG,SAAS;QAC3B,IAAI,CAAC,OAAO,GAAG,IAAI,MAAM,CAAC,YAAY,EAAE,cAAc,CAAC;QACvD,IAAI,CAAC,aAAa,GAAG,IAAI,WAAW,CAAC,SAAS,GAAG,mBAAmB,CAAC;QACr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