@needle-tools/engine 5.1.8 → 5.1.10
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 +16 -0
- package/SKILL.md +62 -4
- package/components.needle.json +1 -1
- package/dist/{needle-engine.bundle-CaD5rOJ0.js → needle-engine.bundle-DP--RGAU.js} +6126 -5969
- package/dist/{needle-engine.bundle-X7Y4A-EO.min.js → needle-engine.bundle-DZD-GG7l.min.js} +144 -143
- package/dist/{needle-engine.bundle-D8gP8Nd0.umd.cjs → needle-engine.bundle-Dv5TidOk.umd.cjs} +141 -140
- package/dist/needle-engine.d.ts +133 -36
- package/dist/needle-engine.js +617 -613
- package/dist/needle-engine.min.js +1 -1
- package/dist/needle-engine.umd.cjs +1 -1
- package/dist/three-examples.js +727 -781
- package/dist/three-examples.min.js +12 -12
- package/dist/three-examples.umd.cjs +9 -9
- 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 +71 -71
- package/lib/engine/engine_license.js.map +1 -1
- package/lib/engine/engine_materialpropertyblock.d.ts +13 -4
- package/lib/engine/engine_materialpropertyblock.js +16 -5
- package/lib/engine/engine_materialpropertyblock.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/postprocessing/postprocessing.d.ts +18 -0
- package/lib/engine/postprocessing/postprocessing.js +31 -2
- package/lib/engine/postprocessing/postprocessing.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.ar-overlay.js +11 -0
- package/lib/engine/webcomponents/needle-engine.ar-overlay.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/NeedleXRSession.d.ts +7 -2
- package/lib/engine/xr/NeedleXRSession.js +65 -5
- package/lib/engine/xr/NeedleXRSession.js.map +1 -1
- package/lib/engine/xr/TempXRContext.js +2 -2
- package/lib/engine/xr/TempXRContext.js.map +1 -1
- package/lib/engine/xr/XRHandMeshModel.d.ts +31 -0
- package/lib/engine/xr/XRHandMeshModel.js +153 -0
- package/lib/engine/xr/XRHandMeshModel.js.map +1 -0
- package/lib/engine-components/Component.d.ts +2 -1
- package/lib/engine-components/Component.js.map +1 -1
- package/lib/engine-components/ReflectionProbe.js +3 -3
- package/lib/engine-components/ReflectionProbe.js.map +1 -1
- package/lib/engine-components/RendererLightmap.js +1 -1
- package/lib/engine-components/RendererLightmap.js.map +1 -1
- package/lib/engine-components/SyncedRoom.js +5 -0
- package/lib/engine-components/SyncedRoom.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/lib/engine-components/postprocessing/Effects/DepthOfField.js +10 -2
- package/lib/engine-components/postprocessing/Effects/DepthOfField.js.map +1 -1
- package/lib/engine-components/postprocessing/index.d.ts +4 -0
- package/lib/engine-components/postprocessing/index.js +7 -0
- package/lib/engine-components/postprocessing/index.js.map +1 -1
- package/lib/engine-components/utils/LookAt.d.ts +13 -4
- package/lib/engine-components/utils/LookAt.js +13 -4
- package/lib/engine-components/utils/LookAt.js.map +1 -1
- package/lib/engine-components/webxr/WebXR.js +1 -1
- package/lib/engine-components/webxr/WebXR.js.map +1 -1
- package/lib/engine-components/webxr/WebXRImageTracking.d.ts +35 -18
- package/lib/engine-components/webxr/WebXRImageTracking.js +93 -78
- package/lib/engine-components/webxr/WebXRImageTracking.js.map +1 -1
- package/lib/engine-components/webxr/WebXRImageTracking.utils.d.ts +35 -0
- package/lib/engine-components/webxr/WebXRImageTracking.utils.js +96 -0
- package/lib/engine-components/webxr/WebXRImageTracking.utils.js.map +1 -0
- package/lib/engine-components/webxr/controllers/XRControllerModel.d.ts +1 -1
- package/lib/engine-components/webxr/controllers/XRControllerModel.js +12 -7
- package/lib/engine-components/webxr/controllers/XRControllerModel.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_init.ts +2 -2
- package/src/engine/engine_license.ts +68 -68
- package/src/engine/engine_materialpropertyblock.ts +17 -5
- package/src/engine/engine_networking_blob.ts +3 -3
- package/src/engine/engine_utils_qrcode.ts +2 -2
- package/src/engine/postprocessing/postprocessing.ts +32 -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.ar-overlay.ts +13 -0
- package/src/engine/webcomponents/needle-engine.loading.ts +6 -6
- package/src/engine/webcomponents/needle-engine.ts +2 -2
- package/src/engine/xr/NeedleXRSession.ts +68 -8
- package/src/engine/xr/TempXRContext.ts +2 -2
- package/src/engine/xr/XRHandMeshModel.ts +179 -0
- package/src/engine-components/Component.ts +2 -1
- package/src/engine-components/ReflectionProbe.ts +3 -3
- package/src/engine-components/RendererLightmap.ts +1 -1
- package/src/engine-components/SyncedRoom.ts +5 -0
- package/src/engine-components/export/usdz/USDZExporter.ts +4 -4
- package/src/engine-components/postprocessing/Effects/DepthOfField.ts +10 -2
- package/src/engine-components/postprocessing/index.ts +7 -0
- package/src/engine-components/utils/LookAt.ts +13 -4
- package/src/engine-components/webxr/WebXR.ts +1 -1
- package/src/engine-components/webxr/WebXRImageTracking.ts +120 -66
- package/src/engine-components/webxr/WebXRImageTracking.utils.ts +105 -0
- package/src/engine-components/webxr/controllers/XRControllerModel.ts +13 -7
package/dist/needle-engine.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { Audio as Audio_2 } from 'three';
|
|
|
5
5
|
import { AudioListener as AudioListener_3 } from 'three';
|
|
6
6
|
import { BatchedMesh } from 'three';
|
|
7
7
|
import { BloomEffect as BloomEffect_2 } from 'postprocessing';
|
|
8
|
+
import { Bone } from 'three';
|
|
8
9
|
import { Box3 } from 'three';
|
|
9
10
|
import { BufferGeometry } from 'three';
|
|
10
11
|
import { Camera as Camera_2 } from 'three';
|
|
@@ -111,11 +112,14 @@ import { WebGLRenderTarget } from 'three';
|
|
|
111
112
|
import { WebXRArrayCamera } from 'three';
|
|
112
113
|
import { World } from '@dimforge/rapier3d-compat';
|
|
113
114
|
import { XRControllerModelFactory } from 'three/examples/jsm/webxr/XRControllerModelFactory.js';
|
|
114
|
-
import { XRHandMeshModel } from 'three/examples/jsm/webxr/XRHandMeshModel.js';
|
|
115
115
|
import { XRHandSpace } from 'three';
|
|
116
116
|
|
|
117
117
|
export declare const $componentName: unique symbol;
|
|
118
118
|
|
|
119
|
+
/* Excluded from this release type: $fHATZ */
|
|
120
|
+
|
|
121
|
+
/* Excluded from this release type: $Ljyi */
|
|
122
|
+
|
|
119
123
|
export declare const $physicsKey: unique symbol;
|
|
120
124
|
|
|
121
125
|
export declare class __Ignore {
|
|
@@ -123,7 +127,7 @@ export declare class __Ignore {
|
|
|
123
127
|
|
|
124
128
|
export declare function __internalNotifyObjectDestroyed(obj: Object3D): void;
|
|
125
129
|
|
|
126
|
-
/* Excluded from this release type:
|
|
130
|
+
/* Excluded from this release type: __KODK */
|
|
127
131
|
|
|
128
132
|
/** Data describing the accessible semantics for a 3D object or component. */
|
|
129
133
|
declare type AccessibilityData = {
|
|
@@ -4119,8 +4123,9 @@ declare abstract class Component implements IComponent, EventTarget, Partial<INe
|
|
|
4119
4123
|
* Use to modify session initialization parameters
|
|
4120
4124
|
* @param mode The XR session mode being requested
|
|
4121
4125
|
* @param args The session initialization parameters that can be modified
|
|
4126
|
+
* @returns void, or a promise that is awaited before the session is requested (e.g. to load assets)
|
|
4122
4127
|
*/
|
|
4123
|
-
onBeforeXR?(mode: XRSessionMode, args: XRSessionInit): void
|
|
4128
|
+
onBeforeXR?(mode: XRSessionMode, args: XRSessionInit): void | Promise<void>;
|
|
4124
4129
|
/**
|
|
4125
4130
|
* Called when this component joins an XR session or becomes active in a running session
|
|
4126
4131
|
* @param args Event data for the XR session
|
|
@@ -5564,7 +5569,7 @@ export declare class DepthOfField extends PostProcessingEffect {
|
|
|
5564
5569
|
unapply(): void;
|
|
5565
5570
|
}
|
|
5566
5571
|
|
|
5567
|
-
declare enum DepthOfFieldMode {
|
|
5572
|
+
export declare enum DepthOfFieldMode {
|
|
5568
5573
|
Off = 0,
|
|
5569
5574
|
Gaussian = 1,
|
|
5570
5575
|
Bokeh = 2
|
|
@@ -9052,8 +9057,8 @@ export declare type INeedleXRSession = NeedleXRSession;
|
|
|
9052
9057
|
export declare interface INeedleXRSessionEventReceiver extends Pick<IComponent, "destroyed"> {
|
|
9053
9058
|
get activeAndEnabled(): boolean;
|
|
9054
9059
|
supportsXR?(mode: XRSessionMode): boolean;
|
|
9055
|
-
/** Called before requesting a XR session */
|
|
9056
|
-
onBeforeXR?(mode: XRSessionMode, args: XRSessionInit): void
|
|
9060
|
+
/** Called before requesting a XR session. May return a promise that is awaited before requesting. */
|
|
9061
|
+
onBeforeXR?(mode: XRSessionMode, args: XRSessionInit): void | Promise<void>;
|
|
9057
9062
|
onEnterXR?(args: NeedleXREventArgs): void;
|
|
9058
9063
|
onUpdateXR?(args: NeedleXREventArgs): void;
|
|
9059
9064
|
onLeaveXR?(args: NeedleXREventArgs): void;
|
|
@@ -10497,6 +10502,10 @@ declare abstract class Joint extends Component {
|
|
|
10497
10502
|
protected abstract createJoint(self: Rigidbody, other: Rigidbody): any;
|
|
10498
10503
|
}
|
|
10499
10504
|
|
|
10505
|
+
declare type JointBone = Bone & {
|
|
10506
|
+
jointName?: string;
|
|
10507
|
+
};
|
|
10508
|
+
|
|
10500
10509
|
/** Locks the follow object's world rotation to the quaternion captured at drag-start. */
|
|
10501
10510
|
export declare class KeepRotationConstraint implements IDragConstraint {
|
|
10502
10511
|
private readonly _savedQuat;
|
|
@@ -11045,19 +11054,28 @@ export declare enum LogType {
|
|
|
11045
11054
|
*/
|
|
11046
11055
|
export declare class LookAt extends Component implements UsdzBehaviour {
|
|
11047
11056
|
/**
|
|
11048
|
-
* The target object to look at.
|
|
11057
|
+
* The target object to look at.
|
|
11058
|
+
* @default undefined — when no target is set the main camera is used
|
|
11049
11059
|
*/
|
|
11050
11060
|
target?: Object3D;
|
|
11051
11061
|
/**
|
|
11052
|
-
* Inverts the forward direction
|
|
11062
|
+
* Inverts the forward direction, so the object turns its back to the target
|
|
11063
|
+
* instead of facing it. Useful for models authored facing -Z.
|
|
11064
|
+
* @default false
|
|
11053
11065
|
*/
|
|
11054
11066
|
invertForward: boolean;
|
|
11055
11067
|
/**
|
|
11056
|
-
*
|
|
11068
|
+
* Keeps the object upright while turning, so it only rotates around the up
|
|
11069
|
+
* axis rather than tilting to point directly at a target above or below it.
|
|
11070
|
+
* @default true
|
|
11057
11071
|
*/
|
|
11058
11072
|
keepUpDirection: boolean;
|
|
11059
11073
|
/**
|
|
11060
|
-
*
|
|
11074
|
+
* Copies the target's rotation instead of aiming at its position. Use this to
|
|
11075
|
+
* match a target's orientation, for example to align with the camera.
|
|
11076
|
+
*
|
|
11077
|
+
* Ignored during a VR or AR session.
|
|
11078
|
+
* @default false
|
|
11061
11079
|
*/
|
|
11062
11080
|
copyTargetRotation: boolean;
|
|
11063
11081
|
private static flipYQuat;
|
|
@@ -11155,8 +11173,6 @@ declare class LowPassFilter {
|
|
|
11155
11173
|
reset(value?: number): void;
|
|
11156
11174
|
}
|
|
11157
11175
|
|
|
11158
|
-
/* Excluded from this release type: LuMYUbW */
|
|
11159
|
-
|
|
11160
11176
|
declare type MagicSkyboxName = "studio" | "blurred-skybox" | "quicklook-ar" | "quicklook";
|
|
11161
11177
|
|
|
11162
11178
|
export declare class MainModule {
|
|
@@ -11253,7 +11269,7 @@ export declare class MaskableGraphic extends Graphic {
|
|
|
11253
11269
|
* This means:
|
|
11254
11270
|
* - If you change the object's material, the overrides will still be applied to the new material
|
|
11255
11271
|
* - Multiple objects can share the same material but have different property overrides
|
|
11256
|
-
* - If you don't want overrides applied after changing a material, you must remove them using {@link
|
|
11272
|
+
* - If you don't want overrides applied after changing a material, you must remove them using {@link removeOverride}, {@link clearAllOverrides}, or {@link dispose}
|
|
11257
11273
|
*
|
|
11258
11274
|
* The property block system works by:
|
|
11259
11275
|
* - Temporarily applying overrides in onBeforeRender
|
|
@@ -11315,7 +11331,7 @@ export declare class MaskableGraphic extends Graphic {
|
|
|
11315
11331
|
* // If you don't want overrides on the new material, remove them:
|
|
11316
11332
|
* block.clearAllOverrides(); // Remove all overrides
|
|
11317
11333
|
* // or
|
|
11318
|
-
* block.
|
|
11334
|
+
* block.removeOverride("color"); // Remove specific override
|
|
11319
11335
|
* // or
|
|
11320
11336
|
* block.dispose(); // Remove the entire property block
|
|
11321
11337
|
* ```
|
|
@@ -11442,11 +11458,20 @@ export declare class MaterialPropertyBlock<T extends Material = Material> {
|
|
|
11442
11458
|
* block.setOverride("lightMap", lightmapTexture);
|
|
11443
11459
|
*
|
|
11444
11460
|
* // Remove a specific override - the material will now use its original color
|
|
11445
|
-
* block.
|
|
11461
|
+
* block.removeOverride("color");
|
|
11446
11462
|
*
|
|
11447
11463
|
* // Other overrides (roughness, lightMap) remain active
|
|
11448
11464
|
* ```
|
|
11449
11465
|
*/
|
|
11466
|
+
removeOverride<K extends NonFunctionPropertyNames<T>>(name: K | ({} & string)): void;
|
|
11467
|
+
/**
|
|
11468
|
+
* Removes a specific property override.
|
|
11469
|
+
*
|
|
11470
|
+
* @param name The property name to remove the override for
|
|
11471
|
+
*
|
|
11472
|
+
* @deprecated The name is missing an `r`. Use {@link removeOverride} instead — this
|
|
11473
|
+
* alias is kept so existing code keeps working and will be removed in a future version.
|
|
11474
|
+
*/
|
|
11450
11475
|
removeOveride<K extends NonFunctionPropertyNames<T>>(name: K | ({} & string)): void;
|
|
11451
11476
|
/**
|
|
11452
11477
|
* Removes all property overrides from this block.
|
|
@@ -11488,7 +11513,7 @@ export declare class MaterialPropertyBlock<T extends Material = Material> {
|
|
|
11488
11513
|
* });
|
|
11489
11514
|
* ```
|
|
11490
11515
|
*
|
|
11491
|
-
* @see {@link
|
|
11516
|
+
* @see {@link removeOverride} - To remove a single override
|
|
11492
11517
|
* @see {@link dispose} - To completely remove the property block and clean up resources
|
|
11493
11518
|
*/
|
|
11494
11519
|
clearAllOverrides(): void;
|
|
@@ -12956,6 +12981,11 @@ export declare class NeedleXRSession implements INeedleXRSession {
|
|
|
12956
12981
|
readonly session: XRSession;
|
|
12957
12982
|
/** XR Session Mode: AR or VR */
|
|
12958
12983
|
readonly mode: XRSessionMode;
|
|
12984
|
+
/** The framebuffer scale factor this session was started with. On this
|
|
12985
|
+
* version the engine never requests a custom scale, so it is always 1 —
|
|
12986
|
+
* the property exists so session-resolution handling (e.g. the App Clip
|
|
12987
|
+
* canvas scaling) reads one authoritative value. */
|
|
12988
|
+
readonly appliedFramebufferScaleFactor: number;
|
|
12959
12989
|
/**
|
|
12960
12990
|
* The XRSession interface's read-only interactionMode property describes the best space (according to the user agent) for the application to draw an interactive UI for the current session.
|
|
12961
12991
|
* @link https://developer.mozilla.org/en-US/docs/Web/API/XRSession/interactionMode
|
|
@@ -13325,7 +13355,7 @@ export declare class NestedGltf extends Component {
|
|
|
13325
13355
|
private hash;
|
|
13326
13356
|
}
|
|
13327
13357
|
|
|
13328
|
-
declare enum NEToneMappingMode {
|
|
13358
|
+
export declare enum NEToneMappingMode {
|
|
13329
13359
|
None = 0,
|
|
13330
13360
|
Neutral = 1,// Neutral tonemapper, close to Reinhard
|
|
13331
13361
|
ACES = 2,// ACES Filmic reference tonemapper (custom approximation)
|
|
@@ -16250,6 +16280,24 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
16250
16280
|
get effects(): readonly IPostProcessingEffect[];
|
|
16251
16281
|
get dirty(): boolean;
|
|
16252
16282
|
set dirty(value: boolean);
|
|
16283
|
+
private _enabled;
|
|
16284
|
+
/**
|
|
16285
|
+
* Whether the postprocessing stack runs at all. When disabled the scene is
|
|
16286
|
+
* rendered directly, with no effects and no composer.
|
|
16287
|
+
*
|
|
16288
|
+
* Every effect keeps its own `enabled` state, so switching this back on
|
|
16289
|
+
* restores exactly the stack that was there before. Useful for a quality
|
|
16290
|
+
* setting, for a clean screenshot, or for comparing a scene with and
|
|
16291
|
+
* without effects.
|
|
16292
|
+
*
|
|
16293
|
+
* @default true
|
|
16294
|
+
* @example
|
|
16295
|
+
* ```ts
|
|
16296
|
+
* context.postprocessing.enabled = false;
|
|
16297
|
+
* ```
|
|
16298
|
+
*/
|
|
16299
|
+
get enabled(): boolean;
|
|
16300
|
+
set enabled(value: boolean);
|
|
16253
16301
|
/** The internal PostProcessingHandler that manages the EffectComposer pipeline */
|
|
16254
16302
|
get handler(): IPostProcessingHandler | null;
|
|
16255
16303
|
/**
|
|
@@ -16720,6 +16768,13 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
16720
16768
|
|
|
16721
16769
|
export { QTrailParticle }
|
|
16722
16770
|
|
|
16771
|
+
export declare enum QualityLevel {
|
|
16772
|
+
LOW = 0,
|
|
16773
|
+
MEDIUM = 1,
|
|
16774
|
+
HIGH = 2,
|
|
16775
|
+
ULTRA = 3
|
|
16776
|
+
}
|
|
16777
|
+
|
|
16723
16778
|
declare type Quat = {
|
|
16724
16779
|
x: number;
|
|
16725
16780
|
y: number;
|
|
@@ -18899,7 +18954,7 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
18899
18954
|
}
|
|
18900
18955
|
|
|
18901
18956
|
/**See (N8AO documentation)[https://github.com/N8python/n8ao] */
|
|
18902
|
-
declare enum ScreenSpaceAmbientOcclusionN8QualityMode {
|
|
18957
|
+
export declare enum ScreenSpaceAmbientOcclusionN8QualityMode {
|
|
18903
18958
|
Performance = 0,
|
|
18904
18959
|
Low = 1,
|
|
18905
18960
|
Medium = 2,
|
|
@@ -23551,8 +23606,6 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
23551
23606
|
private updateDarkness;
|
|
23552
23607
|
}
|
|
23553
23608
|
|
|
23554
|
-
/* Excluded from this release type: _VIq */
|
|
23555
|
-
|
|
23556
23609
|
/**
|
|
23557
23610
|
* Action to show or hide an object.
|
|
23558
23611
|
* Use together with a {@link TapGestureTrigger} to show or hide objects when tapped or clicked.
|
|
@@ -24493,22 +24546,22 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
24493
24546
|
* **Tip:** Add all your markers upfront. In WebXR mode they all work simultaneously.
|
|
24494
24547
|
* In QuickLook mode, the first (primary) marker is used.
|
|
24495
24548
|
*
|
|
24496
|
-
* @param image The marker configuration
|
|
24497
|
-
*
|
|
24549
|
+
* @param image The marker configuration - either a plain options object or a {@link WebXRImageTrackingModel}.
|
|
24550
|
+
* Set `asPrimary: true` to make this the primary marker (for QuickLook fallback).
|
|
24498
24551
|
*
|
|
24499
24552
|
* @example
|
|
24500
24553
|
* ```ts
|
|
24501
|
-
* // Super simple -
|
|
24502
|
-
*
|
|
24554
|
+
* // Super simple - just pass the marker url and the object to show
|
|
24555
|
+
* imageTracking.addImage({
|
|
24503
24556
|
* url: "https://mysite.com/poster.png",
|
|
24504
|
-
*
|
|
24505
|
-
*
|
|
24557
|
+
* object: cool3DModel,
|
|
24558
|
+
* widthInMeters: 0.42, // A3 poster width (optional, defaults to 0.25)
|
|
24506
24559
|
* });
|
|
24507
|
-
* imageTracking.addImage(marker);
|
|
24508
24560
|
* // That's it! Needle does the rest.
|
|
24509
24561
|
* ```
|
|
24510
24562
|
*/
|
|
24511
|
-
addImage(
|
|
24563
|
+
addImage(options: WebXRImageTrackingOptions): void;
|
|
24564
|
+
addImage(model: WebXRImageTrackingModel): void;
|
|
24512
24565
|
/**
|
|
24513
24566
|
* Your list of markers to track. Add as many as you need!
|
|
24514
24567
|
*
|
|
@@ -24544,9 +24597,13 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
24544
24597
|
/* Excluded from this release type: awake */
|
|
24545
24598
|
/* Excluded from this release type: onEnable */
|
|
24546
24599
|
/* Excluded from this release type: onDisable */
|
|
24600
|
+
private onInvalidImageSizeDetected;
|
|
24547
24601
|
private onBeforeUSDZExport;
|
|
24548
24602
|
/* Excluded from this release type: onBeforeXR */
|
|
24549
24603
|
/* Excluded from this release type: onEnterXR */
|
|
24604
|
+
/** Late-registers this component's marker images into an already running session
|
|
24605
|
+
* via the NeedleGo polyfill's runtime hook. See {@link onEnterXR}. */
|
|
24606
|
+
private registerImagesWithRunningSession;
|
|
24550
24607
|
/* Excluded from this release type: onLeaveXR */
|
|
24551
24608
|
private readonly imageToObjectMap;
|
|
24552
24609
|
private readonly currentImages;
|
|
@@ -24598,14 +24655,7 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
24598
24655
|
* @param params.imageDoesNotMove Enable for static markers (floor/wall mounted) to improve tracking stability
|
|
24599
24656
|
* @param params.hideWhenTrackingIsLost If true, hides the object when tracking is lost; if false, leaves it at the last known position
|
|
24600
24657
|
*/
|
|
24601
|
-
constructor(params:
|
|
24602
|
-
url: string;
|
|
24603
|
-
widthInMeters: number; /** Object to track */
|
|
24604
|
-
object: AssetReference | Object3D;
|
|
24605
|
-
createObjectInstance?: boolean;
|
|
24606
|
-
imageDoesNotMove?: boolean;
|
|
24607
|
-
hideWhenTrackingIsLost?: boolean;
|
|
24608
|
-
});
|
|
24658
|
+
constructor(params: Omit<WebXRImageTrackingOptions, "asPrimary">);
|
|
24609
24659
|
/**
|
|
24610
24660
|
* URL to the marker image to track.
|
|
24611
24661
|
* **Important:** Use images with high contrast and unique features to improve tracking quality.
|
|
@@ -24680,6 +24730,27 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
24680
24730
|
getNameFromUrl(): string | null;
|
|
24681
24731
|
}
|
|
24682
24732
|
|
|
24733
|
+
/**
|
|
24734
|
+
* Options for adding a trackable image marker via {@link WebXRImageTracking.addImage}.
|
|
24735
|
+
* A convenience shape that also accepts a plain {@link Object3D} for `object`.
|
|
24736
|
+
*/
|
|
24737
|
+
export declare interface WebXRImageTrackingOptions {
|
|
24738
|
+
/** URL to the marker image to track. Use high-contrast images with unique features for reliable tracking. */
|
|
24739
|
+
url?: string;
|
|
24740
|
+
/** The 3D object (or {@link AssetReference}) to display when the marker is detected. */
|
|
24741
|
+
object: AssetReference | Object3D;
|
|
24742
|
+
/** Physical width of the printed marker in meters. Must match the real marker size. @default 0.25 */
|
|
24743
|
+
widthInMeters?: number;
|
|
24744
|
+
/** Create a new instance of the object for each detection. @default false */
|
|
24745
|
+
createObjectInstance?: boolean;
|
|
24746
|
+
/** Enable for static markers (walls/floor) to improve tracking stability. @default false */
|
|
24747
|
+
imageDoesNotMove?: boolean;
|
|
24748
|
+
/** Hide the object when tracking is lost. @default true */
|
|
24749
|
+
hideWhenTrackingIsLost?: boolean;
|
|
24750
|
+
/** Make this the primary marker (used in QuickLook fallback mode). @default false */
|
|
24751
|
+
asPrimary?: boolean;
|
|
24752
|
+
}
|
|
24753
|
+
|
|
24683
24754
|
/**
|
|
24684
24755
|
* [WebXRPlaneTracking](https://engine.needle.tools/docs/api/WebXRPlaneTracking) tracks planes and meshes in the real world when in immersive-ar (e.g. on Oculus Quest).
|
|
24685
24756
|
* @category XR
|
|
@@ -25088,6 +25159,32 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
25088
25159
|
|
|
25089
25160
|
export declare type XRGestureName = "pinch";
|
|
25090
25161
|
|
|
25162
|
+
/**
|
|
25163
|
+
* Renders a skinned hand mesh and drives its bones from the tracked WebXR joint poses.
|
|
25164
|
+
*
|
|
25165
|
+
* @see {@link XRControllerModel} which creates one per tracked hand.
|
|
25166
|
+
*/
|
|
25167
|
+
declare class XRHandMeshModel {
|
|
25168
|
+
/** The three XRHandSpace whose `joints` drive this mesh. */
|
|
25169
|
+
readonly controller: XRHandSpace;
|
|
25170
|
+
/** The object the loaded hand mesh is added to. */
|
|
25171
|
+
readonly handModel: Object3D;
|
|
25172
|
+
/** The bones driven by {@link updateMesh}, in {@link JOINT_NAMES} order. Sparse if the model lacks joints. */
|
|
25173
|
+
readonly bones: Array<JointBone | undefined>;
|
|
25174
|
+
/**
|
|
25175
|
+
* @param handModel the object the loaded mesh is parented to
|
|
25176
|
+
* @param controller the hand space providing joint poses
|
|
25177
|
+
* @param path base path for the model (defaults to the generic hand profile CDN)
|
|
25178
|
+
* @param handedness file name to load (without extension) — either "left"/"right" for the
|
|
25179
|
+
* default profile, or a full path for a custom hand model
|
|
25180
|
+
* @param loader loader to use; a plain GLTFLoader is created when omitted
|
|
25181
|
+
* @param onLoad invoked with the loaded hand object once it has been added
|
|
25182
|
+
*/
|
|
25183
|
+
constructor(handModel: Object3D, controller: XRHandSpace, path: string | null, handedness: string, loader?: GLTFLoader | null, onLoad?: ((object: Object3D) => void) | null);
|
|
25184
|
+
/** Copies the current tracked joint poses onto the mesh bones. Called every XR frame. */
|
|
25185
|
+
updateMesh(): void;
|
|
25186
|
+
}
|
|
25187
|
+
|
|
25091
25188
|
declare type XRMesh_2 = {
|
|
25092
25189
|
meshSpace: XRSpace;
|
|
25093
25190
|
lastChangedTime: number;
|