@adatechnology/game-vfx-three 0.10.3 → 0.10.4
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.
|
@@ -1090,6 +1090,8 @@ function rainLayer(THREE, rain) {
|
|
|
1090
1090
|
}
|
|
1091
1091
|
};
|
|
1092
1092
|
}
|
|
1093
|
+
var REST_LAYER = 2e-3;
|
|
1094
|
+
var REST_LAYERS = 4;
|
|
1093
1095
|
function debrisLayer(THREE, pool) {
|
|
1094
1096
|
const geometry = new THREE.BoxGeometry(1, 1, 1);
|
|
1095
1097
|
const material = new THREE.MeshStandardMaterial({ color: 16777215, roughness: 0.45, metalness: 0.25, flatShading: true });
|
|
@@ -1120,7 +1122,8 @@ function debrisLayer(THREE, pool) {
|
|
|
1120
1122
|
const shrink = Math.min(1, piece.life / FADE_SECONDS);
|
|
1121
1123
|
euler.set(piece.rx, piece.ry, piece.rz);
|
|
1122
1124
|
quaternion.setFromEuler(euler);
|
|
1123
|
-
|
|
1125
|
+
const lift = piece.rest ? index % REST_LAYERS * REST_LAYER : 0;
|
|
1126
|
+
matrix.compose(position.set(piece.x, piece.y + lift, piece.z), quaternion, scale.set(piece.sx * shrink, piece.sy * shrink, piece.sz * shrink));
|
|
1124
1127
|
mesh.setMatrixAt(index, matrix);
|
|
1125
1128
|
mesh.setColorAt(index, colour.setHex(piece.color));
|
|
1126
1129
|
}
|
|
@@ -1242,7 +1245,7 @@ function decalLayer(THREE, pool) {
|
|
|
1242
1245
|
}
|
|
1243
1246
|
function ringLayer(THREE, pool) {
|
|
1244
1247
|
const geometry = new THREE.RingGeometry(0.86, 1, 40);
|
|
1245
|
-
const material = new THREE.MeshBasicMaterial({ color: 16777215, transparent: true, blending: THREE.AdditiveBlending, depthWrite: false, side: THREE.DoubleSide });
|
|
1248
|
+
const material = new THREE.MeshBasicMaterial({ color: 16777215, transparent: true, blending: THREE.AdditiveBlending, depthWrite: false, side: THREE.DoubleSide, forceSinglePass: true });
|
|
1246
1249
|
const mesh = new THREE.InstancedMesh(geometry, material, RING_CAPACITY);
|
|
1247
1250
|
mesh.frustumCulled = false;
|
|
1248
1251
|
mesh.instanceMatrix.setUsage(THREE.DynamicDrawUsage);
|
|
@@ -1950,4 +1953,4 @@ export {
|
|
|
1950
1953
|
benchText,
|
|
1951
1954
|
createVfxTestModule
|
|
1952
1955
|
};
|
|
1953
|
-
//# sourceMappingURL=chunk-
|
|
1956
|
+
//# sourceMappingURL=chunk-GHLGSWLP.js.map
|