@needle-tools/engine 5.1.0-alpha.2 → 5.1.0-alpha.3
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 +35 -1
- package/components.needle.json +1 -1
- package/dist/{needle-engine.bundle-qZfVf_v-.umd.cjs → needle-engine.bundle-C-ixARur.umd.cjs} +128 -127
- package/dist/{needle-engine.bundle-B-5Q2CpC.min.js → needle-engine.bundle-CHmXdnE1.min.js} +138 -137
- package/dist/{needle-engine.bundle-dit3f1l5.js → needle-engine.bundle-DF01sSGQ.js} +7815 -7602
- package/dist/needle-engine.d.ts +125 -27
- package/dist/needle-engine.js +524 -521
- package/dist/needle-engine.min.js +1 -1
- package/dist/needle-engine.umd.cjs +1 -1
- package/lib/engine/api.d.ts +2 -0
- package/lib/engine/api.js +2 -0
- package/lib/engine/api.js.map +1 -1
- package/lib/engine/debug/debug_spatial_console.d.ts +2 -0
- package/lib/engine/debug/debug_spatial_console.js +10 -7
- package/lib/engine/debug/debug_spatial_console.js.map +1 -1
- package/lib/engine/engine_addressables.d.ts +2 -0
- package/lib/engine/engine_addressables.js +6 -3
- package/lib/engine/engine_addressables.js.map +1 -1
- package/lib/engine/engine_audio.d.ts +68 -0
- package/lib/engine/engine_audio.js +172 -0
- package/lib/engine/engine_audio.js.map +1 -1
- package/lib/engine/engine_components.js +1 -1
- package/lib/engine/engine_components.js.map +1 -1
- package/lib/engine/engine_context.d.ts +1 -1
- package/lib/engine/engine_context.js +1 -1
- package/lib/engine/engine_context.js.map +1 -1
- package/lib/engine/engine_gameobject.js +2 -2
- package/lib/engine/engine_gameobject.js.map +1 -1
- package/lib/engine/engine_init.js +13 -3
- package/lib/engine/engine_init.js.map +1 -1
- package/lib/engine/engine_input.d.ts +1 -1
- package/lib/engine/engine_input.js +1 -1
- package/lib/engine/engine_input.js.map +1 -1
- package/lib/engine/engine_license.js +1 -1
- package/lib/engine/engine_license.js.map +1 -1
- package/lib/engine/engine_mainloop_utils.js +5 -2
- package/lib/engine/engine_mainloop_utils.js.map +1 -1
- package/lib/engine/engine_networking_blob.js +1 -1
- package/lib/engine/engine_networking_blob.js.map +1 -1
- package/lib/engine/engine_scenedata.d.ts +2 -0
- package/lib/engine/engine_scenedata.js +4 -2
- package/lib/engine/engine_scenedata.js.map +1 -1
- package/lib/engine/engine_serialization_builtin_serializer.d.ts +10 -16
- package/lib/engine/engine_serialization_builtin_serializer.js +55 -41
- package/lib/engine/engine_serialization_builtin_serializer.js.map +1 -1
- package/lib/engine/physics/workers/mesh-bvh/GenerateMeshBVHWorker.js +1 -1
- package/lib/engine/physics/workers/mesh-bvh/GenerateMeshBVHWorker.js.map +1 -1
- package/lib/engine/webcomponents/needle menu/needle-menu.d.ts +1 -1
- package/lib/engine/webcomponents/needle menu/needle-menu.js +1 -1
- package/lib/engine/webcomponents/needle menu/needle-menu.js.map +1 -1
- package/lib/engine/webcomponents/needle-engine.d.ts +10 -4
- package/lib/engine/webcomponents/needle-engine.js +1 -1
- package/lib/engine/webcomponents/needle-engine.js.map +1 -1
- package/lib/engine/xr/NeedleXRSession.d.ts +3 -2
- package/lib/engine/xr/NeedleXRSession.js +50 -14
- package/lib/engine/xr/NeedleXRSession.js.map +1 -1
- package/lib/engine/xr/events.d.ts +1 -1
- package/lib/engine/xr/events.js.map +1 -1
- package/lib/engine-components/Animation.js +17 -16
- package/lib/engine-components/Animation.js.map +1 -1
- package/lib/engine-components/AnimatorController.d.ts +2 -0
- package/lib/engine-components/AnimatorController.js +4 -1
- package/lib/engine-components/AnimatorController.js.map +1 -1
- package/lib/engine-components/AudioSource.d.ts +19 -3
- package/lib/engine-components/AudioSource.js +121 -68
- package/lib/engine-components/AudioSource.js.map +1 -1
- package/lib/engine-components/DragControls.d.ts +7 -0
- package/lib/engine-components/DragControls.js +19 -0
- package/lib/engine-components/DragControls.js.map +1 -1
- package/lib/engine-components/Networking.d.ts +1 -1
- package/lib/engine-components/Networking.js +1 -1
- package/lib/engine-components/OrbitControls.js +16 -11
- package/lib/engine-components/OrbitControls.js.map +1 -1
- package/lib/engine-components/ReflectionProbe.js +2 -0
- package/lib/engine-components/ReflectionProbe.js.map +1 -1
- package/lib/engine-components/SeeThrough.js +2 -2
- package/lib/engine-components/SeeThrough.js.map +1 -1
- package/lib/engine-components/api.d.ts +1 -1
- package/lib/engine-components/api.js +1 -1
- package/lib/engine-components/api.js.map +1 -1
- package/lib/engine-components/postprocessing/Effects/Tonemapping.utils.d.ts +1 -1
- package/lib/engine-components/postprocessing/VolumeParameter.d.ts +2 -0
- package/lib/engine-components/postprocessing/VolumeParameter.js +4 -1
- package/lib/engine-components/postprocessing/VolumeParameter.js.map +1 -1
- package/lib/engine-components/ui/Canvas.d.ts +1 -1
- package/lib/engine-components/ui/Canvas.js +2 -8
- package/lib/engine-components/ui/Canvas.js.map +1 -1
- package/lib/engine-components/ui/Text.d.ts +1 -0
- package/lib/engine-components/ui/Text.js +10 -7
- package/lib/engine-components/ui/Text.js.map +1 -1
- package/lib/engine-components/web/CursorFollow.js +21 -12
- package/lib/engine-components/web/CursorFollow.js.map +1 -1
- package/lib/engine-components/webxr/WebXRImageTracking.js +4 -0
- package/lib/engine-components/webxr/WebXRImageTracking.js.map +1 -1
- package/package.json +1 -1
- package/plugins/vite/asap.js +17 -8
- package/plugins/vite/dependencies.js +29 -0
- package/plugins/vite/local-files-core.js +3 -3
- package/plugins/vite/local-files-utils.d.ts +3 -1
- package/plugins/vite/local-files-utils.js +29 -5
- package/src/engine/api.ts +3 -0
- package/src/engine/debug/debug_spatial_console.ts +10 -7
- package/src/engine/engine_addressables.ts +6 -3
- package/src/engine/engine_audio.ts +184 -0
- package/src/engine/engine_components.ts +1 -1
- package/src/engine/engine_context.ts +2 -2
- package/src/engine/engine_gameobject.ts +2 -2
- package/src/engine/engine_init.ts +13 -3
- package/src/engine/engine_input.ts +1 -1
- package/src/engine/engine_license.ts +1 -1
- package/src/engine/engine_mainloop_utils.ts +5 -2
- package/src/engine/engine_networking_blob.ts +1 -1
- package/src/engine/engine_scenedata.ts +5 -3
- package/src/engine/engine_serialization_builtin_serializer.ts +63 -46
- package/src/engine/physics/workers/mesh-bvh/GenerateMeshBVHWorker.js +1 -1
- package/src/engine/webcomponents/needle menu/needle-menu.ts +1 -1
- package/src/engine/webcomponents/needle-engine.ts +10 -4
- package/src/engine/xr/NeedleXRSession.ts +48 -13
- package/src/engine/xr/events.ts +1 -1
- package/src/engine-components/Animation.ts +19 -16
- package/src/engine-components/AnimatorController.ts +4 -1
- package/src/engine-components/AudioSource.ts +130 -79
- package/src/engine-components/DragControls.ts +18 -2
- package/src/engine-components/Networking.ts +1 -1
- package/src/engine-components/OrbitControls.ts +18 -9
- package/src/engine-components/ReflectionProbe.ts +2 -0
- package/src/engine-components/SeeThrough.ts +2 -2
- package/src/engine-components/api.ts +1 -1
- package/src/engine-components/postprocessing/VolumeParameter.ts +4 -1
- package/src/engine-components/ui/Canvas.ts +2 -8
- package/src/engine-components/ui/Text.ts +12 -8
- package/src/engine-components/web/CursorFollow.ts +21 -13
- package/src/engine-components/webxr/WebXRImageTracking.ts +2 -0
package/dist/needle-engine.d.ts
CHANGED
|
@@ -1472,6 +1472,75 @@ export declare class Attractor extends Component {
|
|
|
1472
1472
|
|
|
1473
1473
|
declare type AttributeChangeCallback = (value: string | null) => void;
|
|
1474
1474
|
|
|
1475
|
+
/**
|
|
1476
|
+
* Represents an audio clip that can be loaded and played independently.
|
|
1477
|
+
* The AudioClip class encapsulates the URL of the audio resource and provides
|
|
1478
|
+
* methods for playback control (play, pause, stop) and querying duration.
|
|
1479
|
+
*/
|
|
1480
|
+
export declare class AudioClip {
|
|
1481
|
+
readonly url: string;
|
|
1482
|
+
/**
|
|
1483
|
+
* Creates a new AudioClip instance with the specified URL.
|
|
1484
|
+
* @param url The URL of the audio resource to load. This can be a path to an audio file or a MediaStream URL.
|
|
1485
|
+
*/
|
|
1486
|
+
constructor(url: string);
|
|
1487
|
+
/** Whether the clip is currently playing.
|
|
1488
|
+
* @returns `true` if the clip is actively playing audio.
|
|
1489
|
+
*/
|
|
1490
|
+
get isPlaying(): boolean;
|
|
1491
|
+
/**
|
|
1492
|
+
* The total duration of the audio clip in seconds.
|
|
1493
|
+
* Loads the audio metadata if not already available.
|
|
1494
|
+
* @returns A promise that resolves with the duration in seconds.
|
|
1495
|
+
*/
|
|
1496
|
+
getDuration(): Promise<number>;
|
|
1497
|
+
/**
|
|
1498
|
+
* Plays the audio clip from the current position.
|
|
1499
|
+
* @returns A promise that resolves when playback finishes, or rejects on error.
|
|
1500
|
+
* If the clip is looping, the promise will never resolve on its own – call {@link stop} or {@link pause} to end playback.
|
|
1501
|
+
*/
|
|
1502
|
+
play(): Promise<void>;
|
|
1503
|
+
/**
|
|
1504
|
+
* Pauses playback at the current position.
|
|
1505
|
+
* Call {@link play} to resume.
|
|
1506
|
+
*/
|
|
1507
|
+
pause(): void;
|
|
1508
|
+
/**
|
|
1509
|
+
* Stops playback and resets the position to the beginning.
|
|
1510
|
+
*/
|
|
1511
|
+
stop(): void;
|
|
1512
|
+
/** Whether the clip should loop when reaching the end. */
|
|
1513
|
+
get loop(): boolean;
|
|
1514
|
+
set loop(value: boolean);
|
|
1515
|
+
/** Playback volume from 0 (silent) to 1 (full). */
|
|
1516
|
+
get volume(): number;
|
|
1517
|
+
set volume(value: number);
|
|
1518
|
+
/** Current playback position in seconds. */
|
|
1519
|
+
get currentTime(): number;
|
|
1520
|
+
set currentTime(value: number);
|
|
1521
|
+
/** Normalized playback progress from 0 to 1.
|
|
1522
|
+
* @returns The current playback position as a value between 0 and 1, or 0 if the duration is unknown.
|
|
1523
|
+
*/
|
|
1524
|
+
get progress(): number;
|
|
1525
|
+
/**
|
|
1526
|
+
* Seeks to a normalized position (0–1) in the clip.
|
|
1527
|
+
* @param position A value between 0 (start) and 1 (end).
|
|
1528
|
+
*/
|
|
1529
|
+
seek(position: number): void;
|
|
1530
|
+
/** The underlying HTMLAudioElement, or `undefined` if not yet created.
|
|
1531
|
+
* Use this to connect the element to the Web Audio API via `createMediaElementSource()`.
|
|
1532
|
+
* @returns The HTMLAudioElement if the clip has been loaded or played, otherwise `undefined`.
|
|
1533
|
+
*/
|
|
1534
|
+
get audioElement(): HTMLAudioElement | undefined;
|
|
1535
|
+
private _audioElement?;
|
|
1536
|
+
private _duration?;
|
|
1537
|
+
private _loadPromise?;
|
|
1538
|
+
private _loop;
|
|
1539
|
+
private _volume;
|
|
1540
|
+
/** Lazily creates and loads the shared HTMLAudioElement. */
|
|
1541
|
+
private ensureAudioElement;
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1475
1544
|
/**
|
|
1476
1545
|
* @category Animation and Sequencing
|
|
1477
1546
|
* @see {@link PlayableDirector} for the main component to control timelines in Needle Engine.
|
|
@@ -1627,9 +1696,10 @@ export declare class AudioSource extends Component {
|
|
|
1627
1696
|
*/
|
|
1628
1697
|
get isPlaying(): boolean;
|
|
1629
1698
|
/**
|
|
1630
|
-
* The total duration of the
|
|
1699
|
+
* The total duration of the currently loaded audio clip in seconds.
|
|
1631
1700
|
*
|
|
1632
1701
|
* @returns Duration in seconds or undefined if no clip is loaded
|
|
1702
|
+
* @remarks For MediaStream clips, duration is not directly available and will return undefined. If the audio clip has not started loading or is still loading, duration may also be undefined until the audio buffer is ready.
|
|
1633
1703
|
*/
|
|
1634
1704
|
get duration(): number | undefined;
|
|
1635
1705
|
/**
|
|
@@ -1654,7 +1724,8 @@ export declare class AudioSource extends Component {
|
|
|
1654
1724
|
/**
|
|
1655
1725
|
* Controls how the audio is positioned in space.
|
|
1656
1726
|
* Values range from 0 (2D, non-positional) to 1 (fully 3D positioned).
|
|
1657
|
-
*
|
|
1727
|
+
* Internally uses a dual-path audio graph to crossfade between a spatialized (PannerNode)
|
|
1728
|
+
* and a non-spatialized (direct) signal path.
|
|
1658
1729
|
*/
|
|
1659
1730
|
get spatialBlend(): number;
|
|
1660
1731
|
set spatialBlend(val: number);
|
|
@@ -1702,7 +1773,11 @@ export declare class AudioSource extends Component {
|
|
|
1702
1773
|
private audioLoader;
|
|
1703
1774
|
private shouldPlay;
|
|
1704
1775
|
private _lastClipStartedLoading;
|
|
1776
|
+
private _loadedClip;
|
|
1705
1777
|
private _audioElement;
|
|
1778
|
+
private _entryNode;
|
|
1779
|
+
private _spatialGain;
|
|
1780
|
+
private _bypassGain;
|
|
1706
1781
|
/**
|
|
1707
1782
|
* Returns the underlying {@link PositionalAudio} object, creating it if necessary.
|
|
1708
1783
|
* The audio source needs a user interaction to be initialized due to browser autoplay policies.
|
|
@@ -1730,6 +1805,15 @@ export declare class AudioSource extends Component {
|
|
|
1730
1805
|
private onApplicationMuteChanged;
|
|
1731
1806
|
private createAudio;
|
|
1732
1807
|
private __onAllowAudioCallback;
|
|
1808
|
+
/**
|
|
1809
|
+
* Sets up the dual-path audio graph for spatial blend crossfading.
|
|
1810
|
+
* Creates two parallel signal paths from source to output:
|
|
1811
|
+
* - 3D path: entry → panner → spatialGain → gain (spatialized)
|
|
1812
|
+
* - 2D path: entry → bypassGain → gain (non-spatialized)
|
|
1813
|
+
*/
|
|
1814
|
+
private setupSpatialBlendNodes;
|
|
1815
|
+
/** Updates the spatial/bypass gain values based on the current spatialBlend. */
|
|
1816
|
+
private updateSpatialBlendGains;
|
|
1733
1817
|
private applySpatialDistanceSettings;
|
|
1734
1818
|
private onNewClip;
|
|
1735
1819
|
/**
|
|
@@ -1737,8 +1821,9 @@ export declare class AudioSource extends Component {
|
|
|
1737
1821
|
* If no argument is provided, plays the currently assigned clip.
|
|
1738
1822
|
*
|
|
1739
1823
|
* @param clip - Optional audio clip or {@link MediaStream} to play
|
|
1824
|
+
* @returns A promise that resolves when playback starts successfully, or rejects on error
|
|
1740
1825
|
*/
|
|
1741
|
-
play(clip?: string | MediaStream | undefined):
|
|
1826
|
+
play(clip?: string | MediaStream | undefined): Promise<boolean>;
|
|
1742
1827
|
/**
|
|
1743
1828
|
* Pauses audio playback while maintaining the current position.
|
|
1744
1829
|
* Use play() to resume from the paused position.
|
|
@@ -2946,7 +3031,7 @@ export declare class Canvas extends UIRootComponent implements ICanvas {
|
|
|
2946
3031
|
private _receivers;
|
|
2947
3032
|
registerEventReceiver(receiver: ICanvasEventReceiver): void;
|
|
2948
3033
|
unregisterEventReceiver(receiver: ICanvasEventReceiver): void;
|
|
2949
|
-
onEnterXR(args: NeedleXREventArgs):
|
|
3034
|
+
onEnterXR(args: NeedleXREventArgs): void;
|
|
2950
3035
|
onLeaveXR(args: NeedleXREventArgs): void;
|
|
2951
3036
|
onBeforeRenderRoutine: () => void;
|
|
2952
3037
|
onAfterRenderRoutine: () => void;
|
|
@@ -3623,7 +3708,7 @@ declare class ColorSerializer extends TypeSerializer {
|
|
|
3623
3708
|
onSerialize(data: any): any | void;
|
|
3624
3709
|
}
|
|
3625
3710
|
|
|
3626
|
-
export declare
|
|
3711
|
+
export declare let colorSerializer: ColorSerializer;
|
|
3627
3712
|
|
|
3628
3713
|
/**
|
|
3629
3714
|
* Utility method to check if two materials were created from the same glTF material
|
|
@@ -4097,7 +4182,7 @@ declare class ComponentSerializer extends TypeSerializer {
|
|
|
4097
4182
|
findObjectForGuid(guid: string, root: Object3D): any;
|
|
4098
4183
|
}
|
|
4099
4184
|
|
|
4100
|
-
export declare
|
|
4185
|
+
export declare let componentSerializer: ComponentSerializer;
|
|
4101
4186
|
|
|
4102
4187
|
declare type ComponentType = "button" | "thumbstick" | "squeeze" | "touchpad";
|
|
4103
4188
|
|
|
@@ -5480,6 +5565,12 @@ export declare class DragControls extends Component implements IPointerEventHand
|
|
|
5480
5565
|
* providing visual feedback about the object's position relative to surfaces below it.
|
|
5481
5566
|
*/
|
|
5482
5567
|
showGizmo: boolean;
|
|
5568
|
+
/** Invoked once when a drag begins (after the minimum drag distance threshold is met). */
|
|
5569
|
+
dragStarted: EventList;
|
|
5570
|
+
/** Invoked every frame while the object is being dragged. */
|
|
5571
|
+
dragUpdated: EventList;
|
|
5572
|
+
/** Invoked once when the last pointer is released and the drag ends. */
|
|
5573
|
+
dragEnded: EventList;
|
|
5483
5574
|
/**
|
|
5484
5575
|
* Returns the object currently being dragged by this DragControls component, if any.
|
|
5485
5576
|
* @returns The object being dragged or null if no object is currently dragged
|
|
@@ -5920,19 +6011,6 @@ export declare class EnvironmentScene extends Scene {
|
|
|
5920
6011
|
createAreaLightMaterial(intensity: number): MeshBasicMaterial;
|
|
5921
6012
|
}
|
|
5922
6013
|
|
|
5923
|
-
export declare const euler: EulerSerializer;
|
|
5924
|
-
|
|
5925
|
-
declare class EulerSerializer extends TypeSerializer {
|
|
5926
|
-
constructor();
|
|
5927
|
-
onDeserialize(data: any, _context: SerializationContext): Euler | undefined;
|
|
5928
|
-
onSerialize(data: any, _context: SerializationContext): {
|
|
5929
|
-
x: any;
|
|
5930
|
-
y: any;
|
|
5931
|
-
z: any;
|
|
5932
|
-
order: any;
|
|
5933
|
-
};
|
|
5934
|
-
}
|
|
5935
|
-
|
|
5936
6014
|
/**
|
|
5937
6015
|
* EventList manages a list of callbacks that can be invoked together.
|
|
5938
6016
|
* Used for Unity-style events that can be configured in the editor (Unity or Blender).
|
|
@@ -6065,7 +6143,7 @@ declare class EventListSerializer extends TypeSerializer {
|
|
|
6065
6143
|
onDeserialize(data: EventListData, context: SerializationContext): EventList<any> | undefined | null;
|
|
6066
6144
|
}
|
|
6067
6145
|
|
|
6068
|
-
export declare
|
|
6146
|
+
export declare let eventListSerializer: EventListSerializer;
|
|
6069
6147
|
|
|
6070
6148
|
/**
|
|
6071
6149
|
* [EventSystem](https://engine.needle.tools/docs/api/EventSystem) is responsible for managing and dispatching input events to UI components within the scene.
|
|
@@ -8457,10 +8535,20 @@ export declare class InheritVelocityModule {
|
|
|
8457
8535
|
applyCurrent(vel: Vector3 | Vector3_2, t01: number, lerpFactor: number): void;
|
|
8458
8536
|
}
|
|
8459
8537
|
|
|
8538
|
+
/* Excluded from this release type: initAddressableSerializers */
|
|
8539
|
+
|
|
8540
|
+
/** Register all builtin serializers and prototype patches.
|
|
8541
|
+
* Must be called from {@link initEngine} so the registrations survive tree-shaking
|
|
8542
|
+
* when the package declares `sideEffects: false`.
|
|
8543
|
+
*/
|
|
8544
|
+
export declare function initBuiltinSerializers(): void;
|
|
8545
|
+
|
|
8460
8546
|
/** Register the Rapier physics backend. Called from {@link initEngine}
|
|
8461
8547
|
* to ensure it runs regardless of tree-shaking. */
|
|
8462
8548
|
export declare function initPhysics(): void;
|
|
8463
8549
|
|
|
8550
|
+
/* Excluded from this release type: initVolumeParameterSerializer */
|
|
8551
|
+
|
|
8464
8552
|
/**
|
|
8465
8553
|
* Handles all input events including mouse, touch, keyboard, and XR controllers.
|
|
8466
8554
|
* Access via `this.context.input` from any component.
|
|
@@ -11051,6 +11139,8 @@ export declare type MouseButtonName = "left" | "right" | "middle";
|
|
|
11051
11139
|
* Safe to import at module level, including in SSR environments.
|
|
11052
11140
|
* For pages with multiple `<needle-engine>` elements, use `ctx` directly instead.
|
|
11053
11141
|
*
|
|
11142
|
+
* @experimental This API may change in future releases.
|
|
11143
|
+
*
|
|
11054
11144
|
* @example
|
|
11055
11145
|
* import { needle } from "@needle-tools/engine";
|
|
11056
11146
|
* button.onclick = () => {
|
|
@@ -11207,11 +11297,17 @@ export declare interface NeedleEngineAttributes {
|
|
|
11207
11297
|
'hash': string;
|
|
11208
11298
|
/** Set to automatically add OrbitControls to the loaded scene. */
|
|
11209
11299
|
'camera-controls': string;
|
|
11210
|
-
/** Override the default
|
|
11300
|
+
/** Override the default Draco decoder/decompressor path. Can be a URL or a local path to a directory containing the Draco decoder files.
|
|
11301
|
+
* @default "https://www.gstatic.com/draco/versioned/decoders/1.5.7/"
|
|
11302
|
+
* @example <needle-engine dracoDecoderPath="./decoders/draco/"></needle-engine>
|
|
11303
|
+
*/
|
|
11211
11304
|
'dracoDecoderPath': string;
|
|
11212
|
-
/** Override the default
|
|
11305
|
+
/** Override the default Draco decoder type. */
|
|
11213
11306
|
'dracoDecoderType': 'wasm' | 'js';
|
|
11214
|
-
/** Override the default KTX2 transcoder/decoder path.
|
|
11307
|
+
/** Override the default KTX2 transcoder/decoder path. Can be a URL or a local path to a directory containing the KTX2 transcoder files.
|
|
11308
|
+
* @default "https://cdn.needle.tools/static/three/0.179.1/basis2/"
|
|
11309
|
+
* @example <needle-engine ktx2DecoderPath="./decoders/ktx2/"></needle-engine>
|
|
11310
|
+
*/
|
|
11215
11311
|
'ktx2DecoderPath': string;
|
|
11216
11312
|
/** Prevent context from being disposed when element is removed from DOM. */
|
|
11217
11313
|
'keep-alive': 'true' | 'false';
|
|
@@ -12165,8 +12261,7 @@ export declare class NeedleXRSession implements INeedleXRSession {
|
|
|
12165
12261
|
get referenceSpace(): XRSpace | null;
|
|
12166
12262
|
/** @returns the XRFrame `viewerpose` using the xr `referenceSpace` */
|
|
12167
12263
|
get viewerPose(): XRViewerPose | undefined;
|
|
12168
|
-
/** @returns `true` if any image is currently being tracked */
|
|
12169
|
-
/** returns true if images are currently being tracked */
|
|
12264
|
+
/** @returns `true` if any image is currently being tracked or emulated */
|
|
12170
12265
|
get isTrackingImages(): boolean;
|
|
12171
12266
|
/** The currently active XR rig */
|
|
12172
12267
|
get rig(): IXRRig | null;
|
|
@@ -12212,6 +12307,8 @@ export declare class NeedleXRSession implements INeedleXRSession {
|
|
|
12212
12307
|
private readonly _xr_update_scripts;
|
|
12213
12308
|
/** scripts that are in the scene but inactive (e.g. disabled parent gameObject) */
|
|
12214
12309
|
private readonly _inactive_scripts;
|
|
12310
|
+
/** tracks scripts that have received onEnterXR — prevents spurious onLeaveXR calls */
|
|
12311
|
+
private readonly _scripts_in_xr;
|
|
12215
12312
|
private readonly _controllerAdded;
|
|
12216
12313
|
private readonly _controllerRemoved;
|
|
12217
12314
|
private readonly _originalCameraWorldPosition?;
|
|
@@ -12831,7 +12928,7 @@ export declare interface NetworkEventMap {
|
|
|
12831
12928
|
* @see {@link RoomEvents} for room lifecycle events
|
|
12832
12929
|
* @see {@link isLocalNetwork} for local network detection
|
|
12833
12930
|
* @link https://engine.needle.tools/docs/how-to-guides/networking/
|
|
12834
|
-
* @summary
|
|
12931
|
+
* @summary Configures the websocket server URL for multiplayer networking
|
|
12835
12932
|
* @category Networking
|
|
12836
12933
|
* @group Components
|
|
12837
12934
|
*/
|
|
@@ -13052,7 +13149,7 @@ declare class ObjectSerializer extends TypeSerializer {
|
|
|
13052
13149
|
onDeserialize(data: ObjectData | string | null, context: SerializationContext): Object3D<Object3DEventMap> | Component | null | undefined;
|
|
13053
13150
|
}
|
|
13054
13151
|
|
|
13055
|
-
export declare
|
|
13152
|
+
export declare let objectSerializer: ObjectSerializer;
|
|
13056
13153
|
|
|
13057
13154
|
declare type ObjectToNodeMap = {
|
|
13058
13155
|
[uuid: string]: number;
|
|
@@ -20409,6 +20506,7 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
20409
20506
|
set font(val: string | null);
|
|
20410
20507
|
get font(): string | null;
|
|
20411
20508
|
private _font;
|
|
20509
|
+
private _assignedAtRuntime;
|
|
20412
20510
|
/**
|
|
20413
20511
|
* Whether to support basic rich text tags in the `text` property. Supported tags include `<b>`, `<i>`, and `<color=hex>`. For example: `Hello <b>World</b>` or `Score: <color=#ff0000>100</color>`
|
|
20414
20512
|
* @default false
|