@needle-tools/engine 5.1.9 → 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 +6 -0
- package/SKILL.md +62 -4
- package/components.needle.json +1 -1
- package/dist/{needle-engine.bundle-XZ6cKssu.js → needle-engine.bundle-DP--RGAU.js} +3144 -3021
- package/dist/{needle-engine.bundle-CHq9xqXv.min.js → needle-engine.bundle-DZD-GG7l.min.js} +122 -121
- package/dist/{needle-engine.bundle-DYPk7VZg.umd.cjs → needle-engine.bundle-Dv5TidOk.umd.cjs} +132 -131
- package/dist/needle-engine.d.ts +90 -17
- package/dist/needle-engine.js +610 -606
- 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.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/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/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/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.loading.ts +6 -6
- package/src/engine/webcomponents/needle-engine.ts +2 -2
- package/src/engine/xr/TempXRContext.ts +2 -2
- package/src/engine/xr/XRHandMeshModel.ts +179 -0
- 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/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,22 +112,23 @@ 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: $
|
|
119
|
+
/* Excluded from this release type: $fHATZ */
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
/* Excluded from this release type: $Ljyi */
|
|
122
122
|
|
|
123
|
-
|
|
123
|
+
export declare const $physicsKey: unique symbol;
|
|
124
124
|
|
|
125
125
|
export declare class __Ignore {
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
export declare function __internalNotifyObjectDestroyed(obj: Object3D): void;
|
|
129
129
|
|
|
130
|
+
/* Excluded from this release type: __KODK */
|
|
131
|
+
|
|
130
132
|
/** Data describing the accessible semantics for a 3D object or component. */
|
|
131
133
|
declare type AccessibilityData = {
|
|
132
134
|
/** ARIA role (e.g. `"button"`, `"img"`, `"region"`). */
|
|
@@ -5567,7 +5569,7 @@ export declare class DepthOfField extends PostProcessingEffect {
|
|
|
5567
5569
|
unapply(): void;
|
|
5568
5570
|
}
|
|
5569
5571
|
|
|
5570
|
-
declare enum DepthOfFieldMode {
|
|
5572
|
+
export declare enum DepthOfFieldMode {
|
|
5571
5573
|
Off = 0,
|
|
5572
5574
|
Gaussian = 1,
|
|
5573
5575
|
Bokeh = 2
|
|
@@ -10458,8 +10460,6 @@ export declare interface IWatch {
|
|
|
10458
10460
|
dispose(): any;
|
|
10459
10461
|
}
|
|
10460
10462
|
|
|
10461
|
-
/* Excluded from this release type: _iXmRJVD */
|
|
10462
|
-
|
|
10463
10463
|
export declare interface IXRRig extends Pick<IComponent, "gameObject"> {
|
|
10464
10464
|
isXRRig(): boolean;
|
|
10465
10465
|
get isActive(): boolean;
|
|
@@ -10502,6 +10502,10 @@ declare abstract class Joint extends Component {
|
|
|
10502
10502
|
protected abstract createJoint(self: Rigidbody, other: Rigidbody): any;
|
|
10503
10503
|
}
|
|
10504
10504
|
|
|
10505
|
+
declare type JointBone = Bone & {
|
|
10506
|
+
jointName?: string;
|
|
10507
|
+
};
|
|
10508
|
+
|
|
10505
10509
|
/** Locks the follow object's world rotation to the quaternion captured at drag-start. */
|
|
10506
10510
|
export declare class KeepRotationConstraint implements IDragConstraint {
|
|
10507
10511
|
private readonly _savedQuat;
|
|
@@ -11050,19 +11054,28 @@ export declare enum LogType {
|
|
|
11050
11054
|
*/
|
|
11051
11055
|
export declare class LookAt extends Component implements UsdzBehaviour {
|
|
11052
11056
|
/**
|
|
11053
|
-
* 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
|
|
11054
11059
|
*/
|
|
11055
11060
|
target?: Object3D;
|
|
11056
11061
|
/**
|
|
11057
|
-
* 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
|
|
11058
11065
|
*/
|
|
11059
11066
|
invertForward: boolean;
|
|
11060
11067
|
/**
|
|
11061
|
-
*
|
|
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
|
|
11062
11071
|
*/
|
|
11063
11072
|
keepUpDirection: boolean;
|
|
11064
11073
|
/**
|
|
11065
|
-
*
|
|
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
|
|
11066
11079
|
*/
|
|
11067
11080
|
copyTargetRotation: boolean;
|
|
11068
11081
|
private static flipYQuat;
|
|
@@ -11256,7 +11269,7 @@ export declare class MaskableGraphic extends Graphic {
|
|
|
11256
11269
|
* This means:
|
|
11257
11270
|
* - If you change the object's material, the overrides will still be applied to the new material
|
|
11258
11271
|
* - Multiple objects can share the same material but have different property overrides
|
|
11259
|
-
* - 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}
|
|
11260
11273
|
*
|
|
11261
11274
|
* The property block system works by:
|
|
11262
11275
|
* - Temporarily applying overrides in onBeforeRender
|
|
@@ -11318,7 +11331,7 @@ export declare class MaskableGraphic extends Graphic {
|
|
|
11318
11331
|
* // If you don't want overrides on the new material, remove them:
|
|
11319
11332
|
* block.clearAllOverrides(); // Remove all overrides
|
|
11320
11333
|
* // or
|
|
11321
|
-
* block.
|
|
11334
|
+
* block.removeOverride("color"); // Remove specific override
|
|
11322
11335
|
* // or
|
|
11323
11336
|
* block.dispose(); // Remove the entire property block
|
|
11324
11337
|
* ```
|
|
@@ -11445,11 +11458,20 @@ export declare class MaterialPropertyBlock<T extends Material = Material> {
|
|
|
11445
11458
|
* block.setOverride("lightMap", lightmapTexture);
|
|
11446
11459
|
*
|
|
11447
11460
|
* // Remove a specific override - the material will now use its original color
|
|
11448
|
-
* block.
|
|
11461
|
+
* block.removeOverride("color");
|
|
11449
11462
|
*
|
|
11450
11463
|
* // Other overrides (roughness, lightMap) remain active
|
|
11451
11464
|
* ```
|
|
11452
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
|
+
*/
|
|
11453
11475
|
removeOveride<K extends NonFunctionPropertyNames<T>>(name: K | ({} & string)): void;
|
|
11454
11476
|
/**
|
|
11455
11477
|
* Removes all property overrides from this block.
|
|
@@ -11491,7 +11513,7 @@ export declare class MaterialPropertyBlock<T extends Material = Material> {
|
|
|
11491
11513
|
* });
|
|
11492
11514
|
* ```
|
|
11493
11515
|
*
|
|
11494
|
-
* @see {@link
|
|
11516
|
+
* @see {@link removeOverride} - To remove a single override
|
|
11495
11517
|
* @see {@link dispose} - To completely remove the property block and clean up resources
|
|
11496
11518
|
*/
|
|
11497
11519
|
clearAllOverrides(): void;
|
|
@@ -13333,7 +13355,7 @@ export declare class NestedGltf extends Component {
|
|
|
13333
13355
|
private hash;
|
|
13334
13356
|
}
|
|
13335
13357
|
|
|
13336
|
-
declare enum NEToneMappingMode {
|
|
13358
|
+
export declare enum NEToneMappingMode {
|
|
13337
13359
|
None = 0,
|
|
13338
13360
|
Neutral = 1,// Neutral tonemapper, close to Reinhard
|
|
13339
13361
|
ACES = 2,// ACES Filmic reference tonemapper (custom approximation)
|
|
@@ -16258,6 +16280,24 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
16258
16280
|
get effects(): readonly IPostProcessingEffect[];
|
|
16259
16281
|
get dirty(): boolean;
|
|
16260
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);
|
|
16261
16301
|
/** The internal PostProcessingHandler that manages the EffectComposer pipeline */
|
|
16262
16302
|
get handler(): IPostProcessingHandler | null;
|
|
16263
16303
|
/**
|
|
@@ -16728,6 +16768,13 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
16728
16768
|
|
|
16729
16769
|
export { QTrailParticle }
|
|
16730
16770
|
|
|
16771
|
+
export declare enum QualityLevel {
|
|
16772
|
+
LOW = 0,
|
|
16773
|
+
MEDIUM = 1,
|
|
16774
|
+
HIGH = 2,
|
|
16775
|
+
ULTRA = 3
|
|
16776
|
+
}
|
|
16777
|
+
|
|
16731
16778
|
declare type Quat = {
|
|
16732
16779
|
x: number;
|
|
16733
16780
|
y: number;
|
|
@@ -18907,7 +18954,7 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
18907
18954
|
}
|
|
18908
18955
|
|
|
18909
18956
|
/**See (N8AO documentation)[https://github.com/N8python/n8ao] */
|
|
18910
|
-
declare enum ScreenSpaceAmbientOcclusionN8QualityMode {
|
|
18957
|
+
export declare enum ScreenSpaceAmbientOcclusionN8QualityMode {
|
|
18911
18958
|
Performance = 0,
|
|
18912
18959
|
Low = 1,
|
|
18913
18960
|
Medium = 2,
|
|
@@ -25112,6 +25159,32 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
25112
25159
|
|
|
25113
25160
|
export declare type XRGestureName = "pinch";
|
|
25114
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
|
+
|
|
25115
25188
|
declare type XRMesh_2 = {
|
|
25116
25189
|
meshSpace: XRSpace;
|
|
25117
25190
|
lastChangedTime: number;
|