@adatechnology/game-destruction-three 0.8.1 → 0.8.2
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.global.js +8 -1
- package/dist/index.global.js.map +1 -1
- package/package.json +6 -6
package/dist/index.global.js
CHANGED
|
@@ -52,6 +52,13 @@ var GameDestructionThree = (() => {
|
|
|
52
52
|
const length = Math.hypot(direction[0], direction[1], direction[2]);
|
|
53
53
|
return { speed, direction: [direction[0] / length, direction[1] / length, direction[2] / length], distance, falloff };
|
|
54
54
|
}
|
|
55
|
+
var KIT_ORIGIN_KEY = "kitOrigin";
|
|
56
|
+
function markKitOrigin(object, origin) {
|
|
57
|
+
const node = object;
|
|
58
|
+
node.userData = node.userData ?? {};
|
|
59
|
+
node.userData[KIT_ORIGIN_KEY] = { ...origin };
|
|
60
|
+
return object;
|
|
61
|
+
}
|
|
55
62
|
|
|
56
63
|
// ../game-vfx/dist/index.js
|
|
57
64
|
var __defProp2 = Object.defineProperty;
|
|
@@ -8418,7 +8425,7 @@ void main(){vec2 d=gl_PointCoord-.5;float r=length(d)*2.;if(r>1.)discard;float a
|
|
|
8418
8425
|
for (const mesh2 of anchors.meshes) mesh2.material.dispose();
|
|
8419
8426
|
anchors = void 0;
|
|
8420
8427
|
};
|
|
8421
|
-
const root = new THREE.Group();
|
|
8428
|
+
const root = markKitOrigin(new THREE.Group(), { owner: "game-vfx-three", kind: "effect" });
|
|
8422
8429
|
options.scene.add(root);
|
|
8423
8430
|
const direction = new THREE.Vector3(...options.lightDirection ?? LAB_LIGHT_DIRECTION).normalize();
|
|
8424
8431
|
const sky = hexToLinearRgb(SKY_COLOR);
|