@needle-tools/three-mesh-effects 0.1.0-alpha → 0.1.0-alpha.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/LICENSE +21 -21
- package/README.md +94 -88
- package/build/deformation-runtime.js.map +1 -1
- package/build/impostor-runtime-needle-engine.js.map +1 -1
- package/build/impostor-runtime.js.map +1 -1
- package/build/internal/deformation/cloth-surface.js.map +1 -1
- package/build/internal/deformation/fur-surface.js.map +1 -1
- package/build/internal/deformation/ik-constraints.js.map +1 -1
- package/build/internal/deformation/joints-json.js.map +1 -1
- package/build/internal/deformation/limits.js.map +1 -1
- package/build/internal/deformation/motion-settings.js.map +1 -1
- package/build/internal/deformation/pin-cloth.js.map +1 -1
- package/build/internal/deformation/pin-ik.js.map +1 -1
- package/build/internal/deformation/pin-types.js.map +1 -1
- package/build/internal/deformation/pin-wiggle.js.map +1 -1
- package/build/internal/deformation/pose-slots.js.map +1 -1
- package/build/internal/deformation/pose-timeline.js.map +1 -1
- package/build/internal/deformation/rig-drivers.js.map +1 -1
- package/build/internal/deformation/rig-extension.js.map +1 -1
- package/build/internal/deformation/rig-runtime.js.map +1 -1
- package/build/internal/deformation/wind.js.map +1 -1
- package/build/internal/impostor/impostor-metadata.js.map +1 -1
- package/build/internal/impostor/impostor-node-material.js.map +1 -1
- package/build/internal/impostor/impostor-runtime-support.js.map +1 -1
- package/build/internal/impostor/octahedral.js.map +1 -1
- package/build/internal/pixel-impostor/pixel-impostor-display.js.map +1 -1
- package/build/internal/pixel-impostor/pixel-impostor-metadata.js.map +1 -1
- package/build/internal/pixel-impostor/pixel-impostor-runtime.js.map +1 -1
- package/build/internal/rendering/skin-projection.js +52 -52
- package/build/internal/rendering/skin-projection.js.map +2 -2
- package/build/internal/rendering/surface-query.js +52 -52
- package/build/internal/rendering/surface-query.js.map +2 -2
- package/build/internal/rendering/wireframe.js.map +1 -1
- package/build/internal/rendering/wrap-preview-settings.js.map +1 -1
- package/build/internal/rendering/wrap-preview.js +52 -52
- package/build/internal/rendering/wrap-preview.js.map +2 -2
- package/build/internal/rendering/wrap-skin.js +52 -52
- package/build/internal/rendering/wrap-skin.js.map +2 -2
- package/build/pixel-impostor-runtime.js.map +1 -1
- package/build/wrap-effects.js +52 -52
- package/build/wrap-effects.js.map +2 -2
- package/package.json +107 -94
- package/src/deformation/cloth-surface.ts +223 -223
- package/src/deformation/fur-surface.ts +129 -129
- package/src/deformation/ik-constraints.ts +37 -37
- package/src/deformation/joints-json.ts +94 -94
- package/src/deformation/limits.ts +25 -25
- package/src/deformation/motion-settings.ts +9 -9
- package/src/deformation/pin-cloth.ts +149 -149
- package/src/deformation/pin-ik.ts +582 -582
- package/src/deformation/pin-types.ts +22 -22
- package/src/deformation/pin-wiggle.ts +119 -119
- package/src/deformation/pose-slots.ts +106 -106
- package/src/deformation/pose-timeline.ts +242 -242
- package/src/deformation/rig-drivers.ts +32 -32
- package/src/deformation/rig-extension.ts +87 -87
- package/src/deformation/rig-runtime.ts +416 -416
- package/src/deformation/wind.ts +36 -36
- package/src/impostor/impostor-metadata.js +137 -137
- package/src/impostor/impostor-node-material.js +1581 -1581
- package/src/impostor/impostor-runtime-support.js +139 -139
- package/src/impostor/octahedral.js +280 -280
- package/src/pixel-impostor/pixel-impostor-display.js +794 -794
- package/src/pixel-impostor/pixel-impostor-metadata.js +74 -74
- package/src/pixel-impostor/pixel-impostor-runtime.js +78 -78
- package/src/public/deformation-runtime.ts +3 -3
- package/src/public/impostor-runtime-needle-engine.js +56 -56
- package/src/public/impostor-runtime.js +21 -21
- package/src/public/pixel-impostor-runtime.js +5 -5
- package/src/public/wrap-effects.js +21 -21
- package/src/rendering/skin-projection.js +113 -113
- package/src/rendering/surface-query.js +88 -88
- package/src/rendering/wireframe.js +115 -115
- package/src/rendering/wrap-preview-settings.js +123 -123
- package/src/rendering/wrap-preview.js +645 -645
- package/src/rendering/wrap-skin.js +109 -109
- package/build/internal/public/deformation-runtime.js +0 -2143
- package/build/internal/public/deformation-runtime.js.map +0 -7
- package/build/internal/public/impostor-runtime-needle-engine.js +0 -42
- package/build/internal/public/impostor-runtime-needle-engine.js.map +0 -7
- package/build/internal/public/impostor-runtime.js +0 -1333
- package/build/internal/public/impostor-runtime.js.map +0 -7
- package/build/internal/public/pixel-impostor-runtime.js +0 -876
- package/build/internal/public/pixel-impostor-runtime.js.map +0 -7
- package/build/internal/public/wrap-effects.js +0 -5640
- package/build/internal/public/wrap-effects.js.map +0 -7
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
// src/rendering/surface-query.js
|
|
4
4
|
import { BackSide as BackSide2, BufferAttribute as BufferAttribute3, BufferGeometry, FrontSide as FrontSide2, Ray as Ray2, Vector3 as Vector311 } from "three";
|
|
5
5
|
|
|
6
|
-
//
|
|
6
|
+
// node_modules/three-mesh-bvh/src/core/BVH.js
|
|
7
7
|
import { Box3 as Box33 } from "three";
|
|
8
8
|
|
|
9
|
-
//
|
|
9
|
+
// node_modules/three-mesh-bvh/src/core/Constants.js
|
|
10
10
|
var CENTER = 0;
|
|
11
11
|
var AVERAGE = 1;
|
|
12
12
|
var SAH = 2;
|
|
@@ -32,7 +32,7 @@ var DEFAULT_OPTIONS = {
|
|
|
32
32
|
[SKIP_GENERATION]: false
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
-
//
|
|
35
|
+
// node_modules/three-mesh-bvh/src/utils/ArrayBoxUtilities.js
|
|
36
36
|
function arrayToBox(nodeIndex32, array, target) {
|
|
37
37
|
target.min.x = array[nodeIndex32];
|
|
38
38
|
target.min.y = array[nodeIndex32 + 1];
|
|
@@ -90,7 +90,7 @@ function computeSurfaceArea(bounds) {
|
|
|
90
90
|
return 2 * (d0 * d1 + d1 * d2 + d2 * d0);
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
//
|
|
93
|
+
// node_modules/three-mesh-bvh/src/core/utils/nodeBufferUtils.js
|
|
94
94
|
function IS_LEAF(n16, uint16Array2) {
|
|
95
95
|
return uint16Array2[n16 + 15] === IS_LEAFNODE_FLAG;
|
|
96
96
|
}
|
|
@@ -114,7 +114,7 @@ function BOUNDING_DATA_INDEX(n32) {
|
|
|
114
114
|
return n32;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
//
|
|
117
|
+
// node_modules/three-mesh-bvh/src/core/build/computeBoundsUtils.js
|
|
118
118
|
function getBounds(primitiveBounds, offset, count, target, centroidTarget) {
|
|
119
119
|
let minx = Infinity;
|
|
120
120
|
let miny = Infinity;
|
|
@@ -169,7 +169,7 @@ function getBounds(primitiveBounds, offset, count, target, centroidTarget) {
|
|
|
169
169
|
centroidTarget[5] = cmaxz;
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
//
|
|
172
|
+
// node_modules/three-mesh-bvh/src/core/build/splitUtils.js
|
|
173
173
|
var BIN_COUNT = 32;
|
|
174
174
|
var binsSort = (a, b) => a.candidate - b.candidate;
|
|
175
175
|
var sahBins = /* @__PURE__ */ new Array(BIN_COUNT).fill().map(() => {
|
|
@@ -345,14 +345,14 @@ function getAverage(primitiveBounds, offset, count, axis) {
|
|
|
345
345
|
return avg / count;
|
|
346
346
|
}
|
|
347
347
|
|
|
348
|
-
//
|
|
348
|
+
// node_modules/three-mesh-bvh/src/core/BVHNode.js
|
|
349
349
|
var BVHNode = class {
|
|
350
350
|
constructor() {
|
|
351
351
|
this.boundingData = new Float32Array(6);
|
|
352
352
|
}
|
|
353
353
|
};
|
|
354
354
|
|
|
355
|
-
//
|
|
355
|
+
// node_modules/three-mesh-bvh/src/core/build/sortUtils.js
|
|
356
356
|
function partition(buffer, stride, primitiveBounds, offset, count, split) {
|
|
357
357
|
let left = offset;
|
|
358
358
|
let right = offset + count - 1;
|
|
@@ -387,7 +387,7 @@ function partition(buffer, stride, primitiveBounds, offset, count, split) {
|
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
389
|
|
|
390
|
-
//
|
|
390
|
+
// node_modules/three-mesh-bvh/src/core/build/buildUtils.js
|
|
391
391
|
var float32Array;
|
|
392
392
|
var uint32Array;
|
|
393
393
|
var uint16Array;
|
|
@@ -441,7 +441,7 @@ function _populateBuffer(byteOffset, node) {
|
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
443
|
|
|
444
|
-
//
|
|
444
|
+
// node_modules/three-mesh-bvh/src/core/build/buildTree.js
|
|
445
445
|
function buildTree(bvh, primitiveBounds, offset, count, options, loadRange) {
|
|
446
446
|
const {
|
|
447
447
|
maxDepth,
|
|
@@ -527,10 +527,10 @@ function buildPackedTree(bvh, options) {
|
|
|
527
527
|
});
|
|
528
528
|
}
|
|
529
529
|
|
|
530
|
-
//
|
|
530
|
+
// node_modules/three-mesh-bvh/src/core/cast/shapecast.js
|
|
531
531
|
import { Box3 } from "three";
|
|
532
532
|
|
|
533
|
-
//
|
|
533
|
+
// node_modules/three-mesh-bvh/src/utils/PrimitivePool.js
|
|
534
534
|
var PrimitivePool = class {
|
|
535
535
|
constructor(getNewPrimitive) {
|
|
536
536
|
this._getNewPrimitive = getNewPrimitive;
|
|
@@ -549,7 +549,7 @@ var PrimitivePool = class {
|
|
|
549
549
|
}
|
|
550
550
|
};
|
|
551
551
|
|
|
552
|
-
//
|
|
552
|
+
// node_modules/three-mesh-bvh/src/core/utils/BufferStack.js
|
|
553
553
|
var _BufferStack = class {
|
|
554
554
|
constructor() {
|
|
555
555
|
this.float32Array = null;
|
|
@@ -579,7 +579,7 @@ var _BufferStack = class {
|
|
|
579
579
|
};
|
|
580
580
|
var BufferStack = /* @__PURE__ */ new _BufferStack();
|
|
581
581
|
|
|
582
|
-
//
|
|
582
|
+
// node_modules/three-mesh-bvh/src/core/cast/shapecast.js
|
|
583
583
|
var _box1;
|
|
584
584
|
var _box2;
|
|
585
585
|
var boxStack = [];
|
|
@@ -701,7 +701,7 @@ function shapecastTraverse(nodeIndex32, geometry, intersectsBoundsFunc, intersec
|
|
|
701
701
|
}
|
|
702
702
|
}
|
|
703
703
|
|
|
704
|
-
//
|
|
704
|
+
// node_modules/three-mesh-bvh/src/core/cast/bvhcast.js
|
|
705
705
|
import { Box3 as Box32, Matrix4 } from "three";
|
|
706
706
|
var _bufferStack1 = /* @__PURE__ */ new BufferStack.constructor();
|
|
707
707
|
var _bufferStack2 = /* @__PURE__ */ new BufferStack.constructor();
|
|
@@ -973,7 +973,7 @@ function _traverse(node1Index32, node2Index32, matrix2to1, matrix1to2, intersect
|
|
|
973
973
|
return result;
|
|
974
974
|
}
|
|
975
975
|
|
|
976
|
-
//
|
|
976
|
+
// node_modules/three-mesh-bvh/src/core/BVHTraversalHelper.js
|
|
977
977
|
var BVHTraversalHelper = new class {
|
|
978
978
|
constructor() {
|
|
979
979
|
let buffer = null;
|
|
@@ -1053,7 +1053,7 @@ var BVHTraversalHelper = new class {
|
|
|
1053
1053
|
}
|
|
1054
1054
|
}();
|
|
1055
1055
|
|
|
1056
|
-
//
|
|
1056
|
+
// node_modules/three-mesh-bvh/src/core/BVH.js
|
|
1057
1057
|
var _tempBox = /* @__PURE__ */ new Box33();
|
|
1058
1058
|
var _tempBuffer = /* @__PURE__ */ new Float32Array(6);
|
|
1059
1059
|
var BVH = class {
|
|
@@ -1298,15 +1298,15 @@ var BVH = class {
|
|
|
1298
1298
|
}
|
|
1299
1299
|
};
|
|
1300
1300
|
|
|
1301
|
-
//
|
|
1301
|
+
// node_modules/three-mesh-bvh/src/core/GeometryBVH.js
|
|
1302
1302
|
import { Box3 as Box34 } from "three";
|
|
1303
1303
|
|
|
1304
|
-
//
|
|
1304
|
+
// node_modules/three-mesh-bvh/src/utils/BufferUtils.js
|
|
1305
1305
|
function isSharedArrayBufferSupported() {
|
|
1306
1306
|
return typeof SharedArrayBuffer !== "undefined";
|
|
1307
1307
|
}
|
|
1308
1308
|
|
|
1309
|
-
//
|
|
1309
|
+
// node_modules/three-mesh-bvh/src/core/build/geometryUtils.js
|
|
1310
1310
|
import { BufferAttribute } from "three";
|
|
1311
1311
|
function getVertexCount(geo) {
|
|
1312
1312
|
return geo.index ? geo.index.count : geo.attributes.position.count;
|
|
@@ -1394,7 +1394,7 @@ function getRootPrimitiveRanges(geo, range, stride) {
|
|
|
1394
1394
|
return ranges;
|
|
1395
1395
|
}
|
|
1396
1396
|
|
|
1397
|
-
//
|
|
1397
|
+
// node_modules/three-mesh-bvh/src/core/GeometryBVH.js
|
|
1398
1398
|
function generateIndirectBuffer(ranges, useSharedArrayBuffer) {
|
|
1399
1399
|
const lastRange = ranges[ranges.length - 1];
|
|
1400
1400
|
const useUint32 = lastRange.offset + lastRange.count > 2 ** 16;
|
|
@@ -1484,13 +1484,13 @@ var GeometryBVH = class extends BVH {
|
|
|
1484
1484
|
}
|
|
1485
1485
|
};
|
|
1486
1486
|
|
|
1487
|
-
//
|
|
1487
|
+
// node_modules/three-mesh-bvh/src/core/MeshBVH.js
|
|
1488
1488
|
import { BufferAttribute as BufferAttribute2, FrontSide, Ray, Vector3 as Vector310, Matrix4 as Matrix47 } from "three";
|
|
1489
1489
|
|
|
1490
|
-
//
|
|
1490
|
+
// node_modules/three-mesh-bvh/src/math/OrientedBox.js
|
|
1491
1491
|
import { Vector3 as Vector34, Matrix4 as Matrix42, Line3 as Line33 } from "three";
|
|
1492
1492
|
|
|
1493
|
-
//
|
|
1493
|
+
// node_modules/three-mesh-bvh/src/math/SeparatingAxisBounds.js
|
|
1494
1494
|
import { Vector3 } from "three";
|
|
1495
1495
|
var SeparatingAxisBounds = class {
|
|
1496
1496
|
constructor() {
|
|
@@ -1549,10 +1549,10 @@ SeparatingAxisBounds.prototype.setFromBox = /* @__PURE__ */ (function() {
|
|
|
1549
1549
|
};
|
|
1550
1550
|
})();
|
|
1551
1551
|
|
|
1552
|
-
//
|
|
1552
|
+
// node_modules/three-mesh-bvh/src/math/ExtendedTriangle.js
|
|
1553
1553
|
import { Triangle, Vector3 as Vector33, Vector2 as Vector22, Line3 as Line32, Plane as Plane2 } from "three";
|
|
1554
1554
|
|
|
1555
|
-
//
|
|
1555
|
+
// node_modules/three-mesh-bvh/src/math/MathUtilities.js
|
|
1556
1556
|
import { Vector3 as Vector32, Vector2, Plane, Line3 } from "three";
|
|
1557
1557
|
var closestPointLineToLine = /* @__PURE__ */ (function() {
|
|
1558
1558
|
const dir1 = /* @__PURE__ */ new Vector32();
|
|
@@ -1671,7 +1671,7 @@ var sphereIntersectTriangle = /* @__PURE__ */ (function() {
|
|
|
1671
1671
|
};
|
|
1672
1672
|
})();
|
|
1673
1673
|
|
|
1674
|
-
//
|
|
1674
|
+
// node_modules/three-mesh-bvh/src/math/ExtendedTriangle.js
|
|
1675
1675
|
var componentKeys = ["x", "y", "z"];
|
|
1676
1676
|
var ZERO_EPSILON = 1e-15;
|
|
1677
1677
|
var ZERO_EPSILON_SQR = ZERO_EPSILON * ZERO_EPSILON;
|
|
@@ -2154,7 +2154,7 @@ ExtendedTriangle.prototype.distanceToTriangle = /* @__PURE__ */ (function() {
|
|
|
2154
2154
|
};
|
|
2155
2155
|
})();
|
|
2156
2156
|
|
|
2157
|
-
//
|
|
2157
|
+
// node_modules/three-mesh-bvh/src/math/OrientedBox.js
|
|
2158
2158
|
var OrientedBox = class {
|
|
2159
2159
|
constructor(min, max, matrix) {
|
|
2160
2160
|
this.isOrientedBox = true;
|
|
@@ -2421,7 +2421,7 @@ OrientedBox.prototype.distanceToBox = /* @__PURE__ */ (function() {
|
|
|
2421
2421
|
};
|
|
2422
2422
|
})();
|
|
2423
2423
|
|
|
2424
|
-
//
|
|
2424
|
+
// node_modules/three-mesh-bvh/src/utils/ExtendedTrianglePool.js
|
|
2425
2425
|
var ExtendedTrianglePoolBase = class extends PrimitivePool {
|
|
2426
2426
|
constructor() {
|
|
2427
2427
|
super(() => new ExtendedTriangle());
|
|
@@ -2429,7 +2429,7 @@ var ExtendedTrianglePoolBase = class extends PrimitivePool {
|
|
|
2429
2429
|
};
|
|
2430
2430
|
var ExtendedTrianglePool = /* @__PURE__ */ new ExtendedTrianglePoolBase();
|
|
2431
2431
|
|
|
2432
|
-
//
|
|
2432
|
+
// node_modules/three-mesh-bvh/src/core/cast/closestPointToPoint.js
|
|
2433
2433
|
import { Vector3 as Vector35 } from "three";
|
|
2434
2434
|
var temp = /* @__PURE__ */ new Vector35();
|
|
2435
2435
|
var temp1 = /* @__PURE__ */ new Vector35();
|
|
@@ -2471,7 +2471,7 @@ function closestPointToPoint(bvh, point, target = {}, minThreshold = 0, maxThres
|
|
|
2471
2471
|
return target;
|
|
2472
2472
|
}
|
|
2473
2473
|
|
|
2474
|
-
//
|
|
2474
|
+
// node_modules/three-mesh-bvh/src/utils/ThreeRayIntersectUtilities.js
|
|
2475
2475
|
import { Vector3 as Vector36, Vector2 as Vector23, Triangle as Triangle2, DoubleSide, BackSide, REVISION } from "three";
|
|
2476
2476
|
var IS_GT_REVISION_169 = parseInt(REVISION) >= 169;
|
|
2477
2477
|
var IS_LT_REVISION_161 = parseInt(REVISION) <= 161;
|
|
@@ -2609,7 +2609,7 @@ function intersectTri(geometry, materialOrSide, ray, tri, intersections, near, f
|
|
|
2609
2609
|
return null;
|
|
2610
2610
|
}
|
|
2611
2611
|
|
|
2612
|
-
//
|
|
2612
|
+
// node_modules/three-mesh-bvh/src/utils/TriangleUtilities.js
|
|
2613
2613
|
import { Vector2 as Vector24, Vector3 as Vector37, Triangle as Triangle3 } from "three";
|
|
2614
2614
|
function setTriangle(tri, i, index, pos) {
|
|
2615
2615
|
const ta = tri.a;
|
|
@@ -2634,7 +2634,7 @@ function setTriangle(tri, i, index, pos) {
|
|
|
2634
2634
|
tc.z = pos.getZ(i2);
|
|
2635
2635
|
}
|
|
2636
2636
|
|
|
2637
|
-
//
|
|
2637
|
+
// node_modules/three-mesh-bvh/src/core/utils/iterationUtils.generated.js
|
|
2638
2638
|
function intersectTris(bvh, materialOrSide, ray, offset, count, intersections, near, far) {
|
|
2639
2639
|
const { geometry, _indirectBuffer } = bvh;
|
|
2640
2640
|
for (let i = offset, end = offset + count; i < end; i++) {
|
|
@@ -2671,7 +2671,7 @@ function iterateOverTriangles(offset, count, bvh, intersectsTriangleFunc, contai
|
|
|
2671
2671
|
return false;
|
|
2672
2672
|
}
|
|
2673
2673
|
|
|
2674
|
-
//
|
|
2674
|
+
// node_modules/three-mesh-bvh/src/core/cast/refit.generated.js
|
|
2675
2675
|
function refit(bvh, nodeIndices = null) {
|
|
2676
2676
|
if (nodeIndices && Array.isArray(nodeIndices)) {
|
|
2677
2677
|
nodeIndices = new Set(nodeIndices);
|
|
@@ -2770,7 +2770,7 @@ function refit(bvh, nodeIndices = null) {
|
|
|
2770
2770
|
}
|
|
2771
2771
|
}
|
|
2772
2772
|
|
|
2773
|
-
//
|
|
2773
|
+
// node_modules/three-mesh-bvh/src/core/utils/intersectUtils.js
|
|
2774
2774
|
function intersectsNodeBounds(nodeIndex32, array, ray, near, far) {
|
|
2775
2775
|
let tmin, tmax, tymin, tymax, tzmin, tzmax;
|
|
2776
2776
|
const invdirx = 1 / ray.direction.x, invdiry = 1 / ray.direction.y, invdirz = 1 / ray.direction.z;
|
|
@@ -2813,7 +2813,7 @@ function intersectsNodeBounds(nodeIndex32, array, ray, near, far) {
|
|
|
2813
2813
|
return tmin <= far && tmax >= near;
|
|
2814
2814
|
}
|
|
2815
2815
|
|
|
2816
|
-
//
|
|
2816
|
+
// node_modules/three-mesh-bvh/src/core/utils/iterationUtils_indirect.generated.js
|
|
2817
2817
|
function intersectTris_indirect(bvh, materialOrSide, ray, offset, count, intersections, near, far) {
|
|
2818
2818
|
const { geometry, _indirectBuffer } = bvh;
|
|
2819
2819
|
for (let i = offset, end = offset + count; i < end; i++) {
|
|
@@ -2851,7 +2851,7 @@ function iterateOverTriangles_indirect(offset, count, bvh, intersectsTriangleFun
|
|
|
2851
2851
|
return false;
|
|
2852
2852
|
}
|
|
2853
2853
|
|
|
2854
|
-
//
|
|
2854
|
+
// node_modules/three-mesh-bvh/src/core/cast/raycast.generated.js
|
|
2855
2855
|
function raycast(bvh, root, materialOrSide, ray, intersects, near, far) {
|
|
2856
2856
|
BufferStack.setBuffer(bvh._roots[root]);
|
|
2857
2857
|
_raycast(0, bvh, materialOrSide, ray, intersects, near, far);
|
|
@@ -2877,7 +2877,7 @@ function _raycast(nodeIndex32, bvh, materialOrSide, ray, intersects, near, far)
|
|
|
2877
2877
|
}
|
|
2878
2878
|
}
|
|
2879
2879
|
|
|
2880
|
-
//
|
|
2880
|
+
// node_modules/three-mesh-bvh/src/core/cast/raycastFirst.generated.js
|
|
2881
2881
|
var _xyzFields = ["x", "y", "z"];
|
|
2882
2882
|
function raycastFirst(bvh, root, materialOrSide, ray, near, far) {
|
|
2883
2883
|
BufferStack.setBuffer(bvh._roots[root]);
|
|
@@ -2928,7 +2928,7 @@ function _raycastFirst(nodeIndex32, bvh, materialOrSide, ray, near, far) {
|
|
|
2928
2928
|
}
|
|
2929
2929
|
}
|
|
2930
2930
|
|
|
2931
|
-
//
|
|
2931
|
+
// node_modules/three-mesh-bvh/src/core/cast/intersectsGeometry.generated.js
|
|
2932
2932
|
import { Box3 as Box35, Matrix4 as Matrix43 } from "three";
|
|
2933
2933
|
var boundingBox = /* @__PURE__ */ new Box35();
|
|
2934
2934
|
var triangle = /* @__PURE__ */ new ExtendedTriangle();
|
|
@@ -3014,7 +3014,7 @@ function _intersectsGeometry(nodeIndex32, bvh, otherGeometry, geometryToBvh, cac
|
|
|
3014
3014
|
}
|
|
3015
3015
|
}
|
|
3016
3016
|
|
|
3017
|
-
//
|
|
3017
|
+
// node_modules/three-mesh-bvh/src/core/cast/closestPointToGeometry.generated.js
|
|
3018
3018
|
import { Matrix4 as Matrix44, Vector3 as Vector38 } from "three";
|
|
3019
3019
|
var tempMatrix = /* @__PURE__ */ new Matrix44();
|
|
3020
3020
|
var obb3 = /* @__PURE__ */ new OrientedBox();
|
|
@@ -3154,7 +3154,7 @@ function closestPointToGeometry(bvh, otherGeometry, geometryToBvh, target1 = {},
|
|
|
3154
3154
|
return target1;
|
|
3155
3155
|
}
|
|
3156
3156
|
|
|
3157
|
-
//
|
|
3157
|
+
// node_modules/three-mesh-bvh/src/core/cast/refit_indirect.generated.js
|
|
3158
3158
|
function refit_indirect(bvh, nodeIndices = null) {
|
|
3159
3159
|
if (nodeIndices && Array.isArray(nodeIndices)) {
|
|
3160
3160
|
nodeIndices = new Set(nodeIndices);
|
|
@@ -3257,7 +3257,7 @@ function refit_indirect(bvh, nodeIndices = null) {
|
|
|
3257
3257
|
}
|
|
3258
3258
|
}
|
|
3259
3259
|
|
|
3260
|
-
//
|
|
3260
|
+
// node_modules/three-mesh-bvh/src/core/cast/raycast_indirect.generated.js
|
|
3261
3261
|
function raycast_indirect(bvh, root, materialOrSide, ray, intersects, near, far) {
|
|
3262
3262
|
BufferStack.setBuffer(bvh._roots[root]);
|
|
3263
3263
|
_raycast2(0, bvh, materialOrSide, ray, intersects, near, far);
|
|
@@ -3283,7 +3283,7 @@ function _raycast2(nodeIndex32, bvh, materialOrSide, ray, intersects, near, far)
|
|
|
3283
3283
|
}
|
|
3284
3284
|
}
|
|
3285
3285
|
|
|
3286
|
-
//
|
|
3286
|
+
// node_modules/three-mesh-bvh/src/core/cast/raycastFirst_indirect.generated.js
|
|
3287
3287
|
var _xyzFields2 = ["x", "y", "z"];
|
|
3288
3288
|
function raycastFirst_indirect(bvh, root, materialOrSide, ray, near, far) {
|
|
3289
3289
|
BufferStack.setBuffer(bvh._roots[root]);
|
|
@@ -3334,7 +3334,7 @@ function _raycastFirst2(nodeIndex32, bvh, materialOrSide, ray, near, far) {
|
|
|
3334
3334
|
}
|
|
3335
3335
|
}
|
|
3336
3336
|
|
|
3337
|
-
//
|
|
3337
|
+
// node_modules/three-mesh-bvh/src/core/cast/intersectsGeometry_indirect.generated.js
|
|
3338
3338
|
import { Box3 as Box36, Matrix4 as Matrix45 } from "three";
|
|
3339
3339
|
var boundingBox2 = /* @__PURE__ */ new Box36();
|
|
3340
3340
|
var triangle3 = /* @__PURE__ */ new ExtendedTriangle();
|
|
@@ -3421,7 +3421,7 @@ function _intersectsGeometry2(nodeIndex32, bvh, otherGeometry, geometryToBvh, ca
|
|
|
3421
3421
|
}
|
|
3422
3422
|
}
|
|
3423
3423
|
|
|
3424
|
-
//
|
|
3424
|
+
// node_modules/three-mesh-bvh/src/core/cast/closestPointToGeometry_indirect.generated.js
|
|
3425
3425
|
import { Matrix4 as Matrix46, Vector3 as Vector39 } from "three";
|
|
3426
3426
|
var tempMatrix2 = /* @__PURE__ */ new Matrix46();
|
|
3427
3427
|
var obb5 = /* @__PURE__ */ new OrientedBox();
|
|
@@ -3564,7 +3564,7 @@ function closestPointToGeometry_indirect(bvh, otherGeometry, geometryToBvh, targ
|
|
|
3564
3564
|
return target1;
|
|
3565
3565
|
}
|
|
3566
3566
|
|
|
3567
|
-
//
|
|
3567
|
+
// node_modules/three-mesh-bvh/src/utils/GeometryRayIntersectUtilities.js
|
|
3568
3568
|
function convertRaycastIntersect(hit, object, raycaster) {
|
|
3569
3569
|
if (hit === null) {
|
|
3570
3570
|
return null;
|
|
@@ -3575,7 +3575,7 @@ function convertRaycastIntersect(hit, object, raycaster) {
|
|
|
3575
3575
|
return hit;
|
|
3576
3576
|
}
|
|
3577
3577
|
|
|
3578
|
-
//
|
|
3578
|
+
// node_modules/three-mesh-bvh/src/core/MeshBVH.js
|
|
3579
3579
|
var _obb = /* @__PURE__ */ new OrientedBox();
|
|
3580
3580
|
var _ray = /* @__PURE__ */ new Ray();
|
|
3581
3581
|
var _direction = /* @__PURE__ */ new Vector310();
|
|
@@ -4090,8 +4090,8 @@ var MeshBVH = class _MeshBVH extends GeometryBVH {
|
|
|
4090
4090
|
* `getTriangleHitPointInfo` to obtain more information like UV coordinates, triangle normal
|
|
4091
4091
|
* and materialIndex.
|
|
4092
4092
|
*
|
|
4093
|
-
*
|
|
4094
|
-
*
|
|
4093
|
+
* @note This function can be very slow if `geometry` does not have a `geometry.boundsTree`
|
|
4094
|
+
* computed.
|
|
4095
4095
|
*
|
|
4096
4096
|
* @param {BufferGeometry} otherGeometry
|
|
4097
4097
|
* @param {Matrix4} geometryToBvh - Transform of `otherGeometry` into the local space of
|
|
@@ -4144,7 +4144,7 @@ var MeshBVH = class _MeshBVH extends GeometryBVH {
|
|
|
4144
4144
|
}
|
|
4145
4145
|
};
|
|
4146
4146
|
|
|
4147
|
-
//
|
|
4147
|
+
// node_modules/three-mesh-bvh/src/webgl/glsl/common_functions.glsl.js
|
|
4148
4148
|
var common_functions = (
|
|
4149
4149
|
/* glsl */
|
|
4150
4150
|
`
|
|
@@ -4232,7 +4232,7 @@ void ndcToCameraRay(
|
|
|
4232
4232
|
`
|
|
4233
4233
|
);
|
|
4234
4234
|
|
|
4235
|
-
//
|
|
4235
|
+
// node_modules/three-mesh-bvh/src/webgl/glsl/bvh_ray_functions.glsl.js
|
|
4236
4236
|
var bvh_ray_functions = (
|
|
4237
4237
|
/* glsl */
|
|
4238
4238
|
`
|
|
@@ -4442,7 +4442,7 @@ bool _bvhIntersectFirstHit(
|
|
|
4442
4442
|
`
|
|
4443
4443
|
);
|
|
4444
4444
|
|
|
4445
|
-
//
|
|
4445
|
+
// node_modules/three-mesh-bvh/src/index.js
|
|
4446
4446
|
var shaderIntersectFunction = `
|
|
4447
4447
|
${common_functions}
|
|
4448
4448
|
${bvh_ray_functions}
|