@needle-tools/engine 3.26.1-beta → 3.26.2-beta
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 +118 -102
- package/dist/needle-engine.light.js +80 -64
- package/dist/needle-engine.light.min.js +24 -24
- package/dist/needle-engine.light.umd.cjs +24 -24
- package/dist/needle-engine.min.js +104 -104
- package/dist/needle-engine.umd.cjs +134 -134
- package/lib/engine/engine_context.d.ts +1 -0
- package/lib/engine/engine_context.js +9 -8
- package/lib/engine/engine_context.js.map +1 -1
- package/lib/engine/engine_physics_rapier.js +7 -0
- package/lib/engine/engine_physics_rapier.js.map +1 -1
- package/lib/engine-components/OrbitControls.js +11 -0
- package/lib/engine-components/OrbitControls.js.map +1 -1
- package/package.json +1 -1
- package/src/engine/codegen/register_types.ts +2 -2
- package/src/engine/engine_context.ts +11 -8
- package/src/engine/engine_physics_rapier.ts +8 -0
- package/src/engine-components/OrbitControls.ts +11 -0
package/dist/needle-engine.js
CHANGED
|
@@ -13335,15 +13335,15 @@ class wa {
|
|
|
13335
13335
|
let qA = kA.get(QA);
|
|
13336
13336
|
if (qA !== void 0) {
|
|
13337
13337
|
if (L.currentProgram === qA && L.lightsStateVersion === dA)
|
|
13338
|
-
return
|
|
13338
|
+
return Ve(y, wA), qA;
|
|
13339
13339
|
} else
|
|
13340
13340
|
wA.uniforms = EA.getUniforms(y), y.onBuild(b, wA, u), y.onBeforeCompile(wA, u), qA = EA.acquireProgram(wA, QA), kA.set(QA, qA), L.uniforms = wA.uniforms;
|
|
13341
13341
|
const vA = L.uniforms;
|
|
13342
|
-
(!y.isShaderMaterial && !y.isRawShaderMaterial || y.clipping === !0) && (vA.clippingPlanes = V.uniform),
|
|
13342
|
+
(!y.isShaderMaterial && !y.isRawShaderMaterial || y.clipping === !0) && (vA.clippingPlanes = V.uniform), Ve(y, wA), L.needsLights = F(y), L.lightsStateVersion = dA, L.needsLights && (vA.ambientLightColor.value = O.state.ambient, vA.lightProbe.value = O.state.probe, vA.directionalLights.value = O.state.directional, vA.directionalLightShadows.value = O.state.directionalShadow, vA.spotLights.value = O.state.spot, vA.spotLightShadows.value = O.state.spotShadow, vA.rectAreaLights.value = O.state.rectArea, vA.ltc_1.value = O.state.rectAreaLTC1, vA.ltc_2.value = O.state.rectAreaLTC2, vA.pointLights.value = O.state.point, vA.pointLightShadows.value = O.state.pointShadow, vA.hemisphereLights.value = O.state.hemi, vA.directionalShadowMap.value = O.state.directionalShadowMap, vA.directionalShadowMatrix.value = O.state.directionalShadowMatrix, vA.spotShadowMap.value = O.state.spotShadowMap, vA.spotLightMatrix.value = O.state.spotLightMatrix, vA.spotLightMap.value = O.state.spotLightMap, vA.pointShadowMap.value = O.state.pointShadowMap, vA.pointShadowMatrix.value = O.state.pointShadowMatrix);
|
|
13343
13343
|
const Ae = qA.getUniforms(), Ee = lp.seqWithValue(Ae.seq, vA);
|
|
13344
13344
|
return L.currentProgram = qA, L.uniformsList = Ee, qA;
|
|
13345
13345
|
}
|
|
13346
|
-
function
|
|
13346
|
+
function Ve(y, N) {
|
|
13347
13347
|
const b = zA.get(y);
|
|
13348
13348
|
b.outputColorSpace = N.outputColorSpace, b.instancing = N.instancing, b.skinning = N.skinning, b.morphTargets = N.morphTargets, b.morphNormals = N.morphNormals, b.morphColors = N.morphColors, b.morphTargetsCount = N.morphTargetsCount, b.numClippingPlanes = N.numClippingPlanes, b.numIntersection = N.numClipIntersection, b.vertexAlphas = N.vertexAlphas, b.vertexTangents = N.vertexTangents, b.toneMapping = N.toneMapping;
|
|
13349
13349
|
}
|
|
@@ -21632,7 +21632,7 @@ function p8(i) {
|
|
|
21632
21632
|
qi(i, cs.Error);
|
|
21633
21633
|
}
|
|
21634
21634
|
let nm;
|
|
21635
|
-
function
|
|
21635
|
+
function We() {
|
|
21636
21636
|
return nm !== void 0 ? nm : FI();
|
|
21637
21637
|
}
|
|
21638
21638
|
function ZaA(i) {
|
|
@@ -28647,7 +28647,7 @@ class Rz {
|
|
|
28647
28647
|
this.handleIncomingStringMessage(g);
|
|
28648
28648
|
return;
|
|
28649
28649
|
} catch (g) {
|
|
28650
|
-
pI && t === "pong" ? console.log("<<", t) :
|
|
28650
|
+
pI && t === "pong" ? console.log("<<", t) : We() && console.error("Failed to parse message", g);
|
|
28651
28651
|
}
|
|
28652
28652
|
}
|
|
28653
28653
|
async handleIncomingBinaryMessage(A) {
|
|
@@ -30869,7 +30869,7 @@ function Df(i) {
|
|
|
30869
30869
|
try {
|
|
30870
30870
|
const e = Ot[A];
|
|
30871
30871
|
if (e.isComponent !== !0) {
|
|
30872
|
-
(
|
|
30872
|
+
(We() || Um) && console.error(`Registered script is not a Needle Engine component.
|
|
30873
30873
|
The script will be ignored. Please make sure your component extends "Behaviour" imported from "@needle-tools/engine"
|
|
30874
30874
|
`, e), Ot.splice(A, 1), A--;
|
|
30875
30875
|
continue;
|
|
@@ -30955,7 +30955,7 @@ function Gp(i) {
|
|
|
30955
30955
|
return;
|
|
30956
30956
|
}
|
|
30957
30957
|
const A = bl(i);
|
|
30958
|
-
DT(i, A, !0) || (Um ||
|
|
30958
|
+
DT(i, A, !0) || (Um || We() ? console.error(`Error updating hierarchy
|
|
30959
30959
|
Do you have circular references in your project? <a target="_blank" href="https://docs.needle.tools/circular-reference"> Click here for more information.`, i) : console.error('Failed to update active state in hierarchy of "' + i.name + '"', i), console.warn(" ↑ this error might be caused by circular references. Please make sure you don't have files with circular references (e.g. one GLB 1 is loading GLB 2 which is then loading GLB 1 again)."));
|
|
30960
30960
|
}
|
|
30961
30961
|
function DT(i, A, e, t = 0) {
|
|
@@ -41000,33 +41000,33 @@ class Sf extends pM {
|
|
|
41000
41000
|
}
|
|
41001
41001
|
return O.bytesPerLine = O.width * O.inputSize * O.channels, O.outputChannels == 4 ? (O.format = kt, O.colorSpace = Si) : (O.format = LC, O.colorSpace = GI), O;
|
|
41002
41002
|
}
|
|
41003
|
-
const hB = new DataView(A), lB = new Uint8Array(A), yn = { value: 0 }, ms = kd(hB, A, yn),
|
|
41004
|
-
for (let F = 0; F <
|
|
41003
|
+
const hB = new DataView(A), lB = new Uint8Array(A), yn = { value: 0 }, ms = kd(hB, A, yn), Ve = md(ms, hB, lB, yn, this.type), Gd = { value: 0 }, Zy = { R: 0, G: 1, B: 2, A: 3, Y: 0 };
|
|
41004
|
+
for (let F = 0; F < Ve.height / Ve.scanlineBlockSize; F++) {
|
|
41005
41005
|
const y = OA(hB, yn);
|
|
41006
|
-
|
|
41007
|
-
const b =
|
|
41008
|
-
yn.value +=
|
|
41009
|
-
for (let L = 0; L <
|
|
41010
|
-
const O = L + F *
|
|
41011
|
-
if (O >=
|
|
41006
|
+
Ve.size = OA(hB, yn), Ve.lines = y + Ve.scanlineBlockSize > Ve.height ? Ve.height - y : Ve.scanlineBlockSize;
|
|
41007
|
+
const b = Ve.size < Ve.lines * Ve.bytesPerLine ? Ve.uncompress(Ve) : T(Ve);
|
|
41008
|
+
yn.value += Ve.size;
|
|
41009
|
+
for (let L = 0; L < Ve.scanlineBlockSize; L++) {
|
|
41010
|
+
const O = L + F * Ve.scanlineBlockSize;
|
|
41011
|
+
if (O >= Ve.height)
|
|
41012
41012
|
break;
|
|
41013
|
-
for (let CA = 0; CA <
|
|
41013
|
+
for (let CA = 0; CA < Ve.channels; CA++) {
|
|
41014
41014
|
const dA = Zy[ms.channels[CA].name];
|
|
41015
|
-
for (let wA = 0; wA <
|
|
41016
|
-
Gd.value = (L * (
|
|
41017
|
-
const QA = (
|
|
41018
|
-
|
|
41015
|
+
for (let wA = 0; wA < Ve.width; wA++) {
|
|
41016
|
+
Gd.value = (L * (Ve.channels * Ve.width) + CA * Ve.width + wA) * Ve.inputSize;
|
|
41017
|
+
const QA = (Ve.height - 1 - O) * (Ve.width * Ve.outputChannels) + wA * Ve.outputChannels + dA;
|
|
41018
|
+
Ve.byteArray[QA] = Ve.getter(b, Gd);
|
|
41019
41019
|
}
|
|
41020
41020
|
}
|
|
41021
41021
|
}
|
|
41022
41022
|
}
|
|
41023
41023
|
return {
|
|
41024
41024
|
header: ms,
|
|
41025
|
-
width:
|
|
41026
|
-
height:
|
|
41027
|
-
data:
|
|
41028
|
-
format:
|
|
41029
|
-
colorSpace:
|
|
41025
|
+
width: Ve.width,
|
|
41026
|
+
height: Ve.height,
|
|
41027
|
+
data: Ve.byteArray,
|
|
41028
|
+
format: Ve.format,
|
|
41029
|
+
colorSpace: Ve.colorSpace,
|
|
41030
41030
|
type: this.type
|
|
41031
41031
|
};
|
|
41032
41032
|
}
|
|
@@ -41245,7 +41245,7 @@ class mX {
|
|
|
41245
41245
|
a && s.push(a);
|
|
41246
41246
|
}
|
|
41247
41247
|
const C = await NM(s);
|
|
41248
|
-
C != null && C.anyFailed &&
|
|
41248
|
+
C != null && C.anyFailed && We() && console.error("Failed to load lightmap extension", C), I();
|
|
41249
41249
|
})) : null;
|
|
41250
41250
|
}
|
|
41251
41251
|
}
|
|
@@ -41419,7 +41419,7 @@ function aR(i, A) {
|
|
|
41419
41419
|
if (!i)
|
|
41420
41420
|
return;
|
|
41421
41421
|
if (!i.isComponent) {
|
|
41422
|
-
(
|
|
41422
|
+
(We() || Tn) && console.error(`Registered script is not a Needle Engine component.
|
|
41423
41423
|
The script will be ignored. Please make sure your component extends "Behaviour" imported from "@needle-tools/engine"
|
|
41424
41424
|
`, i);
|
|
41425
41425
|
return;
|
|
@@ -41521,6 +41521,7 @@ const ei = class {
|
|
|
41521
41521
|
r(this, "_renderTarget");
|
|
41522
41522
|
r(this, "_isRendering", !1);
|
|
41523
41523
|
r(this, "_createId", 0);
|
|
41524
|
+
r(this, "_renderlooperrors", 0);
|
|
41524
41525
|
r(this, "_lastTimestamp", 0);
|
|
41525
41526
|
r(this, "_accumulatedTime", 0);
|
|
41526
41527
|
r(this, "_dispatchReadyAfterFrame", !1);
|
|
@@ -41651,7 +41652,7 @@ const ei = class {
|
|
|
41651
41652
|
const I = (g = (t = this.domElement) == null ? void 0 : t.shadowRoot) == null ? void 0 : g.querySelector("canvas");
|
|
41652
41653
|
I && (A.canvas = I);
|
|
41653
41654
|
}
|
|
41654
|
-
this.renderer = new wa(A), this.renderer.debug.checkShaderErrors =
|
|
41655
|
+
this.renderer = new wa(A), this.renderer.debug.checkShaderErrors = We() || sA("checkshadererrors") === !0, this.renderer.toneMappingExposure = 1, this.renderer.toneMapping = sI, this.renderer.setClearColor(new yA("lightgrey"), 0), this.renderer.shadowMap.enabled = !0, this.renderer.shadowMap.type = FG, this.renderer.setSize(this.domWidth, this.domHeight), this.renderer.outputColorSpace = Ie, this.renderer.useLegacyLights = !1;
|
|
41655
41656
|
}
|
|
41656
41657
|
internalOnUpdateVisible() {
|
|
41657
41658
|
var A, e;
|
|
@@ -41904,11 +41905,11 @@ const ei = class {
|
|
|
41904
41905
|
}
|
|
41905
41906
|
/** Performs a full update step including script callbacks, rendering (unless isManagedExternally is set to false) and post render callbacks */
|
|
41906
41907
|
update(A, e) {
|
|
41907
|
-
if (e === void 0 && (e = null),
|
|
41908
|
+
if (e === void 0 && (e = null), We() || Tn || Yj())
|
|
41908
41909
|
try {
|
|
41909
|
-
this.internalStep(A, e);
|
|
41910
|
+
this.internalStep(A, e), this._renderlooperrors = 0;
|
|
41910
41911
|
} catch (t) {
|
|
41911
|
-
(
|
|
41912
|
+
this._renderlooperrors += 1, (We() || Tn) && (t instanceof Error || t instanceof TypeError) && qi("Caught unhandled exception during render-loop.<br/>Stopping renderloop...<br/>See console for details.", cs.Error), console.error(t), this._renderlooperrors > 10 && (console.warn("Stopping render loop due to error"), this.renderer.setAnimationLoop(null)), this.domElement.dispatchEvent(new CustomEvent("error", { detail: t }));
|
|
41912
41913
|
}
|
|
41913
41914
|
else
|
|
41914
41915
|
this.internalStep(A, e);
|
|
@@ -42515,7 +42516,7 @@ let $r = (ai = class {
|
|
|
42515
42516
|
}
|
|
42516
42517
|
/** @internal */
|
|
42517
42518
|
__internalEnable(A) {
|
|
42518
|
-
return this.__destroyed ? (
|
|
42519
|
+
return this.__destroyed ? (We() && console.warn("[Needle Engine Dev] Trying to enable destroyed component"), !1) : this.__didAwake ? this.__didEnable ? (A !== !0 && (this.__isEnabled = !0), !1) : (this.__didEnable = !0, this.__isEnabled = !0, this.onEnable(), !0) : !1;
|
|
42519
42520
|
}
|
|
42520
42521
|
/** @internal */
|
|
42521
42522
|
__internalDisable(A) {
|
|
@@ -42537,7 +42538,7 @@ let $r = (ai = class {
|
|
|
42537
42538
|
}
|
|
42538
42539
|
set enabled(A) {
|
|
42539
42540
|
if (this.__destroyed) {
|
|
42540
|
-
|
|
42541
|
+
We() && console.warn(`[Needle Engine Dev] Trying to ${A ? "enable" : "disable"} destroyed component`);
|
|
42541
42542
|
return;
|
|
42542
42543
|
}
|
|
42543
42544
|
if (typeof A == "number" && (A >= 0.5 ? A = !0 : A = !1), !this.__didAwake) {
|
|
@@ -46472,7 +46473,7 @@ async function s6(i, A, e) {
|
|
|
46472
46473
|
const I = new mf(g);
|
|
46473
46474
|
return I.setAnimationPointerResolver.bind(I)(new o6()), I;
|
|
46474
46475
|
} else
|
|
46475
|
-
return (g6 ||
|
|
46476
|
+
return (g6 || We()) && console.error("Missing KHR_animation_pointer extension..."), {
|
|
46476
46477
|
name: "KHR_animation_pointer_NOT_AVAILABLE"
|
|
46477
46478
|
};
|
|
46478
46479
|
});
|
|
@@ -46774,7 +46775,7 @@ class a6 extends En {
|
|
|
46774
46775
|
if (A.endsWith(".glb") || A.endsWith(".gltf")) {
|
|
46775
46776
|
if (e.serializable instanceof Array && e.serializable.includes(xi))
|
|
46776
46777
|
return;
|
|
46777
|
-
|
|
46778
|
+
We() && Pg("Detected wrong usage of @serializable with Object3D or GameObject. Instead you should use AssetReference here! Please see the console for details.");
|
|
46778
46779
|
const o = (g = (t = e.target) == null ? void 0 : t.constructor) == null ? void 0 : g.name;
|
|
46779
46780
|
console.warn(`Wrong usage of @serializable detected in your script "${o}"
|
|
46780
46781
|
|
|
@@ -46799,7 +46800,7 @@ ${e.path}! : AssetReference;
|
|
|
46799
46800
|
}
|
|
46800
46801
|
let o;
|
|
46801
46802
|
const s = (I = e.gltf) == null ? void 0 : I.scene;
|
|
46802
|
-
return s && (o = IA.findByGuid(A.guid, s)), o || (o = IA.findByGuid(A.guid, e.context.scene)), o ? bg && console.log("Deserialized object reference?", A, o, e == null ? void 0 : e.nodeToObject) : ((
|
|
46803
|
+
return s && (o = IA.findByGuid(A.guid, s)), o || (o = IA.findByGuid(A.guid, e.context.scene)), o ? bg && console.log("Deserialized object reference?", A, o, e == null ? void 0 : e.nodeToObject) : ((We() || bg) && console.warn("Could not resolve object reference", e.path, A, e.target, e.context.scene), A.could_not_resolve = !0), o;
|
|
46803
46804
|
}
|
|
46804
46805
|
}
|
|
46805
46806
|
}
|
|
@@ -46820,7 +46821,7 @@ class B6 extends En {
|
|
|
46820
46821
|
let g = this.findObjectForGuid(A.guid, e.root);
|
|
46821
46822
|
if (g || e.context && (g = this.findObjectForGuid(A.guid, (t = e.context) == null ? void 0 : t.scene), g))
|
|
46822
46823
|
return g;
|
|
46823
|
-
(
|
|
46824
|
+
(We() || bg) && console.warn("Could not resolve component reference", e.path, A, e.target), A.could_not_resolve = !0;
|
|
46824
46825
|
return;
|
|
46825
46826
|
}
|
|
46826
46827
|
}
|
|
@@ -46884,7 +46885,7 @@ Could not find method ${a.method} on object ${B.name}`, B, typeof B[a.method]);
|
|
|
46884
46885
|
}
|
|
46885
46886
|
u = Object.getPrototypeOf(u);
|
|
46886
46887
|
}
|
|
46887
|
-
!p && (
|
|
46888
|
+
!p && (We() || bg) && d();
|
|
46888
46889
|
}
|
|
46889
46890
|
}
|
|
46890
46891
|
let E = a.argument;
|
|
@@ -58537,7 +58538,7 @@ class ls {
|
|
|
58537
58538
|
const n = this.createAction(C);
|
|
58538
58539
|
s.motion.action = n;
|
|
58539
58540
|
} else
|
|
58540
|
-
(lo ||
|
|
58541
|
+
(lo || We()) && console.warn("No valid animationclip assigned", s);
|
|
58541
58542
|
}
|
|
58542
58543
|
if (s.behaviours && Array.isArray(s.behaviours))
|
|
58543
58544
|
for (const C of s.behaviours) {
|
|
@@ -59003,7 +59004,7 @@ const vf = [];
|
|
|
59003
59004
|
function Rw() {
|
|
59004
59005
|
if (qf)
|
|
59005
59006
|
return;
|
|
59006
|
-
|
|
59007
|
+
We() && console.log("User interaction registered: audio can now be played"), qf = !0;
|
|
59007
59008
|
const i = [...vf];
|
|
59008
59009
|
vf.length = 0, i.forEach((A) => A());
|
|
59009
59010
|
}
|
|
@@ -59158,7 +59159,7 @@ const SC = class extends NA {
|
|
|
59158
59159
|
/** Play a mediastream */
|
|
59159
59160
|
play(A = void 0) {
|
|
59160
59161
|
var t, g;
|
|
59161
|
-
!A && this.clip && (A = this.clip), A !== void 0 && typeof A != "string" && !(A instanceof MediaStream) && (
|
|
59162
|
+
!A && this.clip && (A = this.clip), A !== void 0 && typeof A != "string" && !(A instanceof MediaStream) && (We() && console.warn("Called play on AudioSource with unknown argument type:", A + `
|
|
59162
59163
|
Using the assigned clip instead:`, this.clip), A = this.clip);
|
|
59163
59164
|
let e = !this.sound || A && A !== this.clip;
|
|
59164
59165
|
if (typeof A == "string" && !this.audioLoader && (e = !0), (A instanceof MediaStream || typeof A == "string") && (this.clip = A), e) {
|
|
@@ -60585,7 +60586,7 @@ function XtA(i, A, e, t, g) {
|
|
|
60585
60586
|
i.__internalAwake = function() {
|
|
60586
60587
|
var C;
|
|
60587
60588
|
if (!this.onValidate) {
|
|
60588
|
-
|
|
60589
|
+
We() && console.warn('Usage of @validate decorate detected but there is no onValidate method in your class: "' + ((C = i.constructor) == null ? void 0 : C.name) + '"');
|
|
60589
60590
|
return;
|
|
60590
60591
|
}
|
|
60591
60592
|
if (this[o] === void 0) {
|
|
@@ -62108,7 +62109,7 @@ const Ks = class extends NA {
|
|
|
62108
62109
|
start() {
|
|
62109
62110
|
if (this.raycaster.length <= 0 && !IA.findObjectOfType(eB, this.context)) {
|
|
62110
62111
|
const t = IA.addNewComponent(this.context.scene, $s);
|
|
62111
|
-
t.ignoreSkinnedMeshes = !0, this.raycaster.push(t), (
|
|
62112
|
+
t.ignoreSkinnedMeshes = !0, this.raycaster.push(t), (We() || CQ) && console.warn("Added an ObjectRaycaster to the scene because no raycaster was found. Skinnedmeshes will be ignored for better performance");
|
|
62112
62113
|
}
|
|
62113
62114
|
}
|
|
62114
62115
|
register(e) {
|
|
@@ -62794,7 +62795,13 @@ class Xt extends NA {
|
|
|
62794
62795
|
if (f) {
|
|
62795
62796
|
wc && console.log(u.name, u.type, u);
|
|
62796
62797
|
const S = u.children;
|
|
62797
|
-
u.children = a
|
|
62798
|
+
u.children = a;
|
|
62799
|
+
const m = u.position, M = u.scale;
|
|
62800
|
+
if (Number.isNaN(m.x) || Number.isNaN(m.y) || Number.isNaN(m.z)) {
|
|
62801
|
+
console.warn(`Object "${u.name}" has NaN values in position or scale.... will ignore it`, m, M);
|
|
62802
|
+
return;
|
|
62803
|
+
}
|
|
62804
|
+
n.expandByObject(u, !0), u.children = S;
|
|
62798
62805
|
}
|
|
62799
62806
|
for (const S of u.children)
|
|
62800
62807
|
B(S);
|
|
@@ -62802,7 +62809,11 @@ class Xt extends NA {
|
|
|
62802
62809
|
}
|
|
62803
62810
|
for (const u of e)
|
|
62804
62811
|
u.updateMatrixWorld(), B(u);
|
|
62805
|
-
if (I.updateMatrixWorld(), I.updateProjectionMatrix(), n.getCenter(C), n.applyMatrix4(I.matrixWorldInverse), n.getSize(s), n.setFromCenterAndSize(C, s), s.
|
|
62812
|
+
if (I.updateMatrixWorld(), I.updateProjectionMatrix(), n.getCenter(C), n.applyMatrix4(I.matrixWorldInverse), n.getSize(s), n.setFromCenterAndSize(C, s), Number.isNaN(s.x) || Number.isNaN(s.y) || Number.isNaN(s.z)) {
|
|
62813
|
+
console.warn("Camera fit size resultet in NaN", I, n, [...e]);
|
|
62814
|
+
return;
|
|
62815
|
+
}
|
|
62816
|
+
if (s.length() <= 1e-10) {
|
|
62806
62817
|
wc && console.warn("Camera fit size is zero", n, [...e]);
|
|
62807
62818
|
return;
|
|
62808
62819
|
}
|
|
@@ -63138,7 +63149,7 @@ class ciA {
|
|
|
63138
63149
|
return (A = this._camera) == null ? void 0 : A.context;
|
|
63139
63150
|
}
|
|
63140
63151
|
enable() {
|
|
63141
|
-
this._skybox = this.context.lightmaps.tryGetSkybox(this._camera.sourceId), this._skybox ? this.context.scene.background !== this._skybox && (cr && console.log(`Camera "${this._camera.name}" set skybox`, this._camera, this._skybox), this._skybox.colorSpace = Ie, this._skybox.mapping = Lo, this.context.scene.background = this._skybox) : (this._did_log_failed_to_find_skybox || (this._did_log_failed_to_find_skybox = !0, console.warn(`Camera "${this._camera.name}" failed to load/find skybox texture`, this._camera.sourceId, this.context.lightmaps, "Current background: ", this.context.scene.background)), (cr ||
|
|
63152
|
+
this._skybox = this.context.lightmaps.tryGetSkybox(this._camera.sourceId), this._skybox ? this.context.scene.background !== this._skybox && (cr && console.log(`Camera "${this._camera.name}" set skybox`, this._camera, this._skybox), this._skybox.colorSpace = Ie, this._skybox.mapping = Lo, this.context.scene.background = this._skybox) : (this._did_log_failed_to_find_skybox || (this._did_log_failed_to_find_skybox = !0, console.warn(`Camera "${this._camera.name}" failed to load/find skybox texture`, this._camera.sourceId, this.context.lightmaps, "Current background: ", this.context.scene.background)), (cr || We()) && Pg(`Camera "${this._camera.name}" has no skybox texture`));
|
|
63142
63153
|
}
|
|
63143
63154
|
}
|
|
63144
63155
|
function hiA(i) {
|
|
@@ -63856,7 +63867,7 @@ class gU extends qw {
|
|
|
63856
63867
|
}
|
|
63857
63868
|
}
|
|
63858
63869
|
}
|
|
63859
|
-
if (this._useclipOffsets && (this._totalOffsetPosition.lerp(this._totalOffsetPosition2, g), this._totalOffsetRotation.slerp(this._totalOffsetRotation2, g)), this.__mixerError === void 0 && (PC ||
|
|
63870
|
+
if (this._useclipOffsets && (this._totalOffsetPosition.lerp(this._totalOffsetPosition2, g), this._totalOffsetRotation.slerp(this._totalOffsetRotation2, g)), this.__mixerError === void 0 && (PC || We()) && ((n = (C = this._animator) == null ? void 0 : C.runtimeAnimatorController) != null && n.mixer) && this.mixer !== ((B = (a = this._animator) == null ? void 0 : a.runtimeAnimatorController) == null ? void 0 : B.mixer) && (this.__mixerError = !0, console.error("AnimationTrack mixer is not shared with the animator controller - this might result in the timeline to not animate properly. Please report a bug to the Needle Engine team!", this)), (Q = this._animator) != null && Q.runtimeAnimatorController) {
|
|
63860
63871
|
const l = Math.max(0, 1 - s);
|
|
63861
63872
|
(c = (E = this._animator) == null ? void 0 : E.runtimeAnimatorController) == null || c.update(l);
|
|
63862
63873
|
} else
|
|
@@ -64715,7 +64726,7 @@ class tB extends NA {
|
|
|
64715
64726
|
// private _analyzer?: AudioAnalyser;
|
|
64716
64727
|
/** @deprecated */
|
|
64717
64728
|
getFrequency(e) {
|
|
64718
|
-
return this.unsupported_getfrequency || (this.unsupported_getfrequency = !0,
|
|
64729
|
+
return this.unsupported_getfrequency || (this.unsupported_getfrequency = !0, We() && Pg("VOIP: getFrequency is currently not supported"), console.warn("VOIP: getFrequency is currently not supported")), null;
|
|
64719
64730
|
}
|
|
64720
64731
|
async getAudioStream(e) {
|
|
64721
64732
|
return navigator.mediaDevices.getUserMedia ? await navigator.mediaDevices.getUserMedia({ audio: e ?? !0, video: !1 }).catch((g) => (console.warn("VOIP failed getting audio stream", g), null)) : (console.error("No getDisplayMedia support"), null);
|
|
@@ -66431,7 +66442,7 @@ var DgA = Object.defineProperty, wgA = Object.getOwnPropertyDescriptor, $t = (i,
|
|
|
66431
66442
|
return t && g && DgA(A, e, g), g;
|
|
66432
66443
|
};
|
|
66433
66444
|
function Id(i) {
|
|
66434
|
-
i && (i.getComponentInParent(eB) || (
|
|
66445
|
+
i && (i.getComponentInParent(eB) || (We() && console.warn("Create Raycaster on " + i.name + " because no raycaster was found in the hierarchy"), i.addNewComponent($s)));
|
|
66435
66446
|
}
|
|
66436
66447
|
class mE extends NA {
|
|
66437
66448
|
constructor() {
|
|
@@ -66818,7 +66829,7 @@ const nQ = (hk = class extends NA {
|
|
|
66818
66829
|
if (this.target && this.animator) {
|
|
66819
66830
|
const n = (I = (g = this.animator) == null ? void 0 : g.runtimeAnimatorController) == null ? void 0 : I.findState(this.stateName);
|
|
66820
66831
|
if (!((o = n == null ? void 0 : n.motion) != null && o.clip)) {
|
|
66821
|
-
|
|
66832
|
+
We() && console.warn("No clip found for state " + this.stateName);
|
|
66822
66833
|
return;
|
|
66823
66834
|
}
|
|
66824
66835
|
this.stateAnimationModel = e, this.stateAnimation = A.registerAnimation(this.target, n == null ? void 0 : n.motion.clip);
|
|
@@ -73966,7 +73977,7 @@ class hd extends NA {
|
|
|
73966
73977
|
console.warn("OpenURL: URL is not set, can't open.", this);
|
|
73967
73978
|
return;
|
|
73968
73979
|
}
|
|
73969
|
-
switch (this._validateUrl(),
|
|
73980
|
+
switch (this._validateUrl(), We() && qi("Open URL: " + this.url), this.mode) {
|
|
73970
73981
|
case 0:
|
|
73971
73982
|
Qr() ? globalThis.open(this.url, "_blank") : globalThis.open(this.url, "_blank");
|
|
73972
73983
|
break;
|
|
@@ -73998,7 +74009,7 @@ class hd extends NA {
|
|
|
73998
74009
|
this.clickable && !e.used && ((t = this.url) != null && t.length) && this.open();
|
|
73999
74010
|
}
|
|
74000
74011
|
_validateUrl() {
|
|
74001
|
-
this.url && this.url.startsWith("www.") && (
|
|
74012
|
+
this.url && this.url.startsWith("www.") && (We() && console.warn("URL is not valid, adding https:// to the start of the URL", this.url), this.url = "https://" + this.url);
|
|
74002
74013
|
}
|
|
74003
74014
|
}
|
|
74004
74015
|
FU([
|
|
@@ -78580,7 +78591,7 @@ const yG = (dk = class extends NA {
|
|
|
78580
78591
|
r(this, "lengthScale");
|
|
78581
78592
|
}
|
|
78582
78593
|
start() {
|
|
78583
|
-
if (this.maxParticleSize !== 0.5 && this.minParticleSize !== 0 &&
|
|
78594
|
+
if (this.maxParticleSize !== 0.5 && this.minParticleSize !== 0 && We()) {
|
|
78584
78595
|
const A = `ParticleSystem "${this.name}" has non-default min/max particle size. This may not render correctly. Please set min size to 0 and the max size to 0.5 and use the "StartSize" setting instead`;
|
|
78585
78596
|
console.warn(A);
|
|
78586
78597
|
}
|
|
@@ -79234,7 +79245,7 @@ const _p = class extends NA {
|
|
|
79234
79245
|
var A;
|
|
79235
79246
|
if (this._subEmitterSystems && this._particleSystem)
|
|
79236
79247
|
for (const e of this._subEmitterSystems) {
|
|
79237
|
-
e.particleSystem && (e.particleSystem.__internalAwake ? e.particleSystem.__internalAwake() :
|
|
79248
|
+
e.particleSystem && (e.particleSystem.__internalAwake ? e.particleSystem.__internalAwake() : We() && console.warn("SubParticleSystem serialization issue(?)", e.particleSystem, e));
|
|
79238
79249
|
const t = (A = e.particleSystem) == null ? void 0 : A._particleSystem;
|
|
79239
79250
|
if (t) {
|
|
79240
79251
|
e.particleSystem._isUsedAsSubsystem = !0;
|
|
@@ -79316,7 +79327,7 @@ function e2(i, A) {
|
|
|
79316
79327
|
if (!i.unsupported_scaling_mode) {
|
|
79317
79328
|
i.unsupported_scaling_mode = !0;
|
|
79318
79329
|
const e = "ParticleSystem scale mode " + rG[i.main.scalingMode] + " is not supported";
|
|
79319
|
-
|
|
79330
|
+
We() && Pg(e), console.warn(e, i.name, i);
|
|
79320
79331
|
}
|
|
79321
79332
|
A = fg(i.gameObject, A);
|
|
79322
79333
|
break;
|
|
@@ -80947,7 +80958,7 @@ const I2 = function(i) {
|
|
|
80947
80958
|
typeof i == "string" ? I = A[i] : typeof i == "function" && (I = i);
|
|
80948
80959
|
const o = A, s = o.__internalAwake;
|
|
80949
80960
|
if (typeof s != "function") {
|
|
80950
|
-
(uh ||
|
|
80961
|
+
(uh || We()) && console.error('@syncField can currently only used on Needle Engine Components, custom object of type "' + ((a = A == null ? void 0 : A.constructor) == null ? void 0 : a.name) + '" is not supported', A);
|
|
80951
80962
|
return;
|
|
80952
80963
|
}
|
|
80953
80964
|
uh && console.log(t);
|
|
@@ -80964,7 +80975,7 @@ const I2 = function(i) {
|
|
|
80964
80975
|
var l;
|
|
80965
80976
|
const c = this[C];
|
|
80966
80977
|
if (this[C] = E, Q) {
|
|
80967
|
-
|
|
80978
|
+
We() && console.warn("Recursive call detected", t);
|
|
80968
80979
|
return;
|
|
80969
80980
|
}
|
|
80970
80981
|
Q = !0;
|
|
@@ -81660,7 +81671,7 @@ class Og extends NA {
|
|
|
81660
81671
|
this._muted = e, this._videoElement && (this._videoElement.muted = e);
|
|
81661
81672
|
}
|
|
81662
81673
|
set audioOutputMode(e) {
|
|
81663
|
-
e !== this._audioOutputMode && (e === 1 &&
|
|
81674
|
+
e !== this._audioOutputMode && (e === 1 && We() && console.warn("VideoAudioOutputMode.AudioSource is not yet implemented"), this._audioOutputMode = e, this.updateVideoElementSettings());
|
|
81664
81675
|
}
|
|
81665
81676
|
get audioOutputMode() {
|
|
81666
81677
|
return this._audioOutputMode;
|
|
@@ -83557,7 +83568,7 @@ const GG = (fk = class extends NA {
|
|
|
83557
83568
|
for (const g in this.remoteCams) {
|
|
83558
83569
|
const I = this.remoteCams[g], o = this.context.time.realtimeSinceStartup - I.lastUpdate;
|
|
83559
83570
|
if (!I || o > this._camTimeoutInSeconds) {
|
|
83560
|
-
|
|
83571
|
+
We() && console.log("Remote cam timeout", g), I != null && I.obj && IA.destroy(I.obj), delete this.remoteCams[g], I && delete this.userToCamMap[I.userId], GG.instances.push(I), this.context.players.removePlayerView(I.userId, $C.Browser);
|
|
83561
83572
|
continue;
|
|
83562
83573
|
}
|
|
83563
83574
|
}
|
|
@@ -84081,7 +84092,7 @@ class WU extends NA {
|
|
|
84081
84092
|
}
|
|
84082
84093
|
apply() {
|
|
84083
84094
|
var t, g;
|
|
84084
|
-
gk && console.log("Apply PostProcessing", this, (t = this.context.mainCamera) == null ? void 0 : t.name),
|
|
84095
|
+
gk && console.log("Apply PostProcessing", this, (t = this.context.mainCamera) == null ? void 0 : t.name), We() && (this._lastApplyTime !== void 0 && Date.now() - this._lastApplyTime < 100 && (this._rapidApplyCount++, this._rapidApplyCount === 5 && console.warn("Detected rapid post processing modifications - this might be a bug", this)), this._lastApplyTime = Date.now()), this._isDirty = !1, this.unapply(), this._effects.length = 0, (g = this.sharedProfile) != null && g.components && this._effects.push(...this.sharedProfile.components);
|
|
84085
84096
|
const e = this.gameObject.getComponentsInChildren(EI);
|
|
84086
84097
|
if (gk && (e != null && e.length) && console.log("Additional", e), e)
|
|
84087
84098
|
for (const I of e)
|
|
@@ -85798,7 +85809,7 @@ class G2 extends HTMLElement {
|
|
|
85798
85809
|
const c = this.getAttribute("hide-loading-overlay");
|
|
85799
85810
|
c != null && c !== "0" && (o = !1);
|
|
85800
85811
|
}
|
|
85801
|
-
o === !1 && !I && (
|
|
85812
|
+
o === !1 && !I && (We() || (o = !0), console.warn("Needle Engine: You need a commercial license to override the default loading view. Visit https://needle.tools/pricing"), We() && Pg('You need a <a target="_blank" href="https://needle.tools/pricing">commercial license</a> to override the default loading view. This will not work in production.')), !this._loadingView && o && (this._loadingView = new Np(this)), o && (this._didFullyLoad !== !0 ? (Q = this._loadingView) == null || Q.onLoadingBegin("begin load") : setTimeout(() => {
|
|
85802
85813
|
this._loadingView && this._loadingProgress01 < 0.3 && this._loadId === t && this._loadingView.onLoadingBegin("begin load");
|
|
85803
85814
|
}, 300)), cg && console.warn("--------------", t, "Needle Engine: Begin loading", g ?? "", e), this.onBeforeBeginLoading();
|
|
85804
85815
|
const s = [], C = {
|
|
@@ -88058,7 +88069,7 @@ class Oe {
|
|
|
88058
88069
|
A.x = e.x, A.y = e.y, A.z = e.z, A.w = e.w;
|
|
88059
88070
|
}
|
|
88060
88071
|
}
|
|
88061
|
-
var iI, Ki, gD, si, Pr,
|
|
88072
|
+
var iI, Ki, gD, si, Pr, ze, iE, Aa, dl, ul, ID, oD;
|
|
88062
88073
|
(function(i) {
|
|
88063
88074
|
i[i.Dynamic = 0] = "Dynamic", i[i.Fixed = 1] = "Fixed", i[i.KinematicPositionBased = 2] = "KinematicPositionBased", i[i.KinematicVelocityBased = 3] = "KinematicVelocityBased";
|
|
88064
88075
|
})(iI || (iI = {}));
|
|
@@ -88972,38 +88983,38 @@ class tg {
|
|
|
88972
88983
|
const t = A.coShapeType(e);
|
|
88973
88984
|
let g, I, o, s, C, n;
|
|
88974
88985
|
switch (t) {
|
|
88975
|
-
case
|
|
88986
|
+
case ze.Ball:
|
|
88976
88987
|
return new Sd(A.coRadius(e));
|
|
88977
|
-
case
|
|
88988
|
+
case ze.Cuboid:
|
|
88978
88989
|
return g = A.coHalfExtents(e), new Fy(g.x, g.y, g.z);
|
|
88979
|
-
case
|
|
88990
|
+
case ze.RoundCuboid:
|
|
88980
88991
|
return g = A.coHalfExtents(e), I = A.coRoundRadius(e), new Ny(g.x, g.y, g.z, I);
|
|
88981
|
-
case
|
|
88992
|
+
case ze.Capsule:
|
|
88982
88993
|
return C = A.coHalfHeight(e), n = A.coRadius(e), new Ky(C, n);
|
|
88983
|
-
case
|
|
88994
|
+
case ze.Segment:
|
|
88984
88995
|
return o = A.coVertices(e), new Jy(nA.new(o[0], o[1], o[2]), nA.new(o[3], o[4], o[5]));
|
|
88985
|
-
case
|
|
88996
|
+
case ze.Polyline:
|
|
88986
88997
|
return o = A.coVertices(e), s = A.coIndices(e), new by(o, s);
|
|
88987
|
-
case
|
|
88998
|
+
case ze.Triangle:
|
|
88988
88999
|
return o = A.coVertices(e), new qy(nA.new(o[0], o[1], o[2]), nA.new(o[3], o[4], o[5]), nA.new(o[6], o[7], o[8]));
|
|
88989
|
-
case
|
|
89000
|
+
case ze.RoundTriangle:
|
|
88990
89001
|
return o = A.coVertices(e), I = A.coRoundRadius(e), new vy(nA.new(o[0], o[1], o[2]), nA.new(o[3], o[4], o[5]), nA.new(o[6], o[7], o[8]), I);
|
|
88991
|
-
case
|
|
89002
|
+
case ze.TriMesh:
|
|
88992
89003
|
return o = A.coVertices(e), s = A.coIndices(e), new Ly(o, s);
|
|
88993
|
-
case
|
|
89004
|
+
case ze.HeightField:
|
|
88994
89005
|
const a = A.coHeightfieldScale(e), B = A.coHeightfieldHeights(e), Q = A.coHeightfieldNRows(e), E = A.coHeightfieldNCols(e);
|
|
88995
89006
|
return new xy(Q, E, B, a);
|
|
88996
|
-
case
|
|
89007
|
+
case ze.ConvexPolyhedron:
|
|
88997
89008
|
return o = A.coVertices(e), s = A.coIndices(e), new pl(o, s);
|
|
88998
|
-
case
|
|
89009
|
+
case ze.RoundConvexPolyhedron:
|
|
88999
89010
|
return o = A.coVertices(e), s = A.coIndices(e), I = A.coRoundRadius(e), new fl(o, s, I);
|
|
89000
|
-
case
|
|
89011
|
+
case ze.Cylinder:
|
|
89001
89012
|
return C = A.coHalfHeight(e), n = A.coRadius(e), new Ty(C, n);
|
|
89002
|
-
case
|
|
89013
|
+
case ze.RoundCylinder:
|
|
89003
89014
|
return C = A.coHalfHeight(e), n = A.coRadius(e), I = A.coRoundRadius(e), new Yy(C, n, I);
|
|
89004
|
-
case
|
|
89015
|
+
case ze.Cone:
|
|
89005
89016
|
return C = A.coHalfHeight(e), n = A.coRadius(e), new Hy(C, n);
|
|
89006
|
-
case
|
|
89017
|
+
case ze.RoundCone:
|
|
89007
89018
|
return C = A.coHalfHeight(e), n = A.coRadius(e), I = A.coRoundRadius(e), new _y(C, n, I);
|
|
89008
89019
|
default:
|
|
89009
89020
|
throw new Error("unknown shape type: " + t);
|
|
@@ -89044,10 +89055,10 @@ class tg {
|
|
|
89044
89055
|
}
|
|
89045
89056
|
(function(i) {
|
|
89046
89057
|
i[i.Ball = 0] = "Ball", i[i.Cuboid = 1] = "Cuboid", i[i.Capsule = 2] = "Capsule", i[i.Segment = 3] = "Segment", i[i.Polyline = 4] = "Polyline", i[i.Triangle = 5] = "Triangle", i[i.TriMesh = 6] = "TriMesh", i[i.HeightField = 7] = "HeightField", i[i.ConvexPolyhedron = 9] = "ConvexPolyhedron", i[i.Cylinder = 10] = "Cylinder", i[i.Cone = 11] = "Cone", i[i.RoundCuboid = 12] = "RoundCuboid", i[i.RoundTriangle = 13] = "RoundTriangle", i[i.RoundCylinder = 14] = "RoundCylinder", i[i.RoundCone = 15] = "RoundCone", i[i.RoundConvexPolyhedron = 16] = "RoundConvexPolyhedron";
|
|
89047
|
-
})(
|
|
89058
|
+
})(ze || (ze = {}));
|
|
89048
89059
|
class Sd extends tg {
|
|
89049
89060
|
constructor(A) {
|
|
89050
|
-
super(), this.type =
|
|
89061
|
+
super(), this.type = ze.Ball, this.radius = A;
|
|
89051
89062
|
}
|
|
89052
89063
|
intoRaw() {
|
|
89053
89064
|
return Ue.ball(this.radius);
|
|
@@ -89055,7 +89066,7 @@ class Sd extends tg {
|
|
|
89055
89066
|
}
|
|
89056
89067
|
class Fy extends tg {
|
|
89057
89068
|
constructor(A, e, t) {
|
|
89058
|
-
super(), this.type =
|
|
89069
|
+
super(), this.type = ze.Cuboid, this.halfExtents = nA.new(A, e, t);
|
|
89059
89070
|
}
|
|
89060
89071
|
intoRaw() {
|
|
89061
89072
|
return Ue.cuboid(this.halfExtents.x, this.halfExtents.y, this.halfExtents.z);
|
|
@@ -89063,7 +89074,7 @@ class Fy extends tg {
|
|
|
89063
89074
|
}
|
|
89064
89075
|
class Ny extends tg {
|
|
89065
89076
|
constructor(A, e, t, g) {
|
|
89066
|
-
super(), this.type =
|
|
89077
|
+
super(), this.type = ze.RoundCuboid, this.halfExtents = nA.new(A, e, t), this.borderRadius = g;
|
|
89067
89078
|
}
|
|
89068
89079
|
intoRaw() {
|
|
89069
89080
|
return Ue.roundCuboid(this.halfExtents.x, this.halfExtents.y, this.halfExtents.z, this.borderRadius);
|
|
@@ -89071,7 +89082,7 @@ class Ny extends tg {
|
|
|
89071
89082
|
}
|
|
89072
89083
|
class Ky extends tg {
|
|
89073
89084
|
constructor(A, e) {
|
|
89074
|
-
super(), this.type =
|
|
89085
|
+
super(), this.type = ze.Capsule, this.halfHeight = A, this.radius = e;
|
|
89075
89086
|
}
|
|
89076
89087
|
intoRaw() {
|
|
89077
89088
|
return Ue.capsule(this.halfHeight, this.radius);
|
|
@@ -89079,7 +89090,7 @@ class Ky extends tg {
|
|
|
89079
89090
|
}
|
|
89080
89091
|
class Jy extends tg {
|
|
89081
89092
|
constructor(A, e) {
|
|
89082
|
-
super(), this.type =
|
|
89093
|
+
super(), this.type = ze.Segment, this.a = A, this.b = e;
|
|
89083
89094
|
}
|
|
89084
89095
|
intoRaw() {
|
|
89085
89096
|
let A = nA.intoRaw(this.a), e = nA.intoRaw(this.b), t = Ue.segment(A, e);
|
|
@@ -89088,7 +89099,7 @@ class Jy extends tg {
|
|
|
89088
89099
|
}
|
|
89089
89100
|
class qy extends tg {
|
|
89090
89101
|
constructor(A, e, t) {
|
|
89091
|
-
super(), this.type =
|
|
89102
|
+
super(), this.type = ze.Triangle, this.a = A, this.b = e, this.c = t;
|
|
89092
89103
|
}
|
|
89093
89104
|
intoRaw() {
|
|
89094
89105
|
let A = nA.intoRaw(this.a), e = nA.intoRaw(this.b), t = nA.intoRaw(this.c), g = Ue.triangle(A, e, t);
|
|
@@ -89097,7 +89108,7 @@ class qy extends tg {
|
|
|
89097
89108
|
}
|
|
89098
89109
|
class vy extends tg {
|
|
89099
89110
|
constructor(A, e, t, g) {
|
|
89100
|
-
super(), this.type =
|
|
89111
|
+
super(), this.type = ze.RoundTriangle, this.a = A, this.b = e, this.c = t, this.borderRadius = g;
|
|
89101
89112
|
}
|
|
89102
89113
|
intoRaw() {
|
|
89103
89114
|
let A = nA.intoRaw(this.a), e = nA.intoRaw(this.b), t = nA.intoRaw(this.c), g = Ue.roundTriangle(A, e, t, this.borderRadius);
|
|
@@ -89106,7 +89117,7 @@ class vy extends tg {
|
|
|
89106
89117
|
}
|
|
89107
89118
|
class by extends tg {
|
|
89108
89119
|
constructor(A, e) {
|
|
89109
|
-
super(), this.type =
|
|
89120
|
+
super(), this.type = ze.Polyline, this.vertices = A, this.indices = e ?? new Uint32Array(0);
|
|
89110
89121
|
}
|
|
89111
89122
|
intoRaw() {
|
|
89112
89123
|
return Ue.polyline(this.vertices, this.indices);
|
|
@@ -89114,7 +89125,7 @@ class by extends tg {
|
|
|
89114
89125
|
}
|
|
89115
89126
|
class Ly extends tg {
|
|
89116
89127
|
constructor(A, e) {
|
|
89117
|
-
super(), this.type =
|
|
89128
|
+
super(), this.type = ze.TriMesh, this.vertices = A, this.indices = e;
|
|
89118
89129
|
}
|
|
89119
89130
|
intoRaw() {
|
|
89120
89131
|
return Ue.trimesh(this.vertices, this.indices);
|
|
@@ -89122,7 +89133,7 @@ class Ly extends tg {
|
|
|
89122
89133
|
}
|
|
89123
89134
|
class pl extends tg {
|
|
89124
89135
|
constructor(A, e) {
|
|
89125
|
-
super(), this.type =
|
|
89136
|
+
super(), this.type = ze.ConvexPolyhedron, this.vertices = A, this.indices = e;
|
|
89126
89137
|
}
|
|
89127
89138
|
intoRaw() {
|
|
89128
89139
|
return this.indices ? Ue.convexMesh(this.vertices, this.indices) : Ue.convexHull(this.vertices);
|
|
@@ -89130,7 +89141,7 @@ class pl extends tg {
|
|
|
89130
89141
|
}
|
|
89131
89142
|
class fl extends tg {
|
|
89132
89143
|
constructor(A, e, t) {
|
|
89133
|
-
super(), this.type =
|
|
89144
|
+
super(), this.type = ze.RoundConvexPolyhedron, this.vertices = A, this.indices = e, this.borderRadius = t;
|
|
89134
89145
|
}
|
|
89135
89146
|
intoRaw() {
|
|
89136
89147
|
return this.indices ? Ue.roundConvexMesh(this.vertices, this.indices, this.borderRadius) : Ue.roundConvexHull(this.vertices, this.borderRadius);
|
|
@@ -89138,7 +89149,7 @@ class fl extends tg {
|
|
|
89138
89149
|
}
|
|
89139
89150
|
class xy extends tg {
|
|
89140
89151
|
constructor(A, e, t, g) {
|
|
89141
|
-
super(), this.type =
|
|
89152
|
+
super(), this.type = ze.HeightField, this.nrows = A, this.ncols = e, this.heights = t, this.scale = g;
|
|
89142
89153
|
}
|
|
89143
89154
|
intoRaw() {
|
|
89144
89155
|
let A = nA.intoRaw(this.scale), e = Ue.heightfield(this.nrows, this.ncols, this.heights, A);
|
|
@@ -89147,7 +89158,7 @@ class xy extends tg {
|
|
|
89147
89158
|
}
|
|
89148
89159
|
class Ty extends tg {
|
|
89149
89160
|
constructor(A, e) {
|
|
89150
|
-
super(), this.type =
|
|
89161
|
+
super(), this.type = ze.Cylinder, this.halfHeight = A, this.radius = e;
|
|
89151
89162
|
}
|
|
89152
89163
|
intoRaw() {
|
|
89153
89164
|
return Ue.cylinder(this.halfHeight, this.radius);
|
|
@@ -89155,7 +89166,7 @@ class Ty extends tg {
|
|
|
89155
89166
|
}
|
|
89156
89167
|
class Yy extends tg {
|
|
89157
89168
|
constructor(A, e, t) {
|
|
89158
|
-
super(), this.type =
|
|
89169
|
+
super(), this.type = ze.RoundCylinder, this.borderRadius = t, this.halfHeight = A, this.radius = e;
|
|
89159
89170
|
}
|
|
89160
89171
|
intoRaw() {
|
|
89161
89172
|
return Ue.roundCylinder(this.halfHeight, this.radius, this.borderRadius);
|
|
@@ -89163,7 +89174,7 @@ class Yy extends tg {
|
|
|
89163
89174
|
}
|
|
89164
89175
|
class Hy extends tg {
|
|
89165
89176
|
constructor(A, e) {
|
|
89166
|
-
super(), this.type =
|
|
89177
|
+
super(), this.type = ze.Cone, this.halfHeight = A, this.radius = e;
|
|
89167
89178
|
}
|
|
89168
89179
|
intoRaw() {
|
|
89169
89180
|
return Ue.cone(this.halfHeight, this.radius);
|
|
@@ -89171,7 +89182,7 @@ class Hy extends tg {
|
|
|
89171
89182
|
}
|
|
89172
89183
|
class _y extends tg {
|
|
89173
89184
|
constructor(A, e, t) {
|
|
89174
|
-
super(), this.type =
|
|
89185
|
+
super(), this.type = ze.RoundCone, this.halfHeight = A, this.radius = e, this.borderRadius = t;
|
|
89175
89186
|
}
|
|
89176
89187
|
intoRaw() {
|
|
89177
89188
|
return Ue.roundCone(this.halfHeight, this.radius, this.borderRadius);
|
|
@@ -89935,7 +89946,7 @@ var EaA = Object.freeze({ __proto__: null, version: K2, Vector3: gF, VectorOps:
|
|
|
89935
89946
|
}, ImpulseJoint: rn, UnitImpulseJoint: Ry, FixedImpulseJoint: sF, PrismaticImpulseJoint: CF, RevoluteImpulseJoint: nF, SphericalImpulseJoint: aF, JointData: ea, ImpulseJointSet: rF, MultibodyJoint: Bn, UnitMultibodyJoint: Uy, FixedMultibodyJoint: BF, PrismaticMultibodyJoint: QF, RevoluteMultibodyJoint: EF, SphericalMultibodyJoint: cF, MultibodyJointSet: hF, get CoefficientCombineRule() {
|
|
89936
89947
|
return si;
|
|
89937
89948
|
}, CCDSolver: lF, IslandManager: dF, BroadPhase: uF, NarrowPhase: pF, TempContactManifold: fF, Shape: tg, get ShapeType() {
|
|
89938
|
-
return
|
|
89949
|
+
return ze;
|
|
89939
89950
|
}, Ball: Sd, Cuboid: Fy, RoundCuboid: Ny, Capsule: Ky, Segment: Jy, Triangle: qy, RoundTriangle: vy, Polyline: by, TriMesh: Ly, ConvexPolyhedron: pl, RoundConvexPolyhedron: fl, Heightfield: xy, Cylinder: Ty, RoundCylinder: Yy, Cone: Hy, RoundCone: _y, get ActiveCollisionTypes() {
|
|
89940
89951
|
return iE;
|
|
89941
89952
|
}, Collider: sE, get MassPropsMode() {
|
|
@@ -90038,7 +90049,7 @@ const caA = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty(
|
|
|
90038
90049
|
ShapeContact: Wr,
|
|
90039
90050
|
ShapeTOI: cB,
|
|
90040
90051
|
get ShapeType() {
|
|
90041
|
-
return
|
|
90052
|
+
return ze;
|
|
90042
90053
|
},
|
|
90043
90054
|
get SolverFlags() {
|
|
90044
90055
|
return oD;
|
|
@@ -90114,7 +90125,7 @@ const Fh = class {
|
|
|
90114
90125
|
const n = C.parent();
|
|
90115
90126
|
n && n.numColliders() <= 0 && (n[DI] || (g = this.world) == null || g.removeRigidBody(n));
|
|
90116
90127
|
} else
|
|
90117
|
-
s instanceof gE && (s.numColliders() <= 0 ? (I = this.world) == null || I.removeRigidBody(s) :
|
|
90128
|
+
s instanceof gE && (s.numColliders() <= 0 ? (I = this.world) == null || I.removeRigidBody(s) : We() && (s.did_log_removing || setTimeout(() => {
|
|
90118
90129
|
s.numColliders() > 0 && (s.did_log_removing = !0, console.warn("RapierPhysics: removing rigidbody with colliders from the physics world is not possible right now, please remove the colliders first"));
|
|
90119
90130
|
}, 1)));
|
|
90120
90131
|
}
|
|
@@ -90496,12 +90507,12 @@ Error:`, s), null;
|
|
|
90496
90507
|
const t = e.shape;
|
|
90497
90508
|
let g = !1;
|
|
90498
90509
|
switch (t.type) {
|
|
90499
|
-
case
|
|
90510
|
+
case ze.Ball: {
|
|
90500
90511
|
const a = t, B = A, Q = A.gameObject, E = fg(Q, this._tempPosition), c = Math.abs(B.radius * E.x);
|
|
90501
90512
|
g = a.radius !== c, a.radius = c, g && e.setShape(a);
|
|
90502
90513
|
break;
|
|
90503
90514
|
}
|
|
90504
|
-
case
|
|
90515
|
+
case ze.Cuboid:
|
|
90505
90516
|
const I = t, o = A, s = o.size.x * 0.5, C = o.size.y * 0.5, n = o.size.z * 0.5;
|
|
90506
90517
|
g = I.halfExtents.x !== s || I.halfExtents.y !== C || I.halfExtents.z !== n, I.halfExtents.x = s, I.halfExtents.y = C, I.halfExtents.z = n, g && e.setShape(I);
|
|
90507
90518
|
break;
|
|
@@ -90561,7 +90572,12 @@ Error:`, s), null;
|
|
|
90561
90572
|
C ? this.syncPhysicsBody(e.gameObject, C, !0, !0) : this.syncPhysicsBody(e.gameObject, t, !0, !0);
|
|
90562
90573
|
continue;
|
|
90563
90574
|
}
|
|
90564
|
-
const I = t.translation(), o = t.rotation()
|
|
90575
|
+
const I = t.translation(), o = t.rotation();
|
|
90576
|
+
if (Number.isNaN(I.x) || Number.isNaN(o.x)) {
|
|
90577
|
+
!g.__COLLIDER_NAN && We() && (console.warn("Collider has NaN values", g.name, g.gameObject, t), g.__COLLIDER_NAN = !0);
|
|
90578
|
+
continue;
|
|
90579
|
+
}
|
|
90580
|
+
const s = e.center;
|
|
90565
90581
|
if (s && s.isVector3) {
|
|
90566
90582
|
this._tempQuaternion.set(o.x, o.y, o.z, o.w);
|
|
90567
90583
|
const C = this._tempPosition.copy(s).applyQuaternion(this._tempQuaternion);
|
|
@@ -91923,7 +91939,7 @@ export {
|
|
|
91923
91939
|
K8 as isAnimationAction,
|
|
91924
91940
|
HaA as isDebugMode,
|
|
91925
91941
|
AR as isDestroyed,
|
|
91926
|
-
|
|
91942
|
+
We as isDevEnvironment,
|
|
91927
91943
|
QrA as isDisposed,
|
|
91928
91944
|
I8 as isHostedOnGlitch,
|
|
91929
91945
|
WrA as isHotReloading,
|