@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
package/build/wrap-effects.js
CHANGED
|
@@ -133,10 +133,10 @@ import { Triangle as Triangle4, Vector3 as Vector312 } from "three";
|
|
|
133
133
|
// src/rendering/surface-query.js
|
|
134
134
|
import { BackSide as BackSide2, BufferAttribute as BufferAttribute3, BufferGeometry, FrontSide as FrontSide2, Ray as Ray2, Vector3 as Vector311 } from "three";
|
|
135
135
|
|
|
136
|
-
//
|
|
136
|
+
// node_modules/three-mesh-bvh/src/core/BVH.js
|
|
137
137
|
import { Box3 as Box33 } from "three";
|
|
138
138
|
|
|
139
|
-
//
|
|
139
|
+
// node_modules/three-mesh-bvh/src/core/Constants.js
|
|
140
140
|
var CENTER = 0;
|
|
141
141
|
var AVERAGE = 1;
|
|
142
142
|
var SAH = 2;
|
|
@@ -162,7 +162,7 @@ var DEFAULT_OPTIONS = {
|
|
|
162
162
|
[SKIP_GENERATION]: false
|
|
163
163
|
};
|
|
164
164
|
|
|
165
|
-
//
|
|
165
|
+
// node_modules/three-mesh-bvh/src/utils/ArrayBoxUtilities.js
|
|
166
166
|
function arrayToBox(nodeIndex32, array, target) {
|
|
167
167
|
target.min.x = array[nodeIndex32];
|
|
168
168
|
target.min.y = array[nodeIndex32 + 1];
|
|
@@ -220,7 +220,7 @@ function computeSurfaceArea(bounds) {
|
|
|
220
220
|
return 2 * (d0 * d1 + d1 * d2 + d2 * d0);
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
-
//
|
|
223
|
+
// node_modules/three-mesh-bvh/src/core/utils/nodeBufferUtils.js
|
|
224
224
|
function IS_LEAF(n16, uint16Array2) {
|
|
225
225
|
return uint16Array2[n16 + 15] === IS_LEAFNODE_FLAG;
|
|
226
226
|
}
|
|
@@ -244,7 +244,7 @@ function BOUNDING_DATA_INDEX(n32) {
|
|
|
244
244
|
return n32;
|
|
245
245
|
}
|
|
246
246
|
|
|
247
|
-
//
|
|
247
|
+
// node_modules/three-mesh-bvh/src/core/build/computeBoundsUtils.js
|
|
248
248
|
function getBounds(primitiveBounds, offset, count, target, centroidTarget) {
|
|
249
249
|
let minx = Infinity;
|
|
250
250
|
let miny = Infinity;
|
|
@@ -299,7 +299,7 @@ function getBounds(primitiveBounds, offset, count, target, centroidTarget) {
|
|
|
299
299
|
centroidTarget[5] = cmaxz;
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
-
//
|
|
302
|
+
// node_modules/three-mesh-bvh/src/core/build/splitUtils.js
|
|
303
303
|
var BIN_COUNT = 32;
|
|
304
304
|
var binsSort = (a, b) => a.candidate - b.candidate;
|
|
305
305
|
var sahBins = /* @__PURE__ */ new Array(BIN_COUNT).fill().map(() => {
|
|
@@ -475,14 +475,14 @@ function getAverage(primitiveBounds, offset, count, axis) {
|
|
|
475
475
|
return avg / count;
|
|
476
476
|
}
|
|
477
477
|
|
|
478
|
-
//
|
|
478
|
+
// node_modules/three-mesh-bvh/src/core/BVHNode.js
|
|
479
479
|
var BVHNode = class {
|
|
480
480
|
constructor() {
|
|
481
481
|
this.boundingData = new Float32Array(6);
|
|
482
482
|
}
|
|
483
483
|
};
|
|
484
484
|
|
|
485
|
-
//
|
|
485
|
+
// node_modules/three-mesh-bvh/src/core/build/sortUtils.js
|
|
486
486
|
function partition(buffer, stride, primitiveBounds, offset, count, split) {
|
|
487
487
|
let left = offset;
|
|
488
488
|
let right = offset + count - 1;
|
|
@@ -517,7 +517,7 @@ function partition(buffer, stride, primitiveBounds, offset, count, split) {
|
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
519
|
|
|
520
|
-
//
|
|
520
|
+
// node_modules/three-mesh-bvh/src/core/build/buildUtils.js
|
|
521
521
|
var float32Array;
|
|
522
522
|
var uint32Array;
|
|
523
523
|
var uint16Array;
|
|
@@ -571,7 +571,7 @@ function _populateBuffer(byteOffset, node) {
|
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
573
|
|
|
574
|
-
//
|
|
574
|
+
// node_modules/three-mesh-bvh/src/core/build/buildTree.js
|
|
575
575
|
function buildTree(bvh, primitiveBounds, offset, count, options, loadRange) {
|
|
576
576
|
const {
|
|
577
577
|
maxDepth,
|
|
@@ -657,10 +657,10 @@ function buildPackedTree(bvh, options) {
|
|
|
657
657
|
});
|
|
658
658
|
}
|
|
659
659
|
|
|
660
|
-
//
|
|
660
|
+
// node_modules/three-mesh-bvh/src/core/cast/shapecast.js
|
|
661
661
|
import { Box3 } from "three";
|
|
662
662
|
|
|
663
|
-
//
|
|
663
|
+
// node_modules/three-mesh-bvh/src/utils/PrimitivePool.js
|
|
664
664
|
var PrimitivePool = class {
|
|
665
665
|
constructor(getNewPrimitive) {
|
|
666
666
|
this._getNewPrimitive = getNewPrimitive;
|
|
@@ -679,7 +679,7 @@ var PrimitivePool = class {
|
|
|
679
679
|
}
|
|
680
680
|
};
|
|
681
681
|
|
|
682
|
-
//
|
|
682
|
+
// node_modules/three-mesh-bvh/src/core/utils/BufferStack.js
|
|
683
683
|
var _BufferStack = class {
|
|
684
684
|
constructor() {
|
|
685
685
|
this.float32Array = null;
|
|
@@ -709,7 +709,7 @@ var _BufferStack = class {
|
|
|
709
709
|
};
|
|
710
710
|
var BufferStack = /* @__PURE__ */ new _BufferStack();
|
|
711
711
|
|
|
712
|
-
//
|
|
712
|
+
// node_modules/three-mesh-bvh/src/core/cast/shapecast.js
|
|
713
713
|
var _box1;
|
|
714
714
|
var _box2;
|
|
715
715
|
var boxStack = [];
|
|
@@ -831,7 +831,7 @@ function shapecastTraverse(nodeIndex32, geometry, intersectsBoundsFunc, intersec
|
|
|
831
831
|
}
|
|
832
832
|
}
|
|
833
833
|
|
|
834
|
-
//
|
|
834
|
+
// node_modules/three-mesh-bvh/src/core/cast/bvhcast.js
|
|
835
835
|
import { Box3 as Box32, Matrix4 } from "three";
|
|
836
836
|
var _bufferStack1 = /* @__PURE__ */ new BufferStack.constructor();
|
|
837
837
|
var _bufferStack2 = /* @__PURE__ */ new BufferStack.constructor();
|
|
@@ -1103,7 +1103,7 @@ function _traverse(node1Index32, node2Index32, matrix2to1, matrix1to2, intersect
|
|
|
1103
1103
|
return result;
|
|
1104
1104
|
}
|
|
1105
1105
|
|
|
1106
|
-
//
|
|
1106
|
+
// node_modules/three-mesh-bvh/src/core/BVHTraversalHelper.js
|
|
1107
1107
|
var BVHTraversalHelper = new class {
|
|
1108
1108
|
constructor() {
|
|
1109
1109
|
let buffer = null;
|
|
@@ -1183,7 +1183,7 @@ var BVHTraversalHelper = new class {
|
|
|
1183
1183
|
}
|
|
1184
1184
|
}();
|
|
1185
1185
|
|
|
1186
|
-
//
|
|
1186
|
+
// node_modules/three-mesh-bvh/src/core/BVH.js
|
|
1187
1187
|
var _tempBox = /* @__PURE__ */ new Box33();
|
|
1188
1188
|
var _tempBuffer = /* @__PURE__ */ new Float32Array(6);
|
|
1189
1189
|
var BVH = class {
|
|
@@ -1428,15 +1428,15 @@ var BVH = class {
|
|
|
1428
1428
|
}
|
|
1429
1429
|
};
|
|
1430
1430
|
|
|
1431
|
-
//
|
|
1431
|
+
// node_modules/three-mesh-bvh/src/core/GeometryBVH.js
|
|
1432
1432
|
import { Box3 as Box34 } from "three";
|
|
1433
1433
|
|
|
1434
|
-
//
|
|
1434
|
+
// node_modules/three-mesh-bvh/src/utils/BufferUtils.js
|
|
1435
1435
|
function isSharedArrayBufferSupported() {
|
|
1436
1436
|
return typeof SharedArrayBuffer !== "undefined";
|
|
1437
1437
|
}
|
|
1438
1438
|
|
|
1439
|
-
//
|
|
1439
|
+
// node_modules/three-mesh-bvh/src/core/build/geometryUtils.js
|
|
1440
1440
|
import { BufferAttribute } from "three";
|
|
1441
1441
|
function getVertexCount(geo) {
|
|
1442
1442
|
return geo.index ? geo.index.count : geo.attributes.position.count;
|
|
@@ -1524,7 +1524,7 @@ function getRootPrimitiveRanges(geo, range, stride) {
|
|
|
1524
1524
|
return ranges;
|
|
1525
1525
|
}
|
|
1526
1526
|
|
|
1527
|
-
//
|
|
1527
|
+
// node_modules/three-mesh-bvh/src/core/GeometryBVH.js
|
|
1528
1528
|
function generateIndirectBuffer(ranges, useSharedArrayBuffer) {
|
|
1529
1529
|
const lastRange = ranges[ranges.length - 1];
|
|
1530
1530
|
const useUint32 = lastRange.offset + lastRange.count > 2 ** 16;
|
|
@@ -1614,13 +1614,13 @@ var GeometryBVH = class extends BVH {
|
|
|
1614
1614
|
}
|
|
1615
1615
|
};
|
|
1616
1616
|
|
|
1617
|
-
//
|
|
1617
|
+
// node_modules/three-mesh-bvh/src/core/MeshBVH.js
|
|
1618
1618
|
import { BufferAttribute as BufferAttribute2, FrontSide, Ray, Vector3 as Vector310, Matrix4 as Matrix47 } from "three";
|
|
1619
1619
|
|
|
1620
|
-
//
|
|
1620
|
+
// node_modules/three-mesh-bvh/src/math/OrientedBox.js
|
|
1621
1621
|
import { Vector3 as Vector34, Matrix4 as Matrix42, Line3 as Line33 } from "three";
|
|
1622
1622
|
|
|
1623
|
-
//
|
|
1623
|
+
// node_modules/three-mesh-bvh/src/math/SeparatingAxisBounds.js
|
|
1624
1624
|
import { Vector3 } from "three";
|
|
1625
1625
|
var SeparatingAxisBounds = class {
|
|
1626
1626
|
constructor() {
|
|
@@ -1679,10 +1679,10 @@ SeparatingAxisBounds.prototype.setFromBox = /* @__PURE__ */ (function() {
|
|
|
1679
1679
|
};
|
|
1680
1680
|
})();
|
|
1681
1681
|
|
|
1682
|
-
//
|
|
1682
|
+
// node_modules/three-mesh-bvh/src/math/ExtendedTriangle.js
|
|
1683
1683
|
import { Triangle, Vector3 as Vector33, Vector2 as Vector22, Line3 as Line32, Plane as Plane2 } from "three";
|
|
1684
1684
|
|
|
1685
|
-
//
|
|
1685
|
+
// node_modules/three-mesh-bvh/src/math/MathUtilities.js
|
|
1686
1686
|
import { Vector3 as Vector32, Vector2, Plane, Line3 } from "three";
|
|
1687
1687
|
var closestPointLineToLine = /* @__PURE__ */ (function() {
|
|
1688
1688
|
const dir1 = /* @__PURE__ */ new Vector32();
|
|
@@ -1801,7 +1801,7 @@ var sphereIntersectTriangle = /* @__PURE__ */ (function() {
|
|
|
1801
1801
|
};
|
|
1802
1802
|
})();
|
|
1803
1803
|
|
|
1804
|
-
//
|
|
1804
|
+
// node_modules/three-mesh-bvh/src/math/ExtendedTriangle.js
|
|
1805
1805
|
var componentKeys = ["x", "y", "z"];
|
|
1806
1806
|
var ZERO_EPSILON = 1e-15;
|
|
1807
1807
|
var ZERO_EPSILON_SQR = ZERO_EPSILON * ZERO_EPSILON;
|
|
@@ -2284,7 +2284,7 @@ ExtendedTriangle.prototype.distanceToTriangle = /* @__PURE__ */ (function() {
|
|
|
2284
2284
|
};
|
|
2285
2285
|
})();
|
|
2286
2286
|
|
|
2287
|
-
//
|
|
2287
|
+
// node_modules/three-mesh-bvh/src/math/OrientedBox.js
|
|
2288
2288
|
var OrientedBox = class {
|
|
2289
2289
|
constructor(min2, max, matrix) {
|
|
2290
2290
|
this.isOrientedBox = true;
|
|
@@ -2551,7 +2551,7 @@ OrientedBox.prototype.distanceToBox = /* @__PURE__ */ (function() {
|
|
|
2551
2551
|
};
|
|
2552
2552
|
})();
|
|
2553
2553
|
|
|
2554
|
-
//
|
|
2554
|
+
// node_modules/three-mesh-bvh/src/utils/ExtendedTrianglePool.js
|
|
2555
2555
|
var ExtendedTrianglePoolBase = class extends PrimitivePool {
|
|
2556
2556
|
constructor() {
|
|
2557
2557
|
super(() => new ExtendedTriangle());
|
|
@@ -2559,7 +2559,7 @@ var ExtendedTrianglePoolBase = class extends PrimitivePool {
|
|
|
2559
2559
|
};
|
|
2560
2560
|
var ExtendedTrianglePool = /* @__PURE__ */ new ExtendedTrianglePoolBase();
|
|
2561
2561
|
|
|
2562
|
-
//
|
|
2562
|
+
// node_modules/three-mesh-bvh/src/core/cast/closestPointToPoint.js
|
|
2563
2563
|
import { Vector3 as Vector35 } from "three";
|
|
2564
2564
|
var temp = /* @__PURE__ */ new Vector35();
|
|
2565
2565
|
var temp1 = /* @__PURE__ */ new Vector35();
|
|
@@ -2601,7 +2601,7 @@ function closestPointToPoint(bvh, point, target = {}, minThreshold = 0, maxThres
|
|
|
2601
2601
|
return target;
|
|
2602
2602
|
}
|
|
2603
2603
|
|
|
2604
|
-
//
|
|
2604
|
+
// node_modules/three-mesh-bvh/src/utils/ThreeRayIntersectUtilities.js
|
|
2605
2605
|
import { Vector3 as Vector36, Vector2 as Vector23, Triangle as Triangle2, DoubleSide, BackSide, REVISION } from "three";
|
|
2606
2606
|
var IS_GT_REVISION_169 = parseInt(REVISION) >= 169;
|
|
2607
2607
|
var IS_LT_REVISION_161 = parseInt(REVISION) <= 161;
|
|
@@ -2739,7 +2739,7 @@ function intersectTri(geometry, materialOrSide, ray, tri, intersections, near, f
|
|
|
2739
2739
|
return null;
|
|
2740
2740
|
}
|
|
2741
2741
|
|
|
2742
|
-
//
|
|
2742
|
+
// node_modules/three-mesh-bvh/src/utils/TriangleUtilities.js
|
|
2743
2743
|
import { Vector2 as Vector24, Vector3 as Vector37, Triangle as Triangle3 } from "three";
|
|
2744
2744
|
function setTriangle(tri, i, index, pos) {
|
|
2745
2745
|
const ta = tri.a;
|
|
@@ -2764,7 +2764,7 @@ function setTriangle(tri, i, index, pos) {
|
|
|
2764
2764
|
tc.z = pos.getZ(i2);
|
|
2765
2765
|
}
|
|
2766
2766
|
|
|
2767
|
-
//
|
|
2767
|
+
// node_modules/three-mesh-bvh/src/core/utils/iterationUtils.generated.js
|
|
2768
2768
|
function intersectTris(bvh, materialOrSide, ray, offset, count, intersections, near, far) {
|
|
2769
2769
|
const { geometry, _indirectBuffer } = bvh;
|
|
2770
2770
|
for (let i = offset, end = offset + count; i < end; i++) {
|
|
@@ -2801,7 +2801,7 @@ function iterateOverTriangles(offset, count, bvh, intersectsTriangleFunc, contai
|
|
|
2801
2801
|
return false;
|
|
2802
2802
|
}
|
|
2803
2803
|
|
|
2804
|
-
//
|
|
2804
|
+
// node_modules/three-mesh-bvh/src/core/cast/refit.generated.js
|
|
2805
2805
|
function refit(bvh, nodeIndices = null) {
|
|
2806
2806
|
if (nodeIndices && Array.isArray(nodeIndices)) {
|
|
2807
2807
|
nodeIndices = new Set(nodeIndices);
|
|
@@ -2900,7 +2900,7 @@ function refit(bvh, nodeIndices = null) {
|
|
|
2900
2900
|
}
|
|
2901
2901
|
}
|
|
2902
2902
|
|
|
2903
|
-
//
|
|
2903
|
+
// node_modules/three-mesh-bvh/src/core/utils/intersectUtils.js
|
|
2904
2904
|
function intersectsNodeBounds(nodeIndex32, array, ray, near, far) {
|
|
2905
2905
|
let tmin, tmax, tymin, tymax, tzmin, tzmax;
|
|
2906
2906
|
const invdirx = 1 / ray.direction.x, invdiry = 1 / ray.direction.y, invdirz = 1 / ray.direction.z;
|
|
@@ -2943,7 +2943,7 @@ function intersectsNodeBounds(nodeIndex32, array, ray, near, far) {
|
|
|
2943
2943
|
return tmin <= far && tmax >= near;
|
|
2944
2944
|
}
|
|
2945
2945
|
|
|
2946
|
-
//
|
|
2946
|
+
// node_modules/three-mesh-bvh/src/core/utils/iterationUtils_indirect.generated.js
|
|
2947
2947
|
function intersectTris_indirect(bvh, materialOrSide, ray, offset, count, intersections, near, far) {
|
|
2948
2948
|
const { geometry, _indirectBuffer } = bvh;
|
|
2949
2949
|
for (let i = offset, end = offset + count; i < end; i++) {
|
|
@@ -2981,7 +2981,7 @@ function iterateOverTriangles_indirect(offset, count, bvh, intersectsTriangleFun
|
|
|
2981
2981
|
return false;
|
|
2982
2982
|
}
|
|
2983
2983
|
|
|
2984
|
-
//
|
|
2984
|
+
// node_modules/three-mesh-bvh/src/core/cast/raycast.generated.js
|
|
2985
2985
|
function raycast(bvh, root, materialOrSide, ray, intersects, near, far) {
|
|
2986
2986
|
BufferStack.setBuffer(bvh._roots[root]);
|
|
2987
2987
|
_raycast(0, bvh, materialOrSide, ray, intersects, near, far);
|
|
@@ -3007,7 +3007,7 @@ function _raycast(nodeIndex32, bvh, materialOrSide, ray, intersects, near, far)
|
|
|
3007
3007
|
}
|
|
3008
3008
|
}
|
|
3009
3009
|
|
|
3010
|
-
//
|
|
3010
|
+
// node_modules/three-mesh-bvh/src/core/cast/raycastFirst.generated.js
|
|
3011
3011
|
var _xyzFields = ["x", "y", "z"];
|
|
3012
3012
|
function raycastFirst(bvh, root, materialOrSide, ray, near, far) {
|
|
3013
3013
|
BufferStack.setBuffer(bvh._roots[root]);
|
|
@@ -3058,7 +3058,7 @@ function _raycastFirst(nodeIndex32, bvh, materialOrSide, ray, near, far) {
|
|
|
3058
3058
|
}
|
|
3059
3059
|
}
|
|
3060
3060
|
|
|
3061
|
-
//
|
|
3061
|
+
// node_modules/three-mesh-bvh/src/core/cast/intersectsGeometry.generated.js
|
|
3062
3062
|
import { Box3 as Box35, Matrix4 as Matrix43 } from "three";
|
|
3063
3063
|
var boundingBox = /* @__PURE__ */ new Box35();
|
|
3064
3064
|
var triangle = /* @__PURE__ */ new ExtendedTriangle();
|
|
@@ -3144,7 +3144,7 @@ function _intersectsGeometry(nodeIndex32, bvh, otherGeometry, geometryToBvh, cac
|
|
|
3144
3144
|
}
|
|
3145
3145
|
}
|
|
3146
3146
|
|
|
3147
|
-
//
|
|
3147
|
+
// node_modules/three-mesh-bvh/src/core/cast/closestPointToGeometry.generated.js
|
|
3148
3148
|
import { Matrix4 as Matrix44, Vector3 as Vector38 } from "three";
|
|
3149
3149
|
var tempMatrix = /* @__PURE__ */ new Matrix44();
|
|
3150
3150
|
var obb3 = /* @__PURE__ */ new OrientedBox();
|
|
@@ -3284,7 +3284,7 @@ function closestPointToGeometry(bvh, otherGeometry, geometryToBvh, target1 = {},
|
|
|
3284
3284
|
return target1;
|
|
3285
3285
|
}
|
|
3286
3286
|
|
|
3287
|
-
//
|
|
3287
|
+
// node_modules/three-mesh-bvh/src/core/cast/refit_indirect.generated.js
|
|
3288
3288
|
function refit_indirect(bvh, nodeIndices = null) {
|
|
3289
3289
|
if (nodeIndices && Array.isArray(nodeIndices)) {
|
|
3290
3290
|
nodeIndices = new Set(nodeIndices);
|
|
@@ -3387,7 +3387,7 @@ function refit_indirect(bvh, nodeIndices = null) {
|
|
|
3387
3387
|
}
|
|
3388
3388
|
}
|
|
3389
3389
|
|
|
3390
|
-
//
|
|
3390
|
+
// node_modules/three-mesh-bvh/src/core/cast/raycast_indirect.generated.js
|
|
3391
3391
|
function raycast_indirect(bvh, root, materialOrSide, ray, intersects, near, far) {
|
|
3392
3392
|
BufferStack.setBuffer(bvh._roots[root]);
|
|
3393
3393
|
_raycast2(0, bvh, materialOrSide, ray, intersects, near, far);
|
|
@@ -3413,7 +3413,7 @@ function _raycast2(nodeIndex32, bvh, materialOrSide, ray, intersects, near, far)
|
|
|
3413
3413
|
}
|
|
3414
3414
|
}
|
|
3415
3415
|
|
|
3416
|
-
//
|
|
3416
|
+
// node_modules/three-mesh-bvh/src/core/cast/raycastFirst_indirect.generated.js
|
|
3417
3417
|
var _xyzFields2 = ["x", "y", "z"];
|
|
3418
3418
|
function raycastFirst_indirect(bvh, root, materialOrSide, ray, near, far) {
|
|
3419
3419
|
BufferStack.setBuffer(bvh._roots[root]);
|
|
@@ -3464,7 +3464,7 @@ function _raycastFirst2(nodeIndex32, bvh, materialOrSide, ray, near, far) {
|
|
|
3464
3464
|
}
|
|
3465
3465
|
}
|
|
3466
3466
|
|
|
3467
|
-
//
|
|
3467
|
+
// node_modules/three-mesh-bvh/src/core/cast/intersectsGeometry_indirect.generated.js
|
|
3468
3468
|
import { Box3 as Box36, Matrix4 as Matrix45 } from "three";
|
|
3469
3469
|
var boundingBox2 = /* @__PURE__ */ new Box36();
|
|
3470
3470
|
var triangle3 = /* @__PURE__ */ new ExtendedTriangle();
|
|
@@ -3551,7 +3551,7 @@ function _intersectsGeometry2(nodeIndex32, bvh, otherGeometry, geometryToBvh, ca
|
|
|
3551
3551
|
}
|
|
3552
3552
|
}
|
|
3553
3553
|
|
|
3554
|
-
//
|
|
3554
|
+
// node_modules/three-mesh-bvh/src/core/cast/closestPointToGeometry_indirect.generated.js
|
|
3555
3555
|
import { Matrix4 as Matrix46, Vector3 as Vector39 } from "three";
|
|
3556
3556
|
var tempMatrix2 = /* @__PURE__ */ new Matrix46();
|
|
3557
3557
|
var obb5 = /* @__PURE__ */ new OrientedBox();
|
|
@@ -3694,7 +3694,7 @@ function closestPointToGeometry_indirect(bvh, otherGeometry, geometryToBvh, targ
|
|
|
3694
3694
|
return target1;
|
|
3695
3695
|
}
|
|
3696
3696
|
|
|
3697
|
-
//
|
|
3697
|
+
// node_modules/three-mesh-bvh/src/utils/GeometryRayIntersectUtilities.js
|
|
3698
3698
|
function convertRaycastIntersect(hit, object, raycaster) {
|
|
3699
3699
|
if (hit === null) {
|
|
3700
3700
|
return null;
|
|
@@ -3705,7 +3705,7 @@ function convertRaycastIntersect(hit, object, raycaster) {
|
|
|
3705
3705
|
return hit;
|
|
3706
3706
|
}
|
|
3707
3707
|
|
|
3708
|
-
//
|
|
3708
|
+
// node_modules/three-mesh-bvh/src/core/MeshBVH.js
|
|
3709
3709
|
var _obb = /* @__PURE__ */ new OrientedBox();
|
|
3710
3710
|
var _ray = /* @__PURE__ */ new Ray();
|
|
3711
3711
|
var _direction = /* @__PURE__ */ new Vector310();
|
|
@@ -4220,8 +4220,8 @@ var MeshBVH = class _MeshBVH extends GeometryBVH {
|
|
|
4220
4220
|
* `getTriangleHitPointInfo` to obtain more information like UV coordinates, triangle normal
|
|
4221
4221
|
* and materialIndex.
|
|
4222
4222
|
*
|
|
4223
|
-
*
|
|
4224
|
-
*
|
|
4223
|
+
* @note This function can be very slow if `geometry` does not have a `geometry.boundsTree`
|
|
4224
|
+
* computed.
|
|
4225
4225
|
*
|
|
4226
4226
|
* @param {BufferGeometry} otherGeometry
|
|
4227
4227
|
* @param {Matrix4} geometryToBvh - Transform of `otherGeometry` into the local space of
|
|
@@ -4274,7 +4274,7 @@ var MeshBVH = class _MeshBVH extends GeometryBVH {
|
|
|
4274
4274
|
}
|
|
4275
4275
|
};
|
|
4276
4276
|
|
|
4277
|
-
//
|
|
4277
|
+
// node_modules/three-mesh-bvh/src/webgl/glsl/common_functions.glsl.js
|
|
4278
4278
|
var common_functions = (
|
|
4279
4279
|
/* glsl */
|
|
4280
4280
|
`
|
|
@@ -4362,7 +4362,7 @@ void ndcToCameraRay(
|
|
|
4362
4362
|
`
|
|
4363
4363
|
);
|
|
4364
4364
|
|
|
4365
|
-
//
|
|
4365
|
+
// node_modules/three-mesh-bvh/src/webgl/glsl/bvh_ray_functions.glsl.js
|
|
4366
4366
|
var bvh_ray_functions = (
|
|
4367
4367
|
/* glsl */
|
|
4368
4368
|
`
|
|
@@ -4572,7 +4572,7 @@ bool _bvhIntersectFirstHit(
|
|
|
4572
4572
|
`
|
|
4573
4573
|
);
|
|
4574
4574
|
|
|
4575
|
-
//
|
|
4575
|
+
// node_modules/three-mesh-bvh/src/index.js
|
|
4576
4576
|
var shaderIntersectFunction = `
|
|
4577
4577
|
${common_functions}
|
|
4578
4578
|
${bvh_ray_functions}
|