@adatechnology/game-fluids-three 0.4.0 → 0.4.1
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 +10 -1
- package/dist/index.global.js.map +1 -1
- package/package.json +5 -5
package/dist/index.global.js
CHANGED
|
@@ -7260,6 +7260,15 @@ var GameFluidsThree = (() => {
|
|
|
7260
7260
|
};
|
|
7261
7261
|
}
|
|
7262
7262
|
|
|
7263
|
+
// ../game-contracts/dist/index.js
|
|
7264
|
+
var KIT_ORIGIN_KEY = "kitOrigin";
|
|
7265
|
+
function markKitOrigin(object, origin) {
|
|
7266
|
+
const node = object;
|
|
7267
|
+
node.userData = node.userData ?? {};
|
|
7268
|
+
node.userData[KIT_ORIGIN_KEY] = { ...origin };
|
|
7269
|
+
return object;
|
|
7270
|
+
}
|
|
7271
|
+
|
|
7263
7272
|
// ../game-vfx-three/dist/index.js
|
|
7264
7273
|
var GLOW_VERTEX = `attribute vec4 aP;attribute vec4 aC;varying vec2 vU;varying vec4 vC;
|
|
7265
7274
|
void main(){vec3 R=vec3(viewMatrix[0][0],viewMatrix[1][0],viewMatrix[2][0]);vec3 Up=vec3(viewMatrix[0][1],viewMatrix[1][1],viewMatrix[2][1]);
|
|
@@ -8387,7 +8396,7 @@ void main(){vec2 d=gl_PointCoord-.5;float r=length(d)*2.;if(r>1.)discard;float a
|
|
|
8387
8396
|
for (const mesh2 of anchors.meshes) mesh2.material.dispose();
|
|
8388
8397
|
anchors = void 0;
|
|
8389
8398
|
};
|
|
8390
|
-
const root = new THREE.Group();
|
|
8399
|
+
const root = markKitOrigin(new THREE.Group(), { owner: "game-vfx-three", kind: "effect" });
|
|
8391
8400
|
options.scene.add(root);
|
|
8392
8401
|
const direction = new THREE.Vector3(...options.lightDirection ?? LAB_LIGHT_DIRECTION).normalize();
|
|
8393
8402
|
const sky = hexToLinearRgb(SKY_COLOR);
|