@needle-tools/engine 4.17.0-next.36dcae2 → 4.17.0-next.4989636
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/components.needle.json +1 -1
- package/dist/gltf-progressive-BryRjllq.min.js +10 -0
- package/dist/gltf-progressive-Cl167Vjx.js +1537 -0
- package/dist/gltf-progressive-DJBMx-zB.umd.cjs +10 -0
- package/dist/gltf-progressive.worker-BqODMeeW.js +23 -0
- package/dist/needle-engine.bundle-BTIpdDE9.umd.cjs +1654 -0
- package/dist/{needle-engine.bundle-CQFEuAQB.js → needle-engine.bundle-CH2ZOagS.js} +35829 -35882
- package/dist/needle-engine.bundle-D5h7xxUH.min.js +1654 -0
- package/dist/needle-engine.d.ts +105 -39
- package/dist/needle-engine.js +608 -607
- package/dist/needle-engine.min.js +1 -1
- package/dist/needle-engine.umd.cjs +1 -1
- package/dist/three-examples.js +7815 -6828
- package/dist/three-examples.min.js +17 -15
- package/dist/three-examples.umd.cjs +17 -15
- package/dist/three.js +15994 -24892
- package/dist/three.min.js +214 -214
- package/dist/three.umd.cjs +208 -208
- package/dist/vendor-CntUvmJu.umd.cjs +1116 -0
- package/dist/{vendor-BPp9F5vR.min.js → vendor-DPbfJJ4d.min.js} +94 -94
- package/dist/{vendor-CQMI3jTS.js → vendor-vHLk8sXu.js} +8558 -8516
- package/lib/engine/analytics/index.js.map +1 -1
- package/lib/engine/codegen/register_types.d.ts +1 -1
- package/lib/engine/codegen/register_types.js +159 -157
- package/lib/engine/codegen/register_types.js.map +1 -1
- package/lib/engine/debug/debug.d.ts +1 -4
- package/lib/engine/debug/debug.js +1 -25
- package/lib/engine/debug/debug.js.map +1 -1
- package/lib/engine/debug/debug_environment.d.ts +4 -0
- package/lib/engine/debug/debug_environment.js +26 -0
- package/lib/engine/debug/debug_environment.js.map +1 -0
- package/lib/engine/debug/debug_overlay.js +2 -1
- package/lib/engine/debug/debug_overlay.js.map +1 -1
- package/lib/engine/debug/debug_spatial_console.js +1 -1
- package/lib/engine/debug/debug_spatial_console.js.map +1 -1
- package/lib/engine/engine_audio.js +0 -1
- package/lib/engine/engine_audio.js.map +1 -1
- package/lib/engine/engine_components.js +6 -3
- package/lib/engine/engine_components.js.map +1 -1
- package/lib/engine/engine_gltf_builtin_components.d.ts +0 -1
- package/lib/engine/engine_gltf_builtin_components.js +5 -4
- package/lib/engine/engine_gltf_builtin_components.js.map +1 -1
- package/lib/engine/engine_init.d.ts +10 -0
- package/lib/engine/engine_init.js +44 -0
- package/lib/engine/engine_init.js.map +1 -0
- package/lib/engine/engine_loaders.d.ts +2 -0
- package/lib/engine/engine_loaders.js +2 -1
- package/lib/engine/engine_loaders.js.map +1 -1
- package/lib/engine/engine_modules.d.ts +8 -0
- package/lib/engine/engine_modules.js +1 -0
- package/lib/engine/engine_modules.js.map +1 -1
- package/lib/engine/engine_networking.d.ts +2 -1
- package/lib/engine/engine_networking.js +3 -1
- package/lib/engine/engine_networking.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_networking_peer.d.ts +2 -2
- package/lib/engine/engine_networking_peer.js +7 -6
- package/lib/engine/engine_networking_peer.js.map +1 -1
- package/lib/engine/engine_networking_streams.d.ts +2 -1
- package/lib/engine/engine_networking_streams.js +2 -2
- package/lib/engine/engine_networking_streams.js.map +1 -1
- package/lib/engine/engine_physics_rapier.d.ts +2 -0
- package/lib/engine/engine_physics_rapier.js +35 -4
- package/lib/engine/engine_physics_rapier.js.map +1 -1
- package/lib/engine/engine_shims.d.ts +1 -0
- package/lib/engine/engine_shims.js +20 -19
- package/lib/engine/engine_shims.js.map +1 -1
- package/lib/engine/engine_tonemapping.js +0 -1
- package/lib/engine/engine_tonemapping.js.map +1 -1
- package/lib/engine/engine_types.d.ts +8 -0
- package/lib/engine/engine_typestore.d.ts +11 -0
- package/lib/engine/engine_typestore.js +29 -0
- package/lib/engine/engine_typestore.js.map +1 -1
- package/lib/engine/extensions/NEEDLE_animator_controller_model.d.ts +1 -1
- package/lib/engine/js-extensions/Camera.d.ts +1 -1
- package/lib/engine/js-extensions/Camera.js +43 -37
- package/lib/engine/js-extensions/Camera.js.map +1 -1
- package/lib/engine/js-extensions/Layers.js +0 -1
- package/lib/engine/js-extensions/Layers.js.map +1 -1
- package/lib/engine/js-extensions/Object3D.d.ts +1 -0
- package/lib/engine/js-extensions/Object3D.js +173 -167
- package/lib/engine/js-extensions/Object3D.js.map +1 -1
- package/lib/engine/js-extensions/Vector.d.ts +1 -0
- package/lib/engine/js-extensions/Vector.js +10 -4
- package/lib/engine/js-extensions/Vector.js.map +1 -1
- package/lib/engine/js-extensions/index.d.ts +0 -3
- package/lib/engine/js-extensions/index.js +0 -2
- package/lib/engine/js-extensions/index.js.map +1 -1
- package/lib/engine/webcomponents/WebXRButtons.js +11 -13
- package/lib/engine/webcomponents/WebXRButtons.js.map +1 -1
- package/lib/engine/webcomponents/buttons.js +4 -4
- package/lib/engine/webcomponents/buttons.js.map +1 -1
- package/lib/engine/webcomponents/font-urls.d.ts +2 -0
- package/lib/engine/webcomponents/font-urls.js +8 -0
- package/lib/engine/webcomponents/font-urls.js.map +1 -0
- package/lib/engine/webcomponents/fonts.d.ts +2 -2
- package/lib/engine/webcomponents/fonts.js +12 -7
- package/lib/engine/webcomponents/fonts.js.map +1 -1
- package/lib/engine/webcomponents/init.d.ts +4 -0
- package/lib/engine/webcomponents/init.js +20 -0
- package/lib/engine/webcomponents/init.js.map +1 -0
- package/lib/engine/webcomponents/logo-element.js +2 -2
- package/lib/engine/webcomponents/logo-element.js.map +1 -1
- package/lib/engine/webcomponents/needle menu/menu-priority.d.ts +10 -0
- package/lib/engine/webcomponents/needle menu/menu-priority.js +21 -0
- package/lib/engine/webcomponents/needle menu/menu-priority.js.map +1 -0
- package/lib/engine/webcomponents/needle menu/needle-menu-spatial.d.ts +1 -1
- package/lib/engine/webcomponents/needle menu/needle-menu.d.ts +1 -1
- package/lib/engine/webcomponents/needle menu/needle-menu.js +7 -11
- package/lib/engine/webcomponents/needle menu/needle-menu.js.map +1 -1
- package/lib/engine/webcomponents/needle-button.js +0 -3
- package/lib/engine/webcomponents/needle-button.js.map +1 -1
- package/lib/engine/webcomponents/needle-engine.js +4 -10
- package/lib/engine/webcomponents/needle-engine.js.map +1 -1
- package/lib/engine/webcomponents/quicklook-handler.d.ts +29 -0
- package/lib/engine/webcomponents/quicklook-handler.js +21 -0
- package/lib/engine/webcomponents/quicklook-handler.js.map +1 -0
- package/lib/engine/xr/NeedleXRSession.d.ts +1 -0
- package/lib/engine/xr/NeedleXRSession.js +1 -0
- package/lib/engine/xr/NeedleXRSession.js.map +1 -1
- package/lib/engine-components/AnimationUtilsAutoplay.d.ts +1 -1
- package/lib/engine-components/AnimationUtilsAutoplay.js +29 -23
- package/lib/engine-components/AnimationUtilsAutoplay.js.map +1 -1
- package/lib/engine-components/Animator.d.ts +1 -1
- package/lib/engine-components/AnimatorController.d.ts +1 -1
- package/lib/engine-components/CameraUtils.d.ts +1 -1
- package/lib/engine-components/CameraUtils.js +79 -73
- package/lib/engine-components/CameraUtils.js.map +1 -1
- package/lib/engine-components/Collider.d.ts +2 -0
- package/lib/engine-components/Collider.js +25 -3
- package/lib/engine-components/Collider.js.map +1 -1
- package/lib/engine-components/LookAtConstraint.d.ts +34 -1
- package/lib/engine-components/LookAtConstraint.js +54 -1
- package/lib/engine-components/LookAtConstraint.js.map +1 -1
- package/lib/engine-components/Networking.d.ts +2 -1
- package/lib/engine-components/Networking.js +2 -1
- package/lib/engine-components/Networking.js.map +1 -1
- package/lib/engine-components/SceneSwitcher.d.ts +1 -0
- package/lib/engine-components/SceneSwitcher.js +3 -1
- package/lib/engine-components/SceneSwitcher.js.map +1 -1
- package/lib/engine-components/Skybox.d.ts +1 -0
- package/lib/engine-components/Skybox.js +4 -2
- package/lib/engine-components/Skybox.js.map +1 -1
- package/lib/engine-components/SyncedRoom.d.ts +1 -0
- package/lib/engine-components/SyncedRoom.js +1 -0
- package/lib/engine-components/SyncedRoom.js.map +1 -1
- package/lib/engine-components/api.d.ts +5 -8
- package/lib/engine-components/api.js +4 -7
- package/lib/engine-components/api.js.map +1 -1
- package/lib/engine-components/export/usdz/USDZExporter.js +8 -0
- package/lib/engine-components/export/usdz/USDZExporter.js.map +1 -1
- package/lib/engine-components/postprocessing/PostProcessingHandler.js +18 -5
- package/lib/engine-components/postprocessing/PostProcessingHandler.js.map +1 -1
- package/lib/engine-components/postprocessing/utils.js +7 -2
- package/lib/engine-components/postprocessing/utils.js.map +1 -1
- package/lib/engine-components/timeline/TimelineTracks.d.ts +1 -1
- package/lib/engine-components/timeline/TimelineTracks.js +4 -2
- package/lib/engine-components/timeline/TimelineTracks.js.map +1 -1
- package/lib/engine-components/web/ScrollFollow.d.ts +0 -8
- package/lib/engine-components/webxr/WebXR.d.ts +15 -2
- package/lib/engine-components/webxr/WebXR.js +15 -2
- package/lib/engine-components/webxr/WebXR.js.map +1 -1
- package/lib/needle-engine.d.ts +0 -1
- package/lib/needle-engine.js +2 -1
- package/lib/needle-engine.js.map +1 -1
- package/package.json +11 -3
- package/plugins/vite/ai.d.ts +11 -7
- package/plugins/vite/ai.js +21 -16
- package/plugins/vite/asap.js +42 -2
- package/plugins/vite/dependencies.js +110 -16
- package/plugins/vite/index.d.ts +1 -0
- package/plugins/vite/index.js +4 -0
- package/plugins/vite/treeshake.d.ts +11 -0
- package/plugins/vite/treeshake.js +216 -0
- package/src/engine/analytics/index.ts +1 -1
- package/src/engine/codegen/register_types.ts +159 -157
- package/src/engine/debug/debug.ts +1 -26
- package/src/engine/debug/debug_environment.ts +26 -0
- package/src/engine/debug/debug_overlay.ts +2 -1
- package/src/engine/debug/debug_spatial_console.ts +1 -1
- package/src/engine/engine_audio.ts +1 -2
- package/src/engine/engine_components.ts +6 -3
- package/src/engine/engine_gltf_builtin_components.ts +4 -5
- package/src/engine/engine_init.ts +45 -0
- package/src/engine/engine_loaders.ts +2 -1
- package/src/engine/engine_modules.ts +3 -0
- package/src/engine/engine_networking.ts +5 -1
- package/src/engine/engine_networking_blob.ts +3 -3
- package/src/engine/engine_networking_peer.ts +8 -6
- package/src/engine/engine_networking_streams.ts +4 -3
- package/src/engine/engine_physics_rapier.ts +37 -4
- package/src/engine/engine_shims.ts +22 -20
- package/src/engine/engine_tonemapping.ts +0 -1
- package/src/engine/engine_types.ts +9 -0
- package/src/engine/engine_typestore.ts +29 -0
- package/src/engine/extensions/NEEDLE_animator_controller_model.ts +1 -1
- package/src/engine/js-extensions/Camera.ts +40 -33
- package/src/engine/js-extensions/Layers.ts +1 -2
- package/src/engine/js-extensions/Object3D.ts +174 -170
- package/src/engine/js-extensions/Vector.ts +11 -4
- package/src/engine/js-extensions/index.ts +0 -3
- package/src/engine/webcomponents/WebXRButtons.ts +12 -13
- package/src/engine/webcomponents/buttons.ts +4 -4
- package/src/engine/webcomponents/font-urls.js +9 -0
- package/src/engine/webcomponents/fonts.ts +12 -7
- package/src/engine/webcomponents/init.ts +23 -0
- package/src/engine/webcomponents/logo-element.ts +2 -2
- package/src/engine/webcomponents/needle menu/menu-priority.ts +20 -0
- package/src/engine/webcomponents/needle menu/needle-menu.ts +8 -13
- package/src/engine/webcomponents/needle-button.ts +0 -3
- package/src/engine/webcomponents/needle-engine.ts +4 -13
- package/src/engine/webcomponents/quicklook-handler.ts +37 -0
- package/src/engine/xr/NeedleXRSession.ts +2 -1
- package/src/engine-components/AnimationUtilsAutoplay.ts +8 -3
- package/src/engine-components/AnimatorController.ts +1 -1
- package/src/engine-components/CameraUtils.ts +15 -8
- package/src/engine-components/Collider.ts +24 -3
- package/src/engine-components/LookAtConstraint.ts +46 -1
- package/src/engine-components/Networking.ts +3 -1
- package/src/engine-components/SceneSwitcher.ts +3 -1
- package/src/engine-components/Skybox.ts +4 -2
- package/src/engine-components/SyncedRoom.ts +2 -0
- package/src/engine-components/api.ts +5 -10
- package/src/engine-components/export/usdz/USDZExporter.ts +9 -0
- package/src/engine-components/postprocessing/PostProcessingHandler.ts +19 -7
- package/src/engine-components/postprocessing/utils.ts +7 -2
- package/src/engine-components/timeline/TimelineTracks.ts +6 -2
- package/src/engine-components/web/ScrollFollow.ts +0 -2
- package/src/engine-components/webxr/WebXR.ts +15 -2
- package/src/needle-engine.ts +2 -1
- package/dist/gltf-progressive-BBIL1q1j.umd.cjs +0 -4022
- package/dist/gltf-progressive-BbHl9z0v.js +0 -28272
- package/dist/gltf-progressive-Clq_N7Zx.min.js +0 -4022
- package/dist/gltf-progressive.worker-CCrD-Ycm.js +0 -3
- package/dist/needle-engine.bundle-CrqNZdEN.umd.cjs +0 -1657
- package/dist/needle-engine.bundle-DyVf6QdN.min.js +0 -1657
- package/dist/vendor-CipoooTV.umd.cjs +0 -1116
package/dist/needle-engine.d.ts
CHANGED
|
@@ -18,10 +18,10 @@ import { default as default_3 } from 'three/src/materials/nodes/MeshPhysicalNode
|
|
|
18
18
|
import { DepthOfFieldEffect } from 'postprocessing';
|
|
19
19
|
import { DepthTexture } from 'three';
|
|
20
20
|
import { dimforgeRapier3dCompat } from '@dimforge/rapier3d-compat';
|
|
21
|
-
import { DocumentedOptions } from 'three-mesh-ui/build/types/core/elements/MeshUIBaseElement.js';
|
|
21
|
+
import { DocumentedOptions } from '../../../node_modules/three-mesh-ui/build/types/core/elements/MeshUIBaseElement.js';
|
|
22
22
|
import { Effect } from 'postprocessing';
|
|
23
23
|
import { EffectComposer } from 'postprocessing';
|
|
24
|
-
import { EffectComposer as EffectComposer_2 } from 'three/examples/jsm/postprocessing/EffectComposer.js';
|
|
24
|
+
import { EffectComposer as EffectComposer_2 } from '../../node_modules/@types/three/examples/jsm/postprocessing/EffectComposer.js';
|
|
25
25
|
import { EmitterShape } from 'three.quarks';
|
|
26
26
|
import { Euler } from 'three';
|
|
27
27
|
import { EventDispatcher } from 'three';
|
|
@@ -29,14 +29,15 @@ import { Face } from 'three';
|
|
|
29
29
|
import * as fflate from 'three/examples/jsm/libs/fflate.module.js';
|
|
30
30
|
import * as flatbuffers from 'flatbuffers';
|
|
31
31
|
import { Fog as Fog_2 } from 'three';
|
|
32
|
-
import { Font } from 'three/examples/jsm/loaders/FontLoader.js';
|
|
32
|
+
import { Font } from '../../node_modules/@types/three/examples/jsm/loaders/FontLoader.js';
|
|
33
33
|
import { Frustum } from 'three';
|
|
34
|
-
import { GLTF as GLTF_2 } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
34
|
+
import { GLTF as GLTF_2 } from '../../node_modules/@types/three/examples/jsm/loaders/GLTFLoader.js';
|
|
35
|
+
import { GLTF as GLTF_3 } from '../../../node_modules/@types/three/examples/jsm/loaders/GLTFLoader.js';
|
|
36
|
+
import { GLTFExporter } from '../../../node_modules/@types/three/examples/jsm/exporters/GLTFExporter.js';
|
|
37
|
+
import { GLTFExporterOptions } from '../../../../node_modules/@types/three/examples/jsm/exporters/GLTFExporter.js';
|
|
38
|
+
import { GLTFLoader } from '../../../node_modules/@types/three/examples/jsm/loaders/GLTFLoader.js';
|
|
39
|
+
import { GLTFLoaderPlugin } from '../../../node_modules/@types/three/examples/jsm/loaders/GLTFLoader.js';
|
|
40
|
+
import { GLTFParser } from '../../../node_modules/@types/three/examples/jsm/loaders/GLTFLoader.js';
|
|
40
41
|
import { Group } from 'three';
|
|
41
42
|
import { InstancedMesh } from 'three';
|
|
42
43
|
import { Intersection } from 'three';
|
|
@@ -44,7 +45,7 @@ import { IParticleSystem as IParticleSystem_2 } from 'three.quarks';
|
|
|
44
45
|
import { KeyframeTrack } from 'three';
|
|
45
46
|
import { Layers } from 'three';
|
|
46
47
|
import { LightProbe } from 'three';
|
|
47
|
-
import { Line2 } from 'three/examples/jsm/lines/Line2.js';
|
|
48
|
+
import { Line2 } from '../../../../node_modules/@types/three/examples/jsm/lines/Line2.js';
|
|
48
49
|
import { Loader } from 'three';
|
|
49
50
|
import { LoadingManager } from 'three';
|
|
50
51
|
import { LOD_Results } from '@needle-tools/gltf-progressive';
|
|
@@ -63,11 +64,12 @@ import { needleToolsMaterialx } from '@needle-tools/materialx';
|
|
|
63
64
|
import { NormalBufferAttributes } from 'three';
|
|
64
65
|
import { Object3D } from 'three';
|
|
65
66
|
import { Object3DEventMap } from 'three';
|
|
66
|
-
import { Options } from 'three-mesh-ui/build/types/core/elements/MeshUIBaseElement.js';
|
|
67
|
-
import { OrbitControls as OrbitControls_2 } from 'three/examples/jsm/controls/OrbitControls.js';
|
|
67
|
+
import { Options } from '../../../node_modules/three-mesh-ui/build/types/core/elements/MeshUIBaseElement.js';
|
|
68
|
+
import { OrbitControls as OrbitControls_2 } from '../../node_modules/@types/three/examples/jsm/controls/OrbitControls.js';
|
|
68
69
|
import { OrthographicCamera } from 'three';
|
|
69
70
|
import { ParticleSystem as ParticleSystem_2 } from 'three.quarks';
|
|
70
71
|
import { Pass } from 'postprocessing';
|
|
72
|
+
import { peerjs } from 'peerjs';
|
|
71
73
|
import { PeerJSOption } from 'peerjs';
|
|
72
74
|
import { PerspectiveCamera } from 'three';
|
|
73
75
|
import { PositionalAudio } from 'three';
|
|
@@ -88,7 +90,7 @@ import { Sprite as Sprite_2 } from 'three';
|
|
|
88
90
|
import { SpriteMaterial } from 'three';
|
|
89
91
|
import { Texture } from 'three';
|
|
90
92
|
import * as ThreeMeshUI from 'three-mesh-ui';
|
|
91
|
-
import { TransformControls } from 'three/examples/jsm/controls/TransformControls.js';
|
|
93
|
+
import { TransformControls } from '../../node_modules/@types/three/examples/jsm/controls/TransformControls.js';
|
|
92
94
|
import { Vector2 } from 'three';
|
|
93
95
|
import { Vector2Like } from 'three';
|
|
94
96
|
import { Vector3 } from 'three';
|
|
@@ -104,8 +106,8 @@ import { WebGLRendererParameters } from 'three';
|
|
|
104
106
|
import { WebGLRenderTarget } from 'three';
|
|
105
107
|
import { WebXRArrayCamera } from 'three';
|
|
106
108
|
import { World } from '@dimforge/rapier3d-compat';
|
|
107
|
-
import { XRControllerModelFactory } from 'three/examples/jsm/webxr/XRControllerModelFactory.js';
|
|
108
|
-
import { XRHandMeshModel } from 'three/examples/jsm/webxr/XRHandMeshModel.js';
|
|
109
|
+
import { XRControllerModelFactory } from '../../../../node_modules/@types/three/examples/jsm/webxr/XRControllerModelFactory.js';
|
|
110
|
+
import { XRHandMeshModel } from '../../../../node_modules/@types/three/examples/jsm/webxr/XRHandMeshModel.js';
|
|
109
111
|
import { XRHandSpace } from 'three';
|
|
110
112
|
|
|
111
113
|
export declare const $componentName: unique symbol;
|
|
@@ -3414,6 +3416,7 @@ export declare abstract class Collider extends Component implements ICollider {
|
|
|
3414
3416
|
/* Excluded from this release type: start */
|
|
3415
3417
|
/* Excluded from this release type: onEnable */
|
|
3416
3418
|
/* Excluded from this release type: onDisable */
|
|
3419
|
+
/* Excluded from this release type: onDestroy */
|
|
3417
3420
|
/**
|
|
3418
3421
|
* Returns the underlying physics body from the physics engine.
|
|
3419
3422
|
* Only available if the component is enabled and active in the scene.
|
|
@@ -6972,7 +6975,7 @@ export declare function getParentHierarchyPath(obj: Object3D): string;
|
|
|
6972
6975
|
/** @deprecated use resolveUrl instead */
|
|
6973
6976
|
export declare function getPath(source: SourceIdentifier | undefined, uri: string): string;
|
|
6974
6977
|
|
|
6975
|
-
export declare function getPeerjsInstance(id?: string, opts?: PeerJSOption): default_2
|
|
6978
|
+
export declare function getPeerjsInstance(id?: string, opts?: PeerJSOption): Promise<default_2>;
|
|
6976
6979
|
|
|
6977
6980
|
export declare function getPeerOptions(): PeerJSOption | undefined;
|
|
6978
6981
|
|
|
@@ -9099,6 +9102,14 @@ export declare interface IPhysicsEngine {
|
|
|
9099
9102
|
* @param body The component whose physics body should be removed
|
|
9100
9103
|
*/
|
|
9101
9104
|
removeBody(body: IComponent): any;
|
|
9105
|
+
/**
|
|
9106
|
+
* Enables or disables a collider in the physics world without destroying it.
|
|
9107
|
+
* Uses Rapier's `setEnabled()` for efficient toggling instead of removing and recreating the collider.
|
|
9108
|
+
* @param collider The collider component to enable or disable
|
|
9109
|
+
* @param enabled Whether the collider should be enabled
|
|
9110
|
+
* @returns True if the collider was found and its state was changed, false otherwise
|
|
9111
|
+
*/
|
|
9112
|
+
setColliderEnabled(collider: ICollider, enabled: boolean): boolean;
|
|
9102
9113
|
/**
|
|
9103
9114
|
* Gets the physics body for a component
|
|
9104
9115
|
* @param obj The collider or rigidbody component
|
|
@@ -10004,9 +10015,41 @@ export declare class LookAt extends Component implements UsdzBehaviour {
|
|
|
10004
10015
|
}
|
|
10005
10016
|
|
|
10006
10017
|
/**
|
|
10007
|
-
* @deprecated LookAtConstraint
|
|
10018
|
+
* @deprecated LookAtConstraint will be removed in future versions. Please either use a direct object reference instead (e.g. assigning an Object3D as a look target in scripts that reply on the LookAtConstraint) or implement the LookAtConstraint signature in your web project:
|
|
10019
|
+
* ```ts
|
|
10020
|
+
* export class LookAtConstraint extends Behaviour {
|
|
10021
|
+
* constraintActive: boolean = true;
|
|
10022
|
+
* locked: boolean = false;
|
|
10023
|
+
* sources: Object3D[] = [];
|
|
10024
|
+
* setConstraintPosition(worldPosition: Vector3) {
|
|
10025
|
+
* const source = this.sources[0];
|
|
10026
|
+
* if (source) source.worldPosition = worldPosition;
|
|
10027
|
+
* }
|
|
10028
|
+
* }
|
|
10029
|
+
* ```
|
|
10008
10030
|
*/
|
|
10009
10031
|
export declare class LookAtConstraint extends Component {
|
|
10032
|
+
/**
|
|
10033
|
+
* When true, the constraint is active and affects the target.
|
|
10034
|
+
* Set to false to temporarily disable without removing sources.
|
|
10035
|
+
*/
|
|
10036
|
+
constraintActive: boolean;
|
|
10037
|
+
/**
|
|
10038
|
+
* When true, the look-at position is locked and won't update
|
|
10039
|
+
* even if source objects move.
|
|
10040
|
+
*/
|
|
10041
|
+
locked: boolean;
|
|
10042
|
+
/**
|
|
10043
|
+
* Objects to look at. The first object in the array is used
|
|
10044
|
+
* as the primary look-at target.
|
|
10045
|
+
*/
|
|
10046
|
+
sources: Object3D[];
|
|
10047
|
+
/**
|
|
10048
|
+
* Sets the world position that the constraint should look at.
|
|
10049
|
+
* Updates the first source object's position.
|
|
10050
|
+
* @param worldPosition The world-space position to look at
|
|
10051
|
+
*/
|
|
10052
|
+
setConstraintPosition(worldPosition: Vector3): void;
|
|
10010
10053
|
}
|
|
10011
10054
|
|
|
10012
10055
|
export declare function lookAtInverse(obj: Object3D, target: Vector3): void;
|
|
@@ -10737,9 +10780,9 @@ declare class NEEDLE_components implements GLTFLoaderPlugin {
|
|
|
10737
10780
|
parser?: GLTFParser;
|
|
10738
10781
|
nodeToObjectMap: NodeToObjectMap;
|
|
10739
10782
|
/** The loaded gltf */
|
|
10740
|
-
gltf:
|
|
10783
|
+
gltf: GLTF_3 | null;
|
|
10741
10784
|
beforeRoot(): null;
|
|
10742
|
-
afterRoot(result:
|
|
10785
|
+
afterRoot(result: GLTF_3): Promise<void>;
|
|
10743
10786
|
private createComponents;
|
|
10744
10787
|
}
|
|
10745
10788
|
|
|
@@ -10787,6 +10830,14 @@ export declare const NEEDLE_ENGINE_MODULES: {
|
|
|
10787
10830
|
/** Load the module */
|
|
10788
10831
|
load(): Promise<any>;
|
|
10789
10832
|
};
|
|
10833
|
+
PEERJS: {
|
|
10834
|
+
MODULE: peerjs;
|
|
10835
|
+
MAYBEMODULE: peerjs | null;
|
|
10836
|
+
/** Wait for the module to be loaded (doesn't trigger a load) */
|
|
10837
|
+
ready(): Promise<peerjs>;
|
|
10838
|
+
/** Load the module */
|
|
10839
|
+
load(): Promise<peerjs>;
|
|
10840
|
+
};
|
|
10790
10841
|
};
|
|
10791
10842
|
|
|
10792
10843
|
export { NEEDLE_progressive }
|
|
@@ -11299,7 +11350,7 @@ declare class NeedleMenu_2 {
|
|
|
11299
11350
|
/** When enabled=true the menu will be visible in VR/AR sessions */
|
|
11300
11351
|
showSpatialMenu(enabled: boolean): void;
|
|
11301
11352
|
setSpatialMenuVisible(display: boolean): void;
|
|
11302
|
-
get spatialMenuIsVisible():
|
|
11353
|
+
get spatialMenuIsVisible(): any;
|
|
11303
11354
|
/**
|
|
11304
11355
|
* Call to add or remove a button to the menu to show a QR code for the current page
|
|
11305
11356
|
* If enabled=true then a button will be added to the menu that will show a QR code for the current page when clicked.
|
|
@@ -11828,6 +11879,7 @@ export declare class NeedleXRSession implements INeedleXRSession {
|
|
|
11828
11879
|
*
|
|
11829
11880
|
* **For AR**
|
|
11830
11881
|
* If you want to modify the scale in AR at runtime get the WebARSessionRoot component via `findObjectOfType(WebARSessionRoot)` and then set the `arScale` value.
|
|
11882
|
+
* @returns the scale of the XR rig
|
|
11831
11883
|
*
|
|
11832
11884
|
*/
|
|
11833
11885
|
get rigScale(): number;
|
|
@@ -12182,6 +12234,7 @@ declare type NEToneMappingModeNames = keyof typeof NEToneMappingMode;
|
|
|
12182
12234
|
* @see {@link RoomEvents} for room lifecycle events
|
|
12183
12235
|
* @see {@link OwnershipModel} for object ownership
|
|
12184
12236
|
* @link https://engine.needle.tools/docs/how-to-guides/networking/
|
|
12237
|
+
* @category Networking
|
|
12185
12238
|
*/
|
|
12186
12239
|
export declare class NetworkConnection implements INetworkConnection {
|
|
12187
12240
|
private context;
|
|
@@ -12248,7 +12301,7 @@ export declare class NetworkConnection implements INetworkConnection {
|
|
|
12248
12301
|
joinRoom(room: string, viewOnly?: boolean): boolean;
|
|
12249
12302
|
/** Use to leave a room that you are currently connected to (use `leaveRoom()` to disconnect from the currently active room but you can also specify a room name) */
|
|
12250
12303
|
leaveRoom(room?: string | null): boolean;
|
|
12251
|
-
/** Send a message to the networking backend - it will broadcasted to all connected users in the same room by default */
|
|
12304
|
+
/** Send a message to the networking backend - it will be broadcasted to all connected users (except yourself) in the same room by default */
|
|
12252
12305
|
send<T extends WebsocketSendType>(key: string | OwnershipEvent, data?: T | null, queue?: SendQueue): void;
|
|
12253
12306
|
/**
|
|
12254
12307
|
* Deletes the network state for a specific object on the server.
|
|
@@ -12402,7 +12455,7 @@ export declare class NetworkedStreams extends EventDispatcher<any> {
|
|
|
12402
12455
|
}
|
|
12403
12456
|
|
|
12404
12457
|
/**
|
|
12405
|
-
* Provides websocket URL configuration for the built-in networking system.
|
|
12458
|
+
* Provides websocket URL configuration for the {@link NetworkConnection | built-in networking system}.
|
|
12406
12459
|
* Add this component to override the default networking backend URL used by {@link NetworkConnection} (`this.context.connection`).
|
|
12407
12460
|
*
|
|
12408
12461
|
* The component registers itself as a URL provider on `awake()`. When the networking system connects,
|
|
@@ -12429,6 +12482,7 @@ export declare class NetworkedStreams extends EventDispatcher<any> {
|
|
|
12429
12482
|
* @see {@link SyncedRoom} for automatic room joining
|
|
12430
12483
|
* @see {@link OwnershipModel} for networked object ownership
|
|
12431
12484
|
* @see {@link RoomEvents} for room lifecycle events
|
|
12485
|
+
* @see {@link isLocalNetwork} for local network detection
|
|
12432
12486
|
* @link https://engine.needle.tools/docs/how-to-guides/networking/
|
|
12433
12487
|
* @summary Networking configuration
|
|
12434
12488
|
* @category Networking
|
|
@@ -15226,6 +15280,7 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
15226
15280
|
debugRenderColliders: boolean;
|
|
15227
15281
|
debugRenderRaycasts: boolean;
|
|
15228
15282
|
removeBody(obj: IComponent): void;
|
|
15283
|
+
setColliderEnabled(collider: ICollider, enabled: boolean): boolean;
|
|
15229
15284
|
updateBody(comp: ICollider | IRigidbody, translation: boolean, rotation: boolean): void;
|
|
15230
15285
|
updateProperties(obj: IRigidbody | ICollider): void;
|
|
15231
15286
|
addForce(rigidbody: IRigidbody, force: Vec3, wakeup: boolean): void;
|
|
@@ -15356,6 +15411,7 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
15356
15411
|
private internalUpdateColliderProperties;
|
|
15357
15412
|
private internalUpdateRigidbodyProperties;
|
|
15358
15413
|
private lines?;
|
|
15414
|
+
private disabledLines?;
|
|
15359
15415
|
step(dt?: number): void;
|
|
15360
15416
|
postStep(): void;
|
|
15361
15417
|
private updateDebugRendering;
|
|
@@ -19324,6 +19380,7 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
19324
19380
|
* @summary Joins a networked room based on URL parameters or a random room
|
|
19325
19381
|
* @category Networking
|
|
19326
19382
|
* @group Components
|
|
19383
|
+
* @see {@link NetworkConnection} for the main networking API (`this.context.connection`)
|
|
19327
19384
|
* @see {@link SyncedTransform} for synchronizing object transforms
|
|
19328
19385
|
* @see {@link Voip} for voice communication in rooms
|
|
19329
19386
|
* @see {@link ScreenCapture} for screen/video sharing
|
|
@@ -20281,15 +20338,26 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
20281
20338
|
declare class _TypeStore {
|
|
20282
20339
|
private _types;
|
|
20283
20340
|
private _reverseTypes;
|
|
20341
|
+
private _lazyLoaders;
|
|
20284
20342
|
constructor();
|
|
20285
20343
|
/**
|
|
20286
20344
|
* add a type to the store
|
|
20287
20345
|
*/
|
|
20288
20346
|
add(key: string, type: Type): void;
|
|
20347
|
+
/**
|
|
20348
|
+
* Register a lazy-loadable type. The loader is called on first use via {@link getAsync}.
|
|
20349
|
+
* Once resolved, the type is cached for synchronous access via {@link get}.
|
|
20350
|
+
*/
|
|
20351
|
+
addLazy(key: string, loader: () => Promise<Type>): void;
|
|
20289
20352
|
/**
|
|
20290
20353
|
* @returns the type for the given key if registered
|
|
20291
20354
|
*/
|
|
20292
20355
|
get(key: string): Type | null;
|
|
20356
|
+
/**
|
|
20357
|
+
* Async version of {@link get} that also resolves lazy-registered types.
|
|
20358
|
+
* After resolving, the type is cached for future synchronous access.
|
|
20359
|
+
*/
|
|
20360
|
+
getAsync(key: string): Promise<Type | null>;
|
|
20293
20361
|
/**
|
|
20294
20362
|
* @returns the key/name for the given type if registered
|
|
20295
20363
|
*/
|
|
@@ -21635,7 +21703,7 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
21635
21703
|
declare type WebsocketSendType = IModel | object | boolean | null | string | number;
|
|
21636
21704
|
|
|
21637
21705
|
/**
|
|
21638
|
-
* Use the WebXR component to enable VR and AR on **iOS and Android** in your scene. VisionOS support is also provided via QuickLook USDZ export.
|
|
21706
|
+
* Use the [WebXR](https://engine.needle.tools/docs/api/WebXR) component to enable VR and AR on **iOS and Android** in your scene. VisionOS support is also provided via QuickLook USDZ export.
|
|
21639
21707
|
*
|
|
21640
21708
|
* The WebXR component is a simple to use wrapper around the {@link NeedleXRSession} API and adds some additional features like creating buttons for AR, VR, enabling default movement behaviour ({@link XRControllerMovement}) and controller rendering ({@link XRControllerModel}), as well as handling AR placement and Quicklook USDZ export.
|
|
21641
21709
|
*
|
|
@@ -21664,12 +21732,25 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
21664
21732
|
* });
|
|
21665
21733
|
* ```
|
|
21666
21734
|
*
|
|
21735
|
+
*
|
|
21736
|
+
* @example Start AR session with placement reticle and touch to place and adjust the scene
|
|
21737
|
+
* ```ts
|
|
21738
|
+
* import { onStart, WebXR } from "@needle-tools/engine";
|
|
21739
|
+
* onStart(context => {
|
|
21740
|
+
* const webxr = context.scene.addComponent(WebXR);
|
|
21741
|
+
* webxr.autoPlace = false; // disable auto placement, we want the user to tap to place the scene
|
|
21742
|
+
* webxr.usePlacementReticle = true; // show the placement reticle to help the user find surfaces to place the scene
|
|
21743
|
+
* webxr.usePlacementAdjustment = true; // allow the user to adjust the position, rotation and scale of the scene with touch after placing
|
|
21744
|
+
* webxr.arScale = 2; // set the initial scale of the scene in AR. Larger values make the scene appear smaller in AR.
|
|
21745
|
+
* webxr.enterAR(); // start AR session
|
|
21746
|
+
* });
|
|
21747
|
+
*
|
|
21667
21748
|
* @summary WebXR Component for VR and AR support
|
|
21668
21749
|
* @category XR
|
|
21669
21750
|
* @group Components
|
|
21670
21751
|
* @see {@link NeedleXRSession} for low-level XR API
|
|
21671
21752
|
* @see {@link XRControllerMovement} for VR locomotion
|
|
21672
|
-
* @see {@link WebARSessionRoot} for AR session configuration
|
|
21753
|
+
* @see {@link WebARSessionRoot} for AR session configuration and an AR content placement event
|
|
21673
21754
|
* @see {@link Avatar} for networked user avatars
|
|
21674
21755
|
* @see {@link screenshot2} for taking screenshots in XR (including AR camera feed compositing)
|
|
21675
21756
|
* @link https://engine.needle.tools/docs/xr.html
|
|
@@ -22678,21 +22759,6 @@ declare module 'three' {
|
|
|
22678
22759
|
}
|
|
22679
22760
|
|
|
22680
22761
|
|
|
22681
|
-
declare module 'three/examples/jsm/controls/OrbitControls.js' {
|
|
22682
|
-
interface OrbitControls {
|
|
22683
|
-
_sphericalDelta: import("three").Spherical;
|
|
22684
|
-
_rotateLeft: (angleInRadians: number) => void;
|
|
22685
|
-
_rotateUp: (angleInRadians: number) => void;
|
|
22686
|
-
_pan: (dx: number, dy: number) => void;
|
|
22687
|
-
_dollyIn: (dollyScale: number) => void;
|
|
22688
|
-
_dollyOut: (dollyScale: number) => void;
|
|
22689
|
-
}
|
|
22690
|
-
interface OrbitControlsEventMap {
|
|
22691
|
-
endMovement: Event;
|
|
22692
|
-
}
|
|
22693
|
-
}
|
|
22694
|
-
|
|
22695
|
-
|
|
22696
22762
|
declare module 'three' {
|
|
22697
22763
|
interface Object3D {
|
|
22698
22764
|
get guid(): string | undefined;
|