@needle-tools/engine 6.0.0-alpha.4 → 6.0.0-alpha.6
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 +8 -0
- package/README.md +11 -1
- package/dist/{gltf-progressive-CcSfG2Ja.js → gltf-progressive-B7lOWdLe.js} +117 -115
- package/dist/gltf-progressive-BpT9M5Mt.umd.cjs +10 -0
- package/dist/gltf-progressive-D0rzvhNG.min.js +10 -0
- package/dist/{materialx-B3qY8vPU.js → materialx-Bd9BE6LR.js} +1 -1
- package/dist/{materialx-BwYvA-4x.umd.cjs → materialx-CzRx9AGf.umd.cjs} +2 -2
- package/dist/{materialx-CTPhpPxI.min.js → materialx-x1m4IJd1.min.js} +1 -1
- package/dist/{needle-engine.bundle-Bmcb5t3w.min.js → needle-engine.bundle-D6mZl1dR.min.js} +29 -29
- package/dist/{needle-engine.bundle-BuUj9B4K.umd.cjs → needle-engine.bundle-DOHf03pR.umd.cjs} +14 -14
- package/dist/{needle-engine.bundle-0tD9EcNs.js → needle-engine.bundle-Hu7ZAxEI.js} +75 -69
- package/dist/needle-engine.d.ts +5 -5
- package/dist/needle-engine.js +192 -192
- package/dist/needle-engine.min.js +1 -1
- package/dist/needle-engine.umd.cjs +1 -1
- package/dist/{vendor-BQUQwut5.js → vendor-BatPc34p.js} +50 -41
- package/dist/{vendor-BJviq-Oq.umd.cjs → vendor-CDN1hirK.umd.cjs} +1 -1
- package/dist/{vendor-CdNldo8c.min.js → vendor-T07c_9f_.min.js} +1 -1
- package/lib/engine/api.d.ts +1 -1
- package/lib/engine/api.js +1 -1
- package/lib/engine/api.js.map +1 -1
- package/lib/engine/engine_init.js +2 -2
- package/lib/engine/engine_init.js.map +1 -1
- package/lib/engine/engine_license.d.ts +7 -7
- package/lib/engine/engine_license.js +98 -78
- package/lib/engine/engine_license.js.map +1 -1
- package/lib/engine/engine_networking_blob.js +3 -3
- package/lib/engine/engine_networking_blob.js.map +1 -1
- package/lib/engine/engine_utils_qrcode.js +2 -2
- package/lib/engine/engine_utils_qrcode.js.map +1 -1
- package/lib/engine/webcomponents/needle menu/needle-menu-spatial.js +2 -2
- package/lib/engine/webcomponents/needle menu/needle-menu-spatial.js.map +1 -1
- package/lib/engine/webcomponents/needle menu/needle-menu.js +5 -5
- package/lib/engine/webcomponents/needle menu/needle-menu.js.map +1 -1
- package/lib/engine/webcomponents/needle-engine.js +2 -2
- package/lib/engine/webcomponents/needle-engine.js.map +1 -1
- package/lib/engine/webcomponents/needle-engine.loading.js +2 -2
- package/lib/engine/webcomponents/needle-engine.loading.js.map +1 -1
- package/lib/engine/xr/TempXRContext.js +2 -2
- package/lib/engine/xr/TempXRContext.js.map +1 -1
- package/lib/engine-components/Renderer.d.ts +1 -1
- package/lib/engine-components/Renderer.js +2 -11
- package/lib/engine-components/Renderer.js.map +1 -1
- package/lib/engine-components/export/usdz/USDZExporter.js +4 -4
- package/lib/engine-components/export/usdz/USDZExporter.js.map +1 -1
- package/package.json +6 -3
- package/plugins/common/license.js +4 -4
- package/plugins/license/README.md +38 -0
- package/plugins/license/cli.js +46 -0
- package/plugins/license/index.js +24 -0
- package/plugins/vite/license.js +4 -4
- package/src/engine/api.ts +1 -1
- package/src/engine/engine_init.ts +2 -2
- package/src/engine/engine_license.ts +93 -76
- package/src/engine/engine_networking_blob.ts +3 -3
- package/src/engine/engine_utils_qrcode.ts +2 -2
- package/src/engine/webcomponents/needle menu/needle-menu-spatial.ts +2 -2
- package/src/engine/webcomponents/needle menu/needle-menu.ts +5 -5
- package/src/engine/webcomponents/needle-engine.loading.ts +2 -2
- package/src/engine/webcomponents/needle-engine.ts +2 -2
- package/src/engine/xr/TempXRContext.ts +2 -2
- package/src/engine-components/Renderer.ts +4 -13
- package/src/engine-components/export/usdz/USDZExporter.ts +4 -4
- package/dist/gltf-progressive-BYG9UH7O.min.js +0 -10
- package/dist/gltf-progressive-sK--FWg7.umd.cjs +0 -10
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
var _P = Object.defineProperty;
|
|
2
2
|
var bP = (s, e, t) => e in s ? _P(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
3
|
var Xb = (s, e, t) => bP(s, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { Vector2 as ee, Vector3 as w, Vector4 as ve, Quaternion as z, Box3 as li, ShadowMaterial as ix, Euler as Be, PlaneGeometry as Un, WebGLRenderer as ca, PerspectiveCamera as pe, OrthographicCamera as Df, Scene as Ui, Mesh as V, Texture as ke, Uniform as an, Color as oe, ShaderMaterial as ps, MeshStandardMaterial as Tt, Box3Helper as vP, GridHelper as nx, Object3D as E, Material as
|
|
5
|
-
import { createLoaders as n_, LODsManager as vr, NEEDLE_progressive as qe, getRaycastMesh as yx, calculateMeshLODLevel as Ak, getLODColor as Ik, addDracoAndKTX2Loaders as Lk, configureLoader as Dk, setKTX2TranscoderLocation as Fk, setDracoDecoderLocation as Bk } from "./gltf-progressive-
|
|
4
|
+
import { Vector2 as ee, Vector3 as w, Vector4 as ve, Quaternion as z, Box3 as li, ShadowMaterial as ix, Euler as Be, PlaneGeometry as Un, WebGLRenderer as ca, PerspectiveCamera as pe, OrthographicCamera as Df, Scene as Ui, Mesh as V, Texture as ke, Uniform as an, Color as oe, ShaderMaterial as ps, MeshStandardMaterial as Tt, Box3Helper as vP, GridHelper as nx, Object3D as E, Material as Pe, Matrix3 as Hy, Matrix4 as Z, Layers as Xo, PropertyBinding as ml, AnimationClip as Yt, KeyframeTrack as wP, FileLoader as sx, BufferGeometry as In, TextureLoader as Jr, MeshBasicMaterial as Le, DoubleSide as Ni, Group as Ln, CylinderGeometry as ox, SphereGeometry as qy, BoxGeometry as gl, SpriteMaterial as xP, Sprite as SP, Shape as CP, ExtrudeGeometry as PP, Ray as ms, CubeUVReflectionMapping as cn, LinearSRGBColorSpace as Ys, ShaderChunk as ai, Sphere as Fh, DataTexture as Xy, RGBAFormat as Ff, EquirectangularReflectionMapping as Vs, SRGBColorSpace as Ks, PMREMGenerator as kP, NeutralToneMapping as yl, AgXToneMapping as Bf, ACESFilmicToneMapping as jf, NoToneMapping as Nu, AxesHelper as ji, MathUtils as Gs, Fog as rx, DirectionalLight as bg, PointLight as Qy, PCFShadowMap as OP, BasicNodeLibrary as TP, WebGLRenderTarget as gs, DepthTexture as ax, NearestFilter as $u, EdgesGeometry as RP, LineSegments as vg, LineBasicMaterial as Wu, Line as ph, BufferAttribute as lt, Raycaster as Yy, ArrayCamera as EP, Plane as Rl, SkinnedMesh as Uo, InterleavedBufferAttribute as lx, Skeleton as MP, Bone as AP, Audio as cx, AudioListener as hx, WebGLCubeRenderTarget as IP, CubeCamera as LP, LoopRepeat as DP, LoopOnce as wg, AnimationMixer as Ky, InterpolateLinear as FP, InterpolateDiscrete as BP, InterpolateSmooth as jP, QuaternionKeyframeTrack as Ec, BooleanKeyframeTrack as Qb, VectorKeyframeTrack as Mc, ColorKeyframeTrack as Yb, NumberKeyframeTrack as Qp, AudioContext as dx, CompressedTexture as zP, FrontSide as Qo, Camera as UP, Frustum as Kb, PositionalAudio as NP, AudioLoader as $P, BackSide as zf, EquirectangularRefractionMapping as Zy, CubeTexture as Jy, CompressedCubeTexture as ux, MeshDepthMaterial as WP, CustomBlending as VP, MaxEquation as GP, AlwaysStencilFunc as HP, GreaterEqualStencilFunc as qP, NotEqualStencilFunc as XP, GreaterStencilFunc as QP, LessEqualStencilFunc as YP, EqualStencilFunc as KP, LessStencilFunc as ZP, NeverStencilFunc as Zb, InvertStencilOp as JP, DecrementWrapStencilOp as ek, IncrementWrapStencilOp as tk, DecrementStencilOp as ik, IncrementStencilOp as nk, ReplaceStencilOp as sk, ZeroStencilOp as ok, KeepStencilOp as rk, AmbientLight as ak, HemisphereLight as lk, Loader as ck, GLSL3 as hk, AlwaysDepth as dk, GreaterEqualDepth as uk, GreaterDepth as fk, LessEqualDepth as pk, LessDepth as mk, NotEqualDepth as gk, EqualDepth as yk, RawShaderMaterial as fx, BatchedMesh as Jb, LinearFilter as Vu, UnsignedByteType as _k, MeshPhysicalMaterial as ev, RingGeometry as bk, Line3 as vk, AdditiveBlending as px, LoadingManager as mx, BoxHelper as wk, SpotLight as xk, DirectionalLightHelper as Sk, CameraHelper as Ck, LOD as Pk, Triangle as kk, NormalBlending as Ok, ReinhardToneMapping as e_, LinearToneMapping as t_, EventDispatcher as i_, VideoTexture as Tk, CatmullRomCurve3 as Rk, MirroredRepeatWrapping as tv, ShaderLib as Gu, UniformsUtils as gx, MeshNormalMaterial as Ek, HalfFloatType as Yp, Source as Mk } from "./three-core.js";
|
|
5
|
+
import { createLoaders as n_, LODsManager as vr, NEEDLE_progressive as qe, getRaycastMesh as yx, calculateMeshLODLevel as Ak, getLODColor as Ik, addDracoAndKTX2Loaders as Lk, configureLoader as Dk, setKTX2TranscoderLocation as Fk, setDracoDecoderLocation as Bk } from "./gltf-progressive-B7lOWdLe.js";
|
|
6
6
|
import { GroundedSkybox as _l, Font as jk, TextGeometry as zk, FontLoader as Uk, GLTFLoader as Zs, EXRLoader as s_, HDRLoader as _x, Stats as Nk, nodeFrame as Oi, TransformControlsGizmo as iv, OrbitControls as $k, PositionalAudioHelper as Wk, HorizontalBlurShader as Vk, VerticalBlurShader as Gk, GLTFExporter as bx, strToU8 as vx, zipSync as Hk, XRControllerModelFactory as qk, Line2 as Xk, LineGeometry as Qk, LineMaterial as Yk, OBJLoader as o_, FBXLoader as wx, TransformControls as Kk, InteractiveGroup as Zk, HTMLMesh as Jk, VertexNormalsHelper as eO, mergeVertices as tO } from "./three-examples.js";
|
|
7
|
-
import { v5 as xg, ByteBuffer as iO, fetchProfile as nO, MotionController as sO, SIZE_PREFIX_LENGTH as xx, Builder as r_, attachNeedleIdsToLoadedGltf as oO, createNoise4D as rO, Matrix4 as Kp, BatchedParticleRenderer as aO, ParticleSystem as lO, RenderMode as Ds, ConstantColor as cO, Vector4 as hO, ConstantValue as dO, TrailParticle as nv, deriveInstanceId as Zp, PROJECT_DOCUMENT_KEY as uO, isProjectDocument as fO, applyDef as pO, applyOver as mO, evaluateProjectDocument as gO, resolveMaterialEntity as yO, createOverApplyState as _O, reportProjectIssues as bO, resolveDocumentRemoteSrc as vO, splitPath as wO, WorkerBase as xO, MeshBVH as SO } from "./vendor-
|
|
7
|
+
import { v5 as xg, ByteBuffer as iO, fetchProfile as nO, MotionController as sO, SIZE_PREFIX_LENGTH as xx, Builder as r_, attachNeedleIdsToLoadedGltf as oO, createNoise4D as rO, Matrix4 as Kp, BatchedParticleRenderer as aO, ParticleSystem as lO, RenderMode as Ds, ConstantColor as cO, Vector4 as hO, ConstantValue as dO, TrailParticle as nv, deriveInstanceId as Zp, PROJECT_DOCUMENT_KEY as uO, isProjectDocument as fO, applyDef as pO, applyOver as mO, evaluateProjectDocument as gO, resolveMaterialEntity as yO, createOverApplyState as _O, reportProjectIssues as bO, resolveDocumentRemoteSrc as vO, splitPath as wO, WorkerBase as xO, MeshBVH as SO } from "./vendor-BatPc34p.js";
|
|
8
8
|
import { __webpack_exports__default as Me, __webpack_exports__Text as Sx, __webpack_exports__update as CO, __webpack_exports__Block as Cx, SimpleStateBehavior as PO, __webpack_exports__Inline as Jp, __webpack_exports__FontLibrary as sv, ThreeMeshUI as ov } from "./three-mesh-ui-CkQrFn5S.js";
|
|
9
9
|
const rv = typeof window < "u" ? window.location.search.includes("debugcontext") : !1;
|
|
10
10
|
var de = /* @__PURE__ */ ((s) => (s.ContextRegistered = "ContextRegistered", s.ContextCreationStart = "ContextCreationStart", s.ContextCreated = "ContextCreated", s.ContextFirstFrameRendered = "ContextFirstFrameRendered", s.ContextDestroying = "ContextDestroying", s.ContextDestroyed = "ContextDestroyed", s.MissingCamera = "MissingCamera", s.ContextClearing = "ContextClearing", s.ContextCleared = "ContextCleared", s))(de || {});
|
|
@@ -1668,7 +1668,7 @@ function zx(s, ...e) {
|
|
|
1668
1668
|
if (o instanceof w) return `(${i(o.x)}, ${i(o.y)}, ${i(o.z)})`;
|
|
1669
1669
|
if (o instanceof ve) return `(${i(o.x)}, ${i(o.y)}, ${i(o.z)}, ${i(o.w)})`;
|
|
1670
1670
|
if (o instanceof z) return `(${i(o.x)}, ${i(o.y)}, ${i(o.z)}, ${i(o.w)})`;
|
|
1671
|
-
if (o instanceof
|
|
1671
|
+
if (o instanceof Pe || o instanceof ke) return o.name;
|
|
1672
1672
|
if (o instanceof Hy) return `[${o.elements.join(", ")}]`;
|
|
1673
1673
|
if (o instanceof Z) return `[${o.elements.join(", ")}]`;
|
|
1674
1674
|
if (o instanceof Xo) return o.mask.toString();
|
|
@@ -2372,11 +2372,11 @@ ir('if(!globalThis["NEEDLE_ENGINE_VERSION"]) globalThis["NEEDLE_ENGINE_VERSION"]
|
|
|
2372
2372
|
ir('if(!globalThis["NEEDLE_ENGINE_GENERATOR"]) globalThis["NEEDLE_ENGINE_GENERATOR"] = "unknown";');
|
|
2373
2373
|
ir('if(!globalThis["NEEDLE_PROJECT_BUILD_TIME"]) globalThis["NEEDLE_PROJECT_BUILD_TIME"] = "unknown";');
|
|
2374
2374
|
ir('if(!globalThis["NEEDLE_PUBLIC_KEY"]) globalThis["NEEDLE_PUBLIC_KEY"] = "unknown";');
|
|
2375
|
-
ir('globalThis["__NEEDLE_ENGINE_VERSION__"] = "6.0.0-alpha.
|
|
2375
|
+
ir('globalThis["__NEEDLE_ENGINE_VERSION__"] = "6.0.0-alpha.6";');
|
|
2376
2376
|
ir('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
|
|
2377
|
-
ir('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "
|
|
2377
|
+
ir('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Tue Oct 06 2026 10:27:28 GMT+0000 (Coordinated Universal Time)";');
|
|
2378
2378
|
ir('globalThis["__NEEDLE_PUBLIC_KEY__"] = "' + NEEDLE_PUBLIC_KEY + '";');
|
|
2379
|
-
const vi = "6.0.0-alpha.
|
|
2379
|
+
const vi = "6.0.0-alpha.6", gh = "undefined", Zu = "Tue Oct 06 2026 10:27:28 GMT+0000 (Coordinated Universal Time)";
|
|
2380
2380
|
qx && console.log(`Engine version: ${vi} (generator: ${gh})
|
|
2381
2381
|
Project built at ${Zu}`);
|
|
2382
2382
|
const Br = NEEDLE_PUBLIC_KEY, Us = "needle_isActiveInHierarchy", Ba = "builtin_components", $o = "needle_editor_guid";
|
|
@@ -2756,7 +2756,7 @@ function B5(s, e) {
|
|
|
2756
2756
|
function j5(s, e) {
|
|
2757
2757
|
return no(s, De.OnAfterRender, e), () => nr(s, De.OnAfterRender);
|
|
2758
2758
|
}
|
|
2759
|
-
const
|
|
2759
|
+
const Ce = x("__debuglic__"), ef = /* @__PURE__ */ new WeakMap(), tf = /* @__PURE__ */ new WeakMap(), __ = /* @__PURE__ */ new WeakSet();
|
|
2760
2760
|
ce.registerCallback(de.ContextDestroying, ({ context: s }) => {
|
|
2761
2761
|
__.add(s);
|
|
2762
2762
|
for (const e of ef.get(s) ?? []) clearInterval(e);
|
|
@@ -2782,7 +2782,7 @@ function vu(s, e, t) {
|
|
|
2782
2782
|
}
|
|
2783
2783
|
const wu = [];
|
|
2784
2784
|
let zi = "", Yc = "";
|
|
2785
|
-
if (
|
|
2785
|
+
if (Ce)
|
|
2786
2786
|
if (console.log("License Type: " + zi), Yc) {
|
|
2787
2787
|
console.log("License JWT: " + Yc);
|
|
2788
2788
|
try {
|
|
@@ -2854,34 +2854,46 @@ async function uR(s) {
|
|
|
2854
2854
|
a.buffer,
|
|
2855
2855
|
r
|
|
2856
2856
|
))
|
|
2857
|
-
return
|
|
2857
|
+
return Ce && console.warn("JWT: signature verification failed"), null;
|
|
2858
2858
|
const c = new TextDecoder().decode(Iv(i)), h = JSON.parse(c);
|
|
2859
2859
|
if (typeof h.type != "string" || h.type.length === 0)
|
|
2860
|
-
return
|
|
2860
|
+
return Ce && console.warn("JWT: missing or invalid 'type' claim"), null;
|
|
2861
2861
|
if (typeof h.exp == "number") {
|
|
2862
2862
|
const d = Math.floor(Date.now() / 1e3);
|
|
2863
2863
|
if (d > h.exp)
|
|
2864
|
-
return
|
|
2864
|
+
return Ce && console.warn("JWT: token has expired (exp=" + h.exp + ", now=" + d + ")"), null;
|
|
2865
2865
|
}
|
|
2866
2866
|
if (h.aud) {
|
|
2867
2867
|
const d = typeof window < "u" ? window.location.hostname : void 0;
|
|
2868
2868
|
if (d) {
|
|
2869
2869
|
const u = Array.isArray(h.aud) ? h.aud : [h.aud];
|
|
2870
2870
|
if (!u.some((p) => d === p || d.endsWith("." + p)))
|
|
2871
|
-
return
|
|
2871
|
+
return Ce && console.warn("JWT: domain '" + d + "' not in allowed audience: " + u.join(", ")), null;
|
|
2872
2872
|
}
|
|
2873
2873
|
}
|
|
2874
|
-
return
|
|
2874
|
+
return Ce && console.log("JWT: verified license type: " + h.type), h.type;
|
|
2875
2875
|
} catch (e) {
|
|
2876
|
-
return
|
|
2876
|
+
return Ce && console.error("JWT: verification error", e), null;
|
|
2877
2877
|
}
|
|
2878
2878
|
}
|
|
2879
2879
|
let Fg;
|
|
2880
2880
|
async function fR() {
|
|
2881
|
-
|
|
2882
|
-
Yc = ""
|
|
2881
|
+
let s = Yc;
|
|
2882
|
+
if (Yc = "", !s && typeof document < "u") {
|
|
2883
|
+
const t = document.querySelector('meta[name="needle-license"]')?.getAttribute("content");
|
|
2884
|
+
if (t)
|
|
2885
|
+
try {
|
|
2886
|
+
const i = new URL(t, document.baseURI), n = await fetch(i, { cache: "no-store" });
|
|
2887
|
+
if (n.ok) {
|
|
2888
|
+
const o = await n.json();
|
|
2889
|
+
typeof o?.jwt == "string" && (s = o.jwt);
|
|
2890
|
+
}
|
|
2891
|
+
} catch (i) {
|
|
2892
|
+
Ce && console.warn("Could not load signed license file", i);
|
|
2893
|
+
}
|
|
2894
|
+
}
|
|
2883
2895
|
const e = await uR(s);
|
|
2884
|
-
e ? (zi = e,
|
|
2896
|
+
e ? (zi = e, Ce && console.log("License type set from verified JWT: " + e), Ac(Dn())) : (zi = "basic", Ce && s && console.warn("JWT verification failed — license reset to basic"));
|
|
2885
2897
|
}
|
|
2886
2898
|
var ct;
|
|
2887
2899
|
((s) => {
|
|
@@ -2918,7 +2930,7 @@ var ct;
|
|
|
2918
2930
|
s.init = i;
|
|
2919
2931
|
function n(g) {
|
|
2920
2932
|
if (!o(g)) {
|
|
2921
|
-
|
|
2933
|
+
Ce && console.debug("Telemetry is disabled via no-telemetry attribute");
|
|
2922
2934
|
return;
|
|
2923
2935
|
}
|
|
2924
2936
|
return y({
|
|
@@ -2951,7 +2963,7 @@ var ct;
|
|
|
2951
2963
|
let _ = g?.domElement;
|
|
2952
2964
|
if (_ || (_ = document.querySelector("needle-engine")), !_ && !g) return !1;
|
|
2953
2965
|
const v = _?.getAttribute("no-telemetry");
|
|
2954
|
-
return Hs() && (v === "" || v === "true" || v === "1") ? (
|
|
2966
|
+
return Hs() && (v === "" || v === "true" || v === "1") ? (Ce && console.debug("Telemetry is disabled via no-telemetry attribute"), !1) : r() ? (Ce && console.debug("Telemetry is disabled via Do Not Track / Global Privacy Control"), !1) : typeof window < "u" && window.crossOriginIsolated ? (Ce && console.debug("Telemetry is disabled on cross-origin-isolated pages"), !1) : !0;
|
|
2955
2967
|
}
|
|
2956
2968
|
s.isAllowed = o;
|
|
2957
2969
|
function r() {
|
|
@@ -2964,7 +2976,7 @@ var ct;
|
|
|
2964
2976
|
const a = "dabb8317376f";
|
|
2965
2977
|
async function l(g, _, v) {
|
|
2966
2978
|
if (!o(g)) {
|
|
2967
|
-
|
|
2979
|
+
Ce && console.debug("Telemetry is disabled");
|
|
2968
2980
|
return;
|
|
2969
2981
|
}
|
|
2970
2982
|
const C = {
|
|
@@ -2979,7 +2991,7 @@ var ct;
|
|
|
2979
2991
|
s.sendEvent = l;
|
|
2980
2992
|
async function c(g, _, v) {
|
|
2981
2993
|
if (!o(g)) {
|
|
2982
|
-
|
|
2994
|
+
Ce && console.debug("Telemetry is disabled");
|
|
2983
2995
|
return;
|
|
2984
2996
|
}
|
|
2985
2997
|
v instanceof ErrorEvent ? v = {
|
|
@@ -3049,7 +3061,7 @@ var ct;
|
|
|
3049
3061
|
typeof C == "number" && (_.device_memory = C);
|
|
3050
3062
|
}
|
|
3051
3063
|
} catch (C) {
|
|
3052
|
-
|
|
3064
|
+
Ce && console.warn("Telemetry: capability probe failed", C);
|
|
3053
3065
|
}
|
|
3054
3066
|
}
|
|
3055
3067
|
const u = /* @__PURE__ */ new WeakSet();
|
|
@@ -3127,16 +3139,16 @@ var ct;
|
|
|
3127
3139
|
// @ts-ignore
|
|
3128
3140
|
priority: "low"
|
|
3129
3141
|
}).catch((v) => {
|
|
3130
|
-
|
|
3142
|
+
Ce && console.error("Failed to send telemetry", v);
|
|
3131
3143
|
});
|
|
3132
3144
|
} catch (_) {
|
|
3133
|
-
|
|
3145
|
+
Ce && console.error(_);
|
|
3134
3146
|
}
|
|
3135
3147
|
return Promise.resolve();
|
|
3136
3148
|
}
|
|
3137
3149
|
})(ct || (ct = {}));
|
|
3138
3150
|
function pR() {
|
|
3139
|
-
zi === "" && (zi = "basic"), Fg = fR(), ct.init(), ce.registerCallback(de.ContextRegistered, (s) => {
|
|
3151
|
+
zi === "" && (zi = "basic"), Fg = fR(), nf = mR(), ct.init(), ce.registerCallback(de.ContextRegistered, (s) => {
|
|
3140
3152
|
yR(s.context), gR(s.context), vu(s.context, () => bR(s.context), 2e3);
|
|
3141
3153
|
}), ce.registerCallback(de.ContextCreated, (s) => {
|
|
3142
3154
|
ct.attachContextLossMonitor(s.context), ct.attachPerformanceMonitor(s.context);
|
|
@@ -3150,15 +3162,14 @@ async function mR() {
|
|
|
3150
3162
|
const s = "https://needle.tools/api/v1/needle-engine/check?location=" + encodeURIComponent(window.location.href) + "&version=" + vi + "&generator=" + encodeURIComponent(gh), e = await fetch(s, {
|
|
3151
3163
|
method: "GET"
|
|
3152
3164
|
}).catch((t) => {
|
|
3153
|
-
|
|
3165
|
+
Ce && console.error("License check failed", t);
|
|
3154
3166
|
});
|
|
3155
|
-
e?.status === 200 ? (Bg = !1,
|
|
3167
|
+
e?.status === 200 ? (Bg = !1, Ce && console.log("License check succeeded"), zi = "pro", Ac(!0)) : e?.status === 403 ? (Ac(!1), Bg = !0, jg = await e.text()) : (Ac(!1), Ce && console.log("License check failed with status " + e?.status));
|
|
3156
3168
|
} catch (s) {
|
|
3157
|
-
Ac(!1),
|
|
3169
|
+
Ac(!1), Ce && console.error("License check failed", s);
|
|
3158
3170
|
}
|
|
3159
|
-
else
|
|
3171
|
+
else Ce && console.log('Runtime license check is skipped because license is already applied as "' + zi + '"');
|
|
3160
3172
|
}
|
|
3161
|
-
nf = mR();
|
|
3162
3173
|
async function gR(s) {
|
|
3163
3174
|
function e() {
|
|
3164
3175
|
const n = document.createElement("div");
|
|
@@ -3209,9 +3220,9 @@ async function yR(s) {
|
|
|
3209
3220
|
if (!Hs() && !Hf())
|
|
3210
3221
|
return cm(s);
|
|
3211
3222
|
} catch (e) {
|
|
3212
|
-
return
|
|
3223
|
+
return Ce && console.log("License check failed", e), cm(s);
|
|
3213
3224
|
}
|
|
3214
|
-
|
|
3225
|
+
Ce && cm(s);
|
|
3215
3226
|
}
|
|
3216
3227
|
async function cm(s) {
|
|
3217
3228
|
let e = !1;
|
|
@@ -3300,7 +3311,7 @@ async function _R(s) {
|
|
|
3300
3311
|
}
|
|
3301
3312
|
async function bR(s) {
|
|
3302
3313
|
if (!ct.isAllowed(s)) {
|
|
3303
|
-
|
|
3314
|
+
Ce && console.debug("Telemetry is disabled");
|
|
3304
3315
|
return;
|
|
3305
3316
|
}
|
|
3306
3317
|
try {
|
|
@@ -3318,10 +3329,10 @@ async function bR(s) {
|
|
|
3318
3329
|
build_time: Zu,
|
|
3319
3330
|
public_key: Br
|
|
3320
3331
|
}, o = navigator.sendBeacon?.(e, JSON.stringify(n));
|
|
3321
|
-
|
|
3332
|
+
Ce && console.debug("Sent beacon: " + o);
|
|
3322
3333
|
}
|
|
3323
3334
|
} catch (e) {
|
|
3324
|
-
|
|
3335
|
+
Ce && console.log("Failed to send non-commercial usage message to analytics backend", e);
|
|
3325
3336
|
}
|
|
3326
3337
|
}
|
|
3327
3338
|
function tS(s) {
|
|
@@ -4156,7 +4167,7 @@ function Ng(s, e, t, i, n) {
|
|
|
4156
4167
|
} catch (h) {
|
|
4157
4168
|
console.error("Error in callback", h, s);
|
|
4158
4169
|
}
|
|
4159
|
-
if (t.type = r, !o && n && (n instanceof
|
|
4170
|
+
if (t.type = r, !o && n && (n instanceof Pe || n instanceof V || n instanceof In || n instanceof Yt))
|
|
4160
4171
|
return n;
|
|
4161
4172
|
if (i || (i = {
|
|
4162
4173
|
serializer: of.getSerializerForConstructor(r)
|
|
@@ -4190,7 +4201,7 @@ function Ng(s, e, t, i, n) {
|
|
|
4190
4201
|
l = s;
|
|
4191
4202
|
else {
|
|
4192
4203
|
if (s === void 0) return;
|
|
4193
|
-
if (s === null && (r ===
|
|
4204
|
+
if (s === null && (r === Pe || r === ke || r === V || r === Yt))
|
|
4194
4205
|
return null;
|
|
4195
4206
|
try {
|
|
4196
4207
|
l = new r(...HR(s));
|
|
@@ -6028,7 +6039,7 @@ class fE {
|
|
|
6028
6039
|
this._url = e;
|
|
6029
6040
|
}
|
|
6030
6041
|
async start() {
|
|
6031
|
-
const e = await import("./vendor-
|
|
6042
|
+
const e = await import("./vendor-BatPc34p.js").then((o) => o.index), t = e.default?.WebsocketBuilder ?? e.WebsocketBuilder, i = e.default?.ExponentialBackoff ?? e.ExponentialBackoff, n = new t(this._url).withMaxRetries(10).withBackoff(new i(2e3, 4)).onOpen(() => {
|
|
6032
6043
|
this._ws = n, this.onOpen?.();
|
|
6033
6044
|
}).onClose(() => {
|
|
6034
6045
|
this.onClose?.();
|
|
@@ -6071,7 +6082,7 @@ function dc(s) {
|
|
|
6071
6082
|
}
|
|
6072
6083
|
const L = {
|
|
6073
6084
|
MaterialX: dc(
|
|
6074
|
-
() => import("./materialx-
|
|
6085
|
+
() => import("./materialx-Bd9BE6LR.js")
|
|
6075
6086
|
),
|
|
6076
6087
|
RAPIER_PHYSICS: dc(
|
|
6077
6088
|
() => import("./rapier-B3oL1ap-.js")
|
|
@@ -6083,7 +6094,7 @@ const L = {
|
|
|
6083
6094
|
() => import("./postprocessing-BPL7lzln.js").then((s) => s.N8AO)
|
|
6084
6095
|
),
|
|
6085
6096
|
PEERJS: dc(
|
|
6086
|
-
() => import("./vendor-
|
|
6097
|
+
() => import("./vendor-BatPc34p.js").then((s) => s.bundler)
|
|
6087
6098
|
)
|
|
6088
6099
|
};
|
|
6089
6100
|
let S_;
|
|
@@ -7799,7 +7810,7 @@ function aM() {
|
|
|
7799
7810
|
const e = s.mimetype, t = s.context, i = {
|
|
7800
7811
|
name: gm,
|
|
7801
7812
|
loadAsync: async (n, o) => {
|
|
7802
|
-
const r = await import("./vendor-
|
|
7813
|
+
const r = await import("./vendor-BatPc34p.js").then((p) => p.spark_module);
|
|
7803
7814
|
if (oM(t, r.SparkRenderer), e === "model/rad" && rM(n))
|
|
7804
7815
|
return new r.SplatMesh({ url: n, paged: !0 });
|
|
7805
7816
|
Ya.set(t, (Ya.get(t) ?? 0) + 1);
|
|
@@ -13782,7 +13793,7 @@ var df;
|
|
|
13782
13793
|
s.runMeshBVHRaycast = t;
|
|
13783
13794
|
let i = !1, n = null, o = null, r = null, a = null;
|
|
13784
13795
|
function l() {
|
|
13785
|
-
i || (i = !0, import("./vendor-
|
|
13796
|
+
i || (i = !0, import("./vendor-BatPc34p.js").then((_) => _.index$1).then((_) => {
|
|
13786
13797
|
n = _.acceleratedRaycast, o = _.MeshBVH, r = _.StaticGeometryGenerator, a = _.computeBoundsTree;
|
|
13787
13798
|
}).catch((_) => {
|
|
13788
13799
|
(ri || R()) && console.error("Failed to load BVH library...", _.message);
|
|
@@ -13903,8 +13914,8 @@ function Ne(s) {
|
|
|
13903
13914
|
qr && console.warn("BufferAttribute dispose not supported", s.count);
|
|
13904
13915
|
else if (s instanceof Array)
|
|
13905
13916
|
for (const e of s)
|
|
13906
|
-
e instanceof
|
|
13907
|
-
else if (s instanceof
|
|
13917
|
+
e instanceof Pe && Ne(e);
|
|
13918
|
+
else if (s instanceof Pe) {
|
|
13908
13919
|
Oa(s);
|
|
13909
13920
|
for (const t of Object.keys(s)) {
|
|
13910
13921
|
const i = s[t];
|
|
@@ -13942,7 +13953,7 @@ function ti(s, e) {
|
|
|
13942
13953
|
da && !xh.raycasting && (uf(Sh, this, t, !1), uf(Sh, this, i, !0));
|
|
13943
13954
|
});
|
|
13944
13955
|
}
|
|
13945
|
-
da && (ti(V.prototype, "material"), ti(V.prototype, "geometry"), ti(
|
|
13956
|
+
da && (ti(V.prototype, "material"), ti(V.prototype, "geometry"), ti(Pe.prototype, "map"), ti(Pe.prototype, "bumpMap"), ti(Pe.prototype, "alphaMap"), ti(Pe.prototype, "normalMap"), ti(Pe.prototype, "displacementMap"), ti(Pe.prototype, "roughnessMap"), ti(Pe.prototype, "metalnessMap"), ti(Pe.prototype, "emissiveMap"), ti(Pe.prototype, "specularMap"), ti(Pe.prototype, "envMap"), ti(Pe.prototype, "lightMap"), ti(Pe.prototype, "aoMap"), ti(Pe.prototype, "gradientMap"));
|
|
13946
13957
|
function nA(s) {
|
|
13947
13958
|
if (da === !1) return;
|
|
13948
13959
|
const e = s[Sh];
|
|
@@ -13950,7 +13961,7 @@ function nA(s) {
|
|
|
13950
13961
|
for (const t of e)
|
|
13951
13962
|
uf(Sh, t, s, !1);
|
|
13952
13963
|
}
|
|
13953
|
-
da && f_(
|
|
13964
|
+
da && f_(Pe.prototype, "dispose", function() {
|
|
13954
13965
|
nA(this);
|
|
13955
13966
|
});
|
|
13956
13967
|
let Zg = 0;
|
|
@@ -27722,7 +27733,7 @@ function CC(s) {
|
|
|
27722
27733
|
}
|
|
27723
27734
|
const TD = x("debugextensions");
|
|
27724
27735
|
let kf;
|
|
27725
|
-
const RD = import("./vendor-
|
|
27736
|
+
const RD = import("./vendor-BatPc34p.js").then((s) => s.index$2).then(async (s) => (kf = s.GLTFAnimationPointerExtension, kf)).catch((s) => {
|
|
27726
27737
|
console.warn("Failed to import GLTFLoaderAnimationPointer. Please use @needle-tools/three-animationpointer for full KHR_animation support", s);
|
|
27727
27738
|
}), sa = new Array();
|
|
27728
27739
|
function y4(s) {
|
|
@@ -28463,7 +28474,7 @@ class BD {
|
|
|
28463
28474
|
return c[h];
|
|
28464
28475
|
},
|
|
28465
28476
|
set(c, h, d) {
|
|
28466
|
-
return typeof h == "string" && i(d, Number.parseInt(h)), Reflect.set(c, h, d) ? (d instanceof
|
|
28477
|
+
return typeof h == "string" && i(d, Number.parseInt(h)), Reflect.set(c, h, d) ? (d instanceof Pe && (c.changed = !0), !0) : !1;
|
|
28467
28478
|
}
|
|
28468
28479
|
});
|
|
28469
28480
|
}
|
|
@@ -28532,17 +28543,12 @@ const xs = class jc extends A {
|
|
|
28532
28543
|
// private customShaderHandler: RendererCustomShader | undefined = undefined;
|
|
28533
28544
|
// private _materialProperties: Array<MaterialProperties> | undefined = undefined;
|
|
28534
28545
|
_lightmaps;
|
|
28535
|
-
/** Get the mesh Object3D for this renderer
|
|
28536
|
-
* Warn: if this is a multimaterial object it will return the first
|
|
28546
|
+
/** Get the mesh Object3D for this renderer
|
|
28547
|
+
* Warn: if this is a multimaterial object it will return the first submesh only (same as `sharedMeshes[0]`), use {@link sharedMeshes} to get all of them
|
|
28537
28548
|
* @returns a mesh object3D.
|
|
28538
28549
|
* */
|
|
28539
28550
|
get sharedMesh() {
|
|
28540
|
-
|
|
28541
|
-
return this.gameObject;
|
|
28542
|
-
if (this.gameObject.type === "SkinnesMesh")
|
|
28543
|
-
return this.gameObject;
|
|
28544
|
-
if (this.gameObject.type === "Group")
|
|
28545
|
-
return this.gameObject.children[0];
|
|
28551
|
+
return this.sharedMeshes[0];
|
|
28546
28552
|
}
|
|
28547
28553
|
_sharedMeshes = [];
|
|
28548
28554
|
/** Get all the mesh Object3D for this renderer
|
|
@@ -28583,7 +28589,7 @@ const xs = class jc extends A {
|
|
|
28583
28589
|
let t = !1;
|
|
28584
28590
|
for (let i = 0; i < this._sharedMaterials.length; i++) {
|
|
28585
28591
|
const n = i < e.length ? e[i] : null;
|
|
28586
|
-
n && n instanceof
|
|
28592
|
+
n && n instanceof Pe ? this.sharedMaterials[i] = n : t || (t = !0, console.warn("Can not assign null as material: " + this.name, n));
|
|
28587
28593
|
}
|
|
28588
28594
|
}
|
|
28589
28595
|
}
|
|
@@ -30347,7 +30353,7 @@ function GC(s, e, t, i) {
|
|
|
30347
30353
|
let n, o, r;
|
|
30348
30354
|
const a = { position: s.position, quaternion: s.quaternion, scale: s.scale };
|
|
30349
30355
|
if (s.position.x === 0 && s.position.y === 0 && s.position.z === 0 && (a.position = null), s.quaternion.x === 0 && s.quaternion.y === 0 && s.quaternion.z === 0 && s.quaternion.w === 1 && (a.quaternion = null), s.scale.x === 1 && s.scale.y === 1 && s.scale.z === 1 && (a.scale = null), (s instanceof V || s instanceof Uo) && (o = s.geometry, r = s.material), i && !i(s) && (o = void 0, r = void 0), (s instanceof V || s instanceof Uo) && r && typeof r == "object" && (r instanceof Tt || r instanceof Le || // material instanceof MeshPhysicalNodeMaterial ||
|
|
30350
|
-
r.isMeshPhysicalNodeMaterial || r instanceof
|
|
30356
|
+
r.isMeshPhysicalNodeMaterial || r instanceof Pe && r.type === "MeshLineMaterial")) {
|
|
30351
30357
|
const l = nu(s), c = s instanceof Uo ? s : null;
|
|
30352
30358
|
n = new wt(s.uuid, l, a, o, r, void 0, c, s.animations);
|
|
30353
30359
|
} else if (s instanceof pe || s instanceof Df) {
|
|
@@ -32141,10 +32147,10 @@ const mp = class ni extends A {
|
|
|
32141
32147
|
}
|
|
32142
32148
|
};
|
|
32143
32149
|
Xe([
|
|
32144
|
-
f(
|
|
32150
|
+
f(Pe)
|
|
32145
32151
|
], mp.prototype, "materialToSwitch");
|
|
32146
32152
|
Xe([
|
|
32147
|
-
f(
|
|
32153
|
+
f(Pe)
|
|
32148
32154
|
], mp.prototype, "variantMaterial");
|
|
32149
32155
|
Xe([
|
|
32150
32156
|
f()
|
|
@@ -33061,7 +33067,7 @@ At([
|
|
|
33061
33067
|
f(he)
|
|
33062
33068
|
], Hi.prototype, "color", 2);
|
|
33063
33069
|
At([
|
|
33064
|
-
f(
|
|
33070
|
+
f(Pe)
|
|
33065
33071
|
], Hi.prototype, "sharedMaterial", 2);
|
|
33066
33072
|
At([
|
|
33067
33073
|
f()
|
|
@@ -34350,7 +34356,7 @@ class tr extends A {
|
|
|
34350
34356
|
makeOccluder(e) {
|
|
34351
34357
|
if (e instanceof V) {
|
|
34352
34358
|
let t = e.material;
|
|
34353
|
-
t instanceof
|
|
34359
|
+
t instanceof Pe && (t = e.material = t.clone(), t.depthWrite = !0, t.depthTest = !0, t.colorWrite = !1, e.receiveShadow = !1, e.renderOrder = -100);
|
|
34354
34360
|
}
|
|
34355
34361
|
}
|
|
34356
34362
|
}
|
|
@@ -39895,10 +39901,10 @@ Qe([
|
|
|
39895
39901
|
f()
|
|
39896
39902
|
], Vn.prototype, "renderMode");
|
|
39897
39903
|
Qe([
|
|
39898
|
-
f(
|
|
39904
|
+
f(Pe)
|
|
39899
39905
|
], Vn.prototype, "particleMaterial");
|
|
39900
39906
|
Qe([
|
|
39901
|
-
f(
|
|
39907
|
+
f(Pe)
|
|
39902
39908
|
], Vn.prototype, "trailMaterial");
|
|
39903
39909
|
Qe([
|
|
39904
39910
|
f()
|
|
@@ -45939,7 +45945,7 @@ var ij = Object.defineProperty, wa = (s, e, t, i) => {
|
|
|
45939
45945
|
(r = s[o]) && (n = r(e, t, n) || n);
|
|
45940
45946
|
return n && ij(e, t, n), n;
|
|
45941
45947
|
};
|
|
45942
|
-
typeof window < "u" && import("./vendor-
|
|
45948
|
+
typeof window < "u" && import("./vendor-BatPc34p.js").then((s) => s.scrollTimeline);
|
|
45943
45949
|
const Es = x("debugscroll");
|
|
45944
45950
|
class fo extends A {
|
|
45945
45951
|
target = null;
|
|
@@ -50704,10 +50710,9 @@ const e5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
50704
50710
|
GenerateMeshBVHWorker: Jj
|
|
50705
50711
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
50706
50712
|
export {
|
|
50707
|
-
Hf as $TNE,
|
|
50708
50713
|
Ig as $componentName,
|
|
50714
|
+
Hs as $jVksoCHS,
|
|
50709
50715
|
I5 as $physicsKey,
|
|
50710
|
-
Hs as $vnStLM,
|
|
50711
50716
|
be as ActionBuilder,
|
|
50712
50717
|
w2 as ActionCollection,
|
|
50713
50718
|
Ei as ActionModel,
|
|
@@ -50863,6 +50868,7 @@ export {
|
|
|
50863
50868
|
mC as Interactable,
|
|
50864
50869
|
If as InternalScreenshotUtils,
|
|
50865
50870
|
H5 as JoinedRoomResponse,
|
|
50871
|
+
Dn as KLnyx,
|
|
50866
50872
|
tb as KeepRotationConstraint,
|
|
50867
50873
|
VL as KeepScaleConstraint,
|
|
50868
50874
|
W5 as KeyEventArgs,
|
|
@@ -51099,7 +51105,7 @@ export {
|
|
|
51099
51105
|
Vb as XRRig,
|
|
51100
51106
|
bi as XRState,
|
|
51101
51107
|
zs as XRStateFlag,
|
|
51102
|
-
|
|
51108
|
+
Hf as _$sHuA,
|
|
51103
51109
|
Zj as __Ignore,
|
|
51104
51110
|
n4 as __internalNotifyObjectDestroyed,
|
|
51105
51111
|
KE as __internalStepGaussianSplatAdaptation,
|
package/dist/needle-engine.d.ts
CHANGED
|
@@ -136,13 +136,11 @@ import { XRHandSpace } from 'three';
|
|
|
136
136
|
|
|
137
137
|
export declare const $componentName: unique symbol;
|
|
138
138
|
|
|
139
|
-
/* Excluded from this release type:
|
|
139
|
+
/* Excluded from this release type: $jVksoCHS */
|
|
140
140
|
|
|
141
141
|
export declare const $physicsKey: unique symbol;
|
|
142
142
|
|
|
143
|
-
/* Excluded from this release type: $
|
|
144
|
-
|
|
145
|
-
/* Excluded from this release type: $vnStLM */
|
|
143
|
+
/* Excluded from this release type: _$sHuA */
|
|
146
144
|
|
|
147
145
|
export declare class __Ignore {
|
|
148
146
|
}
|
|
@@ -10993,6 +10991,8 @@ declare type KF_2<V> = AnimationKeyframe<V>[] | Tween<V>;
|
|
|
10993
10991
|
/** Keyframe array or tween shorthand */
|
|
10994
10992
|
declare type KF_3<V> = AnimationKeyframe<V>[] | Tween<V>;
|
|
10995
10993
|
|
|
10994
|
+
/* Excluded from this release type: KLnyx */
|
|
10995
|
+
|
|
10996
10996
|
declare type LabelHandle = {
|
|
10997
10997
|
setText(str: string): any;
|
|
10998
10998
|
};
|
|
@@ -18174,7 +18174,7 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
18174
18174
|
reflectionProbeUsage: ReflectionProbeUsage;
|
|
18175
18175
|
private _lightmaps?;
|
|
18176
18176
|
/** Get the mesh Object3D for this renderer
|
|
18177
|
-
* Warn: if this is a multimaterial object it will return the first
|
|
18177
|
+
* Warn: if this is a multimaterial object it will return the first submesh only (same as `sharedMeshes[0]`), use {@link sharedMeshes} to get all of them
|
|
18178
18178
|
* @returns a mesh object3D.
|
|
18179
18179
|
* */
|
|
18180
18180
|
get sharedMesh(): Mesh | SkinnedMesh | undefined;
|