@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
|
@@ -9,10 +9,10 @@ import { Triangle as Triangle4, Vector3 as Vector312 } from "three";
|
|
|
9
9
|
// src/rendering/surface-query.js
|
|
10
10
|
import { BackSide as BackSide2, BufferAttribute as BufferAttribute3, BufferGeometry, FrontSide as FrontSide2, Ray as Ray2, Vector3 as Vector311 } from "three";
|
|
11
11
|
|
|
12
|
-
//
|
|
12
|
+
// node_modules/three-mesh-bvh/src/core/BVH.js
|
|
13
13
|
import { Box3 as Box33 } from "three";
|
|
14
14
|
|
|
15
|
-
//
|
|
15
|
+
// node_modules/three-mesh-bvh/src/core/Constants.js
|
|
16
16
|
var CENTER = 0;
|
|
17
17
|
var AVERAGE = 1;
|
|
18
18
|
var SAH = 2;
|
|
@@ -38,7 +38,7 @@ var DEFAULT_OPTIONS = {
|
|
|
38
38
|
[SKIP_GENERATION]: false
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
//
|
|
41
|
+
// node_modules/three-mesh-bvh/src/utils/ArrayBoxUtilities.js
|
|
42
42
|
function arrayToBox(nodeIndex32, array, target) {
|
|
43
43
|
target.min.x = array[nodeIndex32];
|
|
44
44
|
target.min.y = array[nodeIndex32 + 1];
|
|
@@ -96,7 +96,7 @@ function computeSurfaceArea(bounds) {
|
|
|
96
96
|
return 2 * (d0 * d1 + d1 * d2 + d2 * d0);
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
//
|
|
99
|
+
// node_modules/three-mesh-bvh/src/core/utils/nodeBufferUtils.js
|
|
100
100
|
function IS_LEAF(n16, uint16Array2) {
|
|
101
101
|
return uint16Array2[n16 + 15] === IS_LEAFNODE_FLAG;
|
|
102
102
|
}
|
|
@@ -120,7 +120,7 @@ function BOUNDING_DATA_INDEX(n32) {
|
|
|
120
120
|
return n32;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
//
|
|
123
|
+
// node_modules/three-mesh-bvh/src/core/build/computeBoundsUtils.js
|
|
124
124
|
function getBounds(primitiveBounds, offset, count, target, centroidTarget) {
|
|
125
125
|
let minx = Infinity;
|
|
126
126
|
let miny = Infinity;
|
|
@@ -175,7 +175,7 @@ function getBounds(primitiveBounds, offset, count, target, centroidTarget) {
|
|
|
175
175
|
centroidTarget[5] = cmaxz;
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
//
|
|
178
|
+
// node_modules/three-mesh-bvh/src/core/build/splitUtils.js
|
|
179
179
|
var BIN_COUNT = 32;
|
|
180
180
|
var binsSort = (a, b) => a.candidate - b.candidate;
|
|
181
181
|
var sahBins = /* @__PURE__ */ new Array(BIN_COUNT).fill().map(() => {
|
|
@@ -351,14 +351,14 @@ function getAverage(primitiveBounds, offset, count, axis) {
|
|
|
351
351
|
return avg / count;
|
|
352
352
|
}
|
|
353
353
|
|
|
354
|
-
//
|
|
354
|
+
// node_modules/three-mesh-bvh/src/core/BVHNode.js
|
|
355
355
|
var BVHNode = class {
|
|
356
356
|
constructor() {
|
|
357
357
|
this.boundingData = new Float32Array(6);
|
|
358
358
|
}
|
|
359
359
|
};
|
|
360
360
|
|
|
361
|
-
//
|
|
361
|
+
// node_modules/three-mesh-bvh/src/core/build/sortUtils.js
|
|
362
362
|
function partition(buffer, stride, primitiveBounds, offset, count, split) {
|
|
363
363
|
let left = offset;
|
|
364
364
|
let right = offset + count - 1;
|
|
@@ -393,7 +393,7 @@ function partition(buffer, stride, primitiveBounds, offset, count, split) {
|
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
395
|
|
|
396
|
-
//
|
|
396
|
+
// node_modules/three-mesh-bvh/src/core/build/buildUtils.js
|
|
397
397
|
var float32Array;
|
|
398
398
|
var uint32Array;
|
|
399
399
|
var uint16Array;
|
|
@@ -447,7 +447,7 @@ function _populateBuffer(byteOffset, node) {
|
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
449
|
|
|
450
|
-
//
|
|
450
|
+
// node_modules/three-mesh-bvh/src/core/build/buildTree.js
|
|
451
451
|
function buildTree(bvh, primitiveBounds, offset, count, options, loadRange) {
|
|
452
452
|
const {
|
|
453
453
|
maxDepth,
|
|
@@ -533,10 +533,10 @@ function buildPackedTree(bvh, options) {
|
|
|
533
533
|
});
|
|
534
534
|
}
|
|
535
535
|
|
|
536
|
-
//
|
|
536
|
+
// node_modules/three-mesh-bvh/src/core/cast/shapecast.js
|
|
537
537
|
import { Box3 } from "three";
|
|
538
538
|
|
|
539
|
-
//
|
|
539
|
+
// node_modules/three-mesh-bvh/src/utils/PrimitivePool.js
|
|
540
540
|
var PrimitivePool = class {
|
|
541
541
|
constructor(getNewPrimitive) {
|
|
542
542
|
this._getNewPrimitive = getNewPrimitive;
|
|
@@ -555,7 +555,7 @@ var PrimitivePool = class {
|
|
|
555
555
|
}
|
|
556
556
|
};
|
|
557
557
|
|
|
558
|
-
//
|
|
558
|
+
// node_modules/three-mesh-bvh/src/core/utils/BufferStack.js
|
|
559
559
|
var _BufferStack = class {
|
|
560
560
|
constructor() {
|
|
561
561
|
this.float32Array = null;
|
|
@@ -585,7 +585,7 @@ var _BufferStack = class {
|
|
|
585
585
|
};
|
|
586
586
|
var BufferStack = /* @__PURE__ */ new _BufferStack();
|
|
587
587
|
|
|
588
|
-
//
|
|
588
|
+
// node_modules/three-mesh-bvh/src/core/cast/shapecast.js
|
|
589
589
|
var _box1;
|
|
590
590
|
var _box2;
|
|
591
591
|
var boxStack = [];
|
|
@@ -707,7 +707,7 @@ function shapecastTraverse(nodeIndex32, geometry, intersectsBoundsFunc, intersec
|
|
|
707
707
|
}
|
|
708
708
|
}
|
|
709
709
|
|
|
710
|
-
//
|
|
710
|
+
// node_modules/three-mesh-bvh/src/core/cast/bvhcast.js
|
|
711
711
|
import { Box3 as Box32, Matrix4 } from "three";
|
|
712
712
|
var _bufferStack1 = /* @__PURE__ */ new BufferStack.constructor();
|
|
713
713
|
var _bufferStack2 = /* @__PURE__ */ new BufferStack.constructor();
|
|
@@ -979,7 +979,7 @@ function _traverse(node1Index32, node2Index32, matrix2to1, matrix1to2, intersect
|
|
|
979
979
|
return result;
|
|
980
980
|
}
|
|
981
981
|
|
|
982
|
-
//
|
|
982
|
+
// node_modules/three-mesh-bvh/src/core/BVHTraversalHelper.js
|
|
983
983
|
var BVHTraversalHelper = new class {
|
|
984
984
|
constructor() {
|
|
985
985
|
let buffer = null;
|
|
@@ -1059,7 +1059,7 @@ var BVHTraversalHelper = new class {
|
|
|
1059
1059
|
}
|
|
1060
1060
|
}();
|
|
1061
1061
|
|
|
1062
|
-
//
|
|
1062
|
+
// node_modules/three-mesh-bvh/src/core/BVH.js
|
|
1063
1063
|
var _tempBox = /* @__PURE__ */ new Box33();
|
|
1064
1064
|
var _tempBuffer = /* @__PURE__ */ new Float32Array(6);
|
|
1065
1065
|
var BVH = class {
|
|
@@ -1304,15 +1304,15 @@ var BVH = class {
|
|
|
1304
1304
|
}
|
|
1305
1305
|
};
|
|
1306
1306
|
|
|
1307
|
-
//
|
|
1307
|
+
// node_modules/three-mesh-bvh/src/core/GeometryBVH.js
|
|
1308
1308
|
import { Box3 as Box34 } from "three";
|
|
1309
1309
|
|
|
1310
|
-
//
|
|
1310
|
+
// node_modules/three-mesh-bvh/src/utils/BufferUtils.js
|
|
1311
1311
|
function isSharedArrayBufferSupported() {
|
|
1312
1312
|
return typeof SharedArrayBuffer !== "undefined";
|
|
1313
1313
|
}
|
|
1314
1314
|
|
|
1315
|
-
//
|
|
1315
|
+
// node_modules/three-mesh-bvh/src/core/build/geometryUtils.js
|
|
1316
1316
|
import { BufferAttribute } from "three";
|
|
1317
1317
|
function getVertexCount(geo) {
|
|
1318
1318
|
return geo.index ? geo.index.count : geo.attributes.position.count;
|
|
@@ -1400,7 +1400,7 @@ function getRootPrimitiveRanges(geo, range, stride) {
|
|
|
1400
1400
|
return ranges;
|
|
1401
1401
|
}
|
|
1402
1402
|
|
|
1403
|
-
//
|
|
1403
|
+
// node_modules/three-mesh-bvh/src/core/GeometryBVH.js
|
|
1404
1404
|
function generateIndirectBuffer(ranges, useSharedArrayBuffer) {
|
|
1405
1405
|
const lastRange = ranges[ranges.length - 1];
|
|
1406
1406
|
const useUint32 = lastRange.offset + lastRange.count > 2 ** 16;
|
|
@@ -1490,13 +1490,13 @@ var GeometryBVH = class extends BVH {
|
|
|
1490
1490
|
}
|
|
1491
1491
|
};
|
|
1492
1492
|
|
|
1493
|
-
//
|
|
1493
|
+
// node_modules/three-mesh-bvh/src/core/MeshBVH.js
|
|
1494
1494
|
import { BufferAttribute as BufferAttribute2, FrontSide, Ray, Vector3 as Vector310, Matrix4 as Matrix47 } from "three";
|
|
1495
1495
|
|
|
1496
|
-
//
|
|
1496
|
+
// node_modules/three-mesh-bvh/src/math/OrientedBox.js
|
|
1497
1497
|
import { Vector3 as Vector34, Matrix4 as Matrix42, Line3 as Line33 } from "three";
|
|
1498
1498
|
|
|
1499
|
-
//
|
|
1499
|
+
// node_modules/three-mesh-bvh/src/math/SeparatingAxisBounds.js
|
|
1500
1500
|
import { Vector3 } from "three";
|
|
1501
1501
|
var SeparatingAxisBounds = class {
|
|
1502
1502
|
constructor() {
|
|
@@ -1555,10 +1555,10 @@ SeparatingAxisBounds.prototype.setFromBox = /* @__PURE__ */ (function() {
|
|
|
1555
1555
|
};
|
|
1556
1556
|
})();
|
|
1557
1557
|
|
|
1558
|
-
//
|
|
1558
|
+
// node_modules/three-mesh-bvh/src/math/ExtendedTriangle.js
|
|
1559
1559
|
import { Triangle, Vector3 as Vector33, Vector2 as Vector22, Line3 as Line32, Plane as Plane2 } from "three";
|
|
1560
1560
|
|
|
1561
|
-
//
|
|
1561
|
+
// node_modules/three-mesh-bvh/src/math/MathUtilities.js
|
|
1562
1562
|
import { Vector3 as Vector32, Vector2, Plane, Line3 } from "three";
|
|
1563
1563
|
var closestPointLineToLine = /* @__PURE__ */ (function() {
|
|
1564
1564
|
const dir1 = /* @__PURE__ */ new Vector32();
|
|
@@ -1677,7 +1677,7 @@ var sphereIntersectTriangle = /* @__PURE__ */ (function() {
|
|
|
1677
1677
|
};
|
|
1678
1678
|
})();
|
|
1679
1679
|
|
|
1680
|
-
//
|
|
1680
|
+
// node_modules/three-mesh-bvh/src/math/ExtendedTriangle.js
|
|
1681
1681
|
var componentKeys = ["x", "y", "z"];
|
|
1682
1682
|
var ZERO_EPSILON = 1e-15;
|
|
1683
1683
|
var ZERO_EPSILON_SQR = ZERO_EPSILON * ZERO_EPSILON;
|
|
@@ -2160,7 +2160,7 @@ ExtendedTriangle.prototype.distanceToTriangle = /* @__PURE__ */ (function() {
|
|
|
2160
2160
|
};
|
|
2161
2161
|
})();
|
|
2162
2162
|
|
|
2163
|
-
//
|
|
2163
|
+
// node_modules/three-mesh-bvh/src/math/OrientedBox.js
|
|
2164
2164
|
var OrientedBox = class {
|
|
2165
2165
|
constructor(min, max, matrix) {
|
|
2166
2166
|
this.isOrientedBox = true;
|
|
@@ -2427,7 +2427,7 @@ OrientedBox.prototype.distanceToBox = /* @__PURE__ */ (function() {
|
|
|
2427
2427
|
};
|
|
2428
2428
|
})();
|
|
2429
2429
|
|
|
2430
|
-
//
|
|
2430
|
+
// node_modules/three-mesh-bvh/src/utils/ExtendedTrianglePool.js
|
|
2431
2431
|
var ExtendedTrianglePoolBase = class extends PrimitivePool {
|
|
2432
2432
|
constructor() {
|
|
2433
2433
|
super(() => new ExtendedTriangle());
|
|
@@ -2435,7 +2435,7 @@ var ExtendedTrianglePoolBase = class extends PrimitivePool {
|
|
|
2435
2435
|
};
|
|
2436
2436
|
var ExtendedTrianglePool = /* @__PURE__ */ new ExtendedTrianglePoolBase();
|
|
2437
2437
|
|
|
2438
|
-
//
|
|
2438
|
+
// node_modules/three-mesh-bvh/src/core/cast/closestPointToPoint.js
|
|
2439
2439
|
import { Vector3 as Vector35 } from "three";
|
|
2440
2440
|
var temp = /* @__PURE__ */ new Vector35();
|
|
2441
2441
|
var temp1 = /* @__PURE__ */ new Vector35();
|
|
@@ -2477,7 +2477,7 @@ function closestPointToPoint(bvh, point, target = {}, minThreshold = 0, maxThres
|
|
|
2477
2477
|
return target;
|
|
2478
2478
|
}
|
|
2479
2479
|
|
|
2480
|
-
//
|
|
2480
|
+
// node_modules/three-mesh-bvh/src/utils/ThreeRayIntersectUtilities.js
|
|
2481
2481
|
import { Vector3 as Vector36, Vector2 as Vector23, Triangle as Triangle2, DoubleSide, BackSide, REVISION } from "three";
|
|
2482
2482
|
var IS_GT_REVISION_169 = parseInt(REVISION) >= 169;
|
|
2483
2483
|
var IS_LT_REVISION_161 = parseInt(REVISION) <= 161;
|
|
@@ -2615,7 +2615,7 @@ function intersectTri(geometry, materialOrSide, ray, tri, intersections, near, f
|
|
|
2615
2615
|
return null;
|
|
2616
2616
|
}
|
|
2617
2617
|
|
|
2618
|
-
//
|
|
2618
|
+
// node_modules/three-mesh-bvh/src/utils/TriangleUtilities.js
|
|
2619
2619
|
import { Vector2 as Vector24, Vector3 as Vector37, Triangle as Triangle3 } from "three";
|
|
2620
2620
|
function setTriangle(tri, i, index, pos) {
|
|
2621
2621
|
const ta = tri.a;
|
|
@@ -2640,7 +2640,7 @@ function setTriangle(tri, i, index, pos) {
|
|
|
2640
2640
|
tc.z = pos.getZ(i2);
|
|
2641
2641
|
}
|
|
2642
2642
|
|
|
2643
|
-
//
|
|
2643
|
+
// node_modules/three-mesh-bvh/src/core/utils/iterationUtils.generated.js
|
|
2644
2644
|
function intersectTris(bvh, materialOrSide, ray, offset, count, intersections, near, far) {
|
|
2645
2645
|
const { geometry, _indirectBuffer } = bvh;
|
|
2646
2646
|
for (let i = offset, end = offset + count; i < end; i++) {
|
|
@@ -2677,7 +2677,7 @@ function iterateOverTriangles(offset, count, bvh, intersectsTriangleFunc, contai
|
|
|
2677
2677
|
return false;
|
|
2678
2678
|
}
|
|
2679
2679
|
|
|
2680
|
-
//
|
|
2680
|
+
// node_modules/three-mesh-bvh/src/core/cast/refit.generated.js
|
|
2681
2681
|
function refit(bvh, nodeIndices = null) {
|
|
2682
2682
|
if (nodeIndices && Array.isArray(nodeIndices)) {
|
|
2683
2683
|
nodeIndices = new Set(nodeIndices);
|
|
@@ -2776,7 +2776,7 @@ function refit(bvh, nodeIndices = null) {
|
|
|
2776
2776
|
}
|
|
2777
2777
|
}
|
|
2778
2778
|
|
|
2779
|
-
//
|
|
2779
|
+
// node_modules/three-mesh-bvh/src/core/utils/intersectUtils.js
|
|
2780
2780
|
function intersectsNodeBounds(nodeIndex32, array, ray, near, far) {
|
|
2781
2781
|
let tmin, tmax, tymin, tymax, tzmin, tzmax;
|
|
2782
2782
|
const invdirx = 1 / ray.direction.x, invdiry = 1 / ray.direction.y, invdirz = 1 / ray.direction.z;
|
|
@@ -2819,7 +2819,7 @@ function intersectsNodeBounds(nodeIndex32, array, ray, near, far) {
|
|
|
2819
2819
|
return tmin <= far && tmax >= near;
|
|
2820
2820
|
}
|
|
2821
2821
|
|
|
2822
|
-
//
|
|
2822
|
+
// node_modules/three-mesh-bvh/src/core/utils/iterationUtils_indirect.generated.js
|
|
2823
2823
|
function intersectTris_indirect(bvh, materialOrSide, ray, offset, count, intersections, near, far) {
|
|
2824
2824
|
const { geometry, _indirectBuffer } = bvh;
|
|
2825
2825
|
for (let i = offset, end = offset + count; i < end; i++) {
|
|
@@ -2857,7 +2857,7 @@ function iterateOverTriangles_indirect(offset, count, bvh, intersectsTriangleFun
|
|
|
2857
2857
|
return false;
|
|
2858
2858
|
}
|
|
2859
2859
|
|
|
2860
|
-
//
|
|
2860
|
+
// node_modules/three-mesh-bvh/src/core/cast/raycast.generated.js
|
|
2861
2861
|
function raycast(bvh, root, materialOrSide, ray, intersects, near, far) {
|
|
2862
2862
|
BufferStack.setBuffer(bvh._roots[root]);
|
|
2863
2863
|
_raycast(0, bvh, materialOrSide, ray, intersects, near, far);
|
|
@@ -2883,7 +2883,7 @@ function _raycast(nodeIndex32, bvh, materialOrSide, ray, intersects, near, far)
|
|
|
2883
2883
|
}
|
|
2884
2884
|
}
|
|
2885
2885
|
|
|
2886
|
-
//
|
|
2886
|
+
// node_modules/three-mesh-bvh/src/core/cast/raycastFirst.generated.js
|
|
2887
2887
|
var _xyzFields = ["x", "y", "z"];
|
|
2888
2888
|
function raycastFirst(bvh, root, materialOrSide, ray, near, far) {
|
|
2889
2889
|
BufferStack.setBuffer(bvh._roots[root]);
|
|
@@ -2934,7 +2934,7 @@ function _raycastFirst(nodeIndex32, bvh, materialOrSide, ray, near, far) {
|
|
|
2934
2934
|
}
|
|
2935
2935
|
}
|
|
2936
2936
|
|
|
2937
|
-
//
|
|
2937
|
+
// node_modules/three-mesh-bvh/src/core/cast/intersectsGeometry.generated.js
|
|
2938
2938
|
import { Box3 as Box35, Matrix4 as Matrix43 } from "three";
|
|
2939
2939
|
var boundingBox = /* @__PURE__ */ new Box35();
|
|
2940
2940
|
var triangle = /* @__PURE__ */ new ExtendedTriangle();
|
|
@@ -3020,7 +3020,7 @@ function _intersectsGeometry(nodeIndex32, bvh, otherGeometry, geometryToBvh, cac
|
|
|
3020
3020
|
}
|
|
3021
3021
|
}
|
|
3022
3022
|
|
|
3023
|
-
//
|
|
3023
|
+
// node_modules/three-mesh-bvh/src/core/cast/closestPointToGeometry.generated.js
|
|
3024
3024
|
import { Matrix4 as Matrix44, Vector3 as Vector38 } from "three";
|
|
3025
3025
|
var tempMatrix = /* @__PURE__ */ new Matrix44();
|
|
3026
3026
|
var obb3 = /* @__PURE__ */ new OrientedBox();
|
|
@@ -3160,7 +3160,7 @@ function closestPointToGeometry(bvh, otherGeometry, geometryToBvh, target1 = {},
|
|
|
3160
3160
|
return target1;
|
|
3161
3161
|
}
|
|
3162
3162
|
|
|
3163
|
-
//
|
|
3163
|
+
// node_modules/three-mesh-bvh/src/core/cast/refit_indirect.generated.js
|
|
3164
3164
|
function refit_indirect(bvh, nodeIndices = null) {
|
|
3165
3165
|
if (nodeIndices && Array.isArray(nodeIndices)) {
|
|
3166
3166
|
nodeIndices = new Set(nodeIndices);
|
|
@@ -3263,7 +3263,7 @@ function refit_indirect(bvh, nodeIndices = null) {
|
|
|
3263
3263
|
}
|
|
3264
3264
|
}
|
|
3265
3265
|
|
|
3266
|
-
//
|
|
3266
|
+
// node_modules/three-mesh-bvh/src/core/cast/raycast_indirect.generated.js
|
|
3267
3267
|
function raycast_indirect(bvh, root, materialOrSide, ray, intersects, near, far) {
|
|
3268
3268
|
BufferStack.setBuffer(bvh._roots[root]);
|
|
3269
3269
|
_raycast2(0, bvh, materialOrSide, ray, intersects, near, far);
|
|
@@ -3289,7 +3289,7 @@ function _raycast2(nodeIndex32, bvh, materialOrSide, ray, intersects, near, far)
|
|
|
3289
3289
|
}
|
|
3290
3290
|
}
|
|
3291
3291
|
|
|
3292
|
-
//
|
|
3292
|
+
// node_modules/three-mesh-bvh/src/core/cast/raycastFirst_indirect.generated.js
|
|
3293
3293
|
var _xyzFields2 = ["x", "y", "z"];
|
|
3294
3294
|
function raycastFirst_indirect(bvh, root, materialOrSide, ray, near, far) {
|
|
3295
3295
|
BufferStack.setBuffer(bvh._roots[root]);
|
|
@@ -3340,7 +3340,7 @@ function _raycastFirst2(nodeIndex32, bvh, materialOrSide, ray, near, far) {
|
|
|
3340
3340
|
}
|
|
3341
3341
|
}
|
|
3342
3342
|
|
|
3343
|
-
//
|
|
3343
|
+
// node_modules/three-mesh-bvh/src/core/cast/intersectsGeometry_indirect.generated.js
|
|
3344
3344
|
import { Box3 as Box36, Matrix4 as Matrix45 } from "three";
|
|
3345
3345
|
var boundingBox2 = /* @__PURE__ */ new Box36();
|
|
3346
3346
|
var triangle3 = /* @__PURE__ */ new ExtendedTriangle();
|
|
@@ -3427,7 +3427,7 @@ function _intersectsGeometry2(nodeIndex32, bvh, otherGeometry, geometryToBvh, ca
|
|
|
3427
3427
|
}
|
|
3428
3428
|
}
|
|
3429
3429
|
|
|
3430
|
-
//
|
|
3430
|
+
// node_modules/three-mesh-bvh/src/core/cast/closestPointToGeometry_indirect.generated.js
|
|
3431
3431
|
import { Matrix4 as Matrix46, Vector3 as Vector39 } from "three";
|
|
3432
3432
|
var tempMatrix2 = /* @__PURE__ */ new Matrix46();
|
|
3433
3433
|
var obb5 = /* @__PURE__ */ new OrientedBox();
|
|
@@ -3570,7 +3570,7 @@ function closestPointToGeometry_indirect(bvh, otherGeometry, geometryToBvh, targ
|
|
|
3570
3570
|
return target1;
|
|
3571
3571
|
}
|
|
3572
3572
|
|
|
3573
|
-
//
|
|
3573
|
+
// node_modules/three-mesh-bvh/src/utils/GeometryRayIntersectUtilities.js
|
|
3574
3574
|
function convertRaycastIntersect(hit, object, raycaster) {
|
|
3575
3575
|
if (hit === null) {
|
|
3576
3576
|
return null;
|
|
@@ -3581,7 +3581,7 @@ function convertRaycastIntersect(hit, object, raycaster) {
|
|
|
3581
3581
|
return hit;
|
|
3582
3582
|
}
|
|
3583
3583
|
|
|
3584
|
-
//
|
|
3584
|
+
// node_modules/three-mesh-bvh/src/core/MeshBVH.js
|
|
3585
3585
|
var _obb = /* @__PURE__ */ new OrientedBox();
|
|
3586
3586
|
var _ray = /* @__PURE__ */ new Ray();
|
|
3587
3587
|
var _direction = /* @__PURE__ */ new Vector310();
|
|
@@ -4096,8 +4096,8 @@ var MeshBVH = class _MeshBVH extends GeometryBVH {
|
|
|
4096
4096
|
* `getTriangleHitPointInfo` to obtain more information like UV coordinates, triangle normal
|
|
4097
4097
|
* and materialIndex.
|
|
4098
4098
|
*
|
|
4099
|
-
*
|
|
4100
|
-
*
|
|
4099
|
+
* @note This function can be very slow if `geometry` does not have a `geometry.boundsTree`
|
|
4100
|
+
* computed.
|
|
4101
4101
|
*
|
|
4102
4102
|
* @param {BufferGeometry} otherGeometry
|
|
4103
4103
|
* @param {Matrix4} geometryToBvh - Transform of `otherGeometry` into the local space of
|
|
@@ -4150,7 +4150,7 @@ var MeshBVH = class _MeshBVH extends GeometryBVH {
|
|
|
4150
4150
|
}
|
|
4151
4151
|
};
|
|
4152
4152
|
|
|
4153
|
-
//
|
|
4153
|
+
// node_modules/three-mesh-bvh/src/webgl/glsl/common_functions.glsl.js
|
|
4154
4154
|
var common_functions = (
|
|
4155
4155
|
/* glsl */
|
|
4156
4156
|
`
|
|
@@ -4238,7 +4238,7 @@ void ndcToCameraRay(
|
|
|
4238
4238
|
`
|
|
4239
4239
|
);
|
|
4240
4240
|
|
|
4241
|
-
//
|
|
4241
|
+
// node_modules/three-mesh-bvh/src/webgl/glsl/bvh_ray_functions.glsl.js
|
|
4242
4242
|
var bvh_ray_functions = (
|
|
4243
4243
|
/* glsl */
|
|
4244
4244
|
`
|
|
@@ -4448,7 +4448,7 @@ bool _bvhIntersectFirstHit(
|
|
|
4448
4448
|
`
|
|
4449
4449
|
);
|
|
4450
4450
|
|
|
4451
|
-
//
|
|
4451
|
+
// node_modules/three-mesh-bvh/src/index.js
|
|
4452
4452
|
var shaderIntersectFunction = `
|
|
4453
4453
|
${common_functions}
|
|
4454
4454
|
${bvh_ray_functions}
|