@adatechnology/game-vfx-three 0.3.5 → 0.4.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/dist/index.d.ts +15 -1
- package/dist/index.global.js +486 -150
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +188 -87
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -49,6 +49,12 @@ interface VfxRendererOptions {
|
|
|
49
49
|
pointScale?: number;
|
|
50
50
|
/** Multiplies the blast and fire lights. Default `Math.PI`: three.js r155+ lights are physical, the Lab's were not (r128). */
|
|
51
51
|
lightScale?: number;
|
|
52
|
+
/** Caps on the marks kept on the ground; once one is full the oldest is reused for the next, so nothing grows and nothing is allocated. Defaults: 64 scorch and dirt, 512 rocks, 256 blood. */
|
|
53
|
+
markLimits?: {
|
|
54
|
+
readonly maxGroundMarks?: number;
|
|
55
|
+
readonly maxRocks?: number;
|
|
56
|
+
readonly maxBlood?: number;
|
|
57
|
+
};
|
|
52
58
|
}
|
|
53
59
|
/** The world's counters flattened (`lastBlast` becomes `last_puffs`, `last_sparks`, `last_chunks`, `last_lights`), plus `drawCalls`. */
|
|
54
60
|
type VfxRendererStats = Readonly<Record<string, number>>;
|
|
@@ -146,7 +152,9 @@ interface MarkLayer {
|
|
|
146
152
|
/** The shared rock and plate shapes, so the debris and the rim rocks use the same geometry. */
|
|
147
153
|
handle(event: MarkEvent): void;
|
|
148
154
|
update(dt: number): void;
|
|
149
|
-
/**
|
|
155
|
+
/** Puts the instanced meshes in the scene now, so their shader programs link while loading instead of at the first mark. */
|
|
156
|
+
prepare(): void;
|
|
157
|
+
/** The draw calls the marks cost right now. */
|
|
150
158
|
count(): number;
|
|
151
159
|
dispose(): void;
|
|
152
160
|
}
|
|
@@ -155,6 +163,12 @@ interface MarkLayerOptions {
|
|
|
155
163
|
readonly createCanvas: (() => CanvasLike) | undefined;
|
|
156
164
|
readonly rockGeometry: THREE_NS.BufferGeometry;
|
|
157
165
|
readonly plateGeometry: THREE_NS.BufferGeometry;
|
|
166
|
+
/** Scorch and dirt meshes alive at once; the oldest is reused for the next. Default 64. */
|
|
167
|
+
readonly maxGroundMarks?: number;
|
|
168
|
+
/** Rim rocks and plates alive at once (each shape has its own instanced mesh of this size); the oldest is overwritten. Default 512. */
|
|
169
|
+
readonly maxRocks?: number;
|
|
170
|
+
/** Blood pools alive at once; the oldest is overwritten. Default 256. */
|
|
171
|
+
readonly maxBlood?: number;
|
|
158
172
|
}
|
|
159
173
|
/**
|
|
160
174
|
* The scorch, dirt, rim rocks and blood of the Lab as meshes (L443-476). A scorch or dirt mesh follows the ground as it was the moment the mark was
|