@needle-tools/engine 5.1.0-alpha.9 → 5.1.0-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{needle-engine.bundle-mtqHZ45d.js → needle-engine.bundle-BWkDSRyF.js} +3686 -3627
- package/dist/{needle-engine.bundle-BotdnwVF.min.js → needle-engine.bundle-BvgS8xMP.min.js} +139 -139
- package/dist/{needle-engine.bundle-DagaNrZK.umd.cjs → needle-engine.bundle-CdVr_iIe.umd.cjs} +133 -133
- package/dist/needle-engine.d.ts +70 -29
- package/dist/needle-engine.js +606 -604
- package/dist/needle-engine.min.js +1 -1
- package/dist/needle-engine.umd.cjs +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 +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 +1 -1
- 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/needle-engine.d.ts
CHANGED
|
@@ -118,8 +118,12 @@ import { XRHandSpace } from 'three';
|
|
|
118
118
|
|
|
119
119
|
export declare const $componentName: unique symbol;
|
|
120
120
|
|
|
121
|
+
/* Excluded from this release type: $fwGZrGe */
|
|
122
|
+
|
|
121
123
|
export declare const $physicsKey: unique symbol;
|
|
122
124
|
|
|
125
|
+
/* Excluded from this release type: _$qWUhYZU */
|
|
126
|
+
|
|
123
127
|
export declare class __Ignore {
|
|
124
128
|
}
|
|
125
129
|
|
|
@@ -9011,8 +9015,6 @@ export declare class ImageReference {
|
|
|
9011
9015
|
*/
|
|
9012
9016
|
export declare function imageToCanvas(image: HTMLImageElement | HTMLCanvasElement | OffscreenCanvas | ImageBitmap, color?: Vector4 | undefined, flipY?: boolean, maxTextureSize?: number): Promise<OffscreenCanvasExt>;
|
|
9013
9017
|
|
|
9014
|
-
/* Excluded from this release type: _imGyfK */
|
|
9015
|
-
|
|
9016
9018
|
export declare interface IModel {
|
|
9017
9019
|
guid: string;
|
|
9018
9020
|
/**
|
|
@@ -16712,7 +16714,6 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
16712
16714
|
/** Adds an entry to the browser history. Internally uses `window.history.pushState` */
|
|
16713
16715
|
export declare function pushState(title: string, urlParams: URLSearchParams, state?: any): void;
|
|
16714
16716
|
|
|
16715
|
-
/* Excluded from this release type: _QchMjAD */
|
|
16716
16717
|
export { QParticle }
|
|
16717
16718
|
|
|
16718
16719
|
export { QParticleBehaviour }
|
|
@@ -17232,7 +17233,7 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
17232
17233
|
unapply(obj: Object3D): void;
|
|
17233
17234
|
}
|
|
17234
17235
|
|
|
17235
|
-
declare enum ReflectionProbeUsage {
|
|
17236
|
+
export declare enum ReflectionProbeUsage {
|
|
17236
17237
|
Off = 0,
|
|
17237
17238
|
BlendProbes = 1,
|
|
17238
17239
|
BlendProbesAndSkybox = 2,
|
|
@@ -17983,8 +17984,6 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
17983
17984
|
FreezeAll = 126
|
|
17984
17985
|
}
|
|
17985
17986
|
|
|
17986
|
-
/* Excluded from this release type: rkHTARX */
|
|
17987
|
-
|
|
17988
17987
|
/** Use to listen to room networking events like joining a networked room
|
|
17989
17988
|
* For example: `this.context.connection.beginListen(RoomEvents.JoinedRoom, () => { })`
|
|
17990
17989
|
* @link https://engine.needle.tools/docs/networking.html#manual-networking
|
|
@@ -18321,6 +18320,8 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
18321
18320
|
switchScene(scene: AssetReference): Promise<boolean>;
|
|
18322
18321
|
private __unloadCurrentScene;
|
|
18323
18322
|
private _currentlyLoadingScene?;
|
|
18323
|
+
private _loadingRequestId;
|
|
18324
|
+
private _activeLoadingRequestId;
|
|
18324
18325
|
/* Excluded from this release type: __internalSwitchScene */
|
|
18325
18326
|
preload(index: number): Promise<boolean> | Promise<ArrayBufferLike | null>;
|
|
18326
18327
|
private tryLoadFromQueryParam;
|
|
@@ -19173,13 +19174,42 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
19173
19174
|
*
|
|
19174
19175
|
*/
|
|
19175
19176
|
autoUpdate: boolean;
|
|
19177
|
+
/**
|
|
19178
|
+
* The alpha (opacity) the object is currently faded to, in the `[0, 1]` range.
|
|
19179
|
+
* `1` means fully visible, `0` means fully hidden. This is the live, animated value
|
|
19180
|
+
* (it lerps toward the target over {@link fadeDuration}), updated every frame the fade runs.
|
|
19181
|
+
*
|
|
19182
|
+
* External components can read this to react to the see-through state — e.g. toggling a
|
|
19183
|
+
* collider, muting audio, or driving a UI prompt as the object fades in or out.
|
|
19184
|
+
*
|
|
19185
|
+
* @example React to the object becoming (almost) hidden
|
|
19186
|
+
* ```ts
|
|
19187
|
+
* if (seeThrough.currentAlpha < 0.1) {
|
|
19188
|
+
* // object is essentially see-through now
|
|
19189
|
+
* }
|
|
19190
|
+
* ```
|
|
19191
|
+
* @default 1
|
|
19192
|
+
*/
|
|
19193
|
+
get currentAlpha(): number;
|
|
19194
|
+
/**
|
|
19195
|
+
* Below this alpha the object stops casting a shadow. The shadow map only stores depth, so a
|
|
19196
|
+
* faded object would otherwise keep casting a fully solid shadow (three.js does not fade shadows
|
|
19197
|
+
* by opacity). Toggling shadow casting off near-invisible is the cleanest fix; we drive it via
|
|
19198
|
+
* the {@link Renderer.shadowCastingMode} so it cooperates with the per-frame shadow settings the
|
|
19199
|
+
* Renderer re-applies. Note this is a hard on/off, not a fade.
|
|
19200
|
+
*/
|
|
19201
|
+
static readonly shadowHideThreshold = 0.05;
|
|
19176
19202
|
private readonly _referencePointVector;
|
|
19177
19203
|
private readonly _referencePointDir;
|
|
19178
19204
|
private _distance;
|
|
19179
19205
|
private _renderer;
|
|
19180
19206
|
private _needsUpdate;
|
|
19181
19207
|
private _id;
|
|
19208
|
+
private _currentAlpha;
|
|
19209
|
+
/** Renderers whose shadow casting we turned off while hidden, mapped to their original mode for restore. */
|
|
19210
|
+
private readonly _suppressedShadowCasting;
|
|
19182
19211
|
/* Excluded from this release type: onEnable */
|
|
19212
|
+
/* Excluded from this release type: onDestroy */
|
|
19183
19213
|
/* Excluded from this release type: update */
|
|
19184
19214
|
private updateDirection;
|
|
19185
19215
|
/**
|
|
@@ -19188,6 +19218,15 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
19188
19218
|
* @param duration Duration in seconds to reach the target alpha. 0 means immediate. Default is the component's fadeDuration.
|
|
19189
19219
|
*/
|
|
19190
19220
|
updateAlpha(targetAlpha: number, duration?: number): void;
|
|
19221
|
+
/**
|
|
19222
|
+
* Suppress or restore a renderer's shadow casting based on its current alpha.
|
|
19223
|
+
* Driving {@link Renderer.shadowCastingMode} (rather than the raw `mesh.castShadow`) is required
|
|
19224
|
+
* because the Renderer re-applies that setting every frame; we remember the original mode so it
|
|
19225
|
+
* is restored exactly when the object fades back in.
|
|
19226
|
+
*/
|
|
19227
|
+
private updateShadowCasting;
|
|
19228
|
+
/** Restore every renderer we suppressed shadow casting on, then clear the bookkeeping. */
|
|
19229
|
+
private restoreSuppressedShadowCasting;
|
|
19191
19230
|
}
|
|
19192
19231
|
|
|
19193
19232
|
export declare function sendDestroyed(guid: string, con: INetworkConnection, opts?: SyncDestroyOptions): void;
|
|
@@ -19406,7 +19445,7 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
19406
19445
|
|
|
19407
19446
|
export declare function setWorldScale(obj: Object3D, vec: Vector3): void;
|
|
19408
19447
|
|
|
19409
|
-
declare enum ShadowCastingMode {
|
|
19448
|
+
export declare enum ShadowCastingMode {
|
|
19410
19449
|
Off = 0,
|
|
19411
19450
|
On = 1,
|
|
19412
19451
|
TwoSided = 2,
|
|
@@ -25113,9 +25152,33 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
25113
25152
|
All = 4294967295
|
|
25114
25153
|
}
|
|
25115
25154
|
|
|
25155
|
+
/* Excluded from this release type: _XtEQ */
|
|
25156
|
+
|
|
25116
25157
|
export { }
|
|
25117
25158
|
|
|
25118
25159
|
|
|
25160
|
+
declare module 'three' {
|
|
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;
|
|
25178
|
+
}
|
|
25179
|
+
}
|
|
25180
|
+
|
|
25181
|
+
|
|
25119
25182
|
declare module 'three' {
|
|
25120
25183
|
interface Vector3 {
|
|
25121
25184
|
slerp(end: Vector3, t: number): Vector3;
|
|
@@ -25261,25 +25324,3 @@ declare module 'three' {
|
|
|
25261
25324
|
contains(object: Object3D | null | undefined): boolean;
|
|
25262
25325
|
}
|
|
25263
25326
|
}
|
|
25264
|
-
|
|
25265
|
-
|
|
25266
|
-
declare module 'three' {
|
|
25267
|
-
interface SkinnedMesh {
|
|
25268
|
-
staticGenerator?: StaticGeometryGenerator;
|
|
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;
|
|
25284
|
-
}
|
|
25285
|
-
}
|