@needle-tools/engine 4.8.3-next.66cfa29 → 4.8.3-next.bc4f9a4

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.
@@ -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
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-DVx_cW0s.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-CGONwIc0.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-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();
@@ -1787,9 +1787,9 @@ po('if(!globalThis["NEEDLE_PROJECT_BUILD_TIME"]) globalThis["NEEDLE_PROJECT_BUIL
1787
1787
  po('if(!globalThis["NEEDLE_PUBLIC_KEY"]) globalThis["NEEDLE_PUBLIC_KEY"] = "unknown";');
1788
1788
  po('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.8.3";');
1789
1789
  po('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
1790
- po('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Mon Aug 18 2025 13:23:13 GMT+0000 (Coordinated Universal Time)";');
1790
+ po('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Mon Aug 18 2025 14:02:36 GMT+0000 (Coordinated Universal Time)";');
1791
1791
  po('globalThis["__NEEDLE_PUBLIC_KEY__"] = "' + NEEDLE_PUBLIC_KEY + '";');
1792
- const Ln = "4.8.3", wm = "undefined", Qb = "Mon Aug 18 2025 13:23:13 GMT+0000 (Coordinated Universal Time)";
1792
+ const Ln = "4.8.3", wm = "undefined", Qb = "Mon Aug 18 2025 14:02:36 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";
@@ -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-CGONwIc0.js").then((e) => e.bundler);
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-CGONwIc0.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(() => {
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) => {
@@ -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-CGONwIc0.js").then((v) => v.index$1).then((v) => {
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);
@@ -10983,13 +10983,13 @@ Start a coroutine from a component by calling "this.startCoroutine(myCoroutine()
10983
10983
  get isVisibleToUser() {
10984
10984
  if (this.isInXR) return !0;
10985
10985
  if (!this._isVisible) return !1;
10986
- if (this.time.frame === this._lastStyleComputedFrame) return this._lastStyleComputedResult;
10987
- this._lastStyleComputedFrame = this.time.frame;
10986
+ if (!this._needsVisibleUpdate && this._lastStyleComputedResult !== void 0) return this._lastStyleComputedResult;
10987
+ this._needsVisibleUpdate = !1;
10988
10988
  const e = getComputedStyle(this.domElement);
10989
10989
  return this._lastStyleComputedResult = e.visibility !== "hidden" && e.display !== "none" && e.opacity !== "0", this._lastStyleComputedResult;
10990
10990
  }
10991
- _lastStyleComputedFrame = -1;
10992
- _lastStyleComputedResult = !0;
10991
+ _needsVisibleUpdate = !0;
10992
+ _lastStyleComputedResult = void 0;
10993
10993
  _createId = 0;
10994
10994
  async internalOnCreate(e) {
10995
10995
  const t = ++this._createId;
@@ -11162,7 +11162,7 @@ Possible solutions:
11162
11162
  this.internalOnBeforeRender(e, t) !== !1 && (this.internalOnRender(), this.internalOnAfterRender());
11163
11163
  }
11164
11164
  internalOnBeforeRender(e, t) {
11165
- this.renderer.info.autoReset = !!t, this.renderer.info.autoReset === !1 && this.renderer.info.reset();
11165
+ this.renderer.info.autoReset = !!t, this.renderer.info.autoReset === !1 && this.renderer.info.reset(), this._needsVisibleUpdate = !0;
11166
11166
  const i = t !== null && this._xrFrame === null;
11167
11167
  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
11168
  this._lastTimestamp === 0 && (this._lastTimestamp = e), this._accumulatedTime += (e - this._lastTimestamp) / 1e3, this._lastTimestamp = e;
@@ -11194,28 +11194,26 @@ Possible solutions:
11194
11194
  const o = this.scripts_earlyUpdate[n];
11195
11195
  o.activeAndEnabled && o.earlyUpdate !== void 0 && (N.Current = this, o.earlyUpdate());
11196
11196
  }
11197
- if (this.executeCoroutines(
11197
+ this.executeCoroutines(
11198
11198
  0
11199
11199
  /* EarlyUpdate */
11200
11200
  ), yn(
11201
11201
  this,
11202
11202
  0
11203
11203
  /* EarlyUpdate */
11204
- ), this.onHandlePaused()) return !1;
11205
- this._currentFrameEvent = 1;
11204
+ ), this._currentFrameEvent = 1;
11206
11205
  for (let n = 0; n < this.scripts_update.length; n++) {
11207
11206
  const o = this.scripts_update[n];
11208
11207
  o.activeAndEnabled && o.update !== void 0 && (N.Current = this, o.update());
11209
11208
  }
11210
- if (this.executeCoroutines(
11209
+ this.executeCoroutines(
11211
11210
  1
11212
11211
  /* Update */
11213
11212
  ), yn(
11214
11213
  this,
11215
11214
  1
11216
11215
  /* Update */
11217
- ), this.onHandlePaused()) return !1;
11218
- this._currentFrameEvent = 2;
11216
+ ), this._currentFrameEvent = 2;
11219
11217
  for (let n = 0; n < this.scripts_lateUpdate.length; n++) {
11220
11218
  const o = this.scripts_lateUpdate[n];
11221
11219
  o.activeAndEnabled && o.lateUpdate !== void 0 && (N.Current = this, o.lateUpdate());
@@ -11227,8 +11225,7 @@ Possible solutions:
11227
11225
  this,
11228
11226
  2
11229
11227
  /* LateUpdate */
11230
- ), this.onHandlePaused() || (this.physicsSteps === void 0 && (this.physicsSteps = 1), this.physics.engine && this.physicsSteps > 0 && this.internalUpdatePhysics(this.physicsSteps), this.onHandlePaused())) return !1;
11231
- if (this.isVisibleToUser || this.runInBackground) {
11228
+ ), this.physicsSteps === void 0 && (this.physicsSteps = 1), this.physics.engine && this.physicsSteps > 0 && this.internalUpdatePhysics(this.physicsSteps), this.isVisibleToUser || this.runInBackground) {
11232
11229
  this._currentFrameEvent = 3;
11233
11230
  for (let n = 0; n < this.scripts_onBeforeRender.length; n++) {
11234
11231
  const o = this.scripts_onBeforeRender[n];
@@ -16098,6 +16095,9 @@ class ge extends T {
16098
16095
  afterHandleInput(e) {
16099
16096
  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
16097
  }
16098
+ onPausedChanged(e) {
16099
+ this._controls && e && (this._controls.enabled = !1);
16100
+ }
16101
16101
  /** @internal */
16102
16102
  onBeforeRender() {
16103
16103
  if (!this._controls) return;