@adatechnology/game-vfx 0.7.0 → 0.9.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 -0
- package/dist/index.global.js +6 -2
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5804,13 +5804,14 @@ function composeMushroom(context, spec) {
|
|
|
5804
5804
|
function composeAfterEffects(context) {
|
|
5805
5805
|
const { core, def, random, x, y, z } = context;
|
|
5806
5806
|
const mark = def.mark;
|
|
5807
|
-
|
|
5807
|
+
const keepsMarks = !core.marklessAt?.(x, z);
|
|
5808
|
+
if (keepsMarks && mark.crater && mark.dent && y < 1.2 && (core.cratersAt?.(x, z) ?? true)) {
|
|
5808
5809
|
core.emit({ type: "crater", x, z, radius: mark.crater, depth: mark.dent });
|
|
5809
5810
|
core.trace?.crater?.(x, z, mark.crater, mark.dent);
|
|
5810
5811
|
addCrater(core.marks, core.ground, random, { x, z, radius: mark.crater, depth: mark.dent, marks: core.layers.mark });
|
|
5811
5812
|
if (core.layers.shrapnel) composeRimDebris(context);
|
|
5812
5813
|
}
|
|
5813
|
-
if (mark.scorch && y < 1.2 && core.layers.mark) {
|
|
5814
|
+
if (keepsMarks && mark.scorch && y < 1.2 && core.layers.mark) {
|
|
5814
5815
|
core.trace?.scorch?.(x, z, mark.scorch);
|
|
5815
5816
|
addScorch(core.marks, random, x, z, mark.scorch);
|
|
5816
5817
|
}
|
|
@@ -7605,6 +7606,8 @@ function createVfx(options = {}) {
|
|
|
7605
7606
|
spawned: { puffs: 0, sparks: 0, chunks: 0, lights: 0 },
|
|
7606
7607
|
clock: { time: 0, lastBlast: -1, lod: 1, forcedLod: null },
|
|
7607
7608
|
groundAt,
|
|
7609
|
+
...options.marklessAt ? { marklessAt: options.marklessAt } : {},
|
|
7610
|
+
...options.cratersAt ? { cratersAt: options.cratersAt } : {},
|
|
7608
7611
|
emit: (request) => options.onRequest?.(request)
|
|
7609
7612
|
};
|
|
7610
7613
|
function definitionOf(id) {
|
|
@@ -7631,6 +7634,7 @@ function createVfx(options = {}) {
|
|
|
7631
7634
|
return player ?? (player = createEffectPlayer({ engine: workshop(), effects, view }));
|
|
7632
7635
|
}
|
|
7633
7636
|
return {
|
|
7637
|
+
hostGroundAt: options.groundAt,
|
|
7634
7638
|
play(id, point, playOptions = {}) {
|
|
7635
7639
|
if (!(id in effects)) return null;
|
|
7636
7640
|
const seed = playOptions.seed ?? (randomMode === "shared" ? void 0 : Math.imul(++handles.events, AUTO_SEED) + (options.seed ?? 0));
|