@quake2ts/engine 0.0.767 → 0.0.770
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/dist/browser/index.global.js +1 -1
- package/dist/browser/index.global.js.map +1 -1
- package/dist/cjs/index.cjs +4 -2
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +4 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/render/particleSystem.d.ts +6 -0
- package/dist/types/render/particleSystem.d.ts.map +1 -1
- package/dist/types/render/webgpu/pipelines/particleSystem.d.ts +25 -9
- package/dist/types/render/webgpu/pipelines/particleSystem.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/cjs/index.cjs
CHANGED
|
@@ -6766,7 +6766,6 @@ var Md3Pipeline = class {
|
|
|
6766
6766
|
// src/render/particleSystem.ts
|
|
6767
6767
|
var DEFAULT_COLOR = [1, 1, 1, 1];
|
|
6768
6768
|
var ParticleSystem = class {
|
|
6769
|
-
// 0 alpha, 1 additive
|
|
6770
6769
|
constructor(maxParticles, rng) {
|
|
6771
6770
|
this.maxParticles = maxParticles;
|
|
6772
6771
|
this.rng = rng;
|
|
@@ -6789,6 +6788,7 @@ var ParticleSystem = class {
|
|
|
6789
6788
|
this.bounce = new Float32Array(maxParticles);
|
|
6790
6789
|
this.fade = new Uint8Array(maxParticles);
|
|
6791
6790
|
this.blendMode = new Uint8Array(maxParticles);
|
|
6791
|
+
this.textureIndex = new Int16Array(maxParticles);
|
|
6792
6792
|
}
|
|
6793
6793
|
spawn(options) {
|
|
6794
6794
|
const index = this.findFreeSlot();
|
|
@@ -6816,6 +6816,7 @@ var ParticleSystem = class {
|
|
|
6816
6816
|
this.bounce[index] = options.bounce ?? 0.25;
|
|
6817
6817
|
this.fade[index] = options.fade ? 1 : 0;
|
|
6818
6818
|
this.blendMode[index] = options.blendMode === "additive" ? 1 : 0;
|
|
6819
|
+
this.textureIndex[index] = options.textureIndex ?? 0;
|
|
6819
6820
|
return index;
|
|
6820
6821
|
}
|
|
6821
6822
|
update(dt, options = {}) {
|
|
@@ -6872,7 +6873,8 @@ var ParticleSystem = class {
|
|
|
6872
6873
|
remaining: this.remaining[index],
|
|
6873
6874
|
color: [this.colorR[index], this.colorG[index], this.colorB[index], this.colorA[index]],
|
|
6874
6875
|
size: this.size[index],
|
|
6875
|
-
blendMode: this.blendMode[index] === 1 ? "additive" : "alpha"
|
|
6876
|
+
blendMode: this.blendMode[index] === 1 ? "additive" : "alpha",
|
|
6877
|
+
textureIndex: this.textureIndex[index]
|
|
6876
6878
|
};
|
|
6877
6879
|
}
|
|
6878
6880
|
buildMesh(viewRight, viewUp) {
|