@needle-tools/engine 4.8.3 → 4.8.4-next.5c03fe1
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 +10 -0
- package/dist/{gltf-progressive-Do1XJNMG.js → gltf-progressive-B3JW4cAu.js} +247 -248
- package/dist/gltf-progressive-DorC035H.min.js +8 -0
- package/dist/{gltf-progressive-CHV7_60B.umd.cjs → gltf-progressive-PB_58h1b.umd.cjs} +6 -6
- package/dist/{needle-engine.bundle-d8rUkpZi.umd.cjs → needle-engine.bundle-BDQm33td.umd.cjs} +36 -26
- package/dist/{needle-engine.bundle-CiIS3tNq.js → needle-engine.bundle-BecMzBfA.js} +219 -205
- package/dist/{needle-engine.bundle-Drb5H9t2.min.js → needle-engine.bundle-C3oFZgvW.min.js} +43 -33
- package/dist/needle-engine.js +3 -3
- package/dist/needle-engine.min.js +1 -1
- package/dist/needle-engine.umd.cjs +1 -1
- package/dist/{vendor-CGONwIc0.js → vendor-B_ytQUuR.js} +6 -6
- package/dist/{vendor-BlSxe9JJ.min.js → vendor-C31T0mYm.min.js} +2 -2
- package/dist/{vendor-Cty8Dnri.umd.cjs → vendor-D51IT5ns.umd.cjs} +9 -9
- package/lib/engine/engine_context.d.ts +1 -1
- package/lib/engine/engine_context.js +5 -12
- package/lib/engine/engine_context.js.map +1 -1
- package/lib/engine/engine_networking_streams.js +13 -2
- package/lib/engine/engine_networking_streams.js.map +1 -1
- package/lib/engine/webcomponents/buttons.js +6 -2
- package/lib/engine/webcomponents/buttons.js.map +1 -1
- package/lib/engine/webcomponents/needle menu/needle-menu.js +10 -0
- package/lib/engine/webcomponents/needle menu/needle-menu.js.map +1 -1
- package/lib/engine/webcomponents/needle-engine.loading.js +1 -1
- package/lib/engine/webcomponents/needle-engine.loading.js.map +1 -1
- package/lib/engine-components/OrbitControls.d.ts +1 -0
- package/lib/engine-components/OrbitControls.js +6 -0
- package/lib/engine-components/OrbitControls.js.map +1 -1
- package/package.json +4 -4
- package/plugins/vite/peer.js +60 -2
- package/plugins/vite/poster-client.js +35 -51
- package/plugins/vite/poster.js +2 -3
- package/src/engine/engine_context.ts +7 -12
- package/src/engine/engine_networking_streams.ts +17 -8
- package/src/engine/webcomponents/buttons.ts +6 -2
- package/src/engine/webcomponents/needle menu/needle-menu.ts +10 -0
- package/src/engine/webcomponents/needle-engine.loading.ts +1 -1
- package/src/engine-components/OrbitControls.ts +5 -0
- package/dist/gltf-progressive-B--ZfCTJ.min.js +0 -8
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Vector2 as J, Vector3 as b, Vector4 as de, Quaternion as $, PlaneGeometry as Nn, WebGLRenderer as dr, PerspectiveCamera as pe, OrthographicCamera as Md, Scene as bi, Mesh as H, Texture as Te, Uniform$1 as Ui, Color as se, ShaderMaterial as jn, Box3 as yi, ShadowMaterial as ab, Euler as Tt, MeshStandardMaterial as ct, Box3Helper as qw, GridHelper as rm, Object3D as M, Material as _e, Matrix3 as lb, Matrix4 as te, Layers as lo, Ray as co, MathUtils as gs, AxesHelper as _i, MeshBasicMaterial as we, DoubleSide as vi, BufferGeometry as In, Group as no, CylinderGeometry as cb, SphereGeometry as Rd, BoxGeometry as la, SpriteMaterial as Xw, Sprite as Qw, Shape as Yw, ExtrudeGeometry as Kw, Fog as hb, DirectionalLight as Zf, PointLight as am, EdgesGeometry as Zw, LineSegments as db, LineBasicMaterial as ub, Line as Zl, BufferAttribute as ht, Raycaster as Td, Sphere as Ed, ArrayCamera as Jw, Plane as ir, SkinnedMesh as ys, InterleavedBufferAttribute as fb, Skeleton as ex, Bone as tx, Source as ix, WebGLCubeRenderTarget as nx, CubeCamera as sx, AnimationClip as so, FileLoader as lm, TextureLoader as Qr, PropertyBinding as ca, LinearSRGBColorSpace as Ss, ShaderChunk as Vt, UniformsLib as ox, DataTexture as cm, RGBAFormat as Ad, EquirectangularReflectionMapping as _s, SRGBColorSpace as Cs, Clock as rx, NeutralToneMapping as ha, AgXToneMapping as Id, ACESFilmicToneMapping as Ld, NoToneMapping as Vh, PCFSoftShadowMap$1 as ax, BasicNodeLibrary as lx, WebGLRenderTarget as Bn, DepthTexture as pb, NearestFilter as Hh, LoopRepeat as cx, LoopOnce as Jf, AnimationMixer as hm, CompressedTexture as hx, FrontSide as ho, Camera as dx, Frustum as Gg, AudioListener as ux, PositionalAudio as fx, AudioLoader as ep, EventDispatcher as dm, BackSide as Dd, MeshDepthMaterial as px, CustomBlending as mx, MaxEquation as gx, AmbientLight as yx, HemisphereLight as _x, AlwaysStencilFunc as bx, GreaterEqualStencilFunc as vx, NotEqualStencilFunc as wx, GreaterStencilFunc as xx, LessEqualStencilFunc as Sx, EqualStencilFunc as Cx, LessStencilFunc as Px, NeverStencilFunc as qg, InvertStencilOp as Ox, DecrementWrapStencilOp as kx, IncrementWrapStencilOp as Mx, DecrementStencilOp as Rx, IncrementStencilOp as Tx, ReplaceStencilOp as Ex, ZeroStencilOp as Ax, KeepStencilOp as Ix, RawShaderMaterial as mb, GLSL3 as Lx, AlwaysDepth as Dx, GreaterEqualDepth as jx, GreaterDepth as Bx, LessEqualDepth as Fx, LessDepth as zx, NotEqualDepth as Ux, EqualDepth as Nx, BatchedMesh as Xg, MeshPhysicalMaterial as tp, LinearFilter as Gh, UnsignedByteType as $x, RingGeometry as Wx, Line3 as Vx, AdditiveBlending as gb, BoxHelper as Hx, SpotLight as Gx, DirectionalLightHelper as qx, CameraHelper as Xx, LOD as Qx, Triangle as Yx, NormalBlending as Kx, ReinhardToneMapping as um, LinearToneMapping as fm, HalfFloatType as Nu, VideoTexture as Zx, CubeTexture as Jx, CompressedCubeTexture as eS, EquirectangularRefractionMapping as tS, VectorKeyframeTrack as iS, QuaternionKeyframeTrack as nS, Audio as sS, ShaderLib as qh, UniformsUtils as yb, MirroredRepeatWrapping as Qg, MeshNormalMaterial as oS, AudioContext as rS, PMREMGenerator$1 as aS } from "./three-DrqIzZTH.js";
|
|
2
|
-
import { createLoaders as pm, getRaycastMesh as _b, LODsManager as Io, NEEDLE_progressive as We, addDracoAndKTX2Loaders as lS, configureLoader as cS, setKTX2TranscoderLocation as hS, setDracoDecoderLocation as dS } from "./gltf-progressive-
|
|
2
|
+
import { createLoaders as pm, getRaycastMesh as _b, LODsManager as Io, NEEDLE_progressive as We, addDracoAndKTX2Loaders as lS, configureLoader as cS, setKTX2TranscoderLocation as hS, setDracoDecoderLocation as dS } from "./gltf-progressive-B3JW4cAu.js";
|
|
3
3
|
import { GroundedSkybox as da, Font as uS, TextGeometry as fS, FontLoader as pS, GLTFLoader as Ps, TransformControlsGizmo as bb, EXRLoader as Xh, RGBELoader as ip, Stats as mS, nodeFrame as gS, OrbitControls as vb, PositionalAudioHelper as yS, HorizontalBlurShader as _S, VerticalBlurShader as bS, GLTFExporter as wb, strToU8 as xb, zipSync as vS, XRControllerModelFactory as wS, XRHandMeshModel as xS, Line2 as SS, LineGeometry as CS, LineMaterial as PS, KTX2Loader as OS, TransformControls as kS, InteractiveGroup as MS, HTMLMesh as RS, VertexNormalsHelper as TS, OBJLoader as mm, FBXLoader as Sb, mergeVertices as ES } from "./three-examples-BIuXQPSf.js";
|
|
4
|
-
import { fetchProfile as AS, MotionController as IS, $70d766613f57b014$export$2e2bcd8739ae039 as Yg, ByteBuffer as LS, v5 as Kg, md5 as Zg, SIZE_PREFIX_LENGTH as Cb, Builder as gm, createNoise4D as DS, Matrix4 as $u, BatchedParticleRenderer as jS, ParticleSystem as BS, RenderMode as as, ConstantColor as FS, Vector4 as zS, ConstantValue as US, TrailParticle as Jg, WorkerBase as NS, MeshBVH as $S } from "./vendor-
|
|
4
|
+
import { fetchProfile as AS, MotionController as IS, $70d766613f57b014$export$2e2bcd8739ae039 as Yg, ByteBuffer as LS, v5 as Kg, md5 as Zg, SIZE_PREFIX_LENGTH as Cb, Builder as gm, createNoise4D as DS, Matrix4 as $u, BatchedParticleRenderer as jS, ParticleSystem as BS, RenderMode as as, ConstantColor as FS, Vector4 as zS, ConstantValue as US, TrailParticle as Jg, WorkerBase as NS, MeshBVH as $S } from "./vendor-B_ytQUuR.js";
|
|
5
5
|
import { __webpack_exports__default as Ce, __webpack_exports__Text as Pb, __webpack_exports__Block as Ob, __webpack_exports__update as WS, SimpleStateBehavior as VS, __webpack_exports__Inline as Wu, __webpack_exports__FontLibrary as ey, ThreeMeshUI as ty } from "./three-mesh-ui-D6Mz5Yl7.js";
|
|
6
6
|
import { EffectAttribute as HS } from "./postprocessing-DddlM3CK.js";
|
|
7
7
|
const Vu = /* @__PURE__ */ new Map();
|
|
@@ -1582,14 +1582,14 @@ function Wb(s, ...e) {
|
|
|
1582
1582
|
}
|
|
1583
1583
|
}
|
|
1584
1584
|
const GC = w("nodevlogs");
|
|
1585
|
-
function
|
|
1585
|
+
function Be(s, e = Ni.Log) {
|
|
1586
1586
|
kn(e, s);
|
|
1587
1587
|
}
|
|
1588
1588
|
function me(s) {
|
|
1589
|
-
|
|
1589
|
+
Be(s, Ni.Warn);
|
|
1590
1590
|
}
|
|
1591
1591
|
function Nd(s) {
|
|
1592
|
-
|
|
1592
|
+
Be(s, Ni.Error);
|
|
1593
1593
|
}
|
|
1594
1594
|
let cp, Yu;
|
|
1595
1595
|
function L() {
|
|
@@ -1785,11 +1785,11 @@ po('if(!globalThis["NEEDLE_ENGINE_VERSION"]) globalThis["NEEDLE_ENGINE_VERSION"]
|
|
|
1785
1785
|
po('if(!globalThis["NEEDLE_ENGINE_GENERATOR"]) globalThis["NEEDLE_ENGINE_GENERATOR"] = "unknown";');
|
|
1786
1786
|
po('if(!globalThis["NEEDLE_PROJECT_BUILD_TIME"]) globalThis["NEEDLE_PROJECT_BUILD_TIME"] = "unknown";');
|
|
1787
1787
|
po('if(!globalThis["NEEDLE_PUBLIC_KEY"]) globalThis["NEEDLE_PUBLIC_KEY"] = "unknown";');
|
|
1788
|
-
po('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.8.
|
|
1788
|
+
po('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.8.4";');
|
|
1789
1789
|
po('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
|
|
1790
|
-
po('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Mon Aug 18 2025
|
|
1790
|
+
po('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Mon Aug 18 2025 16:33:04 GMT+0000 (Coordinated Universal Time)";');
|
|
1791
1791
|
po('globalThis["__NEEDLE_PUBLIC_KEY__"] = "' + NEEDLE_PUBLIC_KEY + '";');
|
|
1792
|
-
const Ln = "4.8.
|
|
1792
|
+
const Ln = "4.8.4", wm = "undefined", Qb = "Mon Aug 18 2025 16:33:04 GMT+0000 (Coordinated Universal Time)";
|
|
1793
1793
|
Xb && console.log(`Engine version: ${Ln} (generator: ${wm})
|
|
1794
1794
|
Project built at ${Qb}`);
|
|
1795
1795
|
const vl = NEEDLE_PUBLIC_KEY, ro = "needle_isActiveInHierarchy", jr = "builtin_components", Oh = "needle_editor_guid";
|
|
@@ -1911,7 +1911,7 @@ function o1(s) {
|
|
|
1911
1911
|
pa[e](s);
|
|
1912
1912
|
}
|
|
1913
1913
|
const tt = w("debuginput");
|
|
1914
|
-
var Pm = /* @__PURE__ */ ((s) => (s.Mouse = "mouse", s.Touch = "touch", s.Controller = "controller", s.Hand = "hand", s))(Pm || {}),
|
|
1914
|
+
var Pm = /* @__PURE__ */ ((s) => (s.Mouse = "mouse", s.Touch = "touch", s.Controller = "controller", s.Hand = "hand", s))(Pm || {}), De = /* @__PURE__ */ ((s) => (s.PointerDown = "pointerdown", s.PointerUp = "pointerup", s.PointerMove = "pointermove", s.KeyDown = "keydown", s.KeyUp = "keyup", s.KeyPressed = "keypress", s))(De || {});
|
|
1915
1915
|
class Vs extends PointerEvent {
|
|
1916
1916
|
/**
|
|
1917
1917
|
* Spatial input data
|
|
@@ -2396,13 +2396,13 @@ class r1 {
|
|
|
2396
2396
|
createInputEvent(e) {
|
|
2397
2397
|
switch (e.type) {
|
|
2398
2398
|
case "pointerdown":
|
|
2399
|
-
tt &&
|
|
2399
|
+
tt && Be("Create Pointer down"), this.onDownButton(e.deviceIndex, e.button), this.onDown(e);
|
|
2400
2400
|
break;
|
|
2401
2401
|
case "pointermove":
|
|
2402
|
-
tt &&
|
|
2402
|
+
tt && Be("Create Pointer move"), this.onMove(e);
|
|
2403
2403
|
break;
|
|
2404
2404
|
case "pointerup":
|
|
2405
|
-
tt &&
|
|
2405
|
+
tt && Be("Create Pointer up"), this.onUp(e), this.onReleaseButton(e.deviceIndex, e.button);
|
|
2406
2406
|
break;
|
|
2407
2407
|
}
|
|
2408
2408
|
}
|
|
@@ -2496,7 +2496,7 @@ class r1 {
|
|
|
2496
2496
|
if (this.context.isInAR || this.canReceiveInput(e) === !1) return;
|
|
2497
2497
|
e.target instanceof HTMLElement && e.target.setPointerCapture(e.pointerId);
|
|
2498
2498
|
const t = this.getPointerId(e);
|
|
2499
|
-
tt &&
|
|
2499
|
+
tt && Be(`pointer down #${t}, identifier:${e.pointerId}`);
|
|
2500
2500
|
const i = this.getAndUpdateSpatialObjectForScreenPosition(t, e.clientX, e.clientY), n = new Vs("pointerdown", e, { origin: this, mode: "screen", deviceIndex: 0, pointerId: t, button: e.button, clientX: e.clientX, clientY: e.clientY, pointerType: e.pointerType, buttonName: this.getButtonName(e), device: i, pressure: e.pressure });
|
|
2501
2501
|
this.onDown(n);
|
|
2502
2502
|
};
|
|
@@ -3178,16 +3178,16 @@ Pinch: ${this.getGesture("pinch")?.value.toFixed(3)}`), n += `
|
|
|
3178
3178
|
if (!this.emitPointerDownEvent || this.inputSource !== e.inputSource) return;
|
|
3179
3179
|
this.onUpdateFrame(e.frame), this._hasSelectEvent = !0;
|
|
3180
3180
|
const t = this._layout?.selectComponentId, i = this._layout?.components[t]?.gamepadIndices?.button;
|
|
3181
|
-
i !== void 0 && (this._selectButtonIndex = i), !Xc && (Yn && F.DrawDirection(this.rayWorldPosition, G(0, 0.01, 1).applyQuaternion(this.rayWorldQuaternion), 16711680, 10), this.emitPointerEvent(
|
|
3181
|
+
i !== void 0 && (this._selectButtonIndex = i), !Xc && (Yn && F.DrawDirection(this.rayWorldPosition, G(0, 0.01, 1).applyQuaternion(this.rayWorldQuaternion), 16711680, 10), this.emitPointerEvent(De.PointerDown, this._selectButtonIndex || 0, "xr-standard-trigger", !0, e));
|
|
3182
3182
|
};
|
|
3183
3183
|
onSelectEnd = (e) => {
|
|
3184
|
-
this.emitPointerUpEvent && (Xc || this.inputSource === e.inputSource && this.emitPointerEvent(
|
|
3184
|
+
this.emitPointerUpEvent && (Xc || this.inputSource === e.inputSource && this.emitPointerEvent(De.PointerUp, this._selectButtonIndex || 0, "xr-standard-trigger", !0, e));
|
|
3185
3185
|
};
|
|
3186
3186
|
onSequeezeStart = (e) => {
|
|
3187
|
-
this.emitPointerDownEvent && this.inputSource === e.inputSource && (this._squeezeButtonIndex = this._layout?.components["xr-standard-squeeze"]?.gamepadIndices?.button, this._squeezeButtonIndex !== void 0 && (Yn && F.DrawDirection(this.rayWorldPosition, G(0, 0.01, 1).applyQuaternion(this.rayWorldQuaternion), 255, 10), this.emitPointerEvent(
|
|
3187
|
+
this.emitPointerDownEvent && this.inputSource === e.inputSource && (this._squeezeButtonIndex = this._layout?.components["xr-standard-squeeze"]?.gamepadIndices?.button, this._squeezeButtonIndex !== void 0 && (Yn && F.DrawDirection(this.rayWorldPosition, G(0, 0.01, 1).applyQuaternion(this.rayWorldQuaternion), 255, 10), this.emitPointerEvent(De.PointerDown, this._squeezeButtonIndex || 0, "xr-standard-squeeze", !0, e)));
|
|
3188
3188
|
};
|
|
3189
3189
|
onSequeezeEnd = (e) => {
|
|
3190
|
-
this.emitPointerUpEvent && this.inputSource === e.inputSource && this._squeezeButtonIndex !== void 0 && this.emitPointerEvent(
|
|
3190
|
+
this.emitPointerUpEvent && this.inputSource === e.inputSource && this._squeezeButtonIndex !== void 0 && this.emitPointerEvent(De.PointerUp, this._squeezeButtonIndex || 0, "xr-standard-squeeze", !0, e);
|
|
3191
3191
|
};
|
|
3192
3192
|
/** Index = button index */
|
|
3193
3193
|
states = {};
|
|
@@ -3252,7 +3252,7 @@ Pinch: ${this.getGesture("pinch")?.value.toFixed(3)}`), n += `
|
|
|
3252
3252
|
pointerInit;
|
|
3253
3253
|
emitPointerEvent(e, t, i, n, o = null, r) {
|
|
3254
3254
|
if (!this.emitEvents) {
|
|
3255
|
-
Yn && e !==
|
|
3255
|
+
Yn && e !== De.PointerMove && console.warn("Pointer events are disabled for this controller", this.index, e, t);
|
|
3256
3256
|
return;
|
|
3257
3257
|
}
|
|
3258
3258
|
if (this.xr.mode === "immersive-vr" || this.xr.isPassThrough) {
|
|
@@ -3474,7 +3474,7 @@ function m1(s, e) {
|
|
|
3474
3474
|
}, s ? new Yg(s, e) : new Yg(e);
|
|
3475
3475
|
}
|
|
3476
3476
|
async function Py() {
|
|
3477
|
-
const s = await import("./vendor-
|
|
3477
|
+
const s = await import("./vendor-B_ytQUuR.js").then((e) => e.bundler);
|
|
3478
3478
|
return console.log(s), s.default === void 0 ? s : s.default;
|
|
3479
3479
|
}
|
|
3480
3480
|
class g1 {
|
|
@@ -3887,7 +3887,7 @@ class w1 {
|
|
|
3887
3887
|
}
|
|
3888
3888
|
console.debug(`⊡ Connecting to networking backend on
|
|
3889
3889
|
` + Ti);
|
|
3890
|
-
const o = await import("./vendor-
|
|
3890
|
+
const o = await import("./vendor-B_ytQUuR.js").then((c) => c.index), r = o.default?.WebsocketBuilder ?? o.WebsocketBuilder, a = o.default?.ExponentialBackoff ?? o.ExponentialBackoff, l = new r(Ti).withMaxRetries(10).withBackoff(new a(2e3, 4)).onOpen(() => {
|
|
3891
3891
|
this._connectingToWebsocketPromise = null, this._ws = l, this.connected = !0, L() || ai ? console.log(`⊞ Connected to networking backend
|
|
3892
3892
|
` + Ti) : console.debug("⊞ Connected to networking backend", Ti), n(!0), this.onSendQueued(xn.OnConnection);
|
|
3893
3893
|
}).onClose((c) => {
|
|
@@ -4752,7 +4752,7 @@ class K {
|
|
|
4752
4752
|
a.onBeforeXR && a.onBeforeXR(e, t);
|
|
4753
4753
|
for (const a of this._sessionRequestStartListeners)
|
|
4754
4754
|
a({ mode: e, init: t });
|
|
4755
|
-
He &&
|
|
4755
|
+
He && Be("Requesting " + e + " session (" + Date.now() + ")"), this._currentSessionRequest = navigator.xr?.requestSession(e, t), this._currentSessionRequestMode = e;
|
|
4756
4756
|
const o = await this._currentSessionRequest?.catch((a) => {
|
|
4757
4757
|
console.error(a, "Code: " + a.code), a.code === 9 && me("Make sure your device has the required permissions (e.g. camera access)"), console.log("If the specified XR configuration is not supported (e.g. entering AR doesnt work) - make sure you access the website on a secure connection (HTTPS) and your device has the required permissions (e.g. camera access)"), location.protocol === "http:" && me("XR requires a secure connection (HTTPS)");
|
|
4758
4758
|
});
|
|
@@ -6008,7 +6008,7 @@ var ed;
|
|
|
6008
6008
|
s.runMeshBVHRaycast = e;
|
|
6009
6009
|
let t = !1, i = null, n = null, o = null, r = null;
|
|
6010
6010
|
function a() {
|
|
6011
|
-
t || (t = !0, import("./vendor-
|
|
6011
|
+
t || (t = !0, import("./vendor-B_ytQUuR.js").then((v) => v.index$1).then((v) => {
|
|
6012
6012
|
i = v.acceleratedRaycast, n = v.MeshBVH, o = v.StaticGeometryGenerator, r = v.computeBoundsTree;
|
|
6013
6013
|
}).catch((v) => {
|
|
6014
6014
|
(Wt || L()) && console.error("Failed to load BVH library...", v.message);
|
|
@@ -9238,13 +9238,15 @@ class Rn {
|
|
|
9238
9238
|
L() && window.location.href.includes("://localhost") && me("To access your website from another device in the same local network you have to use the IP address instead of localhost. The IP address is logged in your development server console when you start the server."), o();
|
|
9239
9239
|
});
|
|
9240
9240
|
async function o() {
|
|
9241
|
-
await a()
|
|
9242
|
-
const
|
|
9243
|
-
|
|
9244
|
-
const h =
|
|
9245
|
-
|
|
9241
|
+
await a();
|
|
9242
|
+
const c = document.body.querySelector("needle-engine") || document.body;
|
|
9243
|
+
c.appendChild(i);
|
|
9244
|
+
const h = n.getBoundingClientRect(), d = t.getBoundingClientRect();
|
|
9245
|
+
i.style.left = d.left + d.width * 0.5 - h.width * 0.5 + "px";
|
|
9246
|
+
const f = d.top < h.height, p = "1.3rem";
|
|
9247
|
+
f ? i.style.top = `calc(${d.bottom}px + ${i.style.padding} + 0.0rem)` : i.style.top = `calc(${d.top - h.height}px - ${i.style.padding} - ${p})`, i.style.opacity = "0", i.style.pointerEvents = "all", i.style.transition = "opacity 0.2s ease-in-out", setTimeout(() => {
|
|
9246
9248
|
i.style.opacity = "1", window.addEventListener("click", r, { once: !0 });
|
|
9247
|
-
}), window.addEventListener("resize", r), window.addEventListener("scroll", r), document.fullscreenElement ? document.fullscreenElement.appendChild(i) :
|
|
9249
|
+
}), window.addEventListener("resize", r), window.addEventListener("scroll", r), document.fullscreenElement ? document.fullscreenElement.appendChild(i) : c.appendChild(i);
|
|
9248
9250
|
}
|
|
9249
9251
|
function r() {
|
|
9250
9252
|
i.style.pointerEvents = "none", i.style.transition = "opacity 0.2s", i.style.opacity = "0", setTimeout(() => i.parentNode?.removeChild(i), 500), window.removeEventListener("click", r), window.removeEventListener("resize", r), window.removeEventListener("scroll", r);
|
|
@@ -9774,6 +9776,16 @@ class Xd extends HTMLElement {
|
|
|
9774
9776
|
const e = document.createElement("template");
|
|
9775
9777
|
e.innerHTML = `<style>
|
|
9776
9778
|
|
|
9779
|
+
/** Styling attributes that ensure the nested menu z-index does not cause it to overlay elements outside of <needle-engine> */
|
|
9780
|
+
:host {
|
|
9781
|
+
position: absolute;
|
|
9782
|
+
width: 100%;
|
|
9783
|
+
height: 100%;
|
|
9784
|
+
z-index: 0;
|
|
9785
|
+
top: 0;
|
|
9786
|
+
pointer-events: none;
|
|
9787
|
+
}
|
|
9788
|
+
|
|
9777
9789
|
#root {
|
|
9778
9790
|
position: absolute;
|
|
9779
9791
|
width: auto;
|
|
@@ -10983,13 +10995,13 @@ Start a coroutine from a component by calling "this.startCoroutine(myCoroutine()
|
|
|
10983
10995
|
get isVisibleToUser() {
|
|
10984
10996
|
if (this.isInXR) return !0;
|
|
10985
10997
|
if (!this._isVisible) return !1;
|
|
10986
|
-
if (this.
|
|
10987
|
-
this.
|
|
10998
|
+
if (!this._needsVisibleUpdate && this._lastStyleComputedResult !== void 0) return this._lastStyleComputedResult;
|
|
10999
|
+
this._needsVisibleUpdate = !1;
|
|
10988
11000
|
const e = getComputedStyle(this.domElement);
|
|
10989
11001
|
return this._lastStyleComputedResult = e.visibility !== "hidden" && e.display !== "none" && e.opacity !== "0", this._lastStyleComputedResult;
|
|
10990
11002
|
}
|
|
10991
|
-
|
|
10992
|
-
_lastStyleComputedResult =
|
|
11003
|
+
_needsVisibleUpdate = !0;
|
|
11004
|
+
_lastStyleComputedResult = void 0;
|
|
10993
11005
|
_createId = 0;
|
|
10994
11006
|
async internalOnCreate(e) {
|
|
10995
11007
|
const t = ++this._createId;
|
|
@@ -11141,7 +11153,7 @@ Possible solutions:
|
|
|
11141
11153
|
try {
|
|
11142
11154
|
this.internalStep(e, t), this._renderlooperrors = 0;
|
|
11143
11155
|
} catch (i) {
|
|
11144
|
-
this._renderlooperrors += 1, (L() || Xe) && (i instanceof Error || i instanceof TypeError) &&
|
|
11156
|
+
this._renderlooperrors += 1, (L() || Xe) && (i instanceof Error || i instanceof TypeError) && Be("Caught unhandled exception during render-loop - see console for details.", Ni.Error), console.error("Frame #" + this.time.frame + `
|
|
11145
11157
|
`, i), this._renderlooperrors >= 3 && (console.warn("Stopping render loop due to error"), this.renderer.setAnimationLoop(null)), this.domElement.dispatchEvent(new CustomEvent("error", { detail: i }));
|
|
11146
11158
|
}
|
|
11147
11159
|
else
|
|
@@ -11162,7 +11174,7 @@ Possible solutions:
|
|
|
11162
11174
|
this.internalOnBeforeRender(e, t) !== !1 && (this.internalOnRender(), this.internalOnAfterRender());
|
|
11163
11175
|
}
|
|
11164
11176
|
internalOnBeforeRender(e, t) {
|
|
11165
|
-
this.renderer.info.autoReset = !!t, this.renderer.info.autoReset === !1 && this.renderer.info.reset();
|
|
11177
|
+
this.renderer.info.autoReset = !!t, this.renderer.info.autoReset === !1 && this.renderer.info.reset(), this._needsVisibleUpdate = !0;
|
|
11166
11178
|
const i = t !== null && this._xrFrame === null;
|
|
11167
11179
|
if (this._xrFrame = t, i && this.domElement.dispatchEvent(new CustomEvent("xr-session-started", { detail: { context: this, session: this.xrSession, frame: t } })), this._currentFrameEvent = -1, this.isManagedExternally === !1 && this.isInXR === !1 && this.targetFrameRate !== void 0) {
|
|
11168
11180
|
this._lastTimestamp === 0 && (this._lastTimestamp = e), this._accumulatedTime += (e - this._lastTimestamp) / 1e3, this._lastTimestamp = e;
|
|
@@ -11194,28 +11206,26 @@ Possible solutions:
|
|
|
11194
11206
|
const o = this.scripts_earlyUpdate[n];
|
|
11195
11207
|
o.activeAndEnabled && o.earlyUpdate !== void 0 && (N.Current = this, o.earlyUpdate());
|
|
11196
11208
|
}
|
|
11197
|
-
|
|
11209
|
+
this.executeCoroutines(
|
|
11198
11210
|
0
|
|
11199
11211
|
/* EarlyUpdate */
|
|
11200
11212
|
), yn(
|
|
11201
11213
|
this,
|
|
11202
11214
|
0
|
|
11203
11215
|
/* EarlyUpdate */
|
|
11204
|
-
), this.
|
|
11205
|
-
this._currentFrameEvent = 1;
|
|
11216
|
+
), this._currentFrameEvent = 1;
|
|
11206
11217
|
for (let n = 0; n < this.scripts_update.length; n++) {
|
|
11207
11218
|
const o = this.scripts_update[n];
|
|
11208
11219
|
o.activeAndEnabled && o.update !== void 0 && (N.Current = this, o.update());
|
|
11209
11220
|
}
|
|
11210
|
-
|
|
11221
|
+
this.executeCoroutines(
|
|
11211
11222
|
1
|
|
11212
11223
|
/* Update */
|
|
11213
11224
|
), yn(
|
|
11214
11225
|
this,
|
|
11215
11226
|
1
|
|
11216
11227
|
/* Update */
|
|
11217
|
-
), this.
|
|
11218
|
-
this._currentFrameEvent = 2;
|
|
11228
|
+
), this._currentFrameEvent = 2;
|
|
11219
11229
|
for (let n = 0; n < this.scripts_lateUpdate.length; n++) {
|
|
11220
11230
|
const o = this.scripts_lateUpdate[n];
|
|
11221
11231
|
o.activeAndEnabled && o.lateUpdate !== void 0 && (N.Current = this, o.lateUpdate());
|
|
@@ -11227,8 +11237,7 @@ Possible solutions:
|
|
|
11227
11237
|
this,
|
|
11228
11238
|
2
|
|
11229
11239
|
/* LateUpdate */
|
|
11230
|
-
), this.
|
|
11231
|
-
if (this.isVisibleToUser || this.runInBackground) {
|
|
11240
|
+
), this.physicsSteps === void 0 && (this.physicsSteps = 1), this.physics.engine && this.physicsSteps > 0 && this.internalUpdatePhysics(this.physicsSteps), this.isVisibleToUser || this.runInBackground) {
|
|
11232
11241
|
this._currentFrameEvent = 3;
|
|
11233
11242
|
for (let n = 0; n < this.scripts_onBeforeRender.length; n++) {
|
|
11234
11243
|
const o = this.scripts_onBeforeRender[n];
|
|
@@ -14259,7 +14268,7 @@ const Lt = function(s, e) {
|
|
|
14259
14268
|
function UO(s, e, t, i, n) {
|
|
14260
14269
|
if (!n && !i && !s.onValidate) return;
|
|
14261
14270
|
if (t !== void 0) {
|
|
14262
|
-
console.error("Invalid usage of validate decorator. Only fields can be validated.", s, e, t),
|
|
14271
|
+
console.error("Invalid usage of validate decorator. Only fields can be validated.", s, e, t), Be("Invalid usage of validate decorator. Only fields can be validated. Property: " + e, Ni.Error);
|
|
14263
14272
|
return;
|
|
14264
14273
|
}
|
|
14265
14274
|
let o = "";
|
|
@@ -15485,10 +15494,10 @@ class ei extends T {
|
|
|
15485
15494
|
this.context.scene.getComponent(Sa) || this.context.scene.addComponent(Gi);
|
|
15486
15495
|
}
|
|
15487
15496
|
onEnable() {
|
|
15488
|
-
this.context.input.addEventListener(
|
|
15497
|
+
this.context.input.addEventListener(De.PointerDown, this.onPointerEvent), this.context.input.addEventListener(De.PointerUp, this.onPointerEvent), this.context.input.addEventListener(De.PointerMove, this.onPointerEvent);
|
|
15489
15498
|
}
|
|
15490
15499
|
onDisable() {
|
|
15491
|
-
this.context.input.removeEventListener(
|
|
15500
|
+
this.context.input.removeEventListener(De.PointerDown, this.onPointerEvent), this.context.input.removeEventListener(De.PointerUp, this.onPointerEvent), this.context.input.removeEventListener(De.PointerMove, this.onPointerEvent);
|
|
15492
15501
|
}
|
|
15493
15502
|
/**
|
|
15494
15503
|
* all pointers that have pressed something
|
|
@@ -15513,7 +15522,7 @@ class ei extends T {
|
|
|
15513
15522
|
onPointerEvent = (e) => {
|
|
15514
15523
|
if (e === void 0 || e.propagationStopped || e.defaultPrevented || e.used) return;
|
|
15515
15524
|
const t = new Zd(this.context.input, e);
|
|
15516
|
-
this._currentPointerEventName = e.type, t.inputSource = this.context.input, t.isClick = e.isClick, t.isDoubleClick = e.isDoubleClick, t.isDown = e.type ==
|
|
15525
|
+
this._currentPointerEventName = e.type, t.inputSource = this.context.input, t.isClick = e.isClick, t.isDoubleClick = e.isDoubleClick, t.isDown = e.type == De.PointerDown, t.isUp = e.type == De.PointerUp, t.isPressed = this.context.input.getPointerPressed(e.pointerId);
|
|
15517
15526
|
const i = new pr();
|
|
15518
15527
|
e.hasRay ? i.ray = e.ray : i.screenPoint = this.context.input.getPointerPositionRC(e.pointerId), i.allowSlowRaycastFallback = e.isClick || e.isDoubleClick;
|
|
15519
15528
|
const n = this.performRaycast(i);
|
|
@@ -15526,7 +15535,7 @@ class ei extends T {
|
|
|
15526
15535
|
hits: n
|
|
15527
15536
|
});
|
|
15528
15537
|
}
|
|
15529
|
-
Gs && t.isClick &&
|
|
15538
|
+
Gs && t.isClick && Be("EventSystem: " + t.pointerId + " - " + this.context.time.frame + " - Up:" + t.isUp + ", Down:" + t.isDown);
|
|
15530
15539
|
const o = {
|
|
15531
15540
|
sender: this,
|
|
15532
15541
|
args: t,
|
|
@@ -15745,7 +15754,7 @@ class ei extends T {
|
|
|
15745
15754
|
}
|
|
15746
15755
|
/** invoke the pointerMove event on all captured handlers */
|
|
15747
15756
|
invokePointerCapture(e) {
|
|
15748
|
-
if (e.event.type ===
|
|
15757
|
+
if (e.event.type === De.PointerMove) {
|
|
15749
15758
|
const t = e.pointerId, i = this._capturedPointer[t];
|
|
15750
15759
|
if (i) {
|
|
15751
15760
|
Gs && console.log("Captured", t, i);
|
|
@@ -16098,6 +16107,9 @@ class ge extends T {
|
|
|
16098
16107
|
afterHandleInput(e) {
|
|
16099
16108
|
e.detail.args.pointerId === 0 && (e.detail.args.isDown ? this._controls && this._eventSystem && (this._shouldDisable = this._eventSystem.hasActiveUI) : (!e.detail.args.isPressed || e.detail.args.isUp) && (this._shouldDisable = !1));
|
|
16100
16109
|
}
|
|
16110
|
+
onPausedChanged(e) {
|
|
16111
|
+
this._controls && e && (this._controls.enabled = !1);
|
|
16112
|
+
}
|
|
16101
16113
|
/** @internal */
|
|
16102
16114
|
onBeforeRender() {
|
|
16103
16115
|
if (!this._controls) return;
|
|
@@ -16716,7 +16728,7 @@ const qs = w("debugcam"), u_ = w("debugscreenpointtoray"), Dt = class Cl extends
|
|
|
16716
16728
|
if (typeof t._transparent == "boolean")
|
|
16717
16729
|
return t._transparent;
|
|
16718
16730
|
const i = t.environmentBlendMode;
|
|
16719
|
-
qs &&
|
|
16731
|
+
qs && Be("Environment blend mode: " + i + " on " + navigator.userAgent);
|
|
16720
16732
|
let n = i === "additive" || i === "alpha-blend";
|
|
16721
16733
|
return e.isInAR && i === "opaque" && (navigator.userAgent?.includes("OculusBrowser") || navigator.userAgent?.includes("Mozilla") && navigator.userAgent?.includes("Mobile WebXRViewer/v2")) && (n = !0), t._transparent = n, n;
|
|
16722
16734
|
}
|
|
@@ -17166,29 +17178,29 @@ fn([
|
|
|
17166
17178
|
], Ki.prototype, "rollOffMode", 2);
|
|
17167
17179
|
let hn = Ki;
|
|
17168
17180
|
const uk = w("debugavatar");
|
|
17169
|
-
class
|
|
17181
|
+
class je extends T {
|
|
17170
17182
|
static getAvatar(e) {
|
|
17171
|
-
return e >= 0 && e <
|
|
17183
|
+
return e >= 0 && e < je.instances.length ? je.instances[e] : null;
|
|
17172
17184
|
}
|
|
17173
17185
|
static instances = [];
|
|
17174
17186
|
static onAvatarMarkerCreated(e) {
|
|
17175
|
-
return
|
|
17187
|
+
return je._onNewAvatarMarkerAdded.push(e), e;
|
|
17176
17188
|
}
|
|
17177
17189
|
static onAvatarMarkerDestroyed(e) {
|
|
17178
|
-
return
|
|
17190
|
+
return je._onAvatarMarkerDestroyed.push(e), e;
|
|
17179
17191
|
}
|
|
17180
17192
|
static _onNewAvatarMarkerAdded = [];
|
|
17181
17193
|
static _onAvatarMarkerDestroyed = [];
|
|
17182
17194
|
connectionId;
|
|
17183
17195
|
avatar;
|
|
17184
17196
|
awake() {
|
|
17185
|
-
|
|
17186
|
-
for (const e of
|
|
17197
|
+
je.instances.push(this), uk && console.log(this);
|
|
17198
|
+
for (const e of je._onNewAvatarMarkerAdded)
|
|
17187
17199
|
e({ avatarMarker: this, gameObject: this.gameObject });
|
|
17188
17200
|
}
|
|
17189
17201
|
onDestroy() {
|
|
17190
|
-
|
|
17191
|
-
for (const e of
|
|
17202
|
+
je.instances.splice(je.instances.indexOf(this), 1);
|
|
17203
|
+
for (const e of je._onAvatarMarkerDestroyed)
|
|
17192
17204
|
e({ avatarMarker: this, gameObject: this.gameObject });
|
|
17193
17205
|
}
|
|
17194
17206
|
isLocalAvatar() {
|
|
@@ -17238,8 +17250,8 @@ class ud extends T {
|
|
|
17238
17250
|
_lookDuration = 0;
|
|
17239
17251
|
_lastPoiChangedTime = 0;
|
|
17240
17252
|
awake() {
|
|
17241
|
-
if (this.avatar = x.getComponentInParent(this.gameObject,
|
|
17242
|
-
const e = x.getComponentInParent(this.gameObject,
|
|
17253
|
+
if (this.avatar = x.getComponentInParent(this.gameObject, je), this.avatar) {
|
|
17254
|
+
const e = x.getComponentInParent(this.gameObject, je);
|
|
17243
17255
|
this._model = new o0(this.context.connection, this.guid), e?.isLocalAvatar && this._model.requestOwnership();
|
|
17244
17256
|
}
|
|
17245
17257
|
this.context.connection.beginListen("avatar-look-target-changed", (e) => {
|
|
@@ -17332,7 +17344,7 @@ class _k {
|
|
|
17332
17344
|
this.object = e, this.collider = t;
|
|
17333
17345
|
}
|
|
17334
17346
|
}
|
|
17335
|
-
const
|
|
17347
|
+
const Le = w("debugnetworkingstreams");
|
|
17336
17348
|
var ps = /* @__PURE__ */ ((s) => (s.Connected = "peer-user-connected", s.StreamReceived = "receive-stream", s.StreamEnded = "call-ended", s.Disconnected = "peer-user-disconnected", s.UserJoined = "user-joined", s))(ps || {});
|
|
17337
17349
|
class X0 {
|
|
17338
17350
|
type = "call-ended";
|
|
@@ -17386,7 +17398,7 @@ class xk extends dm {
|
|
|
17386
17398
|
}
|
|
17387
17399
|
constructor(e, t, i, n = null) {
|
|
17388
17400
|
super(), this.peerId = t.peer, this.userId = e, this.call = t, this.direction = i, this._stream = n, t.on("stream", (o) => {
|
|
17389
|
-
if (
|
|
17401
|
+
if (Le && console.log("Receive stream", `
|
|
17390
17402
|
Audio:`, o.getAudioTracks(), `
|
|
17391
17403
|
Video:`, o.getVideoTracks()), this._stream = o, i === "incoming") {
|
|
17392
17404
|
const r = new bk(e, o, this);
|
|
@@ -17420,7 +17432,7 @@ class to extends dm {
|
|
|
17420
17432
|
}
|
|
17421
17433
|
makeCall(e, t) {
|
|
17422
17434
|
if (!t?.id) {
|
|
17423
|
-
|
|
17435
|
+
Le ? console.warn("Can not make a call: mediastream has no id or is undefined") : console.debug("Can not make a call: mediastream has no id or is undefined");
|
|
17424
17436
|
return;
|
|
17425
17437
|
}
|
|
17426
17438
|
const i = {
|
|
@@ -17432,10 +17444,10 @@ class to extends dm {
|
|
|
17432
17444
|
}, n = this._peer?.call(e, t, i);
|
|
17433
17445
|
if (n) {
|
|
17434
17446
|
const o = this.registerCall(n, "outgoing", t);
|
|
17435
|
-
return
|
|
17447
|
+
return Le && console.warn(`📞 CALL ${e}`, `
|
|
17436
17448
|
Outgoing:`, this._outgoingCalls, `
|
|
17437
17449
|
Incoming:`, this._incomingCalls), o;
|
|
17438
|
-
} else
|
|
17450
|
+
} else Le && console.error("Failed to make call", e, t, this._peer);
|
|
17439
17451
|
}
|
|
17440
17452
|
closeAll() {
|
|
17441
17453
|
for (const e of this._incomingCalls)
|
|
@@ -17452,7 +17464,7 @@ Incoming:`, this._incomingCalls), o;
|
|
|
17452
17464
|
for (let e = this._outgoingCalls.length - 1; e >= 0; e--) {
|
|
17453
17465
|
const t = this._outgoingCalls[e];
|
|
17454
17466
|
let i = !1;
|
|
17455
|
-
t.isClosed && !t.isOpening && (t.stream?.active ?
|
|
17467
|
+
t.isClosed && !t.isOpening && (t.stream?.active ? Le && console.warn("!!! Stream is still active, don't remove call", t.userId, "Your id: " + this.context.connection.connectionId) : (Le && console.warn("!!! Remove closed call", t.userId), i = !0)), this.context.connection.userIsInRoom(t.userId) === !1 && (Le && console.warn("!!! User is not in room anymore, remove call", t.userId), i = !0), i && (t.close(), this._outgoingCalls.splice(e, 1));
|
|
17456
17468
|
}
|
|
17457
17469
|
};
|
|
17458
17470
|
get peer() {
|
|
@@ -17467,7 +17479,13 @@ Incoming:`, this._incomingCalls), o;
|
|
|
17467
17479
|
_outgoingCalls = [];
|
|
17468
17480
|
_peer;
|
|
17469
17481
|
constructor(e, t) {
|
|
17470
|
-
super(), this.context = e, this.id = t, this.setupPeer()
|
|
17482
|
+
super(), this.context = e, this.id = t, this.setupPeer();
|
|
17483
|
+
const i = Object.getOwnPropertyDescriptor(navigator, "getUserMedia")?.writable;
|
|
17484
|
+
try {
|
|
17485
|
+
i ? navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia : Le && console.warn("[PeerJs] getUserMedia is not writable");
|
|
17486
|
+
} catch (n) {
|
|
17487
|
+
Le && console.error("[PeerJs] Error setting getUserMedia", n);
|
|
17488
|
+
}
|
|
17471
17489
|
}
|
|
17472
17490
|
_enabled = !1;
|
|
17473
17491
|
_enabledPeer = !1;
|
|
@@ -17507,7 +17525,7 @@ Incoming:`, this._incomingCalls), o;
|
|
|
17507
17525
|
* @param id ID of the peer
|
|
17508
17526
|
*/
|
|
17509
17527
|
onPeerConnect = (e) => {
|
|
17510
|
-
if (
|
|
17528
|
+
if (Le && console.log("PEER opened as", e), e === null) {
|
|
17511
17529
|
console.error("Peer connection failed", e);
|
|
17512
17530
|
return;
|
|
17513
17531
|
}
|
|
@@ -17515,17 +17533,17 @@ Incoming:`, this._incomingCalls), o;
|
|
|
17515
17533
|
};
|
|
17516
17534
|
/** Emitted when the peer is destroyed and can no longer accept or create any new connections. At this time, the peer's connections will all be closed. */
|
|
17517
17535
|
onPeerClose = () => {
|
|
17518
|
-
|
|
17536
|
+
Le && console.log("PEER closed"), this.updateCalls();
|
|
17519
17537
|
};
|
|
17520
17538
|
/** Emitted when the peer is disconnected from the signalling server, either manually or because the connection to the signalling server was lost. */
|
|
17521
17539
|
onPeerDisconnected = () => {
|
|
17522
|
-
|
|
17540
|
+
Le && console.log("PEER disconnected"), this.updateCalls();
|
|
17523
17541
|
};
|
|
17524
17542
|
/**
|
|
17525
17543
|
* Errors on the peer are almost always fatal and will destroy the peer. Errors from the underlying socket and PeerConnections are forwarded here.
|
|
17526
17544
|
*/
|
|
17527
17545
|
onPeerError = (e) => {
|
|
17528
|
-
|
|
17546
|
+
Le && console.error("PEER error", e);
|
|
17529
17547
|
};
|
|
17530
17548
|
onPeerReceivingCall = (e) => {
|
|
17531
17549
|
e.answer(void 0, {
|
|
@@ -17536,12 +17554,12 @@ Incoming:`, this._incomingCalls), o;
|
|
|
17536
17554
|
const n = e.metadata;
|
|
17537
17555
|
(!n || !n.userId) && console.error("Missing call metadata", e);
|
|
17538
17556
|
const o = n.userId;
|
|
17539
|
-
t === "incoming" &&
|
|
17557
|
+
t === "incoming" && Le ? console.warn("← Receive call from", e.metadata, e.connectionId) : Le && console.warn("→ Make call to", e.metadata);
|
|
17540
17558
|
const r = t === "incoming" ? this._incomingCalls : this._outgoingCalls, a = new xk(o, e, t, i);
|
|
17541
17559
|
return r.push(a), e.on("error", (l) => {
|
|
17542
17560
|
console.error("Call error", l);
|
|
17543
17561
|
}), e.on("close", () => {
|
|
17544
|
-
|
|
17562
|
+
Le && console.log("Call ended", e.metadata);
|
|
17545
17563
|
const l = r.indexOf(a);
|
|
17546
17564
|
l !== -1 && r.splice(l, 1), a.close(), this.dispatchEvent(new X0(o, t));
|
|
17547
17565
|
}), a.addEventListener("call-ended", (l) => {
|
|
@@ -17549,11 +17567,11 @@ Incoming:`, this._incomingCalls), o;
|
|
|
17549
17567
|
}), t === "incoming" && (a.addEventListener("receive-stream", (l) => {
|
|
17550
17568
|
this.dispatchEvent(l);
|
|
17551
17569
|
}), e.on("stream", () => {
|
|
17552
|
-
|
|
17570
|
+
Le && console.log("Received stream for call", e.metadata);
|
|
17553
17571
|
let l = 0;
|
|
17554
17572
|
const c = setInterval(() => {
|
|
17555
17573
|
const h = l === 0;
|
|
17556
|
-
!a.isOpen && h && (
|
|
17574
|
+
!a.isOpen && h && (Le && console.warn("Close call because stream is not active", e.metadata), l += 1, clearInterval(c), a.close());
|
|
17557
17575
|
}, 2e3);
|
|
17558
17576
|
})), a;
|
|
17559
17577
|
}
|
|
@@ -17586,7 +17604,7 @@ class Jd extends dm {
|
|
|
17586
17604
|
if (!(e instanceof N)) throw new Error("Failed to create NetworkedStreams because context is not an instance of Context");
|
|
17587
17605
|
} else throw new Error("Failed to create NetworkedStreams because context is undefined");
|
|
17588
17606
|
if (!t) throw new Error("Failed to create NetworkedStreams because peer is undefined");
|
|
17589
|
-
this.context = e, this.peer = t,
|
|
17607
|
+
this.context = e, this.peer = t, Le && (this.debug = !0);
|
|
17590
17608
|
}
|
|
17591
17609
|
startSendingStream(e) {
|
|
17592
17610
|
this._sendingStreams.has(e) ? console.warn("Received start sending stream with stream that is already being sent") : (this._sendingStreams.set(e, []), this.updateSendingCalls());
|
|
@@ -17648,7 +17666,7 @@ class Jd extends dm {
|
|
|
17648
17666
|
const t = this._sendingStreams.keys().next().value;
|
|
17649
17667
|
this.peer.makeCall(e.peerId, t);
|
|
17650
17668
|
} else
|
|
17651
|
-
|
|
17669
|
+
Le && console.log("Unknown user connected", e.guid, e.peerId);
|
|
17652
17670
|
};
|
|
17653
17671
|
onUserLeft = (e) => {
|
|
17654
17672
|
this.debug && console.log("User left room: " + e.userId), this.stopCallsToUsersThatAreNotInTheRoomAnymore();
|
|
@@ -17661,7 +17679,7 @@ class Jd extends dm {
|
|
|
17661
17679
|
if (n === e) continue;
|
|
17662
17680
|
const o = this.peer.getPeerIdFromUserId(n);
|
|
17663
17681
|
if (i.find((a) => a.peerId === o && a.direction === "outgoing" && !a.isClosed && a.stream?.active))
|
|
17664
|
-
|
|
17682
|
+
Le && console.debug("Already have a call with user " + n + " / peer " + o);
|
|
17665
17683
|
else {
|
|
17666
17684
|
const a = this.peer.makeCall(o, t);
|
|
17667
17685
|
a && i.push(a);
|
|
@@ -17692,7 +17710,7 @@ class Jd extends dm {
|
|
|
17692
17710
|
if (t)
|
|
17693
17711
|
for (let i = t.length - 1; i >= 0; i--) {
|
|
17694
17712
|
const n = t[i];
|
|
17695
|
-
this.context.connection.userIsInRoom(n.userId) ?
|
|
17713
|
+
this.context.connection.userIsInRoom(n.userId) ? Le && (this.context.connection.connectionId === n.userId ? console.warn(`You are still in the room [${i}] ${n.userId}`) : console.log(`User is still in room [${i}] ${n.userId}`)) : (Le && console.log(`Remove call ${[i]} to user that is not in room anymore ${n.userId}`), n.close(), t.splice(i, 1));
|
|
17696
17714
|
}
|
|
17697
17715
|
}
|
|
17698
17716
|
this.peer.updateCalls(), this.debug && this.debugLogCurrentState();
|
|
@@ -17890,7 +17908,7 @@ class eu extends T {
|
|
|
17890
17908
|
mouthChangeLength = 0;
|
|
17891
17909
|
awake() {
|
|
17892
17910
|
setTimeout(() => {
|
|
17893
|
-
this.voip = x.findObjectOfType(yr, this.context), this.marker || (this.marker = x.getComponentInParent(this.gameObject,
|
|
17911
|
+
this.voip = x.findObjectOfType(yr, this.context), this.marker || (this.marker = x.getComponentInParent(this.gameObject, je));
|
|
17894
17912
|
}, 3e3);
|
|
17895
17913
|
}
|
|
17896
17914
|
update() {
|
|
@@ -17948,7 +17966,7 @@ class Y0 extends T {
|
|
|
17948
17966
|
marker = null;
|
|
17949
17967
|
_startPosition = null;
|
|
17950
17968
|
awake() {
|
|
17951
|
-
this.voip = x.findObjectOfType(yr, this.context), this.marker = x.getComponentInParent(this.gameObject,
|
|
17969
|
+
this.voip = x.findObjectOfType(yr, this.context), this.marker = x.getComponentInParent(this.gameObject, je);
|
|
17952
17970
|
}
|
|
17953
17971
|
update() {
|
|
17954
17972
|
if (!this.voip || !this.marker || this.context.time.frameCount % 10 !== 0) return;
|
|
@@ -23954,7 +23972,7 @@ class Go {
|
|
|
23954
23972
|
return this._start === void 0 && (this._start = this.ext.getStartTimeByClip(this.clip)), this._start;
|
|
23955
23973
|
}
|
|
23956
23974
|
get duration() {
|
|
23957
|
-
return this.clip?.duration ??
|
|
23975
|
+
return this.clip?.duration ?? Ue.restPoseClipDuration;
|
|
23958
23976
|
}
|
|
23959
23977
|
get nearestAnimatedRoot() {
|
|
23960
23978
|
return this._nearestAnimatedRoot;
|
|
@@ -24006,7 +24024,7 @@ class Go {
|
|
|
24006
24024
|
return e;
|
|
24007
24025
|
}
|
|
24008
24026
|
}
|
|
24009
|
-
class
|
|
24027
|
+
class Ue {
|
|
24010
24028
|
clip;
|
|
24011
24029
|
pos;
|
|
24012
24030
|
rot;
|
|
@@ -24022,7 +24040,7 @@ class ze {
|
|
|
24022
24040
|
static animationDurationPadding = 6 / 60;
|
|
24023
24041
|
static restPoseClipDuration = 6 / 60;
|
|
24024
24042
|
constructor(e, t, i) {
|
|
24025
|
-
if (this.root = e, this.target = t, this.clip = i, i ? this.duration = i.duration : this.duration =
|
|
24043
|
+
if (this.root = e, this.target = t, this.clip = i, i ? this.duration = i.duration : this.duration = Ue.restPoseClipDuration, i && i.tracks) {
|
|
24026
24044
|
const o = Math.max(...i.tracks.map((r) => r.times[r.times.length - 1]));
|
|
24027
24045
|
o !== this.duration && (console.warn("USDZExporter: Animation clip duration does not match the maximum time value in the tracks.", i, o, this.duration), this.duration = o);
|
|
24028
24046
|
}
|
|
@@ -24065,7 +24083,7 @@ class ze {
|
|
|
24065
24083
|
const f = 0;
|
|
24066
24084
|
for (let p = 0 - f; p < e.length + f; p++) {
|
|
24067
24085
|
let g = 0, _ = 0;
|
|
24068
|
-
if (p < 0 ? (g = e[0], _ = g -
|
|
24086
|
+
if (p < 0 ? (g = e[0], _ = g - Ue.animationDurationPadding / 2 + 1 / 60) : p >= e.length ? (g = e[e.length - 1], _ = g + Ue.animationDurationPadding / 2 - 1 / 60) : (g = e[p], _ = g), c) {
|
|
24069
24087
|
const m = c.evaluate(g);
|
|
24070
24088
|
o.set(m[0], m[1], m[2]);
|
|
24071
24089
|
}
|
|
@@ -24125,7 +24143,7 @@ class ag {
|
|
|
24125
24143
|
this.injectRestPoses = e, this.injectImplicitBehaviours = e;
|
|
24126
24144
|
}
|
|
24127
24145
|
getStartTimeCode() {
|
|
24128
|
-
return !this.injectRestPoses || this.rootAndClipToRegisteredAnimationMap.size === 0 ? 0 : (
|
|
24146
|
+
return !this.injectRestPoses || this.rootAndClipToRegisteredAnimationMap.size === 0 ? 0 : (Ue.restPoseClipDuration + Ue.animationDurationPadding) * 60;
|
|
24129
24147
|
}
|
|
24130
24148
|
/** Returns the end time code, based on 60 frames per second, for all registered animations.
|
|
24131
24149
|
* This matches the highest time value in the USDZ file. */
|
|
@@ -24213,9 +24231,9 @@ class ag {
|
|
|
24213
24231
|
console.warn("no transform data found for target ", d, "at slot " + o + ", this is likely a bug");
|
|
24214
24232
|
continue;
|
|
24215
24233
|
}
|
|
24216
|
-
a.delete(d), this.injectRestPoses && !f[0] && (console.log("Injecting rest pose", d, t, "at slot", o), f[0] = new
|
|
24234
|
+
a.delete(d), this.injectRestPoses && !f[0] && (console.log("Injecting rest pose", d, t, "at slot", o), f[0] = new Ue(null, d, null));
|
|
24217
24235
|
let p = f[o];
|
|
24218
|
-
p || (p = new
|
|
24236
|
+
p || (p = new Ue(e, d, t), f[o] = p), p.addTrack(c), r?.includes(d) || r?.push(d);
|
|
24219
24237
|
}
|
|
24220
24238
|
Pn && console.log("Unregistered nodes for this clip", a, "clip", t, "at slot", o, "for root", e, "targets", r);
|
|
24221
24239
|
for (const c of a) {
|
|
@@ -24223,18 +24241,18 @@ class ag {
|
|
|
24223
24241
|
if (!h) continue;
|
|
24224
24242
|
if (this.injectRestPoses && !h[0]) {
|
|
24225
24243
|
console.warn("Adding rest pose for ", c, t, "at slot", o, "This is likely a bug, should have been added earlier.");
|
|
24226
|
-
const f = new
|
|
24244
|
+
const f = new Ue(null, c, null);
|
|
24227
24245
|
h[0] = f;
|
|
24228
24246
|
}
|
|
24229
24247
|
let d = h[o];
|
|
24230
|
-
d || (Pn && console.log("Adding padding clip for ", c, t, "at slot", o), d = new
|
|
24248
|
+
d || (Pn && console.log("Adding padding clip for ", c, t, "at slot", o), d = new Ue(e, c, t), h[o] = d);
|
|
24231
24249
|
}
|
|
24232
24250
|
const l = new Go(this, e, t);
|
|
24233
24251
|
if (this.rootAndClipToRegisteredAnimationMap.set(i, l), Pn && console.log({ root: e, clip: t, info: l }), t) {
|
|
24234
24252
|
const c = this.rootToRegisteredClip.get(e);
|
|
24235
24253
|
if (c ? c.push(t) : this.rootToRegisteredClip.set(e, [t]), !this.clipToStartTime.get(t)) {
|
|
24236
|
-
this.lastClipEndTime == null && (this.lastClipEndTime =
|
|
24237
|
-
let d = this.lastClipEndTime +
|
|
24254
|
+
this.lastClipEndTime == null && (this.lastClipEndTime = Ue.restPoseClipDuration);
|
|
24255
|
+
let d = this.lastClipEndTime + Ue.animationDurationPadding, f = d + t.duration;
|
|
24238
24256
|
const p = Math.round(d * 60) / 60, g = Math.round(f * 60) / 60;
|
|
24239
24257
|
Math.abs(p - d) < 0.01 && (d = p), Math.abs(g - f) < 0.01 && (f = g), d = Math.ceil(d), f = d + t.duration, this.clipToStartTime.set(t, d), this.lastClipEndTime = f;
|
|
24240
24258
|
}
|
|
@@ -24262,7 +24280,7 @@ class ag {
|
|
|
24262
24280
|
let c = a[l];
|
|
24263
24281
|
if (!c) {
|
|
24264
24282
|
const d = l - (this.injectRestPoses ? 1 : 0);
|
|
24265
|
-
a[l] = new
|
|
24283
|
+
a[l] = new Ue(null, r, this.rootToRegisteredClip.get(t)[d]), c = a[l];
|
|
24266
24284
|
}
|
|
24267
24285
|
const h = c.getDuration();
|
|
24268
24286
|
if (o[l] === void 0) o[l] = h;
|
|
@@ -24348,7 +24366,7 @@ class KM {
|
|
|
24348
24366
|
for (const Je of W) {
|
|
24349
24367
|
const Ri = A.get(Je);
|
|
24350
24368
|
let Vc;
|
|
24351
|
-
Ri ? console.assert(Ri.length === Se, "We should have the same number of TransformData entries for each bone", Ri, U) : Vc = new
|
|
24369
|
+
Ri ? console.assert(Ri.length === Se, "We should have the same number of TransformData entries for each bone", Ri, U) : Vc = new Ue(null, Je, null);
|
|
24352
24370
|
for (let js = 0; js < Se; js++) {
|
|
24353
24371
|
const Uu = Ri ? Ri[js] : Vc, Or = U[js];
|
|
24354
24372
|
for (const { time: Ya, translation: Ka } of Uu.getValues(Or.pos, !0, !1, !1)) {
|
|
@@ -24468,7 +24486,7 @@ class KM {
|
|
|
24468
24486
|
const i = this.animationData.get(this.object);
|
|
24469
24487
|
if (i)
|
|
24470
24488
|
for (let h = 0; h < i.length; h++)
|
|
24471
|
-
i[h] === void 0 && (i[h] = new
|
|
24489
|
+
i[h] === void 0 && (i[h] = new Ue(null, this.object, null));
|
|
24472
24490
|
const n = this.ext;
|
|
24473
24491
|
this.skinnedMeshExport(e, t, n);
|
|
24474
24492
|
const o = this.object, r = this.model, a = this.animationData.get(o);
|
|
@@ -24507,21 +24525,21 @@ class KM {
|
|
|
24507
24525
|
const v = !g.clip, y = d === "position" && (g.pos || v), S = d === "rotation" && (g.rot || v), I = d === "scale" && (g.scale || v);
|
|
24508
24526
|
if (y || S || I) {
|
|
24509
24527
|
const O = g.clip?.name ?? "rest", k = g.getDuration();
|
|
24510
|
-
Pn && console.log("Write .timeSamples:", O, _, k, h), e.appendLine("# " + O + ": start=" + l.format(_ *
|
|
24528
|
+
Pn && console.log("Write .timeSamples:", O, _, k, h), e.appendLine("# " + O + ": start=" + l.format(_ * Ue.frameRate) + ", length=" + l.format(k * Ue.frameRate) + ", frames=" + g.getFrames());
|
|
24511
24529
|
}
|
|
24512
24530
|
if (y)
|
|
24513
24531
|
for (const { time: O, translation: k } of g.getValues(m, !0, !1, !1)) {
|
|
24514
|
-
const z = `${l.format((_ + O) *
|
|
24532
|
+
const z = `${l.format((_ + O) * Ue.frameRate)}: (${ae(k.x)}, ${ae(k.y)}, ${ae(k.z)}),`;
|
|
24515
24533
|
e.appendLine(z);
|
|
24516
24534
|
}
|
|
24517
24535
|
if (S)
|
|
24518
24536
|
for (const { time: O, rotation: k } of g.getValues(m, !1, !0, !1)) {
|
|
24519
|
-
const z = `${l.format((_ + O) *
|
|
24537
|
+
const z = `${l.format((_ + O) * Ue.frameRate)}: (${ae(k.w)}, ${ae(k.x)}, ${ae(k.y)}, ${ae(k.z)}),`;
|
|
24520
24538
|
e.appendLine(z);
|
|
24521
24539
|
}
|
|
24522
24540
|
if (I)
|
|
24523
24541
|
for (const { time: O, scale: k } of g.getValues(m, !1, !1, !0)) {
|
|
24524
|
-
const z = `${l.format((_ + O) *
|
|
24542
|
+
const z = `${l.format((_ + O) * Ue.frameRate)}: (${ae(k.x)}, ${ae(k.y)}, ${ae(k.z)}),`;
|
|
24525
24543
|
e.appendLine(z);
|
|
24526
24544
|
}
|
|
24527
24545
|
}
|
|
@@ -24571,7 +24589,7 @@ class La {
|
|
|
24571
24589
|
}
|
|
24572
24590
|
}
|
|
24573
24591
|
}
|
|
24574
|
-
var JM = Object.defineProperty,
|
|
24592
|
+
var JM = Object.defineProperty, Fe = (s, e, t, i) => {
|
|
24575
24593
|
for (var n = void 0, o = s.length - 1, r; o >= 0; o--)
|
|
24576
24594
|
(r = s[o]) && (n = r(e, t, n) || n);
|
|
24577
24595
|
return n && JM(e, t, n), n;
|
|
@@ -24627,16 +24645,16 @@ class Da extends T {
|
|
|
24627
24645
|
}
|
|
24628
24646
|
}
|
|
24629
24647
|
}
|
|
24630
|
-
|
|
24648
|
+
Fe([
|
|
24631
24649
|
u(M)
|
|
24632
24650
|
], Da.prototype, "object");
|
|
24633
|
-
|
|
24651
|
+
Fe([
|
|
24634
24652
|
u(M)
|
|
24635
24653
|
], Da.prototype, "target");
|
|
24636
|
-
|
|
24654
|
+
Fe([
|
|
24637
24655
|
u()
|
|
24638
24656
|
], Da.prototype, "duration");
|
|
24639
|
-
|
|
24657
|
+
Fe([
|
|
24640
24658
|
u()
|
|
24641
24659
|
], Da.prototype, "relativeMotion");
|
|
24642
24660
|
const lu = class Ut extends T {
|
|
@@ -24731,13 +24749,13 @@ const lu = class Ut extends T {
|
|
|
24731
24749
|
return e;
|
|
24732
24750
|
}
|
|
24733
24751
|
};
|
|
24734
|
-
|
|
24752
|
+
Fe([
|
|
24735
24753
|
u(_e)
|
|
24736
24754
|
], lu.prototype, "materialToSwitch");
|
|
24737
|
-
|
|
24755
|
+
Fe([
|
|
24738
24756
|
u(_e)
|
|
24739
24757
|
], lu.prototype, "variantMaterial");
|
|
24740
|
-
|
|
24758
|
+
Fe([
|
|
24741
24759
|
u()
|
|
24742
24760
|
], lu.prototype, "fadeDuration");
|
|
24743
24761
|
let Iv = lu;
|
|
@@ -24820,16 +24838,16 @@ const Sc = class Ae extends T {
|
|
|
24820
24838
|
this.gameObject[Ae.wasVisible] !== void 0 && (this.gameObject.visible = this.gameObject[Ae.wasVisible], delete this.gameObject[Ae.wasVisible]), this.target && this.target[Ae.wasVisible] !== void 0 && (this.target.visible = this.target[Ae.wasVisible], delete this.target[Ae.wasVisible]), delete this.gameObject[Ae.toggleClone], delete this.gameObject[Ae.reverseToggleClone];
|
|
24821
24839
|
}
|
|
24822
24840
|
};
|
|
24823
|
-
|
|
24841
|
+
Fe([
|
|
24824
24842
|
u(M)
|
|
24825
24843
|
], Sc.prototype, "target");
|
|
24826
|
-
|
|
24844
|
+
Fe([
|
|
24827
24845
|
u()
|
|
24828
24846
|
], Sc.prototype, "toggleOnClick");
|
|
24829
|
-
|
|
24847
|
+
Fe([
|
|
24830
24848
|
u()
|
|
24831
24849
|
], Sc.prototype, "targetState");
|
|
24832
|
-
|
|
24850
|
+
Fe([
|
|
24833
24851
|
u()
|
|
24834
24852
|
], Sc.prototype, "hideSelf");
|
|
24835
24853
|
let Lv = Sc;
|
|
@@ -24877,13 +24895,13 @@ class Cc extends T {
|
|
|
24877
24895
|
afterCreateDocument(e, t) {
|
|
24878
24896
|
}
|
|
24879
24897
|
}
|
|
24880
|
-
|
|
24898
|
+
Fe([
|
|
24881
24899
|
u()
|
|
24882
24900
|
], Cc.prototype, "target");
|
|
24883
|
-
|
|
24901
|
+
Fe([
|
|
24884
24902
|
u()
|
|
24885
24903
|
], Cc.prototype, "duration");
|
|
24886
|
-
|
|
24904
|
+
Fe([
|
|
24887
24905
|
u()
|
|
24888
24906
|
], Cc.prototype, "motionType");
|
|
24889
24907
|
class or extends T {
|
|
@@ -24942,13 +24960,13 @@ class or extends T {
|
|
|
24942
24960
|
}
|
|
24943
24961
|
}
|
|
24944
24962
|
}
|
|
24945
|
-
|
|
24963
|
+
Fe([
|
|
24946
24964
|
u(hn)
|
|
24947
24965
|
], or.prototype, "target");
|
|
24948
|
-
|
|
24966
|
+
Fe([
|
|
24949
24967
|
u(URL)
|
|
24950
24968
|
], or.prototype, "clip");
|
|
24951
|
-
|
|
24969
|
+
Fe([
|
|
24952
24970
|
u()
|
|
24953
24971
|
], or.prototype, "toggleOnClick");
|
|
24954
24972
|
const lg = class bn extends T {
|
|
@@ -25150,10 +25168,10 @@ const lg = class bn extends T {
|
|
|
25150
25168
|
n && (this.animationSequence = n.animationSequence, this.animationLoopAfterSequence = n.animationLoopAfterSequence, this.randomOffsetNormalized = n.randomTimeOffset, this.stateAnimationModel = t);
|
|
25151
25169
|
}
|
|
25152
25170
|
};
|
|
25153
|
-
|
|
25171
|
+
Fe([
|
|
25154
25172
|
u(It)
|
|
25155
25173
|
], lg.prototype, "animator");
|
|
25156
|
-
|
|
25174
|
+
Fe([
|
|
25157
25175
|
u()
|
|
25158
25176
|
], lg.prototype, "stateName");
|
|
25159
25177
|
let gd = lg;
|
|
@@ -25164,13 +25182,13 @@ class Pc extends T {
|
|
|
25164
25182
|
getDuration() {
|
|
25165
25183
|
}
|
|
25166
25184
|
}
|
|
25167
|
-
|
|
25185
|
+
Fe([
|
|
25168
25186
|
u(M)
|
|
25169
25187
|
], Pc.prototype, "target");
|
|
25170
25188
|
class cu extends T {
|
|
25171
25189
|
target;
|
|
25172
25190
|
}
|
|
25173
|
-
|
|
25191
|
+
Fe([
|
|
25174
25192
|
u(Pc)
|
|
25175
25193
|
], cu.prototype, "target");
|
|
25176
25194
|
class hu extends Pc {
|
|
@@ -25188,10 +25206,10 @@ class hu extends Pc {
|
|
|
25188
25206
|
return this.duration;
|
|
25189
25207
|
}
|
|
25190
25208
|
}
|
|
25191
|
-
|
|
25209
|
+
Fe([
|
|
25192
25210
|
u()
|
|
25193
25211
|
], hu.prototype, "type");
|
|
25194
|
-
|
|
25212
|
+
Fe([
|
|
25195
25213
|
u()
|
|
25196
25214
|
], hu.prototype, "duration");
|
|
25197
25215
|
class Dv extends cu {
|
|
@@ -25278,7 +25296,7 @@ class tr {
|
|
|
25278
25296
|
const e = "https://oculus.com/open_url/?url=", t = document.createElement("button");
|
|
25279
25297
|
return this._sendToQuestButton = t, t.dataset.needle = "webxr-sendtoquest-button", t.innerText = "Open on Quest", t.prepend(Rt("share_windows")), t.title = "Click to send this page to the Oculus Browser on your Quest", t.addEventListener("click", () => {
|
|
25280
25298
|
const i = encodeURIComponent(window.location.href), n = e + i;
|
|
25281
|
-
window.open(n) == null &&
|
|
25299
|
+
window.open(n) == null && Be("This page doesn't allow popups. Please paste " + n + " into your browser.");
|
|
25282
25300
|
}), this.listenToXRSessionState(t), this.hideElementDuringXRSession(t), q.isMozillaXR() || navigator.xr?.addEventListener("devicechange", () => {
|
|
25283
25301
|
navigator.xr?.isSessionSupported("immersive-vr") ? t.style.display = "none" : t.style.display = "";
|
|
25284
25302
|
}), t;
|
|
@@ -26395,12 +26413,12 @@ class ar extends T {
|
|
|
26395
26413
|
rl && console.warn("AVATAR ENTER XR", this.guid, this.sourceId, this, this.activeAndEnabled), this._syncTransforms && (this._syncTransforms.length = 0), await this.prepareAvatar();
|
|
26396
26414
|
const t = En.getFor(this);
|
|
26397
26415
|
if (t?.owner) {
|
|
26398
|
-
const i = this.gameObject.addComponent(
|
|
26416
|
+
const i = this.gameObject.addComponent(je);
|
|
26399
26417
|
i.avatar = this.gameObject, i.connectionId = t.owner;
|
|
26400
26418
|
} else this.context.connection.isConnected ? console.error("No player state found for avatar", this) : t && !this.context.connection.isConnected && (t.dontDestroy = !0);
|
|
26401
26419
|
}
|
|
26402
26420
|
onLeaveXR(e) {
|
|
26403
|
-
const t = this.gameObject.getComponent(
|
|
26421
|
+
const t = this.gameObject.getComponent(je);
|
|
26404
26422
|
t && t.destroy();
|
|
26405
26423
|
}
|
|
26406
26424
|
onUpdateXR(e) {
|
|
@@ -29022,11 +29040,11 @@ const si = class Wp extends T {
|
|
|
29022
29040
|
/** @internal */
|
|
29023
29041
|
onEnable() {
|
|
29024
29042
|
const e = q.supportsQuickLookAR(), t = q.isiOS() || q.isiPad();
|
|
29025
|
-
!this.button && (oi || e || t) && (this.allowCreateQuicklookButton && (this.button = this.createQuicklookButton()), this.lastCallback = this.quicklookCallback.bind(this), this.link = j_(this.context, e), this.link.addEventListener("message", this.lastCallback)), oi &&
|
|
29043
|
+
!this.button && (oi || e || t) && (this.allowCreateQuicklookButton && (this.button = this.createQuicklookButton()), this.lastCallback = this.quicklookCallback.bind(this), this.link = j_(this.context, e), this.link.addEventListener("message", this.lastCallback)), oi && Be("USDZ Exporter enabled: " + this.name), document.getElementById("open-in-ar")?.addEventListener("click", this.onClickedOpenInARElement), ic.registerExporter(this);
|
|
29026
29044
|
}
|
|
29027
29045
|
/** @internal */
|
|
29028
29046
|
onDisable() {
|
|
29029
|
-
this.button?.remove(), this.link?.removeEventListener("message", this.lastCallback), oi &&
|
|
29047
|
+
this.button?.remove(), this.link?.removeEventListener("message", this.lastCallback), oi && Be("USDZ Exporter disabled: " + this.name), document.getElementById("open-in-ar")?.removeEventListener("click", this.onClickedOpenInARElement), ic.unregisterExporter(this);
|
|
29030
29048
|
}
|
|
29031
29049
|
onClickedOpenInARElement = (e) => {
|
|
29032
29050
|
e.preventDefault(), this.exportAndOpen();
|
|
@@ -29098,7 +29116,7 @@ const si = class Wp extends T {
|
|
|
29098
29116
|
}));
|
|
29099
29117
|
}
|
|
29100
29118
|
}
|
|
29101
|
-
oi &&
|
|
29119
|
+
oi && Be("Progressive Loading: " + n.length), await Promise.all(n), oi && Be("Progressive Loading: done"), le.end("export-usdz-textures");
|
|
29102
29120
|
const r = Jt.Global.Mask;
|
|
29103
29121
|
Jt.Global.Set(us.AR);
|
|
29104
29122
|
const a = new jM(), l = new ag(this.quickLookCompatible);
|
|
@@ -29181,7 +29199,7 @@ const si = class Wp extends T {
|
|
|
29181
29199
|
const i = new URLSearchParams(this.link.href);
|
|
29182
29200
|
if (i) {
|
|
29183
29201
|
const n = i.get("callToActionURL");
|
|
29184
|
-
oi &&
|
|
29202
|
+
oi && Be("Quicklook url: " + n), n && (bs() ? globalThis.open(n, "_blank") : console.warn("Quicklook closed: custom redirects require a Needle Engine Pro license: https://needle.tools/pricing", n));
|
|
29185
29203
|
}
|
|
29186
29204
|
}
|
|
29187
29205
|
}
|
|
@@ -30882,7 +30900,7 @@ C([
|
|
|
30882
30900
|
C([
|
|
30883
30901
|
u()
|
|
30884
30902
|
], ve.prototype, "strengthZMultiplier");
|
|
30885
|
-
class
|
|
30903
|
+
class Ne {
|
|
30886
30904
|
enabled;
|
|
30887
30905
|
attachRibbonToTransform = !1;
|
|
30888
30906
|
colorOverLifetime;
|
|
@@ -30914,64 +30932,64 @@ class Ue {
|
|
|
30914
30932
|
}
|
|
30915
30933
|
C([
|
|
30916
30934
|
u()
|
|
30917
|
-
],
|
|
30935
|
+
], Ne.prototype, "enabled");
|
|
30918
30936
|
C([
|
|
30919
30937
|
u()
|
|
30920
|
-
],
|
|
30938
|
+
], Ne.prototype, "attachRibbonToTransform");
|
|
30921
30939
|
C([
|
|
30922
30940
|
u(Wa)
|
|
30923
|
-
],
|
|
30941
|
+
], Ne.prototype, "colorOverLifetime");
|
|
30924
30942
|
C([
|
|
30925
30943
|
u(Wa)
|
|
30926
|
-
],
|
|
30944
|
+
], Ne.prototype, "colorOverTrail");
|
|
30927
30945
|
C([
|
|
30928
30946
|
u()
|
|
30929
|
-
],
|
|
30947
|
+
], Ne.prototype, "dieWithParticles");
|
|
30930
30948
|
C([
|
|
30931
30949
|
u()
|
|
30932
|
-
],
|
|
30950
|
+
], Ne.prototype, "inheritParticleColor");
|
|
30933
30951
|
C([
|
|
30934
30952
|
u(Y)
|
|
30935
|
-
],
|
|
30953
|
+
], Ne.prototype, "lifetime");
|
|
30936
30954
|
C([
|
|
30937
30955
|
u()
|
|
30938
|
-
],
|
|
30956
|
+
], Ne.prototype, "lifetimeMultiplier");
|
|
30939
30957
|
C([
|
|
30940
30958
|
u()
|
|
30941
|
-
],
|
|
30959
|
+
], Ne.prototype, "minVertexDistance");
|
|
30942
30960
|
C([
|
|
30943
30961
|
u()
|
|
30944
|
-
],
|
|
30962
|
+
], Ne.prototype, "mode");
|
|
30945
30963
|
C([
|
|
30946
30964
|
u()
|
|
30947
|
-
],
|
|
30965
|
+
], Ne.prototype, "ratio");
|
|
30948
30966
|
C([
|
|
30949
30967
|
u()
|
|
30950
|
-
],
|
|
30968
|
+
], Ne.prototype, "ribbonCount");
|
|
30951
30969
|
C([
|
|
30952
30970
|
u()
|
|
30953
|
-
],
|
|
30971
|
+
], Ne.prototype, "shadowBias");
|
|
30954
30972
|
C([
|
|
30955
30973
|
u()
|
|
30956
|
-
],
|
|
30974
|
+
], Ne.prototype, "sizeAffectsLifetime");
|
|
30957
30975
|
C([
|
|
30958
30976
|
u()
|
|
30959
|
-
],
|
|
30977
|
+
], Ne.prototype, "sizeAffectsWidth");
|
|
30960
30978
|
C([
|
|
30961
30979
|
u()
|
|
30962
|
-
],
|
|
30980
|
+
], Ne.prototype, "splitSubEmitterRibbons");
|
|
30963
30981
|
C([
|
|
30964
30982
|
u()
|
|
30965
|
-
],
|
|
30983
|
+
], Ne.prototype, "textureMode");
|
|
30966
30984
|
C([
|
|
30967
30985
|
u(Y)
|
|
30968
|
-
],
|
|
30986
|
+
], Ne.prototype, "widthOverTrail");
|
|
30969
30987
|
C([
|
|
30970
30988
|
u()
|
|
30971
|
-
],
|
|
30989
|
+
], Ne.prototype, "widthOverTrailMultiplier");
|
|
30972
30990
|
C([
|
|
30973
30991
|
u()
|
|
30974
|
-
],
|
|
30992
|
+
], Ne.prototype, "worldSpace");
|
|
30975
30993
|
class Ve {
|
|
30976
30994
|
enabled;
|
|
30977
30995
|
space = 0;
|
|
@@ -31504,7 +31522,7 @@ class ow {
|
|
|
31504
31522
|
), this.particleSystem.worldSpace || i.multiplyMatrices(this._emitterMatrix, i), this.subParticleSystem.emit(t, e.emissionState, i);
|
|
31505
31523
|
}
|
|
31506
31524
|
}
|
|
31507
|
-
var oT = Object.defineProperty,
|
|
31525
|
+
var oT = Object.defineProperty, ze = (s, e, t, i) => {
|
|
31508
31526
|
for (var n = void 0, o = s.length - 1, r; o >= 0; o--)
|
|
31509
31527
|
(r = s[o]) && (n = r(e, t, n) || n);
|
|
31510
31528
|
return n && oT(e, t, n), n;
|
|
@@ -31554,28 +31572,28 @@ class mn extends T {
|
|
|
31554
31572
|
return new H(t, this.getMaterial());
|
|
31555
31573
|
}
|
|
31556
31574
|
}
|
|
31557
|
-
|
|
31575
|
+
ze([
|
|
31558
31576
|
u()
|
|
31559
31577
|
], mn.prototype, "renderMode");
|
|
31560
|
-
|
|
31578
|
+
ze([
|
|
31561
31579
|
u(_e)
|
|
31562
31580
|
], mn.prototype, "particleMaterial");
|
|
31563
|
-
|
|
31581
|
+
ze([
|
|
31564
31582
|
u(_e)
|
|
31565
31583
|
], mn.prototype, "trailMaterial");
|
|
31566
|
-
|
|
31584
|
+
ze([
|
|
31567
31585
|
u()
|
|
31568
31586
|
], mn.prototype, "maxParticleSize");
|
|
31569
|
-
|
|
31587
|
+
ze([
|
|
31570
31588
|
u()
|
|
31571
31589
|
], mn.prototype, "minParticleSize");
|
|
31572
|
-
|
|
31590
|
+
ze([
|
|
31573
31591
|
u()
|
|
31574
31592
|
], mn.prototype, "velocityScale");
|
|
31575
|
-
|
|
31593
|
+
ze([
|
|
31576
31594
|
u()
|
|
31577
31595
|
], mn.prototype, "cameraVelocityScale");
|
|
31578
|
-
|
|
31596
|
+
ze([
|
|
31579
31597
|
u()
|
|
31580
31598
|
], mn.prototype, "lengthScale");
|
|
31581
31599
|
class vh {
|
|
@@ -32212,49 +32230,49 @@ const jt = class Uh extends T {
|
|
|
32212
32230
|
}
|
|
32213
32231
|
}
|
|
32214
32232
|
};
|
|
32215
|
-
|
|
32233
|
+
ze([
|
|
32216
32234
|
u(Cg)
|
|
32217
32235
|
], jt.prototype, "colorOverLifetime");
|
|
32218
|
-
|
|
32236
|
+
ze([
|
|
32219
32237
|
u(Qt)
|
|
32220
32238
|
], jt.prototype, "main");
|
|
32221
|
-
|
|
32239
|
+
ze([
|
|
32222
32240
|
u(Co)
|
|
32223
32241
|
], jt.prototype, "emission");
|
|
32224
|
-
|
|
32242
|
+
ze([
|
|
32225
32243
|
u(Va)
|
|
32226
32244
|
], jt.prototype, "sizeOverLifetime");
|
|
32227
|
-
|
|
32245
|
+
ze([
|
|
32228
32246
|
u(iw)
|
|
32229
32247
|
], jt.prototype, "shape");
|
|
32230
|
-
|
|
32248
|
+
ze([
|
|
32231
32249
|
u(ve)
|
|
32232
32250
|
], jt.prototype, "noise");
|
|
32233
|
-
|
|
32234
|
-
u(
|
|
32251
|
+
ze([
|
|
32252
|
+
u(Ne)
|
|
32235
32253
|
], jt.prototype, "trails");
|
|
32236
|
-
|
|
32254
|
+
ze([
|
|
32237
32255
|
u(Ve)
|
|
32238
32256
|
], jt.prototype, "velocityOverLifetime");
|
|
32239
|
-
|
|
32257
|
+
ze([
|
|
32240
32258
|
u(yt)
|
|
32241
32259
|
], jt.prototype, "limitVelocityOverLifetime");
|
|
32242
|
-
|
|
32260
|
+
ze([
|
|
32243
32261
|
u(sw)
|
|
32244
32262
|
], jt.prototype, "inheritVelocity");
|
|
32245
|
-
|
|
32263
|
+
ze([
|
|
32246
32264
|
u(Ic)
|
|
32247
32265
|
], jt.prototype, "colorBySpeed");
|
|
32248
|
-
|
|
32266
|
+
ze([
|
|
32249
32267
|
u(Yt)
|
|
32250
32268
|
], jt.prototype, "textureSheetAnimation");
|
|
32251
|
-
|
|
32269
|
+
ze([
|
|
32252
32270
|
u(Gn)
|
|
32253
32271
|
], jt.prototype, "rotationOverLifetime");
|
|
32254
|
-
|
|
32272
|
+
ze([
|
|
32255
32273
|
u(pn)
|
|
32256
32274
|
], jt.prototype, "rotationBySpeed");
|
|
32257
|
-
|
|
32275
|
+
ze([
|
|
32258
32276
|
u(Oi)
|
|
32259
32277
|
], jt.prototype, "sizeBySpeed");
|
|
32260
32278
|
let bd = jt;
|
|
@@ -32303,7 +32321,7 @@ class uc extends T {
|
|
|
32303
32321
|
const e = x.getComponentInParent(this.gameObject, En);
|
|
32304
32322
|
if (e && e.owner)
|
|
32305
32323
|
return this._didAssignPlayerColor = !0, this.assignUserColor(e.owner), !0;
|
|
32306
|
-
const t = x.getComponentInParent(this.gameObject,
|
|
32324
|
+
const t = x.getComponentInParent(this.gameObject, je);
|
|
32307
32325
|
return t?.connectionId ? (this._didAssignPlayerColor = !0, this.assignUserColor(t.connectionId), !0) : !1;
|
|
32308
32326
|
};
|
|
32309
32327
|
assignUserColor(e) {
|
|
@@ -33588,7 +33606,7 @@ class Dc extends T {
|
|
|
33588
33606
|
/** @internal */
|
|
33589
33607
|
awake() {
|
|
33590
33608
|
Bo && (console.log("PostprocessingManager Awake", this), console.log("Press P to toggle post processing"), window.addEventListener("keydown", (e) => {
|
|
33591
|
-
e.key === "p" && (this.enabled = !this.enabled,
|
|
33609
|
+
e.key === "p" && (this.enabled = !this.enabled, Be("Toggle PostProcessing " + this.name + ": Enabled=" + this.enabled), this.markDirty());
|
|
33592
33610
|
})), this.sharedProfile?.__init(this);
|
|
33593
33611
|
}
|
|
33594
33612
|
_componentEnabledTime = -1;
|
|
@@ -33786,7 +33804,7 @@ class Ze extends T {
|
|
|
33786
33804
|
}
|
|
33787
33805
|
/** @internal */
|
|
33788
33806
|
async onEnable() {
|
|
33789
|
-
if (globalThis.addEventListener("popstate", this.onPopState), this.context.input.addEventListener(
|
|
33807
|
+
if (globalThis.addEventListener("popstate", this.onPopState), this.context.input.addEventListener(De.KeyDown, this.onInputKeyDown), this.context.input.addEventListener(De.PointerMove, this.onInputPointerMove), this.context.input.addEventListener(De.PointerUp, this.onInputPointerUp), this._engineElementOverserver || (this._engineElementOverserver = new MutationObserver((e) => {
|
|
33790
33808
|
for (const t of e)
|
|
33791
33809
|
if (t.type === "attributes" && t.attributeName === $h) {
|
|
33792
33810
|
const i = this.context.domElement.getAttribute($h);
|
|
@@ -33818,7 +33836,7 @@ class Ze extends T {
|
|
|
33818
33836
|
}
|
|
33819
33837
|
/** @internal */
|
|
33820
33838
|
onDisable() {
|
|
33821
|
-
if (globalThis.removeEventListener("popstate", this.onPopState), this.context.input.removeEventListener(
|
|
33839
|
+
if (globalThis.removeEventListener("popstate", this.onPopState), this.context.input.removeEventListener(De.KeyDown, this.onInputKeyDown), this.context.input.removeEventListener(De.PointerMove, this.onInputPointerMove), this.context.input.removeEventListener(De.PointerUp, this.onInputPointerUp), this._preloadScheduler?.stop(), this._menuButtons) {
|
|
33822
33840
|
for (const e of this._menuButtons)
|
|
33823
33841
|
e.remove();
|
|
33824
33842
|
this._menuButtons = void 0;
|
|
@@ -35855,7 +35873,7 @@ class Lg extends T {
|
|
|
35855
35873
|
*/
|
|
35856
35874
|
setAvatarFlagsBeforeRender() {
|
|
35857
35875
|
const e = this._mode === 0;
|
|
35858
|
-
for (const t of
|
|
35876
|
+
for (const t of je.instances)
|
|
35859
35877
|
if (t.avatar && "isLocalAvatar" in t.avatar && "flags" in t.avatar) {
|
|
35860
35878
|
let i = us.All;
|
|
35861
35879
|
this.isSpectatingSelf && (i = e && t.avatar.isLocalAvatar ? us.FirstPerson : us.ThirdPerson);
|
|
@@ -35869,7 +35887,7 @@ class Lg extends T {
|
|
|
35869
35887
|
* Restores avatar visibility flags after spectator rendering
|
|
35870
35888
|
*/
|
|
35871
35889
|
resetAvatarFlags() {
|
|
35872
|
-
for (const e of
|
|
35890
|
+
for (const e of je.instances)
|
|
35873
35891
|
if (e.avatar && "flags" in e.avatar) {
|
|
35874
35892
|
const t = e.avatar.flags;
|
|
35875
35893
|
if (!t) continue;
|
|
@@ -35955,9 +35973,9 @@ class OE {
|
|
|
35955
35973
|
n.key === "Escape" && this.spectator.stopSpectating();
|
|
35956
35974
|
});
|
|
35957
35975
|
let i = 0;
|
|
35958
|
-
this.context.input.addEventListener(
|
|
35976
|
+
this.context.input.addEventListener(De.PointerDown, (n) => {
|
|
35959
35977
|
i = this.context.time.time;
|
|
35960
|
-
}), this.context.input.addEventListener(
|
|
35978
|
+
}), this.context.input.addEventListener(De.PointerUp, (n) => {
|
|
35961
35979
|
const o = this.context.time.time - i;
|
|
35962
35980
|
o > 1 ? this.spectator.stopSpectating() : this.context.input.getPointerClicked(0) && o < 0.3 && this.trySelectObject();
|
|
35963
35981
|
});
|
|
@@ -35972,7 +35990,7 @@ class OE {
|
|
|
35972
35990
|
if (pi && console.log(...t), t?.length)
|
|
35973
35991
|
for (const i of t) {
|
|
35974
35992
|
if (i.distance < 0.2) continue;
|
|
35975
|
-
const n = i.object, o = x.getComponentInParent(n,
|
|
35993
|
+
const n = i.object, o = x.getComponentInParent(n, je), r = o?.connectionId;
|
|
35976
35994
|
if (r) {
|
|
35977
35995
|
const a = this.context.players.getPlayerView(r);
|
|
35978
35996
|
this.spectator.target = a, pi && console.log("spectate", r, o);
|
|
@@ -36254,7 +36272,7 @@ const xw = class em extends T {
|
|
|
36254
36272
|
l.context = this.context;
|
|
36255
36273
|
const c = x.instantiate(this.cameraPrefab, l);
|
|
36256
36274
|
n = this.remoteCams[t] = { obj: c, lastUpdate: this.context.time.realtimeSinceStartup, userId: i }, n.obj.visible = !0, this.gameObject.add(c), this.userToCamMap[i] = t, em.instances.push(n);
|
|
36257
|
-
const h = x.getOrAddComponent(c,
|
|
36275
|
+
const h = x.getOrAddComponent(c, je);
|
|
36258
36276
|
h.connectionId = i, h.avatar = c;
|
|
36259
36277
|
} else
|
|
36260
36278
|
return;
|
|
@@ -36415,7 +36433,7 @@ C) Set "joinRandomRoom" to true`), !1) : (qf && console.log("Join " + this.roomN
|
|
|
36415
36433
|
const t = this.getViewOnlyUrl();
|
|
36416
36434
|
t?.length ? navigator.canShare({ url: t }) ? navigator.share({ url: t })?.catch((i) => {
|
|
36417
36435
|
console.warn(i);
|
|
36418
|
-
}) : (navigator.clipboard.writeText(t),
|
|
36436
|
+
}) : (navigator.clipboard.writeText(t), Be("View only URL copied to clipboard")) : me("Could not create view only URL");
|
|
36419
36437
|
}, e.title = "Copy the view only URL: A page accessed by the view only URL can not be modified by visiting users.", e.textContent = "Share View URL", e.prepend(Rt("visibility"));
|
|
36420
36438
|
}
|
|
36421
36439
|
this.context.menu.appendChild(this._viewOnlyButton);
|
|
@@ -37786,7 +37804,7 @@ class Mo extends T {
|
|
|
37786
37804
|
Fo && console.warn("Button Up", this.animationTriggers?.highlightedTrigger, this.animator, this._isHovered), this.interactable && (this.transition == 3 && this.animationTriggers && this.animator ? this.animator.setTrigger(this._isHovered ? this.animationTriggers.highlightedTrigger : this.animationTriggers.normalTrigger) : this.transition === 1 && this.colors && this._image?.setState(this._isHovered ? "hovered" : "normal"));
|
|
37787
37805
|
}
|
|
37788
37806
|
onPointerClick(e) {
|
|
37789
|
-
if (this.interactable && !(e.button !== 0 && e.event.pointerType === Pm.Mouse) && (Fo && (console.warn("Button Click", this.onClick),
|
|
37807
|
+
if (this.interactable && !(e.button !== 0 && e.event.pointerType === Pm.Mouse) && (Fo && (console.warn("Button Click", this.onClick), Be("CLICKED button " + this.name + " at " + this.context.time.frameCount)), this.onClick && this.onClick.listenerCount > 0 && (this.onClick.invoke(), e.use(), Fo))) {
|
|
37790
37808
|
const t = this.gameObject.worldPosition;
|
|
37791
37809
|
t.add(this.gameObject.worldUp.multiplyScalar(1 + Math.random() * 0.5)), F.DrawLabel(t, "CLICK:" + Date.now(), 0.1, 1 + Math.random() * 0.5);
|
|
37792
37810
|
}
|
|
@@ -38360,7 +38378,7 @@ class Wc extends T {
|
|
|
38360
38378
|
}
|
|
38361
38379
|
this._validateUrl();
|
|
38362
38380
|
let e = this.url;
|
|
38363
|
-
switch (!e.startsWith("mailto:") && e.includes("@") && (e = "mailto:" + e), L() &&
|
|
38381
|
+
switch (!e.startsWith("mailto:") && e.includes("@") && (e = "mailto:" + e), L() && Be("Open URL: " + e), this.mode) {
|
|
38364
38382
|
case 0:
|
|
38365
38383
|
q.isSafari(), globalThis.open(e, "_blank");
|
|
38366
38384
|
break;
|
|
@@ -39537,7 +39555,7 @@ P.add("TeleportTarget", ug);
|
|
|
39537
39555
|
P.add("WebARCameraBackground", zu);
|
|
39538
39556
|
P.add("WebARSessionRoot", $i);
|
|
39539
39557
|
P.add("WebXR", fg);
|
|
39540
|
-
P.add("AvatarMarker",
|
|
39558
|
+
P.add("AvatarMarker", je);
|
|
39541
39559
|
P.add("WebXRImageTracking", Pd);
|
|
39542
39560
|
P.add("WebXRPlaneTracking", Ao);
|
|
39543
39561
|
P.add("XRRig", Vg);
|
|
@@ -39626,7 +39644,7 @@ async function sm(s, e, t, i) {
|
|
|
39626
39644
|
}
|
|
39627
39645
|
if (ul.length > 0) {
|
|
39628
39646
|
const r = ul.join(", ");
|
|
39629
|
-
console.warn("unknown components: " + r), ul.length = 0, ti() &&
|
|
39647
|
+
console.warn("unknown components: " + r), ul.length = 0, ti() && Be(`<strong>Unknown components in scene</strong>:
|
|
39630
39648
|
|
|
39631
39649
|
${r}
|
|
39632
39650
|
|
|
@@ -39809,7 +39827,7 @@ function xA(s) {
|
|
|
39809
39827
|
if (new URL(s, window.location.href).href.startsWith("file://")) {
|
|
39810
39828
|
const t = `Hi - it looks like you are trying to load a local file which will not work. You need to use a webserver to serve your files.
|
|
39811
39829
|
Please refer to the documentation on <a href="https://fwd.needle.tools/needle-engine/docs/local-server">https://docs.needle.tools</a> or ask for help in our <a href="https://discord.needle.tools">discord community</a>`;
|
|
39812
|
-
|
|
39830
|
+
Be(t), console.warn(t);
|
|
39813
39831
|
}
|
|
39814
39832
|
}
|
|
39815
39833
|
function SA(s, e) {
|
|
@@ -39998,7 +40016,7 @@ class Od {
|
|
|
39998
40016
|
if (!e) {
|
|
39999
40017
|
this._loadingElement.style.position = "absolute", this._loadingElement.style.width = "100%", this._loadingElement.style.height = "100%", this._loadingElement.style.left = "0", this._loadingElement.style.top = "0";
|
|
40000
40018
|
const f = this._element.getAttribute("loading-background");
|
|
40001
|
-
f ? this._loadingElement.style.background = f : this._loadingElement.style.backgroundColor = "transparent", this._loadingElement.style.display = "flex", this._loadingElement.style.alignItems = "center", this._loadingElement.style.justifyContent = "center", this._loadingElement.style.zIndex =
|
|
40019
|
+
f ? this._loadingElement.style.background = f : this._loadingElement.style.backgroundColor = "transparent", this._loadingElement.style.display = "flex", this._loadingElement.style.alignItems = "center", this._loadingElement.style.justifyContent = "center", this._loadingElement.style.zIndex = "0", this._loadingElement.style.flexDirection = "column", this._loadingElement.style.pointerEvents = "none", this._loadingElement.style.color = "white", this._loadingElement.style.fontFamily = 'system-ui, Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', this._loadingElement.style.fontSize = "1rem", t === "light" ? this._loadingElement.style.color = "rgba(0,0,0,.6)" : this._loadingElement.style.color = "rgba(255,255,255,.3)";
|
|
40002
40020
|
}
|
|
40003
40021
|
const n = this._loadingElementOptions?.className ?? Od.LoadingContainerClassName;
|
|
40004
40022
|
if (this._loadingElement.classList.add(n), this._loadingElementOptions?.additionalClasses)
|
|
@@ -41738,7 +41756,7 @@ const pL = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
41738
41756
|
AvatarBlink_Simple: Ta,
|
|
41739
41757
|
AvatarEyeLook_Rotation: ev,
|
|
41740
41758
|
AvatarLoader: FA,
|
|
41741
|
-
AvatarMarker:
|
|
41759
|
+
AvatarMarker: je,
|
|
41742
41760
|
AvatarModel: Hw,
|
|
41743
41761
|
Avatar_Brain_LookAt: ud,
|
|
41744
41762
|
Avatar_MouthShapes: eu,
|
|
@@ -41899,8 +41917,8 @@ const pL = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
41899
41917
|
TextureSheetAnimationModule: Yt,
|
|
41900
41918
|
TiltShiftEffect: Ds,
|
|
41901
41919
|
ToneMappingEffect: cr,
|
|
41902
|
-
TrailModule:
|
|
41903
|
-
TransformData:
|
|
41920
|
+
TrailModule: Ne,
|
|
41921
|
+
TransformData: Ue,
|
|
41904
41922
|
TransformGizmo: qa,
|
|
41905
41923
|
TriggerBuilder: Gt,
|
|
41906
41924
|
TriggerModel: er,
|
|
@@ -42003,11 +42021,7 @@ he.registerCallback(ce.ContextCreated, (s) => {
|
|
|
42003
42021
|
});
|
|
42004
42022
|
class NA extends NS {
|
|
42005
42023
|
constructor() {
|
|
42006
|
-
super(new Worker(new URL(
|
|
42007
|
-
/* @vite-ignore */
|
|
42008
|
-
"/generateMeshBVH.worker-2qGLkQjg.js",
|
|
42009
|
-
import.meta.url
|
|
42010
|
-
), { type: "module" })), this.name = "GenerateMeshBVHWorker";
|
|
42024
|
+
super(new Worker(URL.createObjectURL(new Blob(["import '" + `${new URL('./generateMeshBVH.worker-2qGLkQjg.js', import.meta.url).toString()}` + "';"], { type: 'text/javascript' })), { type: "module" })), this.name = "GenerateMeshBVHWorker";
|
|
42011
42025
|
}
|
|
42012
42026
|
runTask(e, t, i = {}) {
|
|
42013
42027
|
return new Promise((n, o) => {
|
|
@@ -42081,7 +42095,7 @@ export {
|
|
|
42081
42095
|
Ta as AvatarBlink_Simple,
|
|
42082
42096
|
ev as AvatarEyeLook_Rotation,
|
|
42083
42097
|
FA as AvatarLoader,
|
|
42084
|
-
|
|
42098
|
+
je as AvatarMarker,
|
|
42085
42099
|
Hw as AvatarModel,
|
|
42086
42100
|
ud as Avatar_Brain_LookAt,
|
|
42087
42101
|
eu as Avatar_MouthShapes,
|
|
@@ -42188,7 +42202,7 @@ export {
|
|
|
42188
42202
|
sw as InheritVelocityModule,
|
|
42189
42203
|
r1 as Input,
|
|
42190
42204
|
di as InputEventQueue,
|
|
42191
|
-
|
|
42205
|
+
De as InputEvents,
|
|
42192
42206
|
Rw as InputField,
|
|
42193
42207
|
ra as InstanceHandle,
|
|
42194
42208
|
Pa as InstancingHandler,
|
|
@@ -42356,8 +42370,8 @@ export {
|
|
|
42356
42370
|
cr as ToneMappingEffect,
|
|
42357
42371
|
Iu as TrackHandler,
|
|
42358
42372
|
Bi as TrackType,
|
|
42359
|
-
|
|
42360
|
-
|
|
42373
|
+
Ne as TrailModule,
|
|
42374
|
+
Ue as TransformData,
|
|
42361
42375
|
qa as TransformGizmo,
|
|
42362
42376
|
Gt as TriggerBuilder,
|
|
42363
42377
|
er as TriggerModel,
|
|
@@ -42603,7 +42617,7 @@ export {
|
|
|
42603
42617
|
Ud as setWorldRotationXYZ,
|
|
42604
42618
|
tc as setWorldScale,
|
|
42605
42619
|
Nd as showBalloonError,
|
|
42606
|
-
|
|
42620
|
+
Be as showBalloonMessage,
|
|
42607
42621
|
me as showBalloonWarning,
|
|
42608
42622
|
Hb as showDebugConsole,
|
|
42609
42623
|
pI as slerp,
|