@needle-tools/engine 5.1.0-alpha.9 → 5.1.0-beta.1
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 +5 -0
- package/dist/gltf-progressive-BGQ-cjly.umd.cjs +10 -0
- package/dist/gltf-progressive-BvQHrERj.min.js +10 -0
- package/dist/{gltf-progressive-CH7aqHHr.js → gltf-progressive-CtYnVfLc.js} +420 -351
- package/dist/{needle-engine.bundle-mtqHZ45d.js → needle-engine.bundle-CFo3xWPu.js} +3686 -3627
- package/dist/{needle-engine.bundle-DagaNrZK.umd.cjs → needle-engine.bundle-CWiO9cA8.umd.cjs} +133 -133
- package/dist/{needle-engine.bundle-BotdnwVF.min.js → needle-engine.bundle-DxJaiP7e.min.js} +139 -139
- package/dist/needle-engine.d.ts +67 -26
- package/dist/needle-engine.js +602 -600
- package/dist/needle-engine.min.js +1 -1
- package/dist/needle-engine.umd.cjs +1 -1
- package/dist/three.js +3 -0
- package/dist/three.min.js +22 -22
- package/dist/three.umd.cjs +24 -24
- 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_license.d.ts +7 -7
- package/lib/engine/engine_license.js +72 -72
- 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/Component.js +2 -1
- package/lib/engine-components/Component.js.map +1 -1
- package/lib/engine-components/SceneSwitcher.d.ts +2 -0
- package/lib/engine-components/SceneSwitcher.js +26 -14
- package/lib/engine-components/SceneSwitcher.js.map +1 -1
- package/lib/engine-components/SeeThrough.d.ts +39 -0
- package/lib/engine-components/SeeThrough.js +69 -1
- package/lib/engine-components/SeeThrough.js.map +1 -1
- package/lib/engine-components/api.d.ts +1 -0
- package/lib/engine-components/api.js +1 -0
- package/lib/engine-components/api.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 +2 -2
- package/plugins/common/license.js +4 -4
- package/plugins/vite/license.js +4 -4
- package/src/engine/api.ts +1 -1
- package/src/engine/engine_gameobject.ts +1 -1
- package/src/engine/engine_init.ts +2 -2
- package/src/engine/engine_license.ts +69 -69
- 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 +6 -6
- package/src/engine/webcomponents/needle-engine.ts +2 -2
- package/src/engine/xr/TempXRContext.ts +2 -2
- package/src/engine-components/Component.ts +2 -1
- package/src/engine-components/SceneSwitcher.ts +23 -13
- package/src/engine-components/SeeThrough.ts +75 -1
- package/src/engine-components/api.ts +1 -0
- package/src/engine-components/export/usdz/USDZExporter.ts +4 -4
- package/dist/gltf-progressive-9tlS5iCx.umd.cjs +0 -10
- package/dist/gltf-progressive-CVg80COO.min.js +0 -10
package/dist/needle-engine.d.ts
CHANGED
|
@@ -118,8 +118,14 @@ import { XRHandSpace } from 'three';
|
|
|
118
118
|
|
|
119
119
|
export declare const $componentName: unique symbol;
|
|
120
120
|
|
|
121
|
+
/* Excluded from this release type: $KhjWEFh */
|
|
122
|
+
|
|
121
123
|
export declare const $physicsKey: unique symbol;
|
|
122
124
|
|
|
125
|
+
/* Excluded from this release type: _$WfJljBK */
|
|
126
|
+
|
|
127
|
+
/* Excluded from this release type: __Aale */
|
|
128
|
+
|
|
123
129
|
export declare class __Ignore {
|
|
124
130
|
}
|
|
125
131
|
|
|
@@ -9011,8 +9017,6 @@ export declare class ImageReference {
|
|
|
9011
9017
|
*/
|
|
9012
9018
|
export declare function imageToCanvas(image: HTMLImageElement | HTMLCanvasElement | OffscreenCanvas | ImageBitmap, color?: Vector4 | undefined, flipY?: boolean, maxTextureSize?: number): Promise<OffscreenCanvasExt>;
|
|
9013
9019
|
|
|
9014
|
-
/* Excluded from this release type: _imGyfK */
|
|
9015
|
-
|
|
9016
9020
|
export declare interface IModel {
|
|
9017
9021
|
guid: string;
|
|
9018
9022
|
/**
|
|
@@ -16712,7 +16716,6 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
16712
16716
|
/** Adds an entry to the browser history. Internally uses `window.history.pushState` */
|
|
16713
16717
|
export declare function pushState(title: string, urlParams: URLSearchParams, state?: any): void;
|
|
16714
16718
|
|
|
16715
|
-
/* Excluded from this release type: _QchMjAD */
|
|
16716
16719
|
export { QParticle }
|
|
16717
16720
|
|
|
16718
16721
|
export { QParticleBehaviour }
|
|
@@ -17232,7 +17235,7 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
17232
17235
|
unapply(obj: Object3D): void;
|
|
17233
17236
|
}
|
|
17234
17237
|
|
|
17235
|
-
declare enum ReflectionProbeUsage {
|
|
17238
|
+
export declare enum ReflectionProbeUsage {
|
|
17236
17239
|
Off = 0,
|
|
17237
17240
|
BlendProbes = 1,
|
|
17238
17241
|
BlendProbesAndSkybox = 2,
|
|
@@ -17983,8 +17986,6 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
17983
17986
|
FreezeAll = 126
|
|
17984
17987
|
}
|
|
17985
17988
|
|
|
17986
|
-
/* Excluded from this release type: rkHTARX */
|
|
17987
|
-
|
|
17988
17989
|
/** Use to listen to room networking events like joining a networked room
|
|
17989
17990
|
* For example: `this.context.connection.beginListen(RoomEvents.JoinedRoom, () => { })`
|
|
17990
17991
|
* @link https://engine.needle.tools/docs/networking.html#manual-networking
|
|
@@ -18321,6 +18322,8 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
18321
18322
|
switchScene(scene: AssetReference): Promise<boolean>;
|
|
18322
18323
|
private __unloadCurrentScene;
|
|
18323
18324
|
private _currentlyLoadingScene?;
|
|
18325
|
+
private _loadingRequestId;
|
|
18326
|
+
private _activeLoadingRequestId;
|
|
18324
18327
|
/* Excluded from this release type: __internalSwitchScene */
|
|
18325
18328
|
preload(index: number): Promise<boolean> | Promise<ArrayBufferLike | null>;
|
|
18326
18329
|
private tryLoadFromQueryParam;
|
|
@@ -19173,13 +19176,42 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
19173
19176
|
*
|
|
19174
19177
|
*/
|
|
19175
19178
|
autoUpdate: boolean;
|
|
19179
|
+
/**
|
|
19180
|
+
* The alpha (opacity) the object is currently faded to, in the `[0, 1]` range.
|
|
19181
|
+
* `1` means fully visible, `0` means fully hidden. This is the live, animated value
|
|
19182
|
+
* (it lerps toward the target over {@link fadeDuration}), updated every frame the fade runs.
|
|
19183
|
+
*
|
|
19184
|
+
* External components can read this to react to the see-through state — e.g. toggling a
|
|
19185
|
+
* collider, muting audio, or driving a UI prompt as the object fades in or out.
|
|
19186
|
+
*
|
|
19187
|
+
* @example React to the object becoming (almost) hidden
|
|
19188
|
+
* ```ts
|
|
19189
|
+
* if (seeThrough.currentAlpha < 0.1) {
|
|
19190
|
+
* // object is essentially see-through now
|
|
19191
|
+
* }
|
|
19192
|
+
* ```
|
|
19193
|
+
* @default 1
|
|
19194
|
+
*/
|
|
19195
|
+
get currentAlpha(): number;
|
|
19196
|
+
/**
|
|
19197
|
+
* Below this alpha the object stops casting a shadow. The shadow map only stores depth, so a
|
|
19198
|
+
* faded object would otherwise keep casting a fully solid shadow (three.js does not fade shadows
|
|
19199
|
+
* by opacity). Toggling shadow casting off near-invisible is the cleanest fix; we drive it via
|
|
19200
|
+
* the {@link Renderer.shadowCastingMode} so it cooperates with the per-frame shadow settings the
|
|
19201
|
+
* Renderer re-applies. Note this is a hard on/off, not a fade.
|
|
19202
|
+
*/
|
|
19203
|
+
static readonly shadowHideThreshold = 0.05;
|
|
19176
19204
|
private readonly _referencePointVector;
|
|
19177
19205
|
private readonly _referencePointDir;
|
|
19178
19206
|
private _distance;
|
|
19179
19207
|
private _renderer;
|
|
19180
19208
|
private _needsUpdate;
|
|
19181
19209
|
private _id;
|
|
19210
|
+
private _currentAlpha;
|
|
19211
|
+
/** Renderers whose shadow casting we turned off while hidden, mapped to their original mode for restore. */
|
|
19212
|
+
private readonly _suppressedShadowCasting;
|
|
19182
19213
|
/* Excluded from this release type: onEnable */
|
|
19214
|
+
/* Excluded from this release type: onDestroy */
|
|
19183
19215
|
/* Excluded from this release type: update */
|
|
19184
19216
|
private updateDirection;
|
|
19185
19217
|
/**
|
|
@@ -19188,6 +19220,15 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
19188
19220
|
* @param duration Duration in seconds to reach the target alpha. 0 means immediate. Default is the component's fadeDuration.
|
|
19189
19221
|
*/
|
|
19190
19222
|
updateAlpha(targetAlpha: number, duration?: number): void;
|
|
19223
|
+
/**
|
|
19224
|
+
* Suppress or restore a renderer's shadow casting based on its current alpha.
|
|
19225
|
+
* Driving {@link Renderer.shadowCastingMode} (rather than the raw `mesh.castShadow`) is required
|
|
19226
|
+
* because the Renderer re-applies that setting every frame; we remember the original mode so it
|
|
19227
|
+
* is restored exactly when the object fades back in.
|
|
19228
|
+
*/
|
|
19229
|
+
private updateShadowCasting;
|
|
19230
|
+
/** Restore every renderer we suppressed shadow casting on, then clear the bookkeeping. */
|
|
19231
|
+
private restoreSuppressedShadowCasting;
|
|
19191
19232
|
}
|
|
19192
19233
|
|
|
19193
19234
|
export declare function sendDestroyed(guid: string, con: INetworkConnection, opts?: SyncDestroyOptions): void;
|
|
@@ -19406,7 +19447,7 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
19406
19447
|
|
|
19407
19448
|
export declare function setWorldScale(obj: Object3D, vec: Vector3): void;
|
|
19408
19449
|
|
|
19409
|
-
declare enum ShadowCastingMode {
|
|
19450
|
+
export declare enum ShadowCastingMode {
|
|
19410
19451
|
Off = 0,
|
|
19411
19452
|
On = 1,
|
|
19412
19453
|
TwoSided = 2,
|
|
@@ -25117,8 +25158,23 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
25117
25158
|
|
|
25118
25159
|
|
|
25119
25160
|
declare module 'three' {
|
|
25120
|
-
interface
|
|
25121
|
-
|
|
25161
|
+
interface SkinnedMesh {
|
|
25162
|
+
staticGenerator?: StaticGeometryGenerator;
|
|
25163
|
+
staticGeometry?: BufferGeometry;
|
|
25164
|
+
staticGeometryLastUpdate?: number;
|
|
25165
|
+
}
|
|
25166
|
+
interface Mesh {
|
|
25167
|
+
acceleratedRaycast?: any;
|
|
25168
|
+
}
|
|
25169
|
+
interface SkinnedMesh {
|
|
25170
|
+
/** @deprecated use autoUpdateMeshBvhInterval */
|
|
25171
|
+
autoUpdateMeshBVH?: boolean;
|
|
25172
|
+
/**
|
|
25173
|
+
* Interval in milliseconds to automatically update the mesh BVH. When set to >= 0 the BVH will be updated every x milliseconds.
|
|
25174
|
+
* @default undefined (disabled)
|
|
25175
|
+
*/
|
|
25176
|
+
autoUpdateMeshBvhInterval?: number;
|
|
25177
|
+
bvhNeedsUpdate?: boolean;
|
|
25122
25178
|
}
|
|
25123
25179
|
}
|
|
25124
25180
|
|
|
@@ -25264,22 +25320,7 @@ declare module 'three' {
|
|
|
25264
25320
|
|
|
25265
25321
|
|
|
25266
25322
|
declare module 'three' {
|
|
25267
|
-
interface
|
|
25268
|
-
|
|
25269
|
-
staticGeometry?: BufferGeometry;
|
|
25270
|
-
staticGeometryLastUpdate?: number;
|
|
25271
|
-
}
|
|
25272
|
-
interface Mesh {
|
|
25273
|
-
acceleratedRaycast?: any;
|
|
25274
|
-
}
|
|
25275
|
-
interface SkinnedMesh {
|
|
25276
|
-
/** @deprecated use autoUpdateMeshBvhInterval */
|
|
25277
|
-
autoUpdateMeshBVH?: boolean;
|
|
25278
|
-
/**
|
|
25279
|
-
* Interval in milliseconds to automatically update the mesh BVH. When set to >= 0 the BVH will be updated every x milliseconds.
|
|
25280
|
-
* @default undefined (disabled)
|
|
25281
|
-
*/
|
|
25282
|
-
autoUpdateMeshBvhInterval?: number;
|
|
25283
|
-
bvhNeedsUpdate?: boolean;
|
|
25323
|
+
interface Vector3 {
|
|
25324
|
+
slerp(end: Vector3, t: number): Vector3;
|
|
25284
25325
|
}
|
|
25285
25326
|
}
|