@adatechnology/game-destruction-three 0.12.1 → 0.13.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 +10 -2
- package/dist/index.global.js +651 -153
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +65 -14
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment, Vec3, DebrisKind, HitResult, DestructionWorld, MaterialId, DestructibleSpec, MaterialDef } from '@adatechnology/game-destruction';
|
|
2
2
|
export { Quat, Vec3 } from '@adatechnology/game-destruction';
|
|
3
|
+
import { DeferredQueue, WarmUpProbes, BlastShoveOptions, Vec3 as Vec3$1 } from '@adatechnology/game-contracts';
|
|
3
4
|
import * as THREE_NS from 'three';
|
|
4
|
-
import { WarmUpProbes, BlastShoveOptions, Vec3 as Vec3$1 } from '@adatechnology/game-contracts';
|
|
5
5
|
import { VfxWorld, SpriteKind } from '@adatechnology/game-vfx';
|
|
6
6
|
import { LoopRecipe, SoundBank, SoundRecipe, AudioEngine } from '@adatechnology/game-audio';
|
|
7
7
|
|
|
@@ -175,6 +175,11 @@ interface DestructionRenderer {
|
|
|
175
175
|
impulse(objectId: string, impulse: Vec3, point?: Vec3): void;
|
|
176
176
|
/** Integrate fragments, pieces and particles; apply pending visual changes. Call once per frame after `world.update`. */
|
|
177
177
|
update(dt: number): void;
|
|
178
|
+
/**
|
|
179
|
+
* The waiting events and the presentation slices they left, as a `DeferredQueue` for a shared frame budget (id `destruction.events`). `budget.register`
|
|
180
|
+
* attaches it and `update` stops draining by itself; unregistering gives the draining back to `update` and `eventBudgetMs`. Asking for it changes nothing.
|
|
181
|
+
*/
|
|
182
|
+
deferredQueue?(): DeferredQueue;
|
|
178
183
|
/** Emit particles directly (muzzle flashes, extinguisher foam, tool sparks). */
|
|
179
184
|
emit(kind: DebrisKind | 'fire' | 'flash' | 'foam', point: Vec3, normal: Vec3, count: number, speed?: number): void;
|
|
180
185
|
/**
|
|
@@ -230,7 +235,10 @@ interface SpecFromObjectResult {
|
|
|
230
235
|
declare function impactKey(def: MaterialDef | undefined): string;
|
|
231
236
|
/** Sound key (`drag_*`) of a base of this material dragged on a floor. */
|
|
232
237
|
declare const dragSoundKey: (def: MaterialDef | undefined) => string;
|
|
233
|
-
|
|
238
|
+
/** The renderer this package makes always has its `deferredQueue`; a third-party `DestructionRenderer` may leave it out. */
|
|
239
|
+
declare function createDestructionRenderer(THREE: ThreeNamespace, options: RendererOptions): DestructionRenderer & {
|
|
240
|
+
deferredQueue(): DeferredQueue;
|
|
241
|
+
};
|
|
234
242
|
|
|
235
243
|
/** What `userData.destructionPart` says: a string (the part id) or an object `{ id, material?, parent?, kind? }`. */
|
|
236
244
|
interface PartHint {
|