@needle-tools/engine 2.60.2-pre → 2.60.3-pre
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/CHANGELOG.md +3 -0
- package/dist/needle-engine.js +151 -144
- package/dist/needle-engine.umd.cjs +11 -11
- package/lib/engine/engine_types.d.ts +1 -1
- package/lib/engine-components/Camera.d.ts +3 -3
- package/lib/engine-components/Camera.js +17 -4
- package/lib/engine-components/Camera.js.map +1 -1
- package/lib/engine-components/ui/Canvas.js +6 -4
- package/lib/engine-components/ui/Canvas.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/engine/engine_types.ts +1 -1
- package/src/engine-components/Camera.ts +26 -13
- package/src/engine-components/ui/Canvas.ts +6 -4
package/dist/needle-engine.js
CHANGED
|
@@ -3530,7 +3530,7 @@ class fg extends Vi {
|
|
|
3530
3530
|
A === !0 && this.version++;
|
|
3531
3531
|
}
|
|
3532
3532
|
}
|
|
3533
|
-
class
|
|
3533
|
+
class og extends fg {
|
|
3534
3534
|
constructor(A) {
|
|
3535
3535
|
super(), this.isMeshBasicMaterial = !0, this.type = "MeshBasicMaterial", this.color = new T(16777215), this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.combine = kE, this.reflectivity = 1, this.refractionRatio = 0.98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.fog = !0, this.setValues(A);
|
|
3536
3536
|
}
|
|
@@ -4027,7 +4027,7 @@ class hI extends Vi {
|
|
|
4027
4027
|
}
|
|
4028
4028
|
const C0 = /* @__PURE__ */ new XA(), qs = /* @__PURE__ */ new to(), Ud = /* @__PURE__ */ new rC(), Do = /* @__PURE__ */ new k(), wo = /* @__PURE__ */ new k(), uo = /* @__PURE__ */ new k(), Rd = /* @__PURE__ */ new k(), Fd = /* @__PURE__ */ new k(), Nd = /* @__PURE__ */ new k(), Rr = /* @__PURE__ */ new k(), Fr = /* @__PURE__ */ new k(), Nr = /* @__PURE__ */ new k(), mr = /* @__PURE__ */ new QA(), Kr = /* @__PURE__ */ new QA(), Jr = /* @__PURE__ */ new QA(), md = /* @__PURE__ */ new k(), qr = /* @__PURE__ */ new k();
|
|
4029
4029
|
class MA extends HA {
|
|
4030
|
-
constructor(A = new hI(), I = new
|
|
4030
|
+
constructor(A = new hI(), I = new og()) {
|
|
4031
4031
|
super(), this.isMesh = !0, this.type = "Mesh", this.geometry = A, this.material = I, this.updateMorphTargets();
|
|
4032
4032
|
}
|
|
4033
4033
|
copy(A, I) {
|
|
@@ -4276,7 +4276,7 @@ let Nl = class extends HA {
|
|
|
4276
4276
|
return new this.constructor().copy(this);
|
|
4277
4277
|
}
|
|
4278
4278
|
};
|
|
4279
|
-
class
|
|
4279
|
+
class Cg extends Nl {
|
|
4280
4280
|
constructor(A = 50, I = 1, g = 0.1, i = 2e3) {
|
|
4281
4281
|
super(), this.isPerspectiveCamera = !0, this.type = "PerspectiveCamera", this.fov = A, this.zoom = 1, this.near = g, this.far = i, this.focus = 10, this.aspect = I, this.view = null, this.filmGauge = 35, this.filmOffset = 0, this.updateProjectionMatrix();
|
|
4282
4282
|
}
|
|
@@ -4382,17 +4382,17 @@ const Ls = -90, Ys = 1;
|
|
|
4382
4382
|
class oy extends HA {
|
|
4383
4383
|
constructor(A, I, g) {
|
|
4384
4384
|
super(), this.type = "CubeCamera", this.renderTarget = g;
|
|
4385
|
-
const i = new
|
|
4385
|
+
const i = new Cg(Ls, Ys, A, I);
|
|
4386
4386
|
i.layers = this.layers, i.up.set(0, 1, 0), i.lookAt(1, 0, 0), this.add(i);
|
|
4387
|
-
const e = new
|
|
4387
|
+
const e = new Cg(Ls, Ys, A, I);
|
|
4388
4388
|
e.layers = this.layers, e.up.set(0, 1, 0), e.lookAt(-1, 0, 0), this.add(e);
|
|
4389
|
-
const C = new
|
|
4389
|
+
const C = new Cg(Ls, Ys, A, I);
|
|
4390
4390
|
C.layers = this.layers, C.up.set(0, 0, -1), C.lookAt(0, 1, 0), this.add(C);
|
|
4391
|
-
const o = new
|
|
4391
|
+
const o = new Cg(Ls, Ys, A, I);
|
|
4392
4392
|
o.layers = this.layers, o.up.set(0, 0, 1), o.lookAt(0, -1, 0), this.add(o);
|
|
4393
|
-
const B = new
|
|
4393
|
+
const B = new Cg(Ls, Ys, A, I);
|
|
4394
4394
|
B.layers = this.layers, B.up.set(0, 1, 0), B.lookAt(0, 0, 1), this.add(B);
|
|
4395
|
-
const s = new
|
|
4395
|
+
const s = new Cg(Ls, Ys, A, I);
|
|
4396
4396
|
s.layers = this.layers, s.up.set(0, 1, 0), s.lookAt(0, 0, -1), this.add(s);
|
|
4397
4397
|
}
|
|
4398
4398
|
update(A, I) {
|
|
@@ -8767,9 +8767,9 @@ class uu {
|
|
|
8767
8767
|
this._renderer.compile(I, Jd);
|
|
8768
8768
|
}
|
|
8769
8769
|
_sceneToCubeUV(A, I, g, i) {
|
|
8770
|
-
const o = new
|
|
8770
|
+
const o = new Cg(90, 1, I, g), B = [1, -1, 1, 1, 1, 1], s = [1, 1, 1, -1, -1, -1], Q = this._renderer, a = Q.autoClear, n = Q.toneMapping;
|
|
8771
8771
|
Q.getClearColor(B0), Q.toneMapping = ft, Q.autoClear = !1;
|
|
8772
|
-
const r = new
|
|
8772
|
+
const r = new og({
|
|
8773
8773
|
name: "PMREM.Background",
|
|
8774
8774
|
side: Be,
|
|
8775
8775
|
depthWrite: !1,
|
|
@@ -12029,7 +12029,7 @@ function iR(t, A, I) {
|
|
|
12029
12029
|
}
|
|
12030
12030
|
return { convert: i };
|
|
12031
12031
|
}
|
|
12032
|
-
class eR extends
|
|
12032
|
+
class eR extends Cg {
|
|
12033
12033
|
constructor(A = []) {
|
|
12034
12034
|
super(), this.isArrayCamera = !0, this.cameras = A;
|
|
12035
12035
|
}
|
|
@@ -12117,9 +12117,9 @@ class Ox extends Vi {
|
|
|
12117
12117
|
let i = null, e = 1, C = !1, o = null, B = "local-floor", s = null, Q = null, a = null, n = null, r = null, h = null;
|
|
12118
12118
|
const c = I.getContextAttributes();
|
|
12119
12119
|
let l = null, w = null;
|
|
12120
|
-
const p = [], D = [], d = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Map(), y = new
|
|
12120
|
+
const p = [], D = [], d = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Map(), y = new Cg();
|
|
12121
12121
|
y.layers.enable(1), y.viewport = new sI();
|
|
12122
|
-
const f = new
|
|
12122
|
+
const f = new Cg();
|
|
12123
12123
|
f.layers.enable(2), f.viewport = new sI();
|
|
12124
12124
|
const S = [y, f], G = new eR();
|
|
12125
12125
|
G.layers.enable(1), G.layers.enable(2);
|
|
@@ -12299,7 +12299,7 @@ class Ox extends Vi {
|
|
|
12299
12299
|
), A.setRenderTarget(w));
|
|
12300
12300
|
}
|
|
12301
12301
|
let PA = S[z];
|
|
12302
|
-
PA === void 0 && (PA = new
|
|
12302
|
+
PA === void 0 && (PA = new Cg(), PA.layers.enable(z), PA.viewport = new sI(), S[z] = PA), PA.matrix.fromArray(_A.transform.matrix), PA.projectionMatrix.fromArray(_A.projectionMatrix), PA.viewport.set(qA.x, qA.y, qA.width, qA.height), z === 0 && G.matrix.copy(PA.matrix), dA === !0 && G.cameras.push(PA);
|
|
12303
12303
|
}
|
|
12304
12304
|
}
|
|
12305
12305
|
for (let uA = 0; uA < p.length; uA++) {
|
|
@@ -17032,7 +17032,7 @@ class my {
|
|
|
17032
17032
|
}
|
|
17033
17033
|
class KH extends my {
|
|
17034
17034
|
constructor() {
|
|
17035
|
-
super(new
|
|
17035
|
+
super(new Cg(50, 1, 0.5, 500)), this.isSpotLightShadow = !0, this.focus = 1;
|
|
17036
17036
|
}
|
|
17037
17037
|
updateMatrices(A) {
|
|
17038
17038
|
const I = this.camera, g = $a * 2 * A.angle * this.focus, i = this.mapSize.width / this.mapSize.height, e = A.distance || I.far;
|
|
@@ -17062,7 +17062,7 @@ class Ol extends eB {
|
|
|
17062
17062
|
const AG = /* @__PURE__ */ new XA(), Vn = /* @__PURE__ */ new k(), Pd = /* @__PURE__ */ new k();
|
|
17063
17063
|
class JH extends my {
|
|
17064
17064
|
constructor() {
|
|
17065
|
-
super(new
|
|
17065
|
+
super(new Cg(90, 1, 0.5, 500)), this.isPointLightShadow = !0, this._frameExtents = new QA(4, 2), this._viewportCount = 6, this._viewports = [
|
|
17066
17066
|
// These viewports map a cube-map onto a 2D texture with the
|
|
17067
17067
|
// following orientation:
|
|
17068
17068
|
//
|
|
@@ -17335,7 +17335,7 @@ class Wl extends Li {
|
|
|
17335
17335
|
MeshLambertMaterial: pR,
|
|
17336
17336
|
MeshDepthMaterial: sy,
|
|
17337
17337
|
MeshDistanceMaterial: Qy,
|
|
17338
|
-
MeshBasicMaterial:
|
|
17338
|
+
MeshBasicMaterial: og,
|
|
17339
17339
|
MeshMatcapMaterial: yR,
|
|
17340
17340
|
LineDashedMaterial: SR,
|
|
17341
17341
|
LineBasicMaterial: qg,
|
|
@@ -17686,7 +17686,7 @@ class LH extends Li {
|
|
|
17686
17686
|
C = new jo(), A.background !== void 0 && (Number.isInteger(A.background) ? C.background = new T(A.background) : C.background = s(A.background)), A.environment !== void 0 && (C.environment = s(A.environment)), A.fog !== void 0 && (A.fog.type === "Fog" ? C.fog = new Ll(A.fog.color, A.fog.near, A.fog.far) : A.fog.type === "FogExp2" && (C.fog = new ql(A.fog.color, A.fog.density))), A.backgroundBlurriness !== void 0 && (C.backgroundBlurriness = A.backgroundBlurriness);
|
|
17687
17687
|
break;
|
|
17688
17688
|
case "PerspectiveCamera":
|
|
17689
|
-
C = new
|
|
17689
|
+
C = new Cg(A.fov, A.aspect, A.near, A.far), A.focus !== void 0 && (C.focus = A.focus), A.zoom !== void 0 && (C.zoom = A.zoom), A.filmGauge !== void 0 && (C.filmGauge = A.filmGauge), A.filmOffset !== void 0 && (C.filmOffset = A.filmOffset), A.view !== void 0 && (C.view = Object.assign({}, A.view));
|
|
17690
17690
|
break;
|
|
17691
17691
|
case "OrthographicCamera":
|
|
17692
17692
|
C = new iB(A.left, A.right, A.top, A.bottom, A.near, A.far), A.zoom !== void 0 && (C.zoom = A.zoom), A.view !== void 0 && (C.view = Object.assign({}, A.view));
|
|
@@ -17871,7 +17871,7 @@ class xH extends LQ {
|
|
|
17871
17871
|
const iG = /* @__PURE__ */ new XA(), eG = /* @__PURE__ */ new XA(), DB = /* @__PURE__ */ new XA();
|
|
17872
17872
|
class HH {
|
|
17873
17873
|
constructor() {
|
|
17874
|
-
this.type = "StereoCamera", this.aspect = 1, this.eyeSep = 0.064, this.cameraL = new
|
|
17874
|
+
this.type = "StereoCamera", this.aspect = 1, this.eyeSep = 0.064, this.cameraL = new Cg(), this.cameraL.layers.enable(1), this.cameraL.matrixAutoUpdate = !1, this.cameraR = new Cg(), this.cameraR.layers.enable(2), this.cameraR.matrixAutoUpdate = !1, this._cache = {
|
|
17875
17875
|
focus: null,
|
|
17876
17876
|
fov: null,
|
|
17877
17877
|
aspect: null,
|
|
@@ -19512,7 +19512,7 @@ function LR(t) {
|
|
|
19512
19512
|
}
|
|
19513
19513
|
class Qv extends MA {
|
|
19514
19514
|
constructor(A, I, g) {
|
|
19515
|
-
const i = new Ct(I, 4, 2), e = new
|
|
19515
|
+
const i = new Ct(I, 4, 2), e = new og({ wireframe: !0, fog: !1, toneMapped: !1 });
|
|
19516
19516
|
super(i, e), this.light = A, this.color = g, this.type = "PointLightHelper", this.matrix = this.light.matrixWorld, this.matrixAutoUpdate = !1, this.update();
|
|
19517
19517
|
}
|
|
19518
19518
|
dispose() {
|
|
@@ -19527,7 +19527,7 @@ class av extends HA {
|
|
|
19527
19527
|
constructor(A, I, g) {
|
|
19528
19528
|
super(), this.light = A, this.matrix = A.matrixWorld, this.matrixAutoUpdate = !1, this.color = g, this.type = "HemisphereLightHelper";
|
|
19529
19529
|
const i = new zt(I);
|
|
19530
|
-
i.rotateY(Math.PI * 0.5), this.material = new
|
|
19530
|
+
i.rotateY(Math.PI * 0.5), this.material = new og({ wireframe: !0, fog: !1, toneMapped: !1 }), this.color === void 0 && (this.material.vertexColors = !0);
|
|
19531
19531
|
const e = i.getAttribute("position"), C = new Float32Array(e.count * 3);
|
|
19532
19532
|
i.setAttribute("color", new EI(C, 3)), this.add(new MA(i, this.material)), this.update();
|
|
19533
19533
|
}
|
|
@@ -19703,7 +19703,7 @@ class hv extends mg {
|
|
|
19703
19703
|
const i = g, e = [1, -1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, 0], C = new hI();
|
|
19704
19704
|
C.setAttribute("position", new $A(e, 3)), C.computeBoundingSphere(), super(C, new qg({ color: i, toneMapped: !1 })), this.type = "PlaneHelper", this.plane = A, this.size = I;
|
|
19705
19705
|
const o = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0], B = new hI();
|
|
19706
|
-
B.setAttribute("position", new $A(o, 3)), B.computeBoundingSphere(), this.add(new MA(B, new
|
|
19706
|
+
B.setAttribute("position", new $A(o, 3)), B.computeBoundingSphere(), this.add(new MA(B, new og({ color: i, opacity: 0.2, transparent: !0, depthWrite: !1, toneMapped: !1 })));
|
|
19707
19707
|
}
|
|
19708
19708
|
updateMatrixWorld(A) {
|
|
19709
19709
|
this.position.set(0, 0, 0), this.scale.set(0.5 * this.size, 0.5 * this.size, 1), this.lookAt(this.plane.normal), this.translateZ(-this.plane.constant), super.updateMatrixWorld(A);
|
|
@@ -19717,7 +19717,7 @@ let oh, Zd;
|
|
|
19717
19717
|
class cv extends HA {
|
|
19718
19718
|
// dir is assumed to be normalized
|
|
19719
19719
|
constructor(A = new k(0, 0, 1), I = new k(0, 0, 0), g = 1, i = 16776960, e = g * 0.2, C = e * 0.2) {
|
|
19720
|
-
super(), this.type = "ArrowHelper", oh === void 0 && (oh = new hI(), oh.setAttribute("position", new $A([0, 0, 0, 0, 1, 0], 3)), Zd = new pg(0, 0.5, 1, 5, 1), Zd.translate(0, -0.5, 0)), this.position.copy(I), this.line = new mg(oh, new qg({ color: i, toneMapped: !1 })), this.line.matrixAutoUpdate = !1, this.add(this.line), this.cone = new MA(Zd, new
|
|
19720
|
+
super(), this.type = "ArrowHelper", oh === void 0 && (oh = new hI(), oh.setAttribute("position", new $A([0, 0, 0, 0, 1, 0], 3)), Zd = new pg(0, 0.5, 1, 5, 1), Zd.translate(0, -0.5, 0)), this.position.copy(I), this.line = new mg(oh, new qg({ color: i, toneMapped: !1 })), this.line.matrixAutoUpdate = !1, this.add(this.line), this.cone = new MA(Zd, new og({ color: i, toneMapped: !1 })), this.cone.matrixAutoUpdate = !1, this.add(this.cone), this.setDirection(A), this.setLength(g, e, C);
|
|
19721
19721
|
}
|
|
19722
19722
|
setDirection(A) {
|
|
19723
19723
|
if (A.y > 0.99999)
|
|
@@ -20264,7 +20264,7 @@ const Tv = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
20264
20264
|
Matrix4: XA,
|
|
20265
20265
|
MaxEquation: iu,
|
|
20266
20266
|
Mesh: MA,
|
|
20267
|
-
MeshBasicMaterial:
|
|
20267
|
+
MeshBasicMaterial: og,
|
|
20268
20268
|
MeshDepthMaterial: sy,
|
|
20269
20269
|
MeshDistanceMaterial: Qy,
|
|
20270
20270
|
MeshLambertMaterial: pR,
|
|
@@ -20309,7 +20309,7 @@ const Tv = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
20309
20309
|
PCFSoftShadowMap: xp,
|
|
20310
20310
|
PMREMGenerator: uu,
|
|
20311
20311
|
Path: IE,
|
|
20312
|
-
PerspectiveCamera:
|
|
20312
|
+
PerspectiveCamera: Cg,
|
|
20313
20313
|
Plane: $e,
|
|
20314
20314
|
PlaneBufferGeometry: HR,
|
|
20315
20315
|
PlaneGeometry: zi,
|
|
@@ -21582,7 +21582,7 @@ const lQ = class {
|
|
|
21582
21582
|
}
|
|
21583
21583
|
};
|
|
21584
21584
|
let Et = lQ;
|
|
21585
|
-
E(Et, "planeGeometry", new zi(2, 2, 1, 1)), E(Et, "renderer", new An({ antialias: !1 })), E(Et, "perspectiveCam", new
|
|
21585
|
+
E(Et, "planeGeometry", new zi(2, 2, 1, 1)), E(Et, "renderer", new An({ antialias: !1 })), E(Et, "perspectiveCam", new Cg()), E(Et, "scene", new jo()), E(Et, "vertex", `
|
|
21586
21586
|
varying vec2 vUv;
|
|
21587
21587
|
void main(){
|
|
21588
21588
|
vUv = uv;
|
|
@@ -22593,7 +22593,7 @@ function aI(t) {
|
|
|
22593
22593
|
function Hc() {
|
|
22594
22594
|
return Ac.byteLength === 0 && (Ac = new Float64Array(F.memory.buffer)), Ac;
|
|
22595
22595
|
}
|
|
22596
|
-
function
|
|
22596
|
+
function sg() {
|
|
22597
22597
|
return Ic.byteLength === 0 && (Ic = new Int32Array(F.memory.buffer)), Ic;
|
|
22598
22598
|
}
|
|
22599
22599
|
const rF = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 });
|
|
@@ -22607,11 +22607,11 @@ function W(t, A) {
|
|
|
22607
22607
|
return t.ptr;
|
|
22608
22608
|
}
|
|
22609
22609
|
rF.decode();
|
|
22610
|
-
let ic, ec,
|
|
22610
|
+
let ic, ec, Qg = 32;
|
|
22611
22611
|
function yg(t) {
|
|
22612
|
-
if (
|
|
22612
|
+
if (Qg == 1)
|
|
22613
22613
|
throw new Error("out of js stack");
|
|
22614
|
-
return _I[--
|
|
22614
|
+
return _I[--Qg] = t, Qg;
|
|
22615
22615
|
}
|
|
22616
22616
|
function Na() {
|
|
22617
22617
|
return ic.byteLength === 0 && (ic = new Float32Array(F.memory.buffer)), ic;
|
|
@@ -22722,7 +22722,7 @@ class Rg {
|
|
|
22722
22722
|
try {
|
|
22723
22723
|
const i = F.__wbindgen_add_to_stack_pointer(-16);
|
|
22724
22724
|
F.rawcolliderset_coRadius(i, this.ptr, A);
|
|
22725
|
-
var I =
|
|
22725
|
+
var I = sg()[i / 4 + 0], g = Na()[i / 4 + 1];
|
|
22726
22726
|
return I === 0 ? void 0 : g;
|
|
22727
22727
|
} finally {
|
|
22728
22728
|
F.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -22732,7 +22732,7 @@ class Rg {
|
|
|
22732
22732
|
try {
|
|
22733
22733
|
const i = F.__wbindgen_add_to_stack_pointer(-16);
|
|
22734
22734
|
F.rawcolliderset_coHalfHeight(i, this.ptr, A);
|
|
22735
|
-
var I =
|
|
22735
|
+
var I = sg()[i / 4 + 0], g = Na()[i / 4 + 1];
|
|
22736
22736
|
return I === 0 ? void 0 : g;
|
|
22737
22737
|
} finally {
|
|
22738
22738
|
F.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -22742,7 +22742,7 @@ class Rg {
|
|
|
22742
22742
|
try {
|
|
22743
22743
|
const i = F.__wbindgen_add_to_stack_pointer(-16);
|
|
22744
22744
|
F.rawcolliderset_coRoundRadius(i, this.ptr, A);
|
|
22745
|
-
var I =
|
|
22745
|
+
var I = sg()[i / 4 + 0], g = Na()[i / 4 + 1];
|
|
22746
22746
|
return I === 0 ? void 0 : g;
|
|
22747
22747
|
} finally {
|
|
22748
22748
|
F.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -22752,7 +22752,7 @@ class Rg {
|
|
|
22752
22752
|
try {
|
|
22753
22753
|
const i = F.__wbindgen_add_to_stack_pointer(-16);
|
|
22754
22754
|
F.rawcolliderset_coVertices(i, this.ptr, A);
|
|
22755
|
-
var I =
|
|
22755
|
+
var I = sg()[i / 4 + 0], g = sg()[i / 4 + 1];
|
|
22756
22756
|
let e;
|
|
22757
22757
|
return I !== 0 && (e = RG(I, g).slice(), F.__wbindgen_free(I, 4 * g)), e;
|
|
22758
22758
|
} finally {
|
|
@@ -22763,7 +22763,7 @@ class Rg {
|
|
|
22763
22763
|
try {
|
|
22764
22764
|
const i = F.__wbindgen_add_to_stack_pointer(-16);
|
|
22765
22765
|
F.rawcolliderset_coIndices(i, this.ptr, A);
|
|
22766
|
-
var I =
|
|
22766
|
+
var I = sg()[i / 4 + 0], g = sg()[i / 4 + 1];
|
|
22767
22767
|
let e;
|
|
22768
22768
|
return I !== 0 && (e = function(C, o) {
|
|
22769
22769
|
return cF().subarray(C / 4, C / 4 + o);
|
|
@@ -22776,7 +22776,7 @@ class Rg {
|
|
|
22776
22776
|
try {
|
|
22777
22777
|
const i = F.__wbindgen_add_to_stack_pointer(-16);
|
|
22778
22778
|
F.rawcolliderset_coHeightfieldHeights(i, this.ptr, A);
|
|
22779
|
-
var I =
|
|
22779
|
+
var I = sg()[i / 4 + 0], g = sg()[i / 4 + 1];
|
|
22780
22780
|
let e;
|
|
22781
22781
|
return I !== 0 && (e = RG(I, g).slice(), F.__wbindgen_free(I, 4 * g)), e;
|
|
22782
22782
|
} finally {
|
|
@@ -22791,7 +22791,7 @@ class Rg {
|
|
|
22791
22791
|
try {
|
|
22792
22792
|
const i = F.__wbindgen_add_to_stack_pointer(-16);
|
|
22793
22793
|
F.rawcolliderset_coHeightfieldNRows(i, this.ptr, A);
|
|
22794
|
-
var I =
|
|
22794
|
+
var I = sg()[i / 4 + 0], g = sg()[i / 4 + 1];
|
|
22795
22795
|
return I === 0 ? void 0 : g >>> 0;
|
|
22796
22796
|
} finally {
|
|
22797
22797
|
F.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -22801,7 +22801,7 @@ class Rg {
|
|
|
22801
22801
|
try {
|
|
22802
22802
|
const i = F.__wbindgen_add_to_stack_pointer(-16);
|
|
22803
22803
|
F.rawcolliderset_coHeightfieldNCols(i, this.ptr, A);
|
|
22804
|
-
var I =
|
|
22804
|
+
var I = sg()[i / 4 + 0], g = sg()[i / 4 + 1];
|
|
22805
22805
|
return I === 0 ? void 0 : g >>> 0;
|
|
22806
22806
|
} finally {
|
|
22807
22807
|
F.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -22811,7 +22811,7 @@ class Rg {
|
|
|
22811
22811
|
try {
|
|
22812
22812
|
const i = F.__wbindgen_add_to_stack_pointer(-16);
|
|
22813
22813
|
F.rawcolliderset_coParent(i, this.ptr, A);
|
|
22814
|
-
var I =
|
|
22814
|
+
var I = sg()[i / 4 + 0], g = Hc()[i / 8 + 1];
|
|
22815
22815
|
return I === 0 ? void 0 : g;
|
|
22816
22816
|
} finally {
|
|
22817
22817
|
F.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -22956,7 +22956,7 @@ class Rg {
|
|
|
22956
22956
|
try {
|
|
22957
22957
|
const M = F.__wbindgen_add_to_stack_pointer(-16);
|
|
22958
22958
|
W(A, lI), W(I, nA), W(g, qI), W(C, nA), W(o, nA), W(B, qI), W(f, Fg), F.rawcolliderset_createCollider(M, this.ptr, A.ptr, I.ptr, g.ptr, i, e, C.ptr, o.ptr, B.ptr, s, Q, a, n, r, h, c, l, w, p, D, d, u, y, f.ptr);
|
|
22959
|
-
var S =
|
|
22959
|
+
var S = sg()[M / 4 + 0], G = Hc()[M / 8 + 1];
|
|
22960
22960
|
return S === 0 ? void 0 : G;
|
|
22961
22961
|
} finally {
|
|
22962
22962
|
F.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -22972,7 +22972,7 @@ class Rg {
|
|
|
22972
22972
|
try {
|
|
22973
22973
|
F.rawcolliderset_forEachColliderHandle(this.ptr, yg(A));
|
|
22974
22974
|
} finally {
|
|
22975
|
-
_I[
|
|
22975
|
+
_I[Qg++] = void 0;
|
|
22976
22976
|
}
|
|
22977
22977
|
}
|
|
22978
22978
|
}
|
|
@@ -23215,14 +23215,14 @@ class sE {
|
|
|
23215
23215
|
try {
|
|
23216
23216
|
F.raweventqueue_drainCollisionEvents(this.ptr, yg(A));
|
|
23217
23217
|
} finally {
|
|
23218
|
-
_I[
|
|
23218
|
+
_I[Qg++] = void 0;
|
|
23219
23219
|
}
|
|
23220
23220
|
}
|
|
23221
23221
|
drainContactForceEvents(A) {
|
|
23222
23222
|
try {
|
|
23223
23223
|
F.raweventqueue_drainContactForceEvents(this.ptr, yg(A));
|
|
23224
23224
|
} finally {
|
|
23225
|
-
_I[
|
|
23225
|
+
_I[Qg++] = void 0;
|
|
23226
23226
|
}
|
|
23227
23227
|
}
|
|
23228
23228
|
clear() {
|
|
@@ -23357,14 +23357,14 @@ class QC {
|
|
|
23357
23357
|
try {
|
|
23358
23358
|
F.rawimpulsejointset_forEachJointHandle(this.ptr, yg(A));
|
|
23359
23359
|
} finally {
|
|
23360
|
-
_I[
|
|
23360
|
+
_I[Qg++] = void 0;
|
|
23361
23361
|
}
|
|
23362
23362
|
}
|
|
23363
23363
|
forEachJointAttachedToRigidBody(A, I) {
|
|
23364
23364
|
try {
|
|
23365
23365
|
F.rawimpulsejointset_forEachJointAttachedToRigidBody(this.ptr, A, yg(I));
|
|
23366
23366
|
} finally {
|
|
23367
|
-
_I[
|
|
23367
|
+
_I[Qg++] = void 0;
|
|
23368
23368
|
}
|
|
23369
23369
|
}
|
|
23370
23370
|
}
|
|
@@ -23461,7 +23461,7 @@ class Mt {
|
|
|
23461
23461
|
try {
|
|
23462
23462
|
F.rawislandmanager_forEachActiveRigidBodyHandle(this.ptr, yg(A));
|
|
23463
23463
|
} finally {
|
|
23464
|
-
_I[
|
|
23464
|
+
_I[Qg++] = void 0;
|
|
23465
23465
|
}
|
|
23466
23466
|
}
|
|
23467
23467
|
}
|
|
@@ -23529,14 +23529,14 @@ let Io = class {
|
|
|
23529
23529
|
try {
|
|
23530
23530
|
F.rawmultibodyjointset_forEachJointHandle(this.ptr, yg(A));
|
|
23531
23531
|
} finally {
|
|
23532
|
-
_I[
|
|
23532
|
+
_I[Qg++] = void 0;
|
|
23533
23533
|
}
|
|
23534
23534
|
}
|
|
23535
23535
|
forEachJointAttachedToRigidBody(A, I) {
|
|
23536
23536
|
try {
|
|
23537
23537
|
F.rawmultibodyjointset_forEachJointAttachedToRigidBody(this.ptr, A, yg(I));
|
|
23538
23538
|
} finally {
|
|
23539
|
-
_I[
|
|
23539
|
+
_I[Qg++] = void 0;
|
|
23540
23540
|
}
|
|
23541
23541
|
}
|
|
23542
23542
|
};
|
|
@@ -23625,7 +23625,7 @@ class Oc {
|
|
|
23625
23625
|
try {
|
|
23626
23626
|
const g = F.__wbindgen_add_to_stack_pointer(-16);
|
|
23627
23627
|
F.rawpointcolliderprojection_featureId(g, this.ptr);
|
|
23628
|
-
var A =
|
|
23628
|
+
var A = sg()[g / 4 + 0], I = sg()[g / 4 + 1];
|
|
23629
23629
|
return A === 0 ? void 0 : I >>> 0;
|
|
23630
23630
|
} finally {
|
|
23631
23631
|
F.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -23679,7 +23679,7 @@ class _c {
|
|
|
23679
23679
|
const n = F.rawquerypipeline_castRay(this.ptr, A.ptr, I.ptr, g.ptr, i.ptr, e, C, o, !aI(B), aI(B) ? 0 : B, !aI(s), aI(s) ? 0 : s, !aI(Q), aI(Q) ? 0 : Q, yg(a));
|
|
23680
23680
|
return n === 0 ? void 0 : Vy.__wrap(n);
|
|
23681
23681
|
} finally {
|
|
23682
|
-
_I[
|
|
23682
|
+
_I[Qg++] = void 0;
|
|
23683
23683
|
}
|
|
23684
23684
|
}
|
|
23685
23685
|
castRayAndGetNormal(A, I, g, i, e, C, o, B, s, Q, a) {
|
|
@@ -23688,24 +23688,24 @@ class _c {
|
|
|
23688
23688
|
const n = F.rawquerypipeline_castRayAndGetNormal(this.ptr, A.ptr, I.ptr, g.ptr, i.ptr, e, C, o, !aI(B), aI(B) ? 0 : B, !aI(s), aI(s) ? 0 : s, !aI(Q), aI(Q) ? 0 : Q, yg(a));
|
|
23689
23689
|
return n === 0 ? void 0 : tD.__wrap(n);
|
|
23690
23690
|
} finally {
|
|
23691
|
-
_I[
|
|
23691
|
+
_I[Qg++] = void 0;
|
|
23692
23692
|
}
|
|
23693
23693
|
}
|
|
23694
23694
|
intersectionsWithRay(A, I, g, i, e, C, o, B, s, Q, a, n) {
|
|
23695
23695
|
try {
|
|
23696
23696
|
W(A, Fg), W(I, Rg), W(g, nA), W(i, nA), F.rawquerypipeline_intersectionsWithRay(this.ptr, A.ptr, I.ptr, g.ptr, i.ptr, e, C, yg(o), B, !aI(s), aI(s) ? 0 : s, !aI(Q), aI(Q) ? 0 : Q, !aI(a), aI(a) ? 0 : a, yg(n));
|
|
23697
23697
|
} finally {
|
|
23698
|
-
_I[
|
|
23698
|
+
_I[Qg++] = void 0, _I[Qg++] = void 0;
|
|
23699
23699
|
}
|
|
23700
23700
|
}
|
|
23701
23701
|
intersectionWithShape(A, I, g, i, e, C, o, B, s, Q) {
|
|
23702
23702
|
try {
|
|
23703
23703
|
const r = F.__wbindgen_add_to_stack_pointer(-16);
|
|
23704
23704
|
W(A, Fg), W(I, Rg), W(g, nA), W(i, qI), W(e, lI), F.rawquerypipeline_intersectionWithShape(r, this.ptr, A.ptr, I.ptr, g.ptr, i.ptr, e.ptr, C, !aI(o), aI(o) ? 0 : o, !aI(B), aI(B) ? 0 : B, !aI(s), aI(s) ? 0 : s, yg(Q));
|
|
23705
|
-
var a =
|
|
23705
|
+
var a = sg()[r / 4 + 0], n = Hc()[r / 8 + 1];
|
|
23706
23706
|
return a === 0 ? void 0 : n;
|
|
23707
23707
|
} finally {
|
|
23708
|
-
F.__wbindgen_add_to_stack_pointer(16), _I[
|
|
23708
|
+
F.__wbindgen_add_to_stack_pointer(16), _I[Qg++] = void 0;
|
|
23709
23709
|
}
|
|
23710
23710
|
}
|
|
23711
23711
|
projectPoint(A, I, g, i, e, C, o, B, s) {
|
|
@@ -23714,7 +23714,7 @@ class _c {
|
|
|
23714
23714
|
const Q = F.rawquerypipeline_projectPoint(this.ptr, A.ptr, I.ptr, g.ptr, i, e, !aI(C), aI(C) ? 0 : C, !aI(o), aI(o) ? 0 : o, !aI(B), aI(B) ? 0 : B, yg(s));
|
|
23715
23715
|
return Q === 0 ? void 0 : Oc.__wrap(Q);
|
|
23716
23716
|
} finally {
|
|
23717
|
-
_I[
|
|
23717
|
+
_I[Qg++] = void 0;
|
|
23718
23718
|
}
|
|
23719
23719
|
}
|
|
23720
23720
|
projectPointAndGetFeature(A, I, g, i, e, C, o, B) {
|
|
@@ -23723,14 +23723,14 @@ class _c {
|
|
|
23723
23723
|
const s = F.rawquerypipeline_projectPointAndGetFeature(this.ptr, A.ptr, I.ptr, g.ptr, i, !aI(e), aI(e) ? 0 : e, !aI(C), aI(C) ? 0 : C, !aI(o), aI(o) ? 0 : o, yg(B));
|
|
23724
23724
|
return s === 0 ? void 0 : Oc.__wrap(s);
|
|
23725
23725
|
} finally {
|
|
23726
|
-
_I[
|
|
23726
|
+
_I[Qg++] = void 0;
|
|
23727
23727
|
}
|
|
23728
23728
|
}
|
|
23729
23729
|
intersectionsWithPoint(A, I, g, i, e, C, o, B, s) {
|
|
23730
23730
|
try {
|
|
23731
23731
|
W(A, Fg), W(I, Rg), W(g, nA), F.rawquerypipeline_intersectionsWithPoint(this.ptr, A.ptr, I.ptr, g.ptr, yg(i), e, !aI(C), aI(C) ? 0 : C, !aI(o), aI(o) ? 0 : o, !aI(B), aI(B) ? 0 : B, yg(s));
|
|
23732
23732
|
} finally {
|
|
23733
|
-
_I[
|
|
23733
|
+
_I[Qg++] = void 0, _I[Qg++] = void 0;
|
|
23734
23734
|
}
|
|
23735
23735
|
}
|
|
23736
23736
|
castShape(A, I, g, i, e, C, o, B, s, Q, a, n) {
|
|
@@ -23739,21 +23739,21 @@ class _c {
|
|
|
23739
23739
|
const r = F.rawquerypipeline_castShape(this.ptr, A.ptr, I.ptr, g.ptr, i.ptr, e.ptr, C.ptr, o, B, !aI(s), aI(s) ? 0 : s, !aI(Q), aI(Q) ? 0 : Q, !aI(a), aI(a) ? 0 : a, yg(n));
|
|
23740
23740
|
return r === 0 ? void 0 : oD.__wrap(r);
|
|
23741
23741
|
} finally {
|
|
23742
|
-
_I[
|
|
23742
|
+
_I[Qg++] = void 0;
|
|
23743
23743
|
}
|
|
23744
23744
|
}
|
|
23745
23745
|
intersectionsWithShape(A, I, g, i, e, C, o, B, s, Q, a) {
|
|
23746
23746
|
try {
|
|
23747
23747
|
W(A, Fg), W(I, Rg), W(g, nA), W(i, qI), W(e, lI), F.rawquerypipeline_intersectionsWithShape(this.ptr, A.ptr, I.ptr, g.ptr, i.ptr, e.ptr, yg(C), o, !aI(B), aI(B) ? 0 : B, !aI(s), aI(s) ? 0 : s, !aI(Q), aI(Q) ? 0 : Q, yg(a));
|
|
23748
23748
|
} finally {
|
|
23749
|
-
_I[
|
|
23749
|
+
_I[Qg++] = void 0, _I[Qg++] = void 0;
|
|
23750
23750
|
}
|
|
23751
23751
|
}
|
|
23752
23752
|
collidersWithAabbIntersectingAabb(A, I, g) {
|
|
23753
23753
|
try {
|
|
23754
23754
|
W(A, nA), W(I, nA), F.rawquerypipeline_collidersWithAabbIntersectingAabb(this.ptr, A.ptr, I.ptr, yg(g));
|
|
23755
23755
|
} finally {
|
|
23756
|
-
_I[
|
|
23756
|
+
_I[Qg++] = void 0;
|
|
23757
23757
|
}
|
|
23758
23758
|
}
|
|
23759
23759
|
}
|
|
@@ -23787,7 +23787,7 @@ class tD {
|
|
|
23787
23787
|
try {
|
|
23788
23788
|
const g = F.__wbindgen_add_to_stack_pointer(-16);
|
|
23789
23789
|
F.rawpointcolliderprojection_featureId(g, this.ptr);
|
|
23790
|
-
var A =
|
|
23790
|
+
var A = sg()[g / 4 + 0], I = sg()[g / 4 + 1];
|
|
23791
23791
|
return A === 0 ? void 0 : I >>> 0;
|
|
23792
23792
|
} finally {
|
|
23793
23793
|
F.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -23841,7 +23841,7 @@ class CD {
|
|
|
23841
23841
|
try {
|
|
23842
23842
|
const g = F.__wbindgen_add_to_stack_pointer(-16);
|
|
23843
23843
|
F.rawrayintersection_featureId(g, this.ptr);
|
|
23844
|
-
var A =
|
|
23844
|
+
var A = sg()[g / 4 + 0], I = sg()[g / 4 + 1];
|
|
23845
23845
|
return A === 0 ? void 0 : I >>> 0;
|
|
23846
23846
|
} finally {
|
|
23847
23847
|
F.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -24040,7 +24040,7 @@ class Fg {
|
|
|
24040
24040
|
try {
|
|
24041
24041
|
F.rawrigidbodyset_forEachRigidBodyHandle(this.ptr, yg(A));
|
|
24042
24042
|
} finally {
|
|
24043
|
-
_I[
|
|
24043
|
+
_I[Qg++] = void 0;
|
|
24044
24044
|
}
|
|
24045
24045
|
}
|
|
24046
24046
|
}
|
|
@@ -24402,7 +24402,7 @@ async function dF(t) {
|
|
|
24402
24402
|
return vg(e);
|
|
24403
24403
|
}, i.wbg.__wbindgen_number_get = function(e, C) {
|
|
24404
24404
|
const o = PI(C), B = typeof o == "number" ? o : void 0;
|
|
24405
|
-
Hc()[e / 8 + 1] = aI(B) ? 0 : B,
|
|
24405
|
+
Hc()[e / 8 + 1] = aI(B) ? 0 : B, sg()[e / 4 + 0] = !aI(B);
|
|
24406
24406
|
}, i.wbg.__wbindgen_boolean_get = function(e) {
|
|
24407
24407
|
const C = PI(e);
|
|
24408
24408
|
return typeof C == "boolean" ? C ? 1 : 0 : 2;
|
|
@@ -25845,81 +25845,81 @@ class Xc {
|
|
|
25845
25845
|
(function(t) {
|
|
25846
25846
|
t[t.Density = 0] = "Density", t[t.Mass = 1] = "Mass", t[t.MassProps = 2] = "MassProps";
|
|
25847
25847
|
})(OB || (OB = {}));
|
|
25848
|
-
class
|
|
25848
|
+
class Bg {
|
|
25849
25849
|
constructor(A) {
|
|
25850
25850
|
this.shape = A, this.massPropsMode = OB.Density, this.density = 1, this.friction = 0.5, this.restitution = 0, this.rotation = FI.identity(), this.translation = CA.zeros(), this.isSensor = !1, this.collisionGroups = 4294967295, this.solverGroups = 4294967295, this.frictionCombineRule = we.Average, this.restitutionCombineRule = we.Average, this.activeCollisionTypes = Wc.DEFAULT, this.activeEvents = 0, this.activeHooks = 0, this.mass = 0, this.centerOfMass = CA.zeros(), this.contactForceEventThreshold = 0, this.principalAngularInertia = CA.zeros(), this.angularInertiaLocalFrame = FI.identity();
|
|
25851
25851
|
}
|
|
25852
25852
|
static ball(A) {
|
|
25853
25853
|
const I = new $y(A);
|
|
25854
|
-
return new
|
|
25854
|
+
return new Bg(I);
|
|
25855
25855
|
}
|
|
25856
25856
|
static capsule(A, I) {
|
|
25857
25857
|
const g = new gS(A, I);
|
|
25858
|
-
return new
|
|
25858
|
+
return new Bg(g);
|
|
25859
25859
|
}
|
|
25860
25860
|
static segment(A, I) {
|
|
25861
25861
|
const g = new iS(A, I);
|
|
25862
|
-
return new
|
|
25862
|
+
return new Bg(g);
|
|
25863
25863
|
}
|
|
25864
25864
|
static triangle(A, I, g) {
|
|
25865
25865
|
const i = new eS(A, I, g);
|
|
25866
|
-
return new
|
|
25866
|
+
return new Bg(i);
|
|
25867
25867
|
}
|
|
25868
25868
|
static roundTriangle(A, I, g, i) {
|
|
25869
25869
|
const e = new tS(A, I, g, i);
|
|
25870
|
-
return new
|
|
25870
|
+
return new Bg(e);
|
|
25871
25871
|
}
|
|
25872
25872
|
static polyline(A, I) {
|
|
25873
25873
|
const g = new CS(A, I);
|
|
25874
|
-
return new
|
|
25874
|
+
return new Bg(g);
|
|
25875
25875
|
}
|
|
25876
25876
|
static trimesh(A, I) {
|
|
25877
25877
|
const g = new oS(A, I);
|
|
25878
|
-
return new
|
|
25878
|
+
return new Bg(g);
|
|
25879
25879
|
}
|
|
25880
25880
|
static cuboid(A, I, g) {
|
|
25881
25881
|
const i = new AS(A, I, g);
|
|
25882
|
-
return new
|
|
25882
|
+
return new Bg(i);
|
|
25883
25883
|
}
|
|
25884
25884
|
static roundCuboid(A, I, g, i) {
|
|
25885
25885
|
const e = new IS(A, I, g, i);
|
|
25886
|
-
return new
|
|
25886
|
+
return new Bg(e);
|
|
25887
25887
|
}
|
|
25888
25888
|
static heightfield(A, I, g, i) {
|
|
25889
25889
|
const e = new BS(A, I, g, i);
|
|
25890
|
-
return new
|
|
25890
|
+
return new Bg(e);
|
|
25891
25891
|
}
|
|
25892
25892
|
static cylinder(A, I) {
|
|
25893
25893
|
const g = new sS(A, I);
|
|
25894
|
-
return new
|
|
25894
|
+
return new Bg(g);
|
|
25895
25895
|
}
|
|
25896
25896
|
static roundCylinder(A, I, g) {
|
|
25897
25897
|
const i = new QS(A, I, g);
|
|
25898
|
-
return new
|
|
25898
|
+
return new Bg(i);
|
|
25899
25899
|
}
|
|
25900
25900
|
static cone(A, I) {
|
|
25901
25901
|
const g = new nS(A, I);
|
|
25902
|
-
return new
|
|
25902
|
+
return new Bg(g);
|
|
25903
25903
|
}
|
|
25904
25904
|
static roundCone(A, I, g) {
|
|
25905
25905
|
const i = new aS(A, I, g);
|
|
25906
|
-
return new
|
|
25906
|
+
return new Bg(i);
|
|
25907
25907
|
}
|
|
25908
25908
|
static convexHull(A) {
|
|
25909
25909
|
const I = new Vc(A, null);
|
|
25910
|
-
return new
|
|
25910
|
+
return new Bg(I);
|
|
25911
25911
|
}
|
|
25912
25912
|
static convexMesh(A, I) {
|
|
25913
25913
|
const g = new Vc(A, I);
|
|
25914
|
-
return new
|
|
25914
|
+
return new Bg(g);
|
|
25915
25915
|
}
|
|
25916
25916
|
static roundConvexHull(A, I) {
|
|
25917
25917
|
const g = new zc(A, null, I);
|
|
25918
|
-
return new
|
|
25918
|
+
return new Bg(g);
|
|
25919
25919
|
}
|
|
25920
25920
|
static roundConvexMesh(A, I, g) {
|
|
25921
25921
|
const i = new zc(A, I, g);
|
|
25922
|
-
return new
|
|
25922
|
+
return new Bg(i);
|
|
25923
25923
|
}
|
|
25924
25924
|
setTranslation(A, I, g) {
|
|
25925
25925
|
if (typeof A != "number" || typeof I != "number" || typeof g != "number")
|
|
@@ -26380,7 +26380,7 @@ function c2() {
|
|
|
26380
26380
|
try {
|
|
26381
26381
|
const I = F.__wbindgen_add_to_stack_pointer(-16);
|
|
26382
26382
|
F.version(I);
|
|
26383
|
-
var t =
|
|
26383
|
+
var t = sg()[I / 4 + 0], A = sg()[I / 4 + 1];
|
|
26384
26384
|
return hF(t, A);
|
|
26385
26385
|
} finally {
|
|
26386
26386
|
F.__wbindgen_add_to_stack_pointer(16), F.__wbindgen_free(t, A);
|
|
@@ -26402,7 +26402,7 @@ var MC = Object.freeze({ __proto__: null, version: c2, Vector3: wF, VectorOps: C
|
|
|
26402
26402
|
return Wc;
|
|
26403
26403
|
}, Collider: Xc, get MassPropsMode() {
|
|
26404
26404
|
return OB;
|
|
26405
|
-
}, ColliderDesc:
|
|
26405
|
+
}, ColliderDesc: Bg, ColliderSet: YF, get FeatureType() {
|
|
26406
26406
|
return vQ;
|
|
26407
26407
|
}, Ray: s2, RayIntersection: VE, RayColliderIntersection: aE, RayColliderToi: QD, PointProjection: jE, PointColliderProjection: nE, ShapeTOI: sn, ShapeColliderTOI: zE, ShapeContact: TQ, World: XE, PhysicsPipeline: bF, SerializationPipeline: Wu, get ActiveEvents() {
|
|
26408
26408
|
return Zc;
|
|
@@ -26681,17 +26681,17 @@ const LB = class {
|
|
|
26681
26681
|
addBoxCollider(A, I, g) {
|
|
26682
26682
|
const i = A.gameObject, e = fe(i, this._tempPosition).multiply(g);
|
|
26683
26683
|
e.multiplyScalar(0.5);
|
|
26684
|
-
const C =
|
|
26684
|
+
const C = Bg.cuboid(e.x, e.y, e.z);
|
|
26685
26685
|
this.createCollider(A, C, I);
|
|
26686
26686
|
}
|
|
26687
26687
|
addSphereCollider(A, I, g) {
|
|
26688
|
-
const i = A.gameObject, e = fe(i, this._tempPosition).multiplyScalar(g), C =
|
|
26688
|
+
const i = A.gameObject, e = fe(i, this._tempPosition).multiplyScalar(g), C = Bg.ball(e.x);
|
|
26689
26689
|
this.createCollider(A, C, I);
|
|
26690
26690
|
}
|
|
26691
26691
|
addCapsuleCollider(A, I, g, i) {
|
|
26692
26692
|
const e = A.gameObject, C = fe(e, this._tempPosition);
|
|
26693
26693
|
Ps && console.log("capsule scale", C, g, i);
|
|
26694
|
-
const o =
|
|
26694
|
+
const o = Bg.capsule(g * 0.5 * C.y - i, i * C.x);
|
|
26695
26695
|
this.createCollider(A, o, I);
|
|
26696
26696
|
}
|
|
26697
26697
|
addMeshCollider(A, I, g, i) {
|
|
@@ -26715,7 +26715,7 @@ const LB = class {
|
|
|
26715
26715
|
C = a, this._meshCache.set(Q, a);
|
|
26716
26716
|
}
|
|
26717
26717
|
}
|
|
26718
|
-
const B = g ?
|
|
26718
|
+
const B = g ? Bg.convexMesh(C) : Bg.trimesh(C, o);
|
|
26719
26719
|
B && this.createCollider(A, B).setMassProperties(1, { x: 0, y: 0, z: 0 }, { x: 0, y: 0, z: 0 }, { x: 0, y: 0, z: 0, w: 1 });
|
|
26720
26720
|
}
|
|
26721
26721
|
createCollider(A, I, g) {
|
|
@@ -35598,7 +35598,7 @@ let UO = class {
|
|
|
35598
35598
|
this.name = RI.KHR_MATERIALS_UNLIT;
|
|
35599
35599
|
}
|
|
35600
35600
|
getMaterialType() {
|
|
35601
|
-
return
|
|
35601
|
+
return og;
|
|
35602
35602
|
}
|
|
35603
35603
|
extendParams(A, I, g) {
|
|
35604
35604
|
const i = [];
|
|
@@ -36799,11 +36799,11 @@ class A_ {
|
|
|
36799
36799
|
}
|
|
36800
36800
|
e.doubleSided === !0 && (o.side = Tg);
|
|
36801
36801
|
const Q = e.alphaMode || nw.OPAQUE;
|
|
36802
|
-
if (Q === nw.BLEND ? (o.transparent = !0, o.depthWrite = !1) : (o.transparent = !1, Q === nw.MASK && (o.alphaTest = e.alphaCutoff !== void 0 ? e.alphaCutoff : 0.5)), e.normalTexture !== void 0 && C !==
|
|
36802
|
+
if (Q === nw.BLEND ? (o.transparent = !0, o.depthWrite = !1) : (o.transparent = !1, Q === nw.MASK && (o.alphaTest = e.alphaCutoff !== void 0 ? e.alphaCutoff : 0.5)), e.normalTexture !== void 0 && C !== og && (s.push(I.assignTexture(o, "normalMap", e.normalTexture)), o.normalScale = new QA(1, 1), e.normalTexture.scale !== void 0)) {
|
|
36803
36803
|
const a = e.normalTexture.scale;
|
|
36804
36804
|
o.normalScale.set(a, a);
|
|
36805
36805
|
}
|
|
36806
|
-
return e.occlusionTexture !== void 0 && C !==
|
|
36806
|
+
return e.occlusionTexture !== void 0 && C !== og && (s.push(I.assignTexture(o, "aoMap", e.occlusionTexture)), e.occlusionTexture.strength !== void 0 && (o.aoMapIntensity = e.occlusionTexture.strength)), e.emissiveFactor !== void 0 && C !== og && (o.emissive = new T().fromArray(e.emissiveFactor)), e.emissiveTexture !== void 0 && C !== og && s.push(I.assignTexture(o, "emissiveMap", e.emissiveTexture, DI)), Promise.all(s).then(function() {
|
|
36807
36807
|
const a = new C(o);
|
|
36808
36808
|
return e.name && (a.name = e.name), mo(a, e), I.associations.set(a, { materials: A }), e.extensions && Xn(i, a, e), a;
|
|
36809
36809
|
});
|
|
@@ -36900,7 +36900,7 @@ class A_ {
|
|
|
36900
36900
|
console.warn("THREE.GLTFLoader: Missing camera parameters.");
|
|
36901
36901
|
return;
|
|
36902
36902
|
}
|
|
36903
|
-
return g.type === "perspective" ? I = new
|
|
36903
|
+
return g.type === "perspective" ? I = new Cg(ae.radToDeg(i.yfov), i.aspectRatio || 1, i.znear || 1, i.zfar || 2e6) : g.type === "orthographic" && (I = new iB(-i.xmag, i.xmag, i.ymag, -i.ymag, i.znear, i.zfar)), g.name && (I.name = this.createUniqueName(g.name)), mo(I, g), Promise.resolve(I);
|
|
36904
36904
|
}
|
|
36905
36905
|
/**
|
|
36906
36906
|
* Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins
|
|
@@ -37906,7 +37906,7 @@ class r_ {
|
|
|
37906
37906
|
this.objectToWorldMatrix.copy(A.matrixWorld), Al(this.objectToWorldMatrix, this.objectToWorld), this.worldToObjectMatrix.copy(A.matrixWorld).invert(), Al(this.worldToObjectMatrix, this.worldToObject);
|
|
37907
37907
|
}
|
|
37908
37908
|
}
|
|
37909
|
-
const
|
|
37909
|
+
const ag = class extends Gy {
|
|
37910
37910
|
constructor(I, ...g) {
|
|
37911
37911
|
super(...g);
|
|
37912
37912
|
E(this, "identifier");
|
|
@@ -37961,15 +37961,15 @@ const ng = class extends Gy {
|
|
|
37961
37961
|
}
|
|
37962
37962
|
onUpdateUniforms(I, g) {
|
|
37963
37963
|
const i = NI.Current;
|
|
37964
|
-
I && (
|
|
37964
|
+
I && (ag.viewProjection && this.uniforms[this._viewProjectionName] && (ag.viewProjection.copy(I.projectionMatrix).multiply(I.matrixWorldInverse), Al(ag.viewProjection, ag._viewProjectionValues)), ag.viewMatrix && this.uniforms[this._viewMatrixName] && (ag.viewMatrix.copy(I.matrixWorldInverse), Al(ag.viewMatrix, ag._viewMatrixValues)), this.uniforms[ag._worldSpaceCameraPosName] && ag._worldSpaceCameraPos.setFromMatrixPosition(I.matrixWorld)), this.uniforms._TimeParameters ? this.uniforms._TimeParameters.value = i.rendererData.timeVec4 : this.uniforms._Time && (this.uniforms._Time.value = i.rendererData.timeVec4);
|
|
37965
37965
|
const e = i.mainLight;
|
|
37966
37966
|
if (e) {
|
|
37967
|
-
const B = yI(e.gameObject,
|
|
37968
|
-
this.uniforms._MainLightPosition = { value: B.normalize() },
|
|
37967
|
+
const B = yI(e.gameObject, ag._mainLightPosition);
|
|
37968
|
+
this.uniforms._MainLightPosition = { value: B.normalize() }, ag._mainLightColor.set(e.color.r, e.color.g, e.color.b, 0), this.uniforms._MainLightColor = { value: ag._mainLightColor };
|
|
37969
37969
|
const s = e.intensity;
|
|
37970
|
-
|
|
37970
|
+
ag._lightData.z = s, this.uniforms.unity_LightData = { value: ag._lightData };
|
|
37971
37971
|
}
|
|
37972
|
-
if (I && (
|
|
37972
|
+
if (I && (ag.viewProjection && this.uniforms[this._viewProjectionName] && (this.uniforms[this._viewProjectionName].value = ag._viewProjectionValues), ag.viewMatrix && this.uniforms[this._viewMatrixName] && (this.uniforms[this._viewMatrixName].value = ag._viewMatrixValues), this.uniforms[ag._worldSpaceCameraPosName] && (this.uniforms[ag._worldSpaceCameraPosName] = { value: ag._worldSpaceCameraPos }), i.mainCameraComponent)) {
|
|
37973
37973
|
if (this.uniforms._ProjectionParams) {
|
|
37974
37974
|
const B = this.uniforms._ProjectionParams.value;
|
|
37975
37975
|
B.x = 1, B.y = i.mainCameraComponent.nearClipPlane, B.z = i.mainCameraComponent.farClipPlane, B.w = 1 / B.z, this.uniforms._ProjectionParams.value = B;
|
|
@@ -37993,7 +37993,7 @@ const ng = class extends Gy {
|
|
|
37993
37993
|
this.uniformsNeedUpdate = !0;
|
|
37994
37994
|
}
|
|
37995
37995
|
};
|
|
37996
|
-
let We =
|
|
37996
|
+
let We = ag;
|
|
37997
37997
|
E(We, "viewProjection", new XA()), E(We, "_viewProjectionValues", []), E(We, "viewMatrix", new XA()), E(We, "_viewMatrixValues", []), E(We, "_worldSpaceCameraPosName", "_WorldSpaceCameraPos"), E(We, "_worldSpaceCameraPos", new k()), E(We, "_mainLightColor", new sI()), E(We, "_mainLightPosition", new k()), E(We, "_lightData", new sI());
|
|
37998
37998
|
class h_ {
|
|
37999
37999
|
constructor(A, I) {
|
|
@@ -38424,9 +38424,9 @@ var d_ = function(t, A, I, g, i) {
|
|
|
38424
38424
|
}, GN = fN(an, 2), yS = GN[0], gl = GN[1];
|
|
38425
38425
|
yS[28] = 258, gl[258] = 28;
|
|
38426
38426
|
var kN = fN(En, 0), MN = kN[0], op = kN[1], cE = new si(32768);
|
|
38427
|
-
for (var
|
|
38428
|
-
var ko = (
|
|
38429
|
-
ko = (ko & 52428) >>> 2 | (ko & 13107) << 2, ko = (ko & 61680) >>> 4 | (ko & 3855) << 4, cE[
|
|
38427
|
+
for (var ng = 0; ng < 32768; ++ng) {
|
|
38428
|
+
var ko = (ng & 43690) >>> 1 | (ng & 21845) << 1;
|
|
38429
|
+
ko = (ko & 52428) >>> 2 | (ko & 13107) << 2, ko = (ko & 61680) >>> 4 | (ko & 3855) << 4, cE[ng] = ((ko & 65280) >>> 8 | (ko & 255) << 8) >>> 1;
|
|
38430
38430
|
}
|
|
38431
38431
|
var gt = function(t, A, I) {
|
|
38432
38432
|
for (var g = t.length, i = 0, e = new si(A); i < g; ++i)
|
|
@@ -38447,17 +38447,17 @@ var gt = function(t, A, I) {
|
|
|
38447
38447
|
t[i] && (o[i] = cE[C[t[i] - 1]++] >>> 15 - t[i]);
|
|
38448
38448
|
return o;
|
|
38449
38449
|
}, eo = new bI(288);
|
|
38450
|
-
for (var
|
|
38451
|
-
eo[
|
|
38452
|
-
for (var
|
|
38453
|
-
eo[
|
|
38454
|
-
for (var
|
|
38455
|
-
eo[
|
|
38456
|
-
for (var
|
|
38457
|
-
eo[
|
|
38450
|
+
for (var ng = 0; ng < 144; ++ng)
|
|
38451
|
+
eo[ng] = 8;
|
|
38452
|
+
for (var ng = 144; ng < 256; ++ng)
|
|
38453
|
+
eo[ng] = 9;
|
|
38454
|
+
for (var ng = 256; ng < 280; ++ng)
|
|
38455
|
+
eo[ng] = 7;
|
|
38456
|
+
for (var ng = 280; ng < 288; ++ng)
|
|
38457
|
+
eo[ng] = 8;
|
|
38458
38458
|
var PQ = new bI(32);
|
|
38459
|
-
for (var
|
|
38460
|
-
PQ[
|
|
38459
|
+
for (var ng = 0; ng < 32; ++ng)
|
|
38460
|
+
PQ[ng] = 5;
|
|
38461
38461
|
var UN = /* @__PURE__ */ gt(eo, 9, 0), RN = /* @__PURE__ */ gt(eo, 9, 1), FN = /* @__PURE__ */ gt(PQ, 5, 0), NN = /* @__PURE__ */ gt(PQ, 5, 1), tc = function(t) {
|
|
38462
38462
|
for (var A = t[0], I = 1; I < t.length; ++I)
|
|
38463
38463
|
t[I] > A && (A = t[I]);
|
|
@@ -41368,7 +41368,7 @@ function iP(t) {
|
|
|
41368
41368
|
}`
|
|
41369
41369
|
}), g = new MA(A, I);
|
|
41370
41370
|
g.frustumCulled = !1;
|
|
41371
|
-
const i = new
|
|
41371
|
+
const i = new Cg(), e = new jo();
|
|
41372
41372
|
e.add(g);
|
|
41373
41373
|
const C = new An({ antialias: !1 });
|
|
41374
41374
|
return C.setSize(t.image.width, t.image.height), C.clear(), C.render(e, i), new ZI(C.domElement);
|
|
@@ -43015,9 +43015,9 @@ class bP extends HA {
|
|
|
43015
43015
|
$I * (Pe + 1) - 1,
|
|
43016
43016
|
$I * Pe
|
|
43017
43017
|
);
|
|
43018
|
-
const o = new
|
|
43018
|
+
const o = new og();
|
|
43019
43019
|
o.transparent = !0, o.opacity = Vs, this.pointerGeometry.setIndex(i), this.pointerMesh = new MA(this.pointerGeometry, o), this.pointerMesh.position.set(0, 0, -1 * Aa), this.pointerObject = new HA(), this.pointerObject.add(this.pointerMesh), this.raycaster = new Cn();
|
|
43020
|
-
const B = new Ct(LP, 10, 10), s = new
|
|
43020
|
+
const B = new Ct(LP, 10, 10), s = new og();
|
|
43021
43021
|
s.transparent = !0, s.opacity = Vs, this.cursorObject = new MA(B, s), this.pointerObject.add(this.cursorObject), this.add(this.pointerObject), this.pointerObject.layers.mask = this.layers.mask, this.pointerMesh.layers.mask = this.layers.mask;
|
|
43022
43022
|
}
|
|
43023
43023
|
_updateRaycaster() {
|
|
@@ -43328,7 +43328,7 @@ function VP(t, A) {
|
|
|
43328
43328
|
const { type: g, touchPointNodeName: i, visualResponses: e } = I;
|
|
43329
43329
|
if (g === Sg.ComponentType.TOUCHPAD)
|
|
43330
43330
|
if (I.touchPointNode = A.getObjectByName(i), I.touchPointNode) {
|
|
43331
|
-
const C = new Ct(1e-3), o = new
|
|
43331
|
+
const C = new Ct(1e-3), o = new og({ color: 255 }), B = new MA(C, o);
|
|
43332
43332
|
I.touchPointNode.add(B);
|
|
43333
43333
|
} else
|
|
43334
43334
|
console.warn(`Could not find touch dot, ${I.touchPointNodeName}, in touchpad component ${I.id}`);
|
|
@@ -47079,7 +47079,7 @@ const Ci = class extends vA {
|
|
|
47079
47079
|
return g.color = this.raycastColor, I.layers.set(2), I.name = "line", I.scale.z = 1, I;
|
|
47080
47080
|
}
|
|
47081
47081
|
static CreateRaycastHitPoint() {
|
|
47082
|
-
const I = new Ct(0.5, 22, 22), g = new
|
|
47082
|
+
const I = new Ct(0.5, 22, 22), g = new og({ color: this.raycastColor }), i = new MA(I, g);
|
|
47083
47083
|
return i.visible = !1, i.layers.set(2), i;
|
|
47084
47084
|
}
|
|
47085
47085
|
static Create(I, g, i, e) {
|
|
@@ -48236,7 +48236,7 @@ const dQ = class {
|
|
|
48236
48236
|
});
|
|
48237
48237
|
}), !this.reticle && this.sessionRoot && (this.reticle = new MA(
|
|
48238
48238
|
new en(0.07, 0.09, 32).rotateX(-Math.PI / 2),
|
|
48239
|
-
new
|
|
48239
|
+
new og()
|
|
48240
48240
|
), this.reticle.name = "AR Placement reticle", this.reticle.matrixAutoUpdate = !1, this.reticle.visible = !1, this.reticleParent = new HA(), this.reticleParent.name = "AR Reticle Parent", this.reticleParent.matrixAutoUpdate = !1, this.reticleParent.add(this.reticle), this.webxr.scene ? (this.context.scene.add(this.reticleParent), this.context.scene.visible = !0) : console.warn("Could not found WebXR Rig")), this._previousParent = this.webxr.gameObject, dQ.tempWebXRObject || (dQ.tempWebXRObject = new HA()), this.context.scene.add(dQ.tempWebXRObject), sA.addComponent(dQ.tempWebXRObject, this.webxr), this.sessionRoot ? (this.sessionRoot.webAR = this, (o = this.sessionRoot) == null || o.onBegin(A)) : console.warn("No WebARSessionRoot found in scene");
|
|
48241
48241
|
const e = this.context.domElement;
|
|
48242
48242
|
(B = e == null ? void 0 : e.onEnterAR) == null || B.call(e, A, this.arOverlayElement), (s = this.context.mainCameraComponent) == null || s.applyClearFlagsIfIsActiveCamera();
|
|
@@ -48804,7 +48804,7 @@ const up = (xh = class extends vA {
|
|
|
48804
48804
|
E(this, "_backgroundBlurriness");
|
|
48805
48805
|
E(this, "_backgroundIntensity");
|
|
48806
48806
|
E(this, "_backgroundColor");
|
|
48807
|
-
E(this, "_fov"
|
|
48807
|
+
E(this, "_fov");
|
|
48808
48808
|
E(this, "_cam", null);
|
|
48809
48809
|
E(this, "_clearFlags", 2);
|
|
48810
48810
|
E(this, "_skybox");
|
|
@@ -48813,14 +48813,20 @@ const up = (xh = class extends vA {
|
|
|
48813
48813
|
return !0;
|
|
48814
48814
|
}
|
|
48815
48815
|
get aspect() {
|
|
48816
|
-
return this._cam instanceof
|
|
48816
|
+
return this._cam instanceof Cg ? this._cam.aspect : this.context.domWidth / this.context.domHeight;
|
|
48817
48817
|
}
|
|
48818
48818
|
get fieldOfView() {
|
|
48819
|
-
return this._fov;
|
|
48819
|
+
return this._cam instanceof Cg ? this._cam.fov : this._fov;
|
|
48820
48820
|
}
|
|
48821
48821
|
set fieldOfView(A) {
|
|
48822
48822
|
const I = this._fov != A;
|
|
48823
|
-
this._fov = A, I && this._cam && this._cam instanceof
|
|
48823
|
+
if (this._fov = A, I && this._cam && this._cam instanceof Cg) {
|
|
48824
|
+
if (this._fov === void 0) {
|
|
48825
|
+
console.error("Can not set undefined fov on PerspectiveCamera");
|
|
48826
|
+
return;
|
|
48827
|
+
}
|
|
48828
|
+
this._cam.fov = this._fov, this._cam.updateProjectionMatrix();
|
|
48829
|
+
}
|
|
48824
48830
|
}
|
|
48825
48831
|
get nearClipPlane() {
|
|
48826
48832
|
return this._nearClipPlane;
|
|
@@ -48904,10 +48910,10 @@ const up = (xh = class extends vA {
|
|
|
48904
48910
|
return;
|
|
48905
48911
|
const A = this.gameObject.isCamera;
|
|
48906
48912
|
let I = null;
|
|
48907
|
-
if (A ? (I = this.gameObject, I == null || I.layers.enableAll()) : I = this.gameObject.children[0], I && I.isCamera)
|
|
48908
|
-
I.type === "PerspectiveCamera" && (I.fov = this._fov, I.near = this._nearClipPlane, I.far = this._farClipPlane, I.updateProjectionMatrix());
|
|
48913
|
+
if (A ? (I = this.gameObject, I == null || I.layers.enableAll(), I instanceof Cg && (this._fov = I.fov)) : I = this.gameObject.children[0], I && I.isCamera)
|
|
48914
|
+
I.type === "PerspectiveCamera" && (this._fov && (I.fov = this._fov), I.near = this._nearClipPlane, I.far = this._farClipPlane, I.updateProjectionMatrix());
|
|
48909
48915
|
else if (!this.orthographic)
|
|
48910
|
-
I = new
|
|
48916
|
+
I = new Cg(this.fieldOfView, window.innerWidth / window.innerHeight, this._nearClipPlane, this._farClipPlane), this.fieldOfView && (I.fov = this.fieldOfView), this.gameObject.add(I);
|
|
48911
48917
|
else {
|
|
48912
48918
|
const g = this.orthographicSize * 100;
|
|
48913
48919
|
I = new iB(window.innerWidth / -g, window.innerWidth / g, window.innerHeight / g, window.innerHeight / -g, this._nearClipPlane, this._farClipPlane), this.gameObject.add(I);
|
|
@@ -50842,9 +50848,10 @@ const IK = class extends ND {
|
|
|
50842
50848
|
const I = this.gameObject, g = A.gameObject;
|
|
50843
50849
|
g == null || g.add(I);
|
|
50844
50850
|
const i = A.farClipPlane;
|
|
50845
|
-
I.position.x = 0, I.position.y = 0, I.position.z = -i
|
|
50846
|
-
|
|
50847
|
-
|
|
50851
|
+
if (I.position.x = 0, I.position.y = 0, I.position.z = -i, A.fieldOfView) {
|
|
50852
|
+
const e = Math.tan(gI.toRadians(A.fieldOfView) * i) * (A.aspect * 1.333333), C = e * (this.context.domHeight / this.context.domWidth);
|
|
50853
|
+
I.scale.x = -e, I.scale.y = C;
|
|
50854
|
+
}
|
|
50848
50855
|
break;
|
|
50849
50856
|
}
|
|
50850
50857
|
}
|
|
@@ -52872,7 +52879,7 @@ const _f = class {
|
|
|
52872
52879
|
this._camera = A;
|
|
52873
52880
|
const I = new mg(_f.geometry), g = I.material;
|
|
52874
52881
|
g.color = new T(0.4, 0.4, 0.4), I.layers.set(2), I.name = "line", I.scale.y = 1, this._groundLine = I;
|
|
52875
|
-
const i = new Ct(0.5, 22, 22), e = new
|
|
52882
|
+
const i = new Ct(0.5, 22, 22), e = new og({ color: g.color }), C = new MA(i, e);
|
|
52876
52883
|
C.visible = !1, C.layers.set(2), this._groundMarker = C;
|
|
52877
52884
|
}
|
|
52878
52885
|
get hasSelected() {
|
|
@@ -53077,7 +53084,7 @@ async function t4(t, A, I, g, i) {
|
|
|
53077
53084
|
}
|
|
53078
53085
|
const pp = {};
|
|
53079
53086
|
function C4(t, A) {
|
|
53080
|
-
const I = new XI(), g = new MA(I, new
|
|
53087
|
+
const I = new XI(), g = new MA(I, new og({ color: 65280 })), i = new zl(g, 5592405);
|
|
53081
53088
|
if (pp[t.guid] = i, A.scene.add(i), t.parentGuid) {
|
|
53082
53089
|
const e = ID(t.parentGuid, A.scene);
|
|
53083
53090
|
e && e.add(i);
|
|
@@ -53966,7 +53973,7 @@ const Pf = class {
|
|
|
53966
53973
|
E(this, "inst");
|
|
53967
53974
|
E(this, "handles", []);
|
|
53968
53975
|
E(this, "maxCount");
|
|
53969
|
-
this.name = A, this.geo = I, this.material = g, this.context = e, this.maxCount = i, u4 && (g = new
|
|
53976
|
+
this.name = A, this.geo = I, this.material = g, this.context = e, this.maxCount = i, u4 && (g = new og({ color: this.randomColor() })), this.inst = new bl(I, g, i), this.inst.count = 0, this.inst.layers.set(2), this.inst.visible = !0, this.context.scene.add(this.inst);
|
|
53970
53977
|
}
|
|
53971
53978
|
get currentCount() {
|
|
53972
53979
|
return this.inst.count;
|
|
@@ -54305,7 +54312,7 @@ function Jw(t, A, I) {
|
|
|
54305
54312
|
#endif
|
|
54306
54313
|
}`
|
|
54307
54314
|
})), Xs.uniforms.blitTexture.value = t, Xs.defines.IS_SRGB = t.encoding == DI, Xs.needsUpdate = !0, kh || (kh = new MA(Kw, Xs), kh.frustrumCulled = !1);
|
|
54308
|
-
const g = new
|
|
54315
|
+
const g = new Cg(), i = new jo();
|
|
54309
54316
|
i.add(kh), I || (mw || (mw = new An({ antialias: !1 })), I = mw), I.setSize(Math.min(t.image.width, A), Math.min(t.image.height, A)), I.clear(), I.render(i, g);
|
|
54310
54317
|
const e = new ZI(I.domElement);
|
|
54311
54318
|
return e.userData.mimeType = "image/png", e;
|
|
@@ -60868,7 +60875,7 @@ class S8 {
|
|
|
60868
60875
|
let g;
|
|
60869
60876
|
switch (A) {
|
|
60870
60877
|
case 0:
|
|
60871
|
-
const i = new zi(1, 1, 1, 1), e = (I == null ? void 0 : I.material) ?? new
|
|
60878
|
+
const i = new zi(1, 1, 1, 1), e = (I == null ? void 0 : I.material) ?? new og({ color: 16777215 });
|
|
60872
60879
|
g = new MA(i, e);
|
|
60873
60880
|
}
|
|
60874
60881
|
return I != null && I.name && (g.name = I.name), g;
|
|
@@ -61864,7 +61871,7 @@ gd([
|
|
|
61864
61871
|
], Ss.prototype, "positionAxes", 2);
|
|
61865
61872
|
class x8 extends MA {
|
|
61866
61873
|
constructor(A) {
|
|
61867
|
-
const I = new H8(A), g = new zi(I.image.width * 1e-3, I.image.height * 1e-3), i = new
|
|
61874
|
+
const I = new H8(A), g = new zi(I.image.width * 1e-3, I.image.height * 1e-3), i = new og({ map: I, toneMapped: !1, transparent: !0 });
|
|
61868
61875
|
super(g, i);
|
|
61869
61876
|
function e(C) {
|
|
61870
61877
|
i.map.dispatchDOMEvent(C);
|
|
@@ -62682,7 +62689,7 @@ class xn extends vA {
|
|
|
62682
62689
|
if (this._currentSprite)
|
|
62683
62690
|
this._currentSprite.geometry = va.getOrCreateGeometry(I), this._currentSprite.material.map = I.texture;
|
|
62684
62691
|
else {
|
|
62685
|
-
const e = new
|
|
62692
|
+
const e = new og({ color: 16777215, side: Tg });
|
|
62686
62693
|
if (!e)
|
|
62687
62694
|
return;
|
|
62688
62695
|
if (this.color && (e.color || (e.color = new T()), e.color.copy(this.color), e.opacity = this.color.alpha), e.alphaTest = 0.5, I.texture && !e.wireframe) {
|
|
@@ -63069,7 +63076,7 @@ class vK {
|
|
|
63069
63076
|
}
|
|
63070
63077
|
}
|
|
63071
63078
|
E(vK, "temp", new k());
|
|
63072
|
-
const fB = new Cn(), te = new k(), Ro = new k(),
|
|
63079
|
+
const fB = new Cn(), te = new k(), Ro = new k(), Eg = new fA(), qM = {
|
|
63073
63080
|
X: new k(1, 0, 0),
|
|
63074
63081
|
Y: new k(0, 1, 0),
|
|
63075
63082
|
Z: new k(0, 0, 1)
|
|
@@ -63124,7 +63131,7 @@ class aZ extends HA {
|
|
|
63124
63131
|
const C = Ow(this._plane, fB, !0);
|
|
63125
63132
|
if (C) {
|
|
63126
63133
|
if (this.pointEnd.copy(C.point).sub(this.worldPositionStart), g === "translate")
|
|
63127
|
-
this._offset.copy(this.pointEnd).sub(this.pointStart), e === "local" && I !== "XYZ" && this._offset.applyQuaternion(this._worldQuaternionInv), I.indexOf("X") === -1 && (this._offset.x = 0), I.indexOf("Y") === -1 && (this._offset.y = 0), I.indexOf("Z") === -1 && (this._offset.z = 0), e === "local" && I !== "XYZ" ? this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale) : this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale), i.position.copy(this._offset).add(this._positionStart), this.translationSnap && (e === "local" && (i.position.applyQuaternion(
|
|
63134
|
+
this._offset.copy(this.pointEnd).sub(this.pointStart), e === "local" && I !== "XYZ" && this._offset.applyQuaternion(this._worldQuaternionInv), I.indexOf("X") === -1 && (this._offset.x = 0), I.indexOf("Y") === -1 && (this._offset.y = 0), I.indexOf("Z") === -1 && (this._offset.z = 0), e === "local" && I !== "XYZ" ? this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale) : this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale), i.position.copy(this._offset).add(this._positionStart), this.translationSnap && (e === "local" && (i.position.applyQuaternion(Eg.copy(this._quaternionStart).invert()), I.search("X") !== -1 && (i.position.x = Math.round(i.position.x / this.translationSnap) * this.translationSnap), I.search("Y") !== -1 && (i.position.y = Math.round(i.position.y / this.translationSnap) * this.translationSnap), I.search("Z") !== -1 && (i.position.z = Math.round(i.position.z / this.translationSnap) * this.translationSnap), i.position.applyQuaternion(this._quaternionStart)), e === "world" && (i.parent && i.position.add(te.setFromMatrixPosition(i.parent.matrixWorld)), I.search("X") !== -1 && (i.position.x = Math.round(i.position.x / this.translationSnap) * this.translationSnap), I.search("Y") !== -1 && (i.position.y = Math.round(i.position.y / this.translationSnap) * this.translationSnap), I.search("Z") !== -1 && (i.position.z = Math.round(i.position.z / this.translationSnap) * this.translationSnap), i.parent && i.position.sub(te.setFromMatrixPosition(i.parent.matrixWorld))));
|
|
63128
63135
|
else if (g === "scale") {
|
|
63129
63136
|
if (I.search("XYZ") !== -1) {
|
|
63130
63137
|
let o = this.pointEnd.length() / this.pointStart.length();
|
|
@@ -63135,7 +63142,7 @@ class aZ extends HA {
|
|
|
63135
63142
|
} else if (g === "rotate") {
|
|
63136
63143
|
this._offset.copy(this.pointEnd).sub(this.pointStart);
|
|
63137
63144
|
const o = 20 / this.worldPosition.distanceTo(te.setFromMatrixPosition(this.camera.matrixWorld));
|
|
63138
|
-
I === "E" ? (this.rotationAxis.copy(this.eye), this.rotationAngle = this.pointEnd.angleTo(this.pointStart), this._startNorm.copy(this.pointStart).normalize(), this._endNorm.copy(this.pointEnd).normalize(), this.rotationAngle *= this._endNorm.cross(this._startNorm).dot(this.eye) < 0 ? 1 : -1) : I === "XYZE" ? (this.rotationAxis.copy(this._offset).cross(this.eye).normalize(), this.rotationAngle = this._offset.dot(te.copy(this.rotationAxis).cross(this.eye)) * o) : (I === "X" || I === "Y" || I === "Z") && (this.rotationAxis.copy(qM[I]), te.copy(qM[I]), e === "local" && te.applyQuaternion(this.worldQuaternion), this.rotationAngle = this._offset.dot(te.cross(this.eye).normalize()) * o), this.rotationSnap && (this.rotationAngle = Math.round(this.rotationAngle / this.rotationSnap) * this.rotationSnap), e === "local" && I !== "E" && I !== "XYZE" ? (i.quaternion.copy(this._quaternionStart), i.quaternion.multiply(
|
|
63145
|
+
I === "E" ? (this.rotationAxis.copy(this.eye), this.rotationAngle = this.pointEnd.angleTo(this.pointStart), this._startNorm.copy(this.pointStart).normalize(), this._endNorm.copy(this.pointEnd).normalize(), this.rotationAngle *= this._endNorm.cross(this._startNorm).dot(this.eye) < 0 ? 1 : -1) : I === "XYZE" ? (this.rotationAxis.copy(this._offset).cross(this.eye).normalize(), this.rotationAngle = this._offset.dot(te.copy(this.rotationAxis).cross(this.eye)) * o) : (I === "X" || I === "Y" || I === "Z") && (this.rotationAxis.copy(qM[I]), te.copy(qM[I]), e === "local" && te.applyQuaternion(this.worldQuaternion), this.rotationAngle = this._offset.dot(te.cross(this.eye).normalize()) * o), this.rotationSnap && (this.rotationAngle = Math.round(this.rotationAngle / this.rotationSnap) * this.rotationSnap), e === "local" && I !== "E" && I !== "XYZE" ? (i.quaternion.copy(this._quaternionStart), i.quaternion.multiply(Eg.setFromAxisAngle(this.rotationAxis, this.rotationAngle)).normalize()) : (this.rotationAxis.applyQuaternion(this._parentQuaternionInv), i.quaternion.copy(Eg.setFromAxisAngle(this.rotationAxis, this.rotationAngle)), i.quaternion.multiply(this._quaternionStart).normalize());
|
|
63139
63146
|
}
|
|
63140
63147
|
this.dispatchEvent(Tw), this.dispatchEvent(bM);
|
|
63141
63148
|
}
|
|
@@ -63230,7 +63237,7 @@ const Jh = new _g(), Ag = new k(0, 1, 0), xM = new k(0, 0, 0), HM = new XA(), qh
|
|
|
63230
63237
|
class DZ extends HA {
|
|
63231
63238
|
constructor() {
|
|
63232
63239
|
super(), this.isTransformControlsGizmo = !0, this.type = "TransformControlsGizmo";
|
|
63233
|
-
const A = new
|
|
63240
|
+
const A = new og({
|
|
63234
63241
|
depthTest: !1,
|
|
63235
63242
|
depthWrite: !1,
|
|
63236
63243
|
fog: !1,
|
|
@@ -63476,10 +63483,10 @@ class DZ extends HA {
|
|
|
63476
63483
|
C.visible = !0, C.rotation.set(0, 0, 0), C.position.copy(this.worldPosition);
|
|
63477
63484
|
let o;
|
|
63478
63485
|
if (this.camera.isOrthographicCamera ? o = (this.camera.top - this.camera.bottom) / this.camera.zoom : o = this.worldPosition.distanceTo(this.cameraPosition) * Math.min(1.9 * Math.tan(Math.PI * this.camera.fov / 360) / this.camera.zoom, 7), C.scale.set(1, 1, 1).multiplyScalar(o * this.size / 4), C.tag === "helper") {
|
|
63479
|
-
C.visible = !1, C.name === "AXIS" ? (C.position.copy(this.worldPositionStart), C.visible = !!this.axis, this.axis === "X" && (
|
|
63486
|
+
C.visible = !1, C.name === "AXIS" ? (C.position.copy(this.worldPositionStart), C.visible = !!this.axis, this.axis === "X" && (Eg.setFromEuler(Jh.set(0, 0, 0)), C.quaternion.copy(g).multiply(Eg), Math.abs(Ag.copy(wa).applyQuaternion(g).dot(this.eye)) > 0.9 && (C.visible = !1)), this.axis === "Y" && (Eg.setFromEuler(Jh.set(0, 0, Math.PI / 2)), C.quaternion.copy(g).multiply(Eg), Math.abs(Ag.copy(mB).applyQuaternion(g).dot(this.eye)) > 0.9 && (C.visible = !1)), this.axis === "Z" && (Eg.setFromEuler(Jh.set(0, Math.PI / 2, 0)), C.quaternion.copy(g).multiply(Eg), Math.abs(Ag.copy(ua).applyQuaternion(g).dot(this.eye)) > 0.9 && (C.visible = !1)), this.axis === "XYZE" && (Eg.setFromEuler(Jh.set(0, Math.PI / 2, 0)), Ag.copy(this.rotationAxis), C.quaternion.setFromRotationMatrix(HM.lookAt(xM, Ag, mB)), C.quaternion.multiply(Eg), C.visible = this.dragging), this.axis === "E" && (C.visible = !1)) : C.name === "START" ? (C.position.copy(this.worldPositionStart), C.visible = this.dragging) : C.name === "END" ? (C.position.copy(this.worldPosition), C.visible = this.dragging) : C.name === "DELTA" ? (C.position.copy(this.worldPositionStart), C.quaternion.copy(this.worldQuaternionStart), te.set(1e-10, 1e-10, 1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1), te.applyQuaternion(this.worldQuaternionStart.clone().invert()), C.scale.copy(te), C.visible = this.dragging) : (C.quaternion.copy(g), this.dragging ? C.position.copy(this.worldPositionStart) : C.position.copy(this.worldPosition), this.axis && (C.visible = this.axis.search(C.name) !== -1));
|
|
63480
63487
|
continue;
|
|
63481
63488
|
}
|
|
63482
|
-
C.quaternion.copy(g), this.mode === "translate" || this.mode === "scale" ? (C.name === "X" && Math.abs(Ag.copy(wa).applyQuaternion(g).dot(this.eye)) > 0.99 && (C.scale.set(1e-10, 1e-10, 1e-10), C.visible = !1), C.name === "Y" && Math.abs(Ag.copy(mB).applyQuaternion(g).dot(this.eye)) > 0.99 && (C.scale.set(1e-10, 1e-10, 1e-10), C.visible = !1), C.name === "Z" && Math.abs(Ag.copy(ua).applyQuaternion(g).dot(this.eye)) > 0.99 && (C.scale.set(1e-10, 1e-10, 1e-10), C.visible = !1), C.name === "XY" && Math.abs(Ag.copy(ua).applyQuaternion(g).dot(this.eye)) < 0.2 && (C.scale.set(1e-10, 1e-10, 1e-10), C.visible = !1), C.name === "YZ" && Math.abs(Ag.copy(wa).applyQuaternion(g).dot(this.eye)) < 0.2 && (C.scale.set(1e-10, 1e-10, 1e-10), C.visible = !1), C.name === "XZ" && Math.abs(Ag.copy(mB).applyQuaternion(g).dot(this.eye)) < 0.2 && (C.scale.set(1e-10, 1e-10, 1e-10), C.visible = !1)) : this.mode === "rotate" && (qh.copy(g), Ag.copy(this.eye).applyQuaternion(
|
|
63489
|
+
C.quaternion.copy(g), this.mode === "translate" || this.mode === "scale" ? (C.name === "X" && Math.abs(Ag.copy(wa).applyQuaternion(g).dot(this.eye)) > 0.99 && (C.scale.set(1e-10, 1e-10, 1e-10), C.visible = !1), C.name === "Y" && Math.abs(Ag.copy(mB).applyQuaternion(g).dot(this.eye)) > 0.99 && (C.scale.set(1e-10, 1e-10, 1e-10), C.visible = !1), C.name === "Z" && Math.abs(Ag.copy(ua).applyQuaternion(g).dot(this.eye)) > 0.99 && (C.scale.set(1e-10, 1e-10, 1e-10), C.visible = !1), C.name === "XY" && Math.abs(Ag.copy(ua).applyQuaternion(g).dot(this.eye)) < 0.2 && (C.scale.set(1e-10, 1e-10, 1e-10), C.visible = !1), C.name === "YZ" && Math.abs(Ag.copy(wa).applyQuaternion(g).dot(this.eye)) < 0.2 && (C.scale.set(1e-10, 1e-10, 1e-10), C.visible = !1), C.name === "XZ" && Math.abs(Ag.copy(mB).applyQuaternion(g).dot(this.eye)) < 0.2 && (C.scale.set(1e-10, 1e-10, 1e-10), C.visible = !1)) : this.mode === "rotate" && (qh.copy(g), Ag.copy(this.eye).applyQuaternion(Eg.copy(g).invert()), C.name.search("E") !== -1 && C.quaternion.setFromRotationMatrix(HM.lookAt(this.eye, xM, mB)), C.name === "X" && (Eg.setFromAxisAngle(wa, Math.atan2(-Ag.y, Ag.z)), Eg.multiplyQuaternions(qh, Eg), C.quaternion.copy(Eg)), C.name === "Y" && (Eg.setFromAxisAngle(mB, Math.atan2(Ag.x, Ag.z)), Eg.multiplyQuaternions(qh, Eg), C.quaternion.copy(Eg)), C.name === "Z" && (Eg.setFromAxisAngle(ua, Math.atan2(Ag.y, Ag.x)), Eg.multiplyQuaternions(qh, Eg), C.quaternion.copy(Eg))), C.visible = C.visible && (C.name.indexOf("X") === -1 || this.showX), C.visible = C.visible && (C.name.indexOf("Y") === -1 || this.showY), C.visible = C.visible && (C.name.indexOf("Z") === -1 || this.showZ), C.visible = C.visible && (C.name.indexOf("E") === -1 || this.showX && this.showY && this.showZ), C.material._color = C.material._color || C.material.color.clone(), C.material._opacity = C.material._opacity || C.material.opacity, C.material.color.copy(C.material._color), C.material.opacity = C.material._opacity, this.enabled && this.axis && (C.name === this.axis || this.axis.split("").some(function(B) {
|
|
63483
63490
|
return C.name === B;
|
|
63484
63491
|
})) && (C.material.color.setHex(16776960), C.material.opacity = 1);
|
|
63485
63492
|
}
|
|
@@ -63490,7 +63497,7 @@ class dZ extends MA {
|
|
|
63490
63497
|
constructor() {
|
|
63491
63498
|
super(
|
|
63492
63499
|
new zi(1e5, 1e5, 2, 2),
|
|
63493
|
-
new
|
|
63500
|
+
new og({ visible: !1, wireframe: !0, side: Tg, transparent: !0, opacity: 0.1, toneMapped: !1 })
|
|
63494
63501
|
), this.isTransformControlsPlane = !0, this.type = "TransformControlsPlane";
|
|
63495
63502
|
}
|
|
63496
63503
|
updateMatrixWorld(A) {
|