@relu-interactives/spatial-ecs 0.5.2 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{System-V_mv07le.d.cts → System-8D-XBDKZ.d.cts} +734 -8
- package/dist/{System-V_mv07le.d.ts → System-DPMAW30g.d.ts} +734 -8
- package/dist/{XRHandPose-CU3vNFuS.d.ts → XRHandPose-G0Dl-F0w.d.ts} +93 -3
- package/dist/{XRHandPose-CQTLGxFC.d.cts → XRHandPose-VQMT1WXj.d.cts} +93 -3
- package/dist/animation/index.cjs +252 -0
- package/dist/animation/index.cjs.map +1 -0
- package/dist/animation/index.d.cts +100 -0
- package/dist/animation/index.d.ts +100 -0
- package/dist/animation/index.js +4 -0
- package/dist/animation/index.js.map +1 -0
- package/dist/chunk-CKTHDXPS.js +11 -0
- package/dist/chunk-CKTHDXPS.js.map +1 -0
- package/dist/chunk-G4XJ53LS.js +1237 -0
- package/dist/chunk-G4XJ53LS.js.map +1 -0
- package/dist/chunk-GSWC6LLD.js +241 -0
- package/dist/chunk-GSWC6LLD.js.map +1 -0
- package/dist/{chunk-DF5SSRN6.js → chunk-JIJQFW6P.js} +1216 -2920
- package/dist/chunk-JIJQFW6P.js.map +1 -0
- package/dist/{chunk-BUEKOSR5.js → chunk-NNDUOQ7O.js} +188 -14
- package/dist/chunk-NNDUOQ7O.js.map +1 -0
- package/dist/chunk-OHCNPPMX.js +334 -0
- package/dist/chunk-OHCNPPMX.js.map +1 -0
- package/dist/{chunk-RXBLOO5B.js → chunk-SGF73YTF.js} +105 -715
- package/dist/chunk-SGF73YTF.js.map +1 -0
- package/dist/chunk-U727NTWQ.js +2856 -0
- package/dist/chunk-U727NTWQ.js.map +1 -0
- package/dist/{chunk-OY7ZODZP.js → chunk-XE4OXN2W.js} +3 -9
- package/dist/chunk-XE4OXN2W.js.map +1 -0
- package/dist/{chunk-OWQSESTO.js → chunk-XU2DVWCP.js} +4 -3
- package/dist/chunk-XU2DVWCP.js.map +1 -0
- package/dist/components/index.cjs +183 -10
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +5 -3
- package/dist/components/index.d.ts +5 -3
- package/dist/components/index.js +3 -2
- package/dist/docs/api/Behaviour/classes/Behaviour.md +366 -79
- package/dist/docs/api/Behaviour/index.md +7 -3
- package/dist/docs/api/Behaviour/type-aliases/UiInteractionEvent.md +35 -0
- package/dist/docs/api/Component/classes/Component.md +14 -1
- package/dist/docs/api/components/classes/AnimationComponent.md +26 -26
- package/dist/docs/api/components/classes/AudioComponent.md +19 -19
- package/dist/docs/api/components/classes/CameraComponent.md +14 -14
- package/dist/docs/api/components/classes/EntityType.md +4 -4
- package/dist/docs/api/components/classes/Environment.md +5 -4
- package/dist/docs/api/components/classes/ImageComponent.md +7 -7
- package/dist/docs/api/components/classes/ImageTarget.md +8 -8
- package/dist/docs/api/components/classes/ImageTargetAnchor.md +4 -4
- package/dist/docs/api/components/classes/InstanceSlotComponent.md +4 -4
- package/dist/docs/api/components/classes/InstancedMeshComponent.md +10 -10
- package/dist/docs/api/components/classes/LightComponent.md +6 -6
- package/dist/docs/api/components/classes/MaterialComponent.md +16 -16
- package/dist/docs/api/components/classes/MeshComponent.md +3 -3
- package/dist/docs/api/components/classes/MeshGeometryComponent.md +9 -9
- package/dist/docs/api/components/classes/ModelComponent.md +8 -5
- package/dist/docs/api/components/classes/Name.md +3 -3
- package/dist/docs/api/components/classes/Object3DRef.md +4 -4
- package/dist/docs/api/components/classes/ParentId.md +3 -3
- package/dist/docs/api/components/classes/PhysicsComponent.md +7 -6
- package/dist/docs/api/components/classes/Postprocessing.md +3 -3
- package/dist/docs/api/components/classes/PrefabInstance.md +5 -5
- package/dist/docs/api/components/classes/PrefabNode.md +3 -3
- package/dist/docs/api/components/classes/ScriptComponent.md +5 -5
- package/dist/docs/api/components/classes/ScriptObjectComponent.md +9 -9
- package/dist/docs/api/components/classes/Selectable.md +3 -3
- package/dist/docs/api/components/classes/SelectionTransformState.md +5 -5
- package/dist/docs/api/components/classes/SpriteComponent.md +7 -7
- package/dist/docs/api/components/classes/TransformComponent.md +12 -12
- package/dist/docs/api/components/classes/UIButtonComponent.md +63 -0
- package/dist/docs/api/components/classes/UIPanelComponent.md +62 -0
- package/dist/docs/api/components/classes/UISliderComponent.md +59 -0
- package/dist/docs/api/components/classes/UITextComponent.md +59 -0
- package/dist/docs/api/components/classes/UIToggleComponent.md +56 -0
- package/dist/docs/api/components/classes/VRTeleportAreaComponent.md +53 -0
- package/dist/docs/api/components/classes/VideoComponent.md +28 -28
- package/dist/docs/api/components/classes/XRAnchorComponent.md +64 -0
- package/dist/docs/api/components/classes/XREnvironmentComponent.md +64 -0
- package/dist/docs/api/components/classes/XRHandPoseComponent.md +50 -0
- package/dist/docs/api/components/classes/XRInteractableComponent.md +74 -0
- package/dist/docs/api/components/classes/XRInteractorComponent.md +57 -0
- package/dist/docs/api/components/classes/XRInteractorSideComponent.md +50 -0
- package/dist/docs/api/components/classes/XRRigComponent.md +68 -0
- package/dist/docs/api/components/functions/createAttachPoint.md +25 -0
- package/dist/docs/api/components/functions/createHandPoseEntry.md +25 -0
- package/dist/docs/api/components/functions/defaultMaterialValue.md +1 -1
- package/dist/docs/api/components/functions/handPoseDefinitionFor.md +33 -0
- package/dist/docs/api/components/functions/normalizeEnvironmentLighting.md +30 -0
- package/dist/docs/api/components/functions/normalizePhysicsState.md +1 -1
- package/dist/docs/api/components/functions/setModelLoadState.md +33 -0
- package/dist/docs/api/components/functions/setPhysicsLiveRef.md +3 -9
- package/dist/docs/api/components/index.md +61 -4
- package/dist/docs/api/components/type-aliases/AnimationComponentOptions.md +9 -9
- package/dist/docs/api/components/type-aliases/CameraComponentOptions.md +13 -13
- package/dist/docs/api/components/type-aliases/CameraProjection.md +1 -1
- package/dist/docs/api/components/type-aliases/CameraRuntimeType.md +5 -3
- package/dist/docs/api/components/type-aliases/ColliderShape.md +1 -1
- package/dist/docs/api/components/type-aliases/ColliderState.md +20 -20
- package/dist/docs/api/components/type-aliases/CubeMeshParameters.md +4 -4
- package/dist/docs/api/components/type-aliases/EditableMeshObjectKind.md +1 -1
- package/dist/docs/api/components/type-aliases/EnvironmentFogState.md +8 -8
- package/dist/docs/api/components/type-aliases/EnvironmentFogType.md +1 -1
- package/dist/docs/api/components/type-aliases/EnvironmentGradientEffect.md +1 -1
- package/dist/docs/api/components/type-aliases/EnvironmentLightingState.md +40 -0
- package/dist/docs/api/components/type-aliases/EnvironmentSkyboxImageProjection.md +22 -0
- package/dist/docs/api/components/type-aliases/EnvironmentSkyboxState.md +9 -7
- package/dist/docs/api/components/type-aliases/EnvironmentSkyboxType.md +1 -1
- package/dist/docs/api/components/type-aliases/EnvironmentState.md +7 -5
- package/dist/docs/api/components/type-aliases/EnvironmentToneMapping.md +16 -0
- package/dist/docs/api/components/type-aliases/ImageTargetAnchorOptions.md +3 -3
- package/dist/docs/api/components/type-aliases/ImageTargetReference.md +7 -7
- package/dist/docs/api/components/type-aliases/InstanceTransform.md +13 -13
- package/dist/docs/api/components/type-aliases/InstancedMeshKind.md +1 -1
- package/dist/docs/api/components/type-aliases/LightShadowState.md +37 -0
- package/dist/docs/api/components/type-aliases/LightValueState.md +13 -11
- package/dist/docs/api/components/type-aliases/MaterialTypeValue.md +1 -1
- package/dist/docs/api/components/type-aliases/MaterialValueState.md +28 -28
- package/dist/docs/api/components/type-aliases/MeshGeometryParameters.md +1 -1
- package/dist/docs/api/components/type-aliases/MeshGeometryParametersByKind.md +7 -7
- package/dist/docs/api/components/type-aliases/ModelLoadState.md +15 -0
- package/dist/docs/api/components/type-aliases/PhysicsState.md +3 -3
- package/dist/docs/api/components/type-aliases/PlaneMeshParameters.md +3 -3
- package/dist/docs/api/components/type-aliases/PostprocessingState.md +62 -62
- package/dist/docs/api/components/type-aliases/RadiusHeightMeshParameters.md +3 -3
- package/dist/docs/api/components/type-aliases/RadiusMeshParameters.md +2 -2
- package/dist/docs/api/components/type-aliases/RigidbodyState.md +17 -17
- package/dist/docs/api/components/type-aliases/RigidbodyType.md +1 -1
- package/dist/docs/api/components/type-aliases/ScriptEntry.md +8 -8
- package/dist/docs/api/components/type-aliases/ScriptObjectComponentInput.md +1 -1
- package/dist/docs/api/components/type-aliases/ScriptObjectRuntimeState.md +1 -1
- package/dist/docs/api/components/type-aliases/TextureFilteringValue.md +1 -1
- package/dist/docs/api/components/type-aliases/TransformData.md +4 -4
- package/dist/docs/api/components/type-aliases/TransformModeValue.md +1 -1
- package/dist/docs/api/components/type-aliases/TransformSpaceValue.md +1 -1
- package/dist/docs/api/components/type-aliases/UIButtonOptions.md +45 -0
- package/dist/docs/api/components/type-aliases/UIPanelOptions.md +39 -0
- package/dist/docs/api/components/type-aliases/UISliderOptions.md +39 -0
- package/dist/docs/api/components/type-aliases/UITextOptions.md +41 -0
- package/dist/docs/api/components/type-aliases/UIToggleOptions.md +35 -0
- package/dist/docs/api/components/type-aliases/UiFollowMode.md +15 -0
- package/dist/docs/api/components/type-aliases/UiTextAlign.md +13 -0
- package/dist/docs/api/components/type-aliases/UiTextVAlign.md +13 -0
- package/dist/docs/api/components/type-aliases/VRTeleportAreaOptions.md +29 -0
- package/dist/docs/api/components/type-aliases/Vec3.md +4 -4
- package/dist/docs/api/components/type-aliases/VrTeleportShape.md +15 -0
- package/dist/docs/api/components/type-aliases/XRAnchorOptions.md +23 -0
- package/dist/docs/api/components/type-aliases/XRHandPoseOptions.md +23 -0
- package/dist/docs/api/components/type-aliases/XRInteractableOptions.md +75 -0
- package/dist/docs/api/components/type-aliases/XRInteractorOptions.md +37 -0
- package/dist/docs/api/components/type-aliases/XRRigOptions.md +51 -0
- package/dist/docs/api/components/type-aliases/XrAttachPoint.md +53 -0
- package/dist/docs/api/components/type-aliases/XrDistanceGrabBehavior.md +19 -0
- package/dist/docs/api/components/type-aliases/XrEnvironmentKind.md +15 -0
- package/dist/docs/api/components/type-aliases/XrEnvironmentOrientation.md +15 -0
- package/dist/docs/api/components/type-aliases/XrEnvironmentPhysics.md +25 -0
- package/dist/docs/api/components/type-aliases/XrGrabGesture.md +19 -0
- package/dist/docs/api/components/type-aliases/XrGrabHands.md +20 -0
- package/dist/docs/api/components/type-aliases/XrGrabReach.md +20 -0
- package/dist/docs/api/components/type-aliases/XrHandPoseEntry.md +49 -0
- package/dist/docs/api/components/type-aliases/XrHandPreset.md +19 -0
- package/dist/docs/api/components/type-aliases/XrInteractorSide.md +15 -0
- package/dist/docs/api/components/type-aliases/XrInteractorType.md +13 -0
- package/dist/docs/api/components/type-aliases/XrLocomotionMode.md +15 -0
- package/dist/docs/api/components/type-aliases/XrTrackingOrigin.md +24 -0
- package/dist/docs/api/components/type-aliases/XrTwoHandRotation.md +15 -0
- package/dist/docs/api/components/variables/DEFAULT_COLLIDER_STATE.md +1 -1
- package/dist/docs/api/components/variables/DEFAULT_ENVIRONMENT_LIGHTING.md +15 -0
- package/dist/docs/api/components/variables/DEFAULT_ENVIRONMENT_STATE.md +1 -1
- package/dist/docs/api/components/variables/DEFAULT_INSTANCED_MESH_PARAMETERS.md +1 -1
- package/dist/docs/api/components/variables/DEFAULT_INSTANCE_TRANSFORM.md +1 -1
- package/dist/docs/api/components/variables/DEFAULT_MESH_GEOMETRY_PARAMETERS.md +1 -1
- package/dist/docs/api/components/variables/DEFAULT_PHYSICS_STATE.md +1 -1
- package/dist/docs/api/components/variables/DEFAULT_POSE_CURLS.md +13 -0
- package/dist/docs/api/components/variables/DEFAULT_POSE_DIRECTIONS.md +13 -0
- package/dist/docs/api/components/variables/DEFAULT_POSTPROCESSING_STATE.md +1 -1
- package/dist/docs/api/components/variables/DEFAULT_RIGIDBODY_STATE.md +1 -1
- package/dist/docs/api/components/variables/MODEL_NO_PATH_MESSAGE.md +15 -0
- package/dist/docs/api/index/classes/AnimationStateMachine.md +16 -16
- package/dist/docs/api/index/classes/AnimationStateManager.md +13 -13
- package/dist/docs/api/index/classes/AnimationSystem.md +3 -3
- package/dist/docs/api/index/classes/AudioSystem.md +4 -4
- package/dist/docs/api/index/classes/CameraSyncSystem.md +2 -2
- package/dist/docs/api/index/classes/EnvironmentSyncSystem.md +19 -4
- package/dist/docs/api/index/classes/HandPoseTracker.md +114 -0
- package/dist/docs/api/index/classes/InputSystem.md +33 -33
- package/dist/docs/api/index/classes/InstancedMeshSystem.md +2 -2
- package/dist/docs/api/index/classes/LightSyncSystem.md +2 -2
- package/dist/docs/api/index/classes/MaterialSyncSystem.md +3 -3
- package/dist/docs/api/index/classes/MeshGeometrySystem.md +2 -2
- package/dist/docs/api/index/classes/ObjectManagementSystem.md +14 -14
- package/dist/docs/api/index/classes/ObjectVisibilitySystem.md +2 -2
- package/dist/docs/api/index/classes/PhysicsSyncSystem.md +4 -4
- package/dist/docs/api/index/classes/PostprocessingSyncSystem.md +34 -10
- package/dist/docs/api/index/classes/RenderSystem.md +13 -4
- package/dist/docs/api/index/classes/ScriptBehaviourSystem.md +9 -5
- package/dist/docs/api/index/classes/ScriptObject.md +10 -10
- package/dist/docs/api/index/classes/ScriptObjectSystem.md +6 -6
- package/dist/docs/api/index/classes/TeleportAimGate.md +114 -0
- package/dist/docs/api/index/classes/ThrowVelocityTracker.md +89 -0
- package/dist/docs/api/index/classes/TransformSyncSystem.md +2 -2
- package/dist/docs/api/index/classes/UIInteractionSystem.md +60 -0
- package/dist/docs/api/index/classes/UIPanelSystem.md +79 -0
- package/dist/docs/api/index/classes/VRTeleportAreaSystem.md +49 -0
- package/dist/docs/api/index/classes/VideoSystem.md +8 -6
- package/dist/docs/api/index/classes/World.md +282 -100
- package/dist/docs/api/index/classes/XRAnchorSystem.md +90 -0
- package/dist/docs/api/index/classes/XRControllerVisualSystem.md +77 -0
- package/dist/docs/api/index/classes/XREnvironmentSystem.md +137 -0
- package/dist/docs/api/index/classes/XRHandPoseSystem.md +107 -0
- package/dist/docs/api/index/classes/XRHitTestSystem.md +93 -0
- package/dist/docs/api/index/classes/XRHoverVisualSystem.md +76 -0
- package/dist/docs/api/index/classes/XRInputSystem.md +189 -0
- package/dist/docs/api/index/classes/XRInteractionSystem.md +323 -0
- package/dist/docs/api/index/classes/XRLocomotionSystem.md +128 -0
- package/dist/docs/api/index/classes/XRSessionSystem.md +116 -0
- package/dist/docs/api/index/classes/XRTeleportVisualSystem.md +75 -0
- package/dist/docs/api/index/functions/angularVelocityFrom.md +33 -0
- package/dist/docs/api/index/functions/applyHandMaterial.md +26 -0
- package/dist/docs/api/index/functions/applyPrefabToSnapshotInstances.md +1 -1
- package/dist/docs/api/index/functions/arcGroundCrossing.md +30 -0
- package/dist/docs/api/index/functions/buildComponentValueMaps.md +1 -1
- package/dist/docs/api/index/functions/buildNodeKeyMapsFromSnapshot.md +1 -1
- package/dist/docs/api/index/functions/buildNodeMapsFromSnapshot.md +1 -1
- package/dist/docs/api/index/functions/canonicalizeComponentValue.md +1 -1
- package/dist/docs/api/index/functions/clearModelCache.md +1 -1
- package/dist/docs/api/index/functions/clearPrefabCache.md +1 -1
- package/dist/docs/api/index/functions/cloneHandPose.md +23 -0
- package/dist/docs/api/index/functions/collectDiffPaths.md +1 -1
- package/dist/docs/api/index/functions/collectDirectPrefabDependencies.md +1 -1
- package/dist/docs/api/index/functions/collectEntitySubtree.md +1 -1
- package/dist/docs/api/index/functions/collectSnapshotSubtreeIds.md +1 -1
- package/dist/docs/api/index/functions/computeFingerCurl.md +29 -0
- package/dist/docs/api/index/functions/computeHandShape.md +29 -0
- package/dist/docs/api/index/functions/computeInstanceOverrides.md +1 -1
- package/dist/docs/api/index/functions/computePalmPose.md +30 -0
- package/dist/docs/api/index/functions/computePalmWidth.md +25 -0
- package/dist/docs/api/index/functions/computePinch.md +29 -0
- package/dist/docs/api/index/functions/computeSpread.md +33 -0
- package/dist/docs/api/index/functions/createAnimationComponent.md +1 -1
- package/dist/docs/api/index/functions/createAudioComponent.md +1 -1
- package/dist/docs/api/index/functions/createCameraComponent.md +1 -1
- package/dist/docs/api/index/functions/createEntityTypeComponent.md +2 -2
- package/dist/docs/api/index/functions/createEnvironmentComponent.md +1 -1
- package/dist/docs/api/index/functions/createHandMaterial.md +30 -0
- package/dist/docs/api/index/functions/createImageComponent.md +1 -1
- package/dist/docs/api/index/functions/createImageTargetAnchorComponent.md +1 -1
- package/dist/docs/api/index/functions/createImageTargetComponent.md +2 -2
- package/dist/docs/api/index/functions/createInstanceSlotComponent.md +1 -1
- package/dist/docs/api/index/functions/createInstancedMeshComponent.md +1 -1
- package/dist/docs/api/index/functions/createLightComponent.md +2 -2
- package/dist/docs/api/index/functions/createMaterialComponent.md +2 -2
- package/dist/docs/api/index/functions/createMeshComponent.md +1 -1
- package/dist/docs/api/index/functions/createMeshGeometryComponent.md +1 -1
- package/dist/docs/api/index/functions/createModelComponent.md +1 -1
- package/dist/docs/api/index/functions/createNameComponent.md +1 -1
- package/dist/docs/api/index/functions/createObject3DRefComponent.md +1 -1
- package/dist/docs/api/index/functions/createParentIdComponent.md +1 -1
- package/dist/docs/api/index/functions/createPhysicsComponent.md +1 -1
- package/dist/docs/api/index/functions/createPostprocessingComponent.md +1 -1
- package/dist/docs/api/index/functions/createScriptComponent.md +1 -1
- package/dist/docs/api/index/functions/createScriptObjectComponent.md +1 -1
- package/dist/docs/api/index/functions/createSelectableComponent.md +1 -1
- package/dist/docs/api/index/functions/createSelectionTransformStateComponent.md +1 -1
- package/dist/docs/api/index/functions/createSpriteComponent.md +1 -1
- package/dist/docs/api/index/functions/createTransformComponent.md +1 -1
- package/dist/docs/api/index/functions/createUIButtonComponent.md +28 -0
- package/dist/docs/api/index/functions/createUIPanelComponent.md +28 -0
- package/dist/docs/api/index/functions/createUISliderComponent.md +28 -0
- package/dist/docs/api/index/functions/createUITextComponent.md +28 -0
- package/dist/docs/api/index/functions/createUIToggleComponent.md +28 -0
- package/dist/docs/api/index/functions/createVRTeleportAreaComponent.md +28 -0
- package/dist/docs/api/index/functions/createVideoComponent.md +1 -1
- package/dist/docs/api/index/functions/createXRAnchorComponent.md +28 -0
- package/dist/docs/api/index/functions/createXRHandPoseComponent.md +28 -0
- package/dist/docs/api/index/functions/createXRInteractableComponent.md +28 -0
- package/dist/docs/api/index/functions/createXRInteractorComponent.md +28 -0
- package/dist/docs/api/index/functions/createXRInteractorSideComponent.md +28 -0
- package/dist/docs/api/index/functions/createXRRigComponent.md +28 -0
- package/dist/docs/api/index/functions/decanonicalizeComponentValue.md +1 -1
- package/dist/docs/api/index/functions/despawnPrefab.md +1 -1
- package/dist/docs/api/index/functions/encodeOverride.md +1 -1
- package/dist/docs/api/index/functions/estimateHandScale.md +28 -0
- package/dist/docs/api/index/functions/findSnapshotRootEntityIds.md +1 -1
- package/dist/docs/api/index/functions/findTopLevelNestedRegions.md +1 -1
- package/dist/docs/api/index/functions/getHandPosePreset.md +31 -0
- package/dist/docs/api/index/functions/groupOverridePaths.md +1 -1
- package/dist/docs/api/index/functions/handPoseFromCurls.md +42 -0
- package/dist/docs/api/index/functions/hydrateWorldFromSnapshot.md +1 -1
- package/dist/docs/api/index/functions/hydrateWorldFromSnapshotDetailed.md +1 -1
- package/dist/docs/api/index/functions/indexSnapshotByEntity.md +1 -1
- package/dist/docs/api/index/functions/instantiateSubtree.md +1 -1
- package/dist/docs/api/index/functions/loadPrefab.md +1 -1
- package/dist/docs/api/index/functions/loadSharedGltf.md +1 -1
- package/dist/docs/api/index/functions/matchHandPose.md +34 -0
- package/dist/docs/api/index/functions/mergeComponentValue.md +1 -1
- package/dist/docs/api/index/functions/parseOverride.md +1 -1
- package/dist/docs/api/index/functions/parsePrefabAsset.md +1 -1
- package/dist/docs/api/index/functions/prefabFileVersionFor.md +1 -1
- package/dist/docs/api/index/functions/readXrCapabilities.md +30 -0
- package/dist/docs/api/index/functions/registerDefaultComponentFactories.md +1 -1
- package/dist/docs/api/index/functions/registerDefaultFactories.md +1 -1
- package/dist/docs/api/index/functions/remapSnapshotEntityIds.md +3 -3
- package/dist/docs/api/index/functions/resolveDracoDecoderPath.md +1 -1
- package/dist/docs/api/index/functions/restoreComponentState.md +1 -1
- package/dist/docs/api/index/functions/restorePostCreateComponents.md +1 -1
- package/dist/docs/api/index/functions/sampleTeleportArc.md +40 -0
- package/dist/docs/api/index/functions/serializeEntitySubtree.md +1 -1
- package/dist/docs/api/index/functions/setDracoDecoderPath.md +1 -1
- package/dist/docs/api/index/functions/setPrefabAssetUrlResolver.md +1 -1
- package/dist/docs/api/index/functions/spawnPrefab.md +1 -1
- package/dist/docs/api/index/index.md +116 -4
- package/dist/docs/api/index/interfaces/ChromaKeyOptions.md +20 -0
- package/dist/docs/api/index/interfaces/EcsSystem.md +3 -3
- package/dist/docs/api/index/interfaces/PostprocessingBuildContext.md +21 -0
- package/dist/docs/api/index/interfaces/PostprocessingPipeline.md +84 -0
- package/dist/docs/api/index/interfaces/RenderBackend.md +168 -0
- package/dist/docs/api/index/interfaces/StateMachine.md +13 -13
- package/dist/docs/api/index/type-aliases/AnimationStateCallbacks.md +4 -4
- package/dist/docs/api/index/type-aliases/ApplyPrefabToSnapshotResult.md +3 -3
- package/dist/docs/api/index/type-aliases/ComponentFactory.md +1 -1
- package/dist/docs/api/index/type-aliases/ComponentValueMaps.md +50 -26
- package/dist/docs/api/index/type-aliases/EcsComponentFactoryKind.md +14 -2
- package/dist/docs/api/index/type-aliases/EcsRenderer.md +17 -0
- package/dist/docs/api/index/type-aliases/EcsWorldComponentSnapshot.md +3 -3
- package/dist/docs/api/index/type-aliases/EcsWorldStateSnapshotLike.md +4 -4
- package/dist/docs/api/index/type-aliases/ExternalRefWarning.md +5 -5
- package/dist/docs/api/index/type-aliases/HandMaterialOptions.md +32 -0
- package/dist/docs/api/index/type-aliases/HandPoseTrackerOptions.md +27 -0
- package/dist/docs/api/index/type-aliases/HydrateOptions.md +3 -3
- package/dist/docs/api/index/type-aliases/HydrateWorldFromSnapshotResult.md +4 -4
- package/dist/docs/api/index/type-aliases/InstantiateSubtreeResult.md +3 -3
- package/dist/docs/api/index/type-aliases/KeyboardKey.md +1 -1
- package/dist/docs/api/index/type-aliases/ModuleLoader.md +1 -1
- package/dist/docs/api/index/type-aliases/MouseButton.md +1 -1
- package/dist/docs/api/index/type-aliases/NestedRegion.md +5 -5
- package/dist/docs/api/index/type-aliases/NodeKeyMaps.md +5 -5
- package/dist/docs/api/index/type-aliases/NodeMaps.md +4 -4
- package/dist/docs/api/index/type-aliases/PrefabAsset.md +5 -5
- package/dist/docs/api/index/type-aliases/RemapSnapshotOptions.md +2 -2
- package/dist/docs/api/index/type-aliases/RendererKind.md +15 -0
- package/dist/docs/api/index/type-aliases/ScriptBehaviourSystemOptions.md +23 -0
- package/dist/docs/api/index/type-aliases/ScriptErrorEvent.md +39 -0
- package/dist/docs/api/index/type-aliases/ScriptErrorListener.md +25 -0
- package/dist/docs/api/index/type-aliases/ScriptErrorPhase.md +28 -0
- package/dist/docs/api/index/type-aliases/ScriptErrorReport.md +31 -0
- package/dist/docs/api/index/type-aliases/ScriptErrorSource.md +15 -0
- package/dist/docs/api/index/type-aliases/SelectionContext.md +4 -4
- package/dist/docs/api/index/type-aliases/SerializeEntitySubtreeResult.md +4 -4
- package/dist/docs/api/index/type-aliases/SpawnPrefabOptions.md +5 -5
- package/dist/docs/api/index/type-aliases/SpawnPrefabSource.md +1 -1
- package/dist/docs/api/index/type-aliases/SubtreeSnapshot.md +3 -3
- package/dist/docs/api/index/type-aliases/UiCanvasLike.md +46 -0
- package/dist/docs/api/index/type-aliases/VelocitySample.md +23 -0
- package/dist/docs/api/index/type-aliases/XrCapabilities.md +41 -0
- package/dist/docs/api/index/type-aliases/XrFinger.md +13 -0
- package/dist/docs/api/index/type-aliases/XrFingerCurl.md +27 -0
- package/dist/docs/api/index/type-aliases/XrFingerTarget.md +31 -0
- package/dist/docs/api/index/type-aliases/XrHandJointName.md +40 -0
- package/dist/docs/api/index/type-aliases/XrHandJoints.md +18 -0
- package/dist/docs/api/index/type-aliases/XrHandPoseAxis.md +15 -0
- package/dist/docs/api/index/type-aliases/XrHandPoseContext.md +23 -0
- package/dist/docs/api/index/type-aliases/XrHandPoseDefinition.md +47 -0
- package/dist/docs/api/index/type-aliases/XrHandPoseDirection.md +21 -0
- package/dist/docs/api/index/type-aliases/XrHandPoseEvent.md +13 -0
- package/dist/docs/api/index/type-aliases/XrHandPoseEventDetail.md +27 -0
- package/dist/docs/api/index/type-aliases/XrHandPoseMatch.md +25 -0
- package/dist/docs/api/index/type-aliases/XrHandPoseOrientation.md +25 -0
- package/dist/docs/api/index/type-aliases/XrHandShape.md +46 -0
- package/dist/docs/api/index/type-aliases/XrHandedness.md +15 -0
- package/dist/docs/api/index/type-aliases/XrHitResult.md +25 -0
- package/dist/docs/api/index/type-aliases/XrInputKind.md +19 -0
- package/dist/docs/api/index/type-aliases/XrInputState.md +60 -0
- package/dist/docs/api/index/type-aliases/XrPalmPose.md +31 -0
- package/dist/docs/api/index/variables/ADDED_NODE_MARKER_COMPONENT.md +2 -2
- package/dist/docs/api/index/variables/ARC_GRAVITY.md +15 -0
- package/dist/docs/api/index/variables/ARC_MAX_TIME.md +15 -0
- package/dist/docs/api/index/variables/ARC_SPEED.md +15 -0
- package/dist/docs/api/index/variables/ARC_STEPS.md +15 -0
- package/dist/docs/api/index/variables/CURLED_COS.md +13 -0
- package/dist/docs/api/index/variables/DEFAULT_DIRECTION_TOLERANCE.md +15 -0
- package/dist/docs/api/index/variables/DEFAULT_ENTER_CONFIDENCE.md +13 -0
- package/dist/docs/api/index/variables/DEFAULT_EXIT_CONFIDENCE.md +13 -0
- package/dist/docs/api/index/variables/DEFAULT_LOST_GRACE_SECONDS.md +13 -0
- package/dist/docs/api/index/variables/DEFAULT_MIN_HOLD_SECONDS.md +13 -0
- package/dist/docs/api/index/variables/DEFAULT_SCRIPT_ERROR_RETRY_DELAY.md +17 -0
- package/dist/docs/api/index/variables/FALLBACK_HAND_SCALE.md +15 -0
- package/dist/docs/api/index/variables/HAND_POSE_PRESETS.md +19 -0
- package/dist/docs/api/index/variables/HAND_POSE_PRESET_IDS.md +15 -0
- package/dist/docs/api/index/variables/HYDRATABLE_ENTITY_KINDS.md +1 -1
- package/dist/docs/api/index/variables/KeyboardKeys.md +89 -89
- package/dist/docs/api/index/variables/MATCH_FALLOFF.md +15 -0
- package/dist/docs/api/index/variables/MAX_PLAUSIBLE_SPEED.md +25 -0
- package/dist/docs/api/index/variables/MAX_SAMPLE_AGE_SECONDS.md +18 -0
- package/dist/docs/api/index/variables/NODE_KEY_SEPARATOR.md +1 -1
- package/dist/docs/api/index/variables/NO_XR_CAPABILITIES.md +15 -0
- package/dist/docs/api/index/variables/OVERRIDE_DIFF_EXCLUDED_COMPONENTS.md +1 -1
- package/dist/docs/api/index/variables/OVERRIDE_ROOT_EXCLUDED_COMPONENTS.md +1 -1
- package/dist/docs/api/index/variables/PINCH_FINGERS.md +15 -0
- package/dist/docs/api/index/variables/PREFAB_FILE_VERSION.md +1 -1
- package/dist/docs/api/index/variables/PREFAB_FILE_VERSION_NESTED.md +1 -1
- package/dist/docs/api/index/variables/SCRIPT_OBJECT_ROOT_FLAG.md +1 -1
- package/dist/docs/api/index/variables/SHARED_MODEL_RESOURCE_FLAG.md +1 -1
- package/dist/docs/api/index/variables/STRAIGHT_COS.md +19 -0
- package/dist/docs/api/index/variables/VELOCITY_SAMPLES.md +15 -0
- package/dist/docs/api/index/variables/XR_FINGERS.md +13 -0
- package/dist/docs/api/index/variables/XR_HOVER_SHELL_FLAG.md +15 -0
- package/dist/docs/api/index/variables/webglBackend.md +16 -0
- package/dist/docs/api/typedoc-sidebar.json +1 -1
- package/dist/docs/api/types/type-aliases/AssetInput.md +3 -3
- package/dist/docs/api/types/type-aliases/CheckboxInput.md +3 -3
- package/dist/docs/api/types/type-aliases/ColorInput.md +1 -1
- package/dist/docs/api/types/type-aliases/ComponentInput.md +4 -4
- package/dist/docs/api/types/type-aliases/ComponentKind.md +1 -1
- package/dist/docs/api/types/type-aliases/DropdownInput.md +3 -3
- package/dist/docs/api/types/type-aliases/DropdownOption.md +3 -3
- package/dist/docs/api/types/type-aliases/EcsEntityEditorKind.md +1 -1
- package/dist/docs/api/types/type-aliases/EcsEntityKind.md +10 -2
- package/dist/docs/api/types/type-aliases/EntityId.md +1 -1
- package/dist/docs/api/types/type-aliases/EntityInput.md +3 -3
- package/dist/docs/api/types/type-aliases/FloatInput.md +1 -1
- package/dist/docs/api/types/type-aliases/IntersectionResult.md +3 -3
- package/dist/docs/api/types/type-aliases/ParentLookup.md +3 -3
- package/dist/docs/api/types/type-aliases/SelectionListener.md +1 -1
- package/dist/docs/api/types/type-aliases/SliderInput.md +5 -5
- package/dist/docs/api/types/type-aliases/TextInput.md +1 -1
- package/dist/docs/api/types/type-aliases/ToggleInput.md +1 -1
- package/dist/docs/api/types/type-aliases/Vec3.md +1 -1
- package/dist/docs/api/types/type-aliases/Vector2Input.md +3 -3
- package/dist/docs/api/types/type-aliases/Vector3Input.md +4 -4
- package/dist/docs/api/types/type-aliases/WorldEntityView.md +1 -1
- package/dist/docs/guide/audio-mixing-and-sound-banks.md +71 -0
- package/dist/docs/guide/authoring-a-behaviour.md +3 -3
- package/dist/docs/guide/authoring-a-script-object.md +12 -9
- package/dist/docs/guide/behaviour-data-binding/index.md +11 -11
- package/dist/docs/guide/behaviour-lifecycle.md +9 -0
- package/dist/docs/guide/bone-attachments-and-ik.md +128 -0
- package/dist/docs/guide/component-catalog.md +10 -2
- package/dist/docs/guide/components/light.md +42 -0
- package/dist/docs/guide/components/model.md +32 -3
- package/dist/docs/guide/concepts.md +2 -2
- package/dist/docs/guide/getting-started/creating-objects.md +2 -2
- package/dist/docs/guide/getting-started/editing-objects.md +2 -2
- package/dist/docs/guide/getting-started/editor/ai-agent.md +227 -0
- package/dist/docs/guide/getting-started/editor/hierarchy.md +2 -2
- package/dist/docs/guide/getting-started/editor/index.md +3 -2
- package/dist/docs/guide/getting-started/editor/inspector.md +2 -2
- package/dist/docs/guide/getting-started/editor/scene-inspector.md +3 -3
- package/dist/docs/guide/getting-started/editor/toolbar.md +11 -11
- package/dist/docs/guide/getting-started/editor/viewport.md +17 -9
- package/dist/docs/guide/getting-started/index.md +1 -1
- package/dist/docs/guide/getting-started/installation.md +1 -1
- package/dist/docs/guide/getting-started/preview-and-test.md +7 -7
- package/dist/docs/guide/getting-started/project-types/image-tracking.md +23 -11
- package/dist/docs/guide/getting-started/project-types/index.md +4 -4
- package/dist/docs/guide/getting-started/project-types/vr.md +270 -2
- package/dist/docs/guide/getting-started/projects.md +4 -5
- package/dist/docs/guide/getting-started/shortcuts.md +5 -4
- package/dist/docs/guide/multiplayer.md +92 -0
- package/dist/docs/guide/scene/environment.md +101 -4
- package/dist/docs/guide/scene/index.md +4 -4
- package/dist/docs/guide/scene/postprocessing.md +67 -5
- package/dist/docs/guide/spawning/area-light.md +2 -0
- package/dist/docs/guide/systems/environment-sync-system.md +11 -6
- package/dist/docs/guide/systems/light-sync-system.md +5 -3
- package/dist/docs/guide/systems/postprocessing-sync-system.md +16 -6
- package/dist/docs/guide/systems/render-system.md +7 -6
- package/dist/docs/guide/systems/script-behaviour-system.md +7 -5
- package/dist/docs/guide/systems/script-object-system.md +3 -1
- package/dist/docs/guide/systems/video-system.md +1 -1
- package/dist/docs/guide/webgpu-and-tsl.md +415 -0
- package/dist/docs/guide/world-api.md +52 -2
- package/dist/factories/index.cjs +770 -283
- package/dist/factories/index.cjs.map +1 -1
- package/dist/factories/index.d.cts +14 -3
- package/dist/factories/index.d.ts +14 -3
- package/dist/factories/index.js +7 -4
- package/dist/{index-D2Jt_JzH.d.ts → index-C61n65PE.d.ts} +135 -42
- package/dist/{index-DaG03vyN.d.cts → index-C70N4BYG.d.cts} +135 -42
- package/dist/{index-C3ik3sA1.d.ts → index-D9DjrUn3.d.cts} +25 -3
- package/dist/{index-Dlr-7-4m.d.cts → index-DppafVu4.d.ts} +25 -3
- package/dist/index.cjs +3642 -1263
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +113 -11
- package/dist/index.d.ts +113 -11
- package/dist/index.js +187 -12
- package/dist/index.js.map +1 -1
- package/dist/network/index.cjs +4896 -0
- package/dist/network/index.cjs.map +1 -0
- package/dist/network/index.d.cts +98 -0
- package/dist/network/index.d.ts +98 -0
- package/dist/network/index.js +493 -0
- package/dist/network/index.js.map +1 -0
- package/dist/systems/index.cjs +3958 -1762
- package/dist/systems/index.cjs.map +1 -1
- package/dist/systems/index.d.cts +4 -2
- package/dist/systems/index.d.ts +4 -2
- package/dist/systems/index.js +8 -4
- package/dist/types.d.cts +3 -1
- package/dist/types.d.ts +3 -1
- package/dist/webgpu/index.d.ts +113 -0
- package/dist/webgpu/index.js +302 -0
- package/dist/webgpu/index.js.map +1 -0
- package/dist/worldSnapshotUtils.d.cts +3 -1
- package/dist/worldSnapshotUtils.d.ts +3 -1
- package/dist/worldSnapshotUtils.js +3 -2
- package/package.json +19 -3
- package/dist/chunk-BUEKOSR5.js.map +0 -1
- package/dist/chunk-DF5SSRN6.js.map +0 -1
- package/dist/chunk-OWQSESTO.js.map +0 -1
- package/dist/chunk-OY7ZODZP.js.map +0 -1
- package/dist/chunk-RXBLOO5B.js.map +0 -1
- package/dist/chunk-WJD2VKEH.js +0 -315
- package/dist/chunk-WJD2VKEH.js.map +0 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
2
|
import { Vector3, Euler, EulerOrder, Quaternion } from 'three';
|
|
3
3
|
import * as RAPIER from '@dimforge/rapier3d-compat';
|
|
4
|
+
import { HumanoidBone } from './animation/index.cjs';
|
|
5
|
+
import { WebGPURenderer } from 'three/webgpu';
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* Marker base class for every ECS component. Subclass `Component` to declare
|
|
@@ -16,20 +18,150 @@ import * as RAPIER from '@dimforge/rapier3d-compat';
|
|
|
16
18
|
declare class Component {
|
|
17
19
|
}
|
|
18
20
|
|
|
21
|
+
/** A value a networked prop can hold: anything that survives JSON. */
|
|
22
|
+
type NetValue = string | number | boolean | null | NetValue[] | {
|
|
23
|
+
[key: string]: NetValue;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Marks an entity as shared between players. A scene object is simulated by
|
|
27
|
+
* the host (the first player in the room, then the longest connected); a
|
|
28
|
+
* spawned object belongs to the player who spawned it and leaves with them.
|
|
29
|
+
*
|
|
30
|
+
* @category Components
|
|
31
|
+
*/
|
|
32
|
+
declare class NetworkIdentityComponent extends Component {
|
|
33
|
+
/** The id every client knows this entity by. Set when connected, never saved. */
|
|
34
|
+
networkId: string;
|
|
35
|
+
/** The session that simulates this entity. Set when connected, never saved. */
|
|
36
|
+
owner: string;
|
|
37
|
+
constructor();
|
|
38
|
+
}
|
|
39
|
+
type NetworkTransformOptions = Partial<Pick<NetworkTransformComponent, "enabled" | "sendRate" | "interpolationMs" | "syncRotation" | "teleportDistance">>;
|
|
40
|
+
/**
|
|
41
|
+
* Shares an entity's position and rotation. The owner moves it at once and
|
|
42
|
+
* sends updates; everyone else plays them back a little in the past, so
|
|
43
|
+
* movement is smooth however the packets arrive.
|
|
44
|
+
*
|
|
45
|
+
* @category Components
|
|
46
|
+
*/
|
|
47
|
+
declare class NetworkTransformComponent extends Component {
|
|
48
|
+
enabled: boolean;
|
|
49
|
+
/** Updates per second the owner sends. */
|
|
50
|
+
sendRate: number;
|
|
51
|
+
/** How far in the past others see it, in ms. More is smoother; less is more current. */
|
|
52
|
+
interpolationMs: number;
|
|
53
|
+
syncRotation: boolean;
|
|
54
|
+
/** A jump longer than this (m) snaps instead of sliding, for respawns and teleports. */
|
|
55
|
+
teleportDistance: number;
|
|
56
|
+
constructor(options?: NetworkTransformOptions);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Named values shared with everyone: a health bar, a score. Only the entity's
|
|
60
|
+
* owner can change them, with `this.network.setProp()`. `values` holds the
|
|
61
|
+
* starting values, and a Behaviour hears changes in `onNetworkProp`.
|
|
62
|
+
*
|
|
63
|
+
* @category Components
|
|
64
|
+
*/
|
|
65
|
+
declare class NetworkedPropsComponent extends Component {
|
|
66
|
+
values: Record<string, NetValue>;
|
|
67
|
+
constructor(values?: Record<string, NetValue>);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Gives each player an avatar: when a client connects it spawns `playerPrefab`
|
|
71
|
+
* as its own, placed around this entity.
|
|
72
|
+
*
|
|
73
|
+
* @category Components
|
|
74
|
+
*/
|
|
75
|
+
declare class NetworkSpawnerComponent extends Component {
|
|
76
|
+
/** The `.prefab` each player gets. */
|
|
77
|
+
playerPrefab: string;
|
|
78
|
+
/** How far from this entity players appear, in metres. */
|
|
79
|
+
spawnRadius: number;
|
|
80
|
+
constructor(playerPrefab?: string, spawnRadius?: number);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** One recording of a slot. `file` is an asset path; `volume` multiplies the slot's. */
|
|
84
|
+
interface SoundTake {
|
|
85
|
+
file: string;
|
|
86
|
+
volume?: number;
|
|
87
|
+
}
|
|
88
|
+
/** The mixer's groups. Music dips while a voice plays. */
|
|
89
|
+
type AudioBus = "sfx" | "voice" | "music";
|
|
90
|
+
/**
|
|
91
|
+
* A named sound the game asks for ("hit", "footstep"), played as a random take.
|
|
92
|
+
*
|
|
93
|
+
* | Field | Default | Description |
|
|
94
|
+
* |---|---|---|
|
|
95
|
+
* | `takes` | | The recordings to choose between. |
|
|
96
|
+
* | `bus` | `"sfx"` | Which volume group it plays through. |
|
|
97
|
+
* | `chance` | `1` | Probability it plays at all when asked, `0` to `1`. |
|
|
98
|
+
* | `cooldownMs` | `0` | Asks within this long of the last play are ignored. |
|
|
99
|
+
* | `volume` | `1` | Linear gain. |
|
|
100
|
+
* | `priority` | `0` | On the voice bus: lower priorities wait, higher ones cut in. |
|
|
101
|
+
*/
|
|
102
|
+
interface SoundSlot {
|
|
103
|
+
takes: SoundTake[];
|
|
104
|
+
bus?: AudioBus;
|
|
105
|
+
chance?: number;
|
|
106
|
+
cooldownMs?: number;
|
|
107
|
+
volume?: number;
|
|
108
|
+
priority?: number;
|
|
109
|
+
}
|
|
110
|
+
/** The contents of a `.soundbank.json` asset. */
|
|
111
|
+
interface SoundBankAsset {
|
|
112
|
+
version: 1;
|
|
113
|
+
slots: Record<string, SoundSlot>;
|
|
114
|
+
}
|
|
115
|
+
/** Every recording a bank needs. */
|
|
116
|
+
declare function soundBankFiles(bank: SoundBankAsset): string[];
|
|
117
|
+
/**
|
|
118
|
+
* Decides whether a slot sounds and which take: chance, cooldown, and never the
|
|
119
|
+
* same take twice running when there's another. No audio here, so it's testable.
|
|
120
|
+
*/
|
|
121
|
+
declare class SlotChooser {
|
|
122
|
+
private readonly random;
|
|
123
|
+
private readonly lastPlay;
|
|
124
|
+
private readonly lastTake;
|
|
125
|
+
constructor(random?: () => number);
|
|
126
|
+
/** The take to play now, or `null` to stay silent. `now` is in milliseconds. */
|
|
127
|
+
choose(id: string, slot: SoundSlot, now: number): SoundTake | null;
|
|
128
|
+
}
|
|
129
|
+
|
|
19
130
|
/** Skybox rendering modes. `none` disables skybox rendering entirely. */
|
|
20
131
|
type EnvironmentSkyboxType = "gradient" | "color" | "image" | "none";
|
|
21
132
|
/** Gradient distribution applied when {@link EnvironmentSkyboxState.type} is `"gradient"`. */
|
|
22
133
|
type EnvironmentGradientEffect = "radial" | "linear" | "angular";
|
|
23
134
|
/** Fog distance models. `none` disables fog. */
|
|
24
135
|
type EnvironmentFogType = "linear" | "exponential" | "none";
|
|
136
|
+
/**
|
|
137
|
+
* How an `"image"` skybox is projected.
|
|
138
|
+
*
|
|
139
|
+
* - `"screen"` (the behaviour when the field is absent): the image is drawn as
|
|
140
|
+
* a flat backdrop stretched over the viewport. It does not rotate with the
|
|
141
|
+
* camera.
|
|
142
|
+
* - `"equirect"`: the image is an equirectangular panorama wrapped around the
|
|
143
|
+
* scene, so it turns with the camera like a real sky. `.hdr` and `.exr`
|
|
144
|
+
* files load in this mode.
|
|
145
|
+
*/
|
|
146
|
+
type EnvironmentSkyboxImageProjection = "screen" | "equirect";
|
|
147
|
+
/**
|
|
148
|
+
* Tone-mapping operator applied by the renderer. `"none"` leaves colours
|
|
149
|
+
* linear-clamped (three's `NoToneMapping`).
|
|
150
|
+
*/
|
|
151
|
+
type EnvironmentToneMapping = "none" | "aces" | "agx" | "neutral";
|
|
25
152
|
/** Skybox configuration. Only the fields relevant to {@link type} are read at render time. */
|
|
26
153
|
type EnvironmentSkyboxState = {
|
|
27
154
|
/** Active skybox mode. */
|
|
28
155
|
type: EnvironmentSkyboxType;
|
|
29
156
|
/** Solid color used when {@link type} is `"color"`. `#rrggbb`. */
|
|
30
157
|
color: string;
|
|
31
|
-
/** URL or `localasset://` path of the
|
|
158
|
+
/** URL or `localasset://` path of the image used when {@link type} is `"image"`. */
|
|
32
159
|
imageUrl?: string;
|
|
160
|
+
/**
|
|
161
|
+
* Projection for an `"image"` skybox. Absent means `"screen"` (a flat
|
|
162
|
+
* backdrop, the original behaviour). Set `"equirect"` for a 360° panorama.
|
|
163
|
+
*/
|
|
164
|
+
imageProjection?: EnvironmentSkyboxImageProjection;
|
|
33
165
|
/** Gradient parameters used when {@link type} is `"gradient"`. */
|
|
34
166
|
gradient: {
|
|
35
167
|
/** Ordered list of color stops as `#rrggbb` strings. */
|
|
@@ -66,6 +198,37 @@ type EnvironmentGravityState = {
|
|
|
66
198
|
/** Gravity along world Z. */
|
|
67
199
|
z: number;
|
|
68
200
|
};
|
|
201
|
+
/**
|
|
202
|
+
* Image-based lighting and renderer colour settings. Every field is optional;
|
|
203
|
+
* the defaults below apply when a field is missing. When the whole block is
|
|
204
|
+
* absent the scene's environment map and the renderer's tone mapping are left
|
|
205
|
+
* untouched.
|
|
206
|
+
*/
|
|
207
|
+
type EnvironmentLightingState = {
|
|
208
|
+
/**
|
|
209
|
+
* URL or `localasset://` path of an equirectangular environment map used
|
|
210
|
+
* for image-based lighting (reflections and ambient light on PBR
|
|
211
|
+
* materials). `.hdr` and `.exr` load as HDR; any other extension loads as an
|
|
212
|
+
* sRGB image. Empty = no environment map.
|
|
213
|
+
*/
|
|
214
|
+
envMapUrl?: string;
|
|
215
|
+
/** Strength of the environment lighting (`scene.environmentIntensity`). Default `1`. */
|
|
216
|
+
envIntensity?: number;
|
|
217
|
+
/** Rotation of the environment map around world Y, in radians. Default `0`. */
|
|
218
|
+
envRotationY?: number;
|
|
219
|
+
/** Also show the environment map as the background. Overrides the skybox. Default `false`. */
|
|
220
|
+
useAsBackground?: boolean;
|
|
221
|
+
/** Background blur in `[0, 1]` when {@link useAsBackground} is on. Default `0`. */
|
|
222
|
+
backgroundBlurriness?: number;
|
|
223
|
+
/** Background brightness multiplier when {@link useAsBackground} is on. Default `1`. */
|
|
224
|
+
backgroundIntensity?: number;
|
|
225
|
+
/** Renderer tone-mapping operator. Default `"none"`. */
|
|
226
|
+
toneMapping?: EnvironmentToneMapping;
|
|
227
|
+
/** Renderer exposure (`toneMappingExposure`). Only has an effect when tone mapping is on. Default `1`. */
|
|
228
|
+
exposure?: number;
|
|
229
|
+
};
|
|
230
|
+
/** Defaults for every {@link EnvironmentLightingState} field. */
|
|
231
|
+
declare const DEFAULT_ENVIRONMENT_LIGHTING: Required<EnvironmentLightingState>;
|
|
69
232
|
/** Aggregated authoring state owned by {@link Environment}. */
|
|
70
233
|
type EnvironmentState = {
|
|
71
234
|
/** Skybox configuration. */
|
|
@@ -80,11 +243,24 @@ type EnvironmentState = {
|
|
|
80
243
|
* Default is `0.02` (50 Hz).
|
|
81
244
|
*/
|
|
82
245
|
fixedTimeStep: number;
|
|
246
|
+
/**
|
|
247
|
+
* Image-based lighting, tone mapping and exposure. Optional: absent means
|
|
248
|
+
* the scene's environment map and the renderer's tone mapping stay
|
|
249
|
+
* untouched, which is how every scene saved before 0.5.4 renders.
|
|
250
|
+
*/
|
|
251
|
+
lighting?: EnvironmentLightingState;
|
|
83
252
|
};
|
|
84
253
|
declare const DEFAULT_ENVIRONMENT_STATE: EnvironmentState;
|
|
254
|
+
/**
|
|
255
|
+
* Normalize a lighting block to a complete {@link EnvironmentLightingState}.
|
|
256
|
+
* Returns `undefined` when `value` is not an object, so a scene without the
|
|
257
|
+
* block stays without it.
|
|
258
|
+
*/
|
|
259
|
+
declare function normalizeEnvironmentLighting(value: unknown): Required<EnvironmentLightingState> | undefined;
|
|
85
260
|
/**
|
|
86
261
|
* Scene environment settings: skybox (gradient/color/image), fog
|
|
87
|
-
* (linear/exponential),
|
|
262
|
+
* (linear/exponential), gravity vector for the physics world, and optional
|
|
263
|
+
* image-based lighting / tone mapping (`values.lighting`).
|
|
88
264
|
* Singleton-style — attached to one environment entity per scene.
|
|
89
265
|
*
|
|
90
266
|
* Use `world.getEnvironmentComponent()` to access this component directly
|
|
@@ -94,7 +270,7 @@ declare const DEFAULT_ENVIRONMENT_STATE: EnvironmentState;
|
|
|
94
270
|
* @category Components
|
|
95
271
|
*/
|
|
96
272
|
declare class Environment extends Component {
|
|
97
|
-
/** Aggregated environment authoring state (skybox, fog, gravity). Saved with the project. */
|
|
273
|
+
/** Aggregated environment authoring state (skybox, fog, gravity, lighting). Saved with the project. */
|
|
98
274
|
values: EnvironmentState;
|
|
99
275
|
constructor(values?: Partial<EnvironmentState>);
|
|
100
276
|
}
|
|
@@ -323,6 +499,55 @@ declare class TransformComponent extends Component {
|
|
|
323
499
|
setRotation(input: TransformInput, order?: EulerOrder): this;
|
|
324
500
|
}
|
|
325
501
|
|
|
502
|
+
/** The limb a chain moves: its end bone, by humanoid name. */
|
|
503
|
+
type IKLimb = "leftHand" | "rightHand" | "leftFoot" | "rightFoot";
|
|
504
|
+
/** One limb reaching for an entity. */
|
|
505
|
+
type IKChain = {
|
|
506
|
+
/** The hand or foot that reaches. */
|
|
507
|
+
limb: IKLimb;
|
|
508
|
+
/** Entity whose world position the hand/foot reaches (a weapon's grip, a door handle, a step). */
|
|
509
|
+
target: EntityId | null;
|
|
510
|
+
/** Entity the elbow/knee bends toward; `null` keeps the animation's own bend. */
|
|
511
|
+
pole: EntityId | null;
|
|
512
|
+
/** 0 = the animation, 1 = the target; in between blends. */
|
|
513
|
+
weight: number;
|
|
514
|
+
/** Also turn the hand/foot to the target's rotation. */
|
|
515
|
+
matchRotation: boolean;
|
|
516
|
+
/** Whether this chain runs. */
|
|
517
|
+
enabled: boolean;
|
|
518
|
+
};
|
|
519
|
+
/** Optional initializer for {@link IKComponent}. */
|
|
520
|
+
type IKOptions = {
|
|
521
|
+
chains?: Array<Partial<IKChain> & {
|
|
522
|
+
limb: IKLimb;
|
|
523
|
+
}>;
|
|
524
|
+
enabled?: boolean;
|
|
525
|
+
};
|
|
526
|
+
/** A chain with every field filled in. */
|
|
527
|
+
declare function normalizeIKChain(chain: Partial<IKChain> & {
|
|
528
|
+
limb: IKLimb;
|
|
529
|
+
}): IKChain;
|
|
530
|
+
/**
|
|
531
|
+
* Inverse kinematics for a humanoid model: after the animation plays, each
|
|
532
|
+
* chain bends an arm or leg so its hand/foot reaches a target entity — the
|
|
533
|
+
* second hand on a rifle's grip, a hand on a door handle, a foot on a step.
|
|
534
|
+
* The elbow/knee keeps the animation's bend unless a pole entity says
|
|
535
|
+
* otherwise. Bones are found by humanoid name, so any rig the editor
|
|
536
|
+
* recognises works (Mixamo, auto-rigs, Unreal, VRM).
|
|
537
|
+
*
|
|
538
|
+
* The `IKSystem` runs it right after the `AnimationSystem`; objects attached
|
|
539
|
+
* to the moved bones follow.
|
|
540
|
+
*
|
|
541
|
+
* @category Components
|
|
542
|
+
*/
|
|
543
|
+
declare class IKComponent extends Component {
|
|
544
|
+
/** The limbs that reach. */
|
|
545
|
+
chains: IKChain[];
|
|
546
|
+
/** Turn every chain off at once. */
|
|
547
|
+
enabled: boolean;
|
|
548
|
+
constructor(options?: IKOptions);
|
|
549
|
+
}
|
|
550
|
+
|
|
326
551
|
/**
|
|
327
552
|
* Numeric identifier for an entity. Entities are pure ids — all data lives in
|
|
328
553
|
* components attached to the entity.
|
|
@@ -445,6 +670,99 @@ type IntersectionResult = {
|
|
|
445
670
|
threeResult: THREE.Intersection;
|
|
446
671
|
};
|
|
447
672
|
|
|
673
|
+
/** One shared entity, as the room holds it. */
|
|
674
|
+
type NetEntityView = {
|
|
675
|
+
id: string;
|
|
676
|
+
owner: string;
|
|
677
|
+
/** The prefab to spawn; empty for a scene object. */
|
|
678
|
+
prefab: string;
|
|
679
|
+
x: number;
|
|
680
|
+
y: number;
|
|
681
|
+
z: number;
|
|
682
|
+
qx: number;
|
|
683
|
+
qy: number;
|
|
684
|
+
qz: number;
|
|
685
|
+
qw: number;
|
|
686
|
+
/** JSON-encoded prop values. */
|
|
687
|
+
props: Record<string, string>;
|
|
688
|
+
};
|
|
689
|
+
type NetPose = Pick<NetEntityView, "x" | "y" | "z" | "qx" | "qy" | "qz" | "qw">;
|
|
690
|
+
/** What a shared-world connection must do. `ColyseusTransport` is the real one. */
|
|
691
|
+
interface NetworkTransport {
|
|
692
|
+
readonly sessionId: string;
|
|
693
|
+
/** The session that simulates scene objects. */
|
|
694
|
+
readonly host: string;
|
|
695
|
+
readonly players: string[];
|
|
696
|
+
onEntityAdd(cb: (entity: NetEntityView) => void): void;
|
|
697
|
+
onEntityChange(cb: (entity: NetEntityView) => void): void;
|
|
698
|
+
onEntityRemove(cb: (id: string) => void): void;
|
|
699
|
+
onPlayerJoin(cb: (id: string) => void): void;
|
|
700
|
+
onPlayerLeave(cb: (id: string) => void): void;
|
|
701
|
+
/** A message from the server or another player. */
|
|
702
|
+
onMessage(cb: (name: string, payload: unknown, from: string) => void): void;
|
|
703
|
+
/** The server overruled the owner's pose. */
|
|
704
|
+
onCorrect(cb: (id: string, pose: NetPose) => void): void;
|
|
705
|
+
onClose(cb: () => void): void;
|
|
706
|
+
/** Tell the room about the scene's shared objects; the first client's copy wins. */
|
|
707
|
+
registerScene(entities: (NetPose & {
|
|
708
|
+
id: string;
|
|
709
|
+
props: Record<string, string>;
|
|
710
|
+
})[]): void;
|
|
711
|
+
spawn(request: NetPose & {
|
|
712
|
+
prefab: string;
|
|
713
|
+
props: Record<string, string>;
|
|
714
|
+
}): void;
|
|
715
|
+
despawn(id: string): void;
|
|
716
|
+
sendPose(id: string, pose: NetPose): void;
|
|
717
|
+
setProp(id: string, key: string, json: string): void;
|
|
718
|
+
send(name: string, payload: unknown): void;
|
|
719
|
+
leave(): void;
|
|
720
|
+
}
|
|
721
|
+
/** Options for {@link NetworkHandle.spawn}. */
|
|
722
|
+
type NetSpawnOptions = {
|
|
723
|
+
position?: {
|
|
724
|
+
x?: number;
|
|
725
|
+
y?: number;
|
|
726
|
+
z?: number;
|
|
727
|
+
};
|
|
728
|
+
/** Euler XYZ in radians. */
|
|
729
|
+
rotation?: {
|
|
730
|
+
x?: number;
|
|
731
|
+
y?: number;
|
|
732
|
+
z?: number;
|
|
733
|
+
};
|
|
734
|
+
props?: Record<string, NetValue>;
|
|
735
|
+
};
|
|
736
|
+
/** A Behaviour's view of the shared world: `this.network`, `null` in a single-player run. */
|
|
737
|
+
interface NetworkHandle {
|
|
738
|
+
readonly connected: boolean;
|
|
739
|
+
/** This client's id in the room. */
|
|
740
|
+
readonly sessionId: string;
|
|
741
|
+
/** Whether this client simulates the scene's shared objects. */
|
|
742
|
+
readonly isHost: boolean;
|
|
743
|
+
/** Whether this client simulates this entity. */
|
|
744
|
+
readonly isOwner: boolean;
|
|
745
|
+
/** Everyone in the room, by session id. */
|
|
746
|
+
readonly players: string[];
|
|
747
|
+
/** Send to the room. Others hear it in `onMessage`, unless a server hook keeps it. */
|
|
748
|
+
send(name: string, payload?: unknown): void;
|
|
749
|
+
/** Listen for a message. Returns the way to stop. */
|
|
750
|
+
onMessage(name: string, handler: (payload: unknown, from: string) => void): () => void;
|
|
751
|
+
/** Spawn a prefab everyone sees, owned by this client. */
|
|
752
|
+
spawn(prefab: string | {
|
|
753
|
+
path: string;
|
|
754
|
+
}, options?: NetSpawnOptions): void;
|
|
755
|
+
/** Remove a shared entity this client owns (this one by default). */
|
|
756
|
+
despawn(entityId?: EntityId): void;
|
|
757
|
+
/** Change a shared value on this entity. Only its owner can. */
|
|
758
|
+
setProp(key: string, value: NetValue): void;
|
|
759
|
+
getProp(key: string): NetValue | undefined;
|
|
760
|
+
}
|
|
761
|
+
/** What `world.getNetwork()` returns. Set by `NetworkSystem` once connected. */
|
|
762
|
+
interface NetworkService {
|
|
763
|
+
handleFor(entityId: EntityId): NetworkHandle;
|
|
764
|
+
}
|
|
765
|
+
|
|
448
766
|
type ComponentClass<T extends Component> = new (...args: never[]) => T;
|
|
449
767
|
type AnyComponent = Component;
|
|
450
768
|
type WorldHistorySnapshot = {
|
|
@@ -468,6 +786,53 @@ type NormalizeContext = {
|
|
|
468
786
|
declare function normalizeDebugValue(value: unknown, ctx: NormalizeContext): unknown;
|
|
469
787
|
declare function cloneHistoryValue<T>(value: T, seen?: WeakMap<object, unknown>): T;
|
|
470
788
|
|
|
789
|
+
/**
|
|
790
|
+
* Where in a script's life an error happened.
|
|
791
|
+
*
|
|
792
|
+
* - `"load"`: fetching/importing the module, or the named class is missing.
|
|
793
|
+
* - `"init"`: the constructor or a Behaviour's `init()` threw.
|
|
794
|
+
* - `"build"`: a ScriptObject's `build()` threw or did not return an Object3D.
|
|
795
|
+
* - `"update"`: a per-frame `update()` / `onUpdate()` threw.
|
|
796
|
+
* - Any other string is the name of the Behaviour hook that threw, e.g.
|
|
797
|
+
* `"onSelect"`, `"onUiPress"`, `"onGrab"`, `"onXRSessionStart"`.
|
|
798
|
+
*/
|
|
799
|
+
type ScriptErrorPhase = "load" | "init" | "build" | "update" | (string & {});
|
|
800
|
+
/** Which kind of script failed. */
|
|
801
|
+
type ScriptErrorSource = "behaviour" | "scriptObject";
|
|
802
|
+
/**
|
|
803
|
+
* Emitted by `world.onScriptError(...)` the first time a distinct script error
|
|
804
|
+
* occurs. "Distinct" is the combination of script URL, class name, phase and
|
|
805
|
+
* message: ten enemies running the same broken script report once.
|
|
806
|
+
*/
|
|
807
|
+
type ScriptErrorEvent = {
|
|
808
|
+
/** Entity the failing script is attached to. */
|
|
809
|
+
entityId: number;
|
|
810
|
+
/** That entity's name (`Name` component), or `"Entity <id>"`. */
|
|
811
|
+
entityName: string;
|
|
812
|
+
/** URL of the script module. Empty when unknown. */
|
|
813
|
+
scriptUrl: string;
|
|
814
|
+
/** Script class name. */
|
|
815
|
+
className: string;
|
|
816
|
+
/** Lifecycle phase or hook name. See {@link ScriptErrorPhase}. */
|
|
817
|
+
phase: ScriptErrorPhase;
|
|
818
|
+
/** Short error message, with local file paths removed. */
|
|
819
|
+
message: string;
|
|
820
|
+
/** Stack trace when the error carried one, with local file paths removed. */
|
|
821
|
+
stack?: string;
|
|
822
|
+
/** Behaviour or ScriptObject. */
|
|
823
|
+
source: ScriptErrorSource;
|
|
824
|
+
};
|
|
825
|
+
/** Listener registered with `world.onScriptError(...)`. */
|
|
826
|
+
type ScriptErrorListener = (event: ScriptErrorEvent) => void;
|
|
827
|
+
/** What a system knows when it reports a script error. */
|
|
828
|
+
type ScriptErrorReport = {
|
|
829
|
+
entityId: number;
|
|
830
|
+
scriptUrl: string;
|
|
831
|
+
className: string;
|
|
832
|
+
phase: ScriptErrorPhase;
|
|
833
|
+
source: ScriptErrorSource;
|
|
834
|
+
};
|
|
835
|
+
|
|
471
836
|
/**
|
|
472
837
|
* Snapshot-space entity-id walking/remapping.
|
|
473
838
|
*
|
|
@@ -479,6 +844,7 @@ declare function cloneHistoryValue<T>(value: T, seen?: WeakMap<object, unknown>)
|
|
|
479
844
|
* - `ScriptObjectComponent.data` EntityInput/ComponentInput (same shapes)
|
|
480
845
|
* - `InstancedMeshComponent.instanceEntityIds[]`
|
|
481
846
|
* - `InstanceSlotComponent.groupEntityId`
|
|
847
|
+
* - `IKComponent.chains[].target` / `.pole`
|
|
482
848
|
*
|
|
483
849
|
* Any new id-bearing component field must be added here — serialization,
|
|
484
850
|
* instantiation and the override differ all route through this walker.
|
|
@@ -595,6 +961,29 @@ declare function spawnPrefab(world: World, source: SpawnPrefabSource, options?:
|
|
|
595
961
|
*/
|
|
596
962
|
declare function despawnPrefab(world: World, rootId: EntityId, dispose?: boolean): number;
|
|
597
963
|
|
|
964
|
+
/** A bone of a loaded model, for bone pickers and attachment. */
|
|
965
|
+
type ModelBoneInfo = {
|
|
966
|
+
/** Node name as three.js has it (glTF names are sanitized: `mixamorig:Hips` → `mixamorigHips`). */
|
|
967
|
+
name: string;
|
|
968
|
+
/** Humanoid name when the rig is a recognisable humanoid, else `null`. */
|
|
969
|
+
humanoid: HumanoidBone | null;
|
|
970
|
+
/** Parent bone's name, or `null` for a root bone. */
|
|
971
|
+
parent: string | null;
|
|
972
|
+
/** Depth below the topmost bone (for indenting a tree). */
|
|
973
|
+
depth: number;
|
|
974
|
+
};
|
|
975
|
+
/** Every bone of a loaded model, parents before children. */
|
|
976
|
+
declare function listModelBones(root: THREE.Object3D): ModelBoneInfo[];
|
|
977
|
+
/**
|
|
978
|
+
* The bone an attachment names in `root`: by node name, then by its
|
|
979
|
+
* sanitized form (a name saved from a source file), then by humanoid name
|
|
980
|
+
* (the same body part on another rig). `null` when none matches.
|
|
981
|
+
*/
|
|
982
|
+
declare function findModelBone(root: THREE.Object3D, ref: {
|
|
983
|
+
bone?: string | null;
|
|
984
|
+
humanoid?: string | null;
|
|
985
|
+
}): THREE.Object3D | null;
|
|
986
|
+
|
|
598
987
|
type CreatePayload = {
|
|
599
988
|
name?: string;
|
|
600
989
|
transform?: TransformData;
|
|
@@ -619,7 +1008,7 @@ type CreateContext = {
|
|
|
619
1008
|
isEditor?: boolean;
|
|
620
1009
|
};
|
|
621
1010
|
type EntityFactory = (context: CreateContext) => EntityId;
|
|
622
|
-
type EcsComponentFactoryKind = "animation" | "audio" | "camera" | "environment" | "entityType" | "image" | "imageTargetAnchor" | "imageTarget" | "light" | "material" | "mesh" | "meshGeometry" | "model" | "name" | "object3DRef" | "parentId" | "physics" | "postprocessing" | "script" | "scriptObject" | "selectable" | "selectionTransformState" | "sprite" | "transform" | "video" | "instancedMesh" | "xrRig" | "vrTeleportArea" | "xrHandPose" | "xrAnchor" | "uiPanel" | "uiText" | "uiButton" | "uiToggle" | "uiSlider" | "xrInteractable" | "xrInteractor" | "xrInteractorSide";
|
|
1011
|
+
type EcsComponentFactoryKind = "animation" | "audio" | "camera" | "environment" | "entityType" | "image" | "imageTargetAnchor" | "imageTarget" | "light" | "material" | "mesh" | "meshGeometry" | "model" | "name" | "object3DRef" | "parentId" | "physics" | "postprocessing" | "script" | "scriptObject" | "selectable" | "selectionTransformState" | "sprite" | "transform" | "video" | "instancedMesh" | "xrRig" | "vrTeleportArea" | "xrHandPose" | "xrAnchor" | "boneAttachment" | "ik" | "networkIdentity" | "networkTransform" | "networkedProps" | "networkSpawner" | "uiPanel" | "uiText" | "uiButton" | "uiToggle" | "uiSlider" | "xrInteractable" | "xrInteractor" | "xrInteractorSide";
|
|
623
1012
|
type ComponentFactory = (world: World, entityId: EntityId, ...args: any[]) => unknown;
|
|
624
1013
|
declare class ObjectManagementSystem implements EcsSystem {
|
|
625
1014
|
private readonly scene;
|
|
@@ -628,6 +1017,9 @@ declare class ObjectManagementSystem implements EcsSystem {
|
|
|
628
1017
|
private readonly registry;
|
|
629
1018
|
private readonly componentRegistry;
|
|
630
1019
|
private readonly createQueue;
|
|
1020
|
+
private readonly boneSockets;
|
|
1021
|
+
/** Attachments whose bone wasn't found in a given model (skip re-searching every frame). */
|
|
1022
|
+
private readonly boneMisses;
|
|
631
1023
|
constructor(scene: THREE.Scene, camera: THREE.PerspectiveCamera, isEditor?: boolean);
|
|
632
1024
|
register(kind: EcsEntityKind, factory: EntityFactory): void;
|
|
633
1025
|
registerComponentFactory(kind: EcsComponentFactoryKind, factory: ComponentFactory): void;
|
|
@@ -665,9 +1057,144 @@ declare class ObjectManagementSystem implements EcsSystem {
|
|
|
665
1057
|
}): boolean;
|
|
666
1058
|
private syncTransformComponentFromObject;
|
|
667
1059
|
reconcileSceneFromWorld(world: World): void;
|
|
1060
|
+
private dropBoneSocket;
|
|
1061
|
+
/**
|
|
1062
|
+
* The socket an attached entity hangs under, or `null` (not attached, the
|
|
1063
|
+
* parent's model not loaded yet, or no such bone — the entity then sits
|
|
1064
|
+
* under its parent as an ordinary child).
|
|
1065
|
+
*/
|
|
1066
|
+
private resolveBoneSocket;
|
|
1067
|
+
/**
|
|
1068
|
+
* Cancel the rig's own scale between the character and the bone (a
|
|
1069
|
+
* centimetre armature under a 0.01 node), so offsets are in the character's
|
|
1070
|
+
* units and the object keeps its size; the character entity's own scale
|
|
1071
|
+
* still applies, as it does to any child.
|
|
1072
|
+
*/
|
|
1073
|
+
private fitSocketScale;
|
|
1074
|
+
/**
|
|
1075
|
+
* Load a model entity's file again and swap it in (the file was rewritten);
|
|
1076
|
+
* the entity, its components and children stay, attachments re-home.
|
|
1077
|
+
*/
|
|
1078
|
+
reloadModel(world: World, entityId: EntityId): boolean;
|
|
1079
|
+
/** Reload every model entity whose path `matches` (returns how many). */
|
|
1080
|
+
reloadModelsAt(world: World, matches: (path: string) => boolean): number;
|
|
1081
|
+
/** The bones of an entity's loaded model (empty until it loads, or for a model without a skeleton). */
|
|
1082
|
+
listModelBones(world: World, entityId: EntityId): ModelBoneInfo[];
|
|
1083
|
+
/** The socket object an attached entity currently hangs under, if resolved. */
|
|
1084
|
+
getBoneSocket(entityId: EntityId): THREE.Object3D | null;
|
|
1085
|
+
/**
|
|
1086
|
+
* Fix `entityId` to a bone of `parentEntityId`'s model (making it the
|
|
1087
|
+
* parent if it isn't). With `preserveWorldTransform` (default) it stays
|
|
1088
|
+
* where it is and its Transform becomes the offset from the bone; without,
|
|
1089
|
+
* it snaps onto the bone (zero offset). Returns whether the bone was found
|
|
1090
|
+
* (when the model is still loading, the attachment is stored and resolves
|
|
1091
|
+
* once it loads, without preserving the pose).
|
|
1092
|
+
*/
|
|
1093
|
+
attachToBone(world: World, entityId: EntityId, parentEntityId: EntityId, ref: {
|
|
1094
|
+
bone?: string;
|
|
1095
|
+
humanoid?: string | null;
|
|
1096
|
+
}, options?: {
|
|
1097
|
+
preserveWorldTransform?: boolean;
|
|
1098
|
+
compensateScale?: boolean;
|
|
1099
|
+
}): {
|
|
1100
|
+
ok: boolean;
|
|
1101
|
+
resolved: boolean;
|
|
1102
|
+
bone: string | null;
|
|
1103
|
+
};
|
|
1104
|
+
/**
|
|
1105
|
+
* Release a bone attachment. The entity stays a child of the character
|
|
1106
|
+
* (or moves to the root with `toRoot`), and by default keeps its place in
|
|
1107
|
+
* the world.
|
|
1108
|
+
*/
|
|
1109
|
+
detachFromBone(world: World, entityId: EntityId, options?: {
|
|
1110
|
+
preserveWorldTransform?: boolean;
|
|
1111
|
+
toRoot?: boolean;
|
|
1112
|
+
}): boolean;
|
|
668
1113
|
update(world: World): void;
|
|
669
1114
|
}
|
|
670
1115
|
|
|
1116
|
+
/**
|
|
1117
|
+
* A renderer a {@link World} can run on: three's classic `WebGLRenderer`, or
|
|
1118
|
+
* `WebGPURenderer` from `three/webgpu` (which falls back to WebGL 2 on its own
|
|
1119
|
+
* when the browser has no WebGPU).
|
|
1120
|
+
*/
|
|
1121
|
+
type EcsRenderer = THREE.WebGLRenderer | WebGPURenderer;
|
|
1122
|
+
/** Which renderer family a world is drawing with. */
|
|
1123
|
+
type RendererKind = "webgl" | "webgpu";
|
|
1124
|
+
/**
|
|
1125
|
+
* A built post-processing chain. `RenderSystem` calls `render()` in place of
|
|
1126
|
+
* `renderer.render()` while it is active.
|
|
1127
|
+
*
|
|
1128
|
+
* `setSize` / `setPixelRatio` are optional: a WebGL `EffectComposer` needs
|
|
1129
|
+
* them, while a WebGPU `RenderPipeline` reads the renderer's size every frame.
|
|
1130
|
+
*/
|
|
1131
|
+
interface PostprocessingPipeline {
|
|
1132
|
+
render(): void;
|
|
1133
|
+
setSize?(width: number, height: number): void;
|
|
1134
|
+
setPixelRatio?(pixelRatio: number): void;
|
|
1135
|
+
dispose(): void;
|
|
1136
|
+
}
|
|
1137
|
+
/** Everything a backend needs to build a post-processing chain. */
|
|
1138
|
+
interface PostprocessingBuildContext {
|
|
1139
|
+
renderer: EcsRenderer;
|
|
1140
|
+
scene: THREE.Scene;
|
|
1141
|
+
camera: THREE.PerspectiveCamera;
|
|
1142
|
+
/** The scene's current `Postprocessing.values` (`postEnabled` is `true`). */
|
|
1143
|
+
values: PostprocessingState;
|
|
1144
|
+
/** The world being rendered, when known (used to scope one-time warnings). */
|
|
1145
|
+
world?: World;
|
|
1146
|
+
}
|
|
1147
|
+
/** Green-screen settings, in the same units as `VideoComponent.options`. */
|
|
1148
|
+
interface ChromaKeyOptions {
|
|
1149
|
+
/** Colour to key out (any three.js colour representation, e.g. `"#00ff00"`). */
|
|
1150
|
+
keyColor: THREE.ColorRepresentation;
|
|
1151
|
+
/** Colour distance below which a pixel is fully transparent. */
|
|
1152
|
+
similarity: number;
|
|
1153
|
+
/** Width of the soft edge above `similarity`. */
|
|
1154
|
+
smoothness: number;
|
|
1155
|
+
/** How far past the edge the key colour is desaturated (spill removal). */
|
|
1156
|
+
spill: number;
|
|
1157
|
+
}
|
|
1158
|
+
/**
|
|
1159
|
+
* Everything renderer-specific the engine does, behind one small interface so
|
|
1160
|
+
* a {@link World} can run on WebGL or WebGPU.
|
|
1161
|
+
*
|
|
1162
|
+
* The default is `webglBackend` (exported from the package root). For a
|
|
1163
|
+
* `WebGPURenderer`, pass `webgpuBackend` from
|
|
1164
|
+
* `@relu-interactives/spatial-ecs/webgpu`.
|
|
1165
|
+
*/
|
|
1166
|
+
interface RenderBackend {
|
|
1167
|
+
/** Renderer family this backend drives. */
|
|
1168
|
+
readonly kind: RendererKind;
|
|
1169
|
+
/** One-time renderer setup, called once from the `World` constructor. */
|
|
1170
|
+
install?(world: World): void;
|
|
1171
|
+
/**
|
|
1172
|
+
* Called the first time an area light (`RectAreaLight`) is created, so the
|
|
1173
|
+
* backend can load the lookup tables those lights need. Optional.
|
|
1174
|
+
*/
|
|
1175
|
+
prepareAreaLights?(world: World): void;
|
|
1176
|
+
/**
|
|
1177
|
+
* Build the post-processing chain for `context.values`. Return `null` to
|
|
1178
|
+
* render the scene directly (no chain).
|
|
1179
|
+
*/
|
|
1180
|
+
createPostprocessing(context: PostprocessingBuildContext): PostprocessingPipeline | null;
|
|
1181
|
+
/**
|
|
1182
|
+
* Apply a values change to an existing chain without rebuilding it. Return
|
|
1183
|
+
* `true` when the chain was updated in place, `false` when the change is
|
|
1184
|
+
* structural (an effect switched on or off) and the caller must rebuild.
|
|
1185
|
+
* When omitted, every change rebuilds.
|
|
1186
|
+
*/
|
|
1187
|
+
updatePostprocessing?(pipeline: PostprocessingPipeline, previous: PostprocessingState, next: PostprocessingState): boolean;
|
|
1188
|
+
/** Material that renders `texture` with `options.keyColor` keyed out. */
|
|
1189
|
+
createChromaKeyMaterial(texture: THREE.Texture, options: ChromaKeyOptions): THREE.Material;
|
|
1190
|
+
/**
|
|
1191
|
+
* Push new options into a material made by {@link createChromaKeyMaterial}.
|
|
1192
|
+
* Returns `false` when `material` is not one of this backend's chroma-key
|
|
1193
|
+
* materials.
|
|
1194
|
+
*/
|
|
1195
|
+
updateChromaKeyMaterial(material: THREE.Material, options: ChromaKeyOptions): boolean;
|
|
1196
|
+
}
|
|
1197
|
+
|
|
671
1198
|
declare const KeyboardKeys: {
|
|
672
1199
|
readonly A: "a";
|
|
673
1200
|
readonly B: "b";
|
|
@@ -833,12 +1360,41 @@ declare class InputSystem implements EcsSystem {
|
|
|
833
1360
|
private clearAll;
|
|
834
1361
|
}
|
|
835
1362
|
|
|
1363
|
+
/**
|
|
1364
|
+
* Draws the frame: through the post-processing chain in
|
|
1365
|
+
* `scene.userData.ecsPostprocessingComposer` while
|
|
1366
|
+
* `scene.userData.ecsPostprocessingComposerActive` is `true`, otherwise with
|
|
1367
|
+
* `renderer.render(scene, camera)`. Runs last in the default system list.
|
|
1368
|
+
*
|
|
1369
|
+
* Works with `WebGLRenderer` and `WebGPURenderer`. A `WebGPURenderer` must be
|
|
1370
|
+
* initialised (`await renderer.init()`) first; until it is, frames are
|
|
1371
|
+
* skipped with a single warning instead of throwing.
|
|
1372
|
+
*
|
|
1373
|
+
* @category Systems
|
|
1374
|
+
*/
|
|
836
1375
|
declare class RenderSystem implements EcsSystem {
|
|
837
1376
|
private readonly renderer;
|
|
838
1377
|
private readonly scene;
|
|
839
1378
|
private readonly camera;
|
|
840
1379
|
private readonly afterRender?;
|
|
841
|
-
|
|
1380
|
+
/** Composer the last size was pushed to, plus that size. */
|
|
1381
|
+
private sizedComposer;
|
|
1382
|
+
private sizedWidth;
|
|
1383
|
+
private sizedHeight;
|
|
1384
|
+
private sizedPixelRatio;
|
|
1385
|
+
private warnedUninitialized;
|
|
1386
|
+
constructor(renderer: EcsRenderer, scene: THREE.Scene, camera: THREE.PerspectiveCamera, afterRender?: () => void);
|
|
1387
|
+
/**
|
|
1388
|
+
* `WebGPURenderer.render()` throws until `await renderer.init()` resolved.
|
|
1389
|
+
* Skip those frames (warning once) rather than throwing from the loop.
|
|
1390
|
+
*/
|
|
1391
|
+
private isRendererReady;
|
|
1392
|
+
/**
|
|
1393
|
+
* Resize the composer only when the canvas size or pixel ratio changed, or
|
|
1394
|
+
* when the composer itself was rebuilt. `setSize` resizes every render
|
|
1395
|
+
* target in the chain, so calling it every frame wasted GPU work.
|
|
1396
|
+
*/
|
|
1397
|
+
private syncComposerSize;
|
|
842
1398
|
update(_world: World): void;
|
|
843
1399
|
}
|
|
844
1400
|
|
|
@@ -846,6 +1402,102 @@ declare class TransformSyncSystem implements EcsSystem {
|
|
|
846
1402
|
update(world: World): void;
|
|
847
1403
|
}
|
|
848
1404
|
|
|
1405
|
+
/** Options for {@link AudioSystem.playSlot}. */
|
|
1406
|
+
type PlaySlotOptions = {
|
|
1407
|
+
/** Multiplies the slot's volume. */
|
|
1408
|
+
volume?: number;
|
|
1409
|
+
/** Play from this point in the world instead of everywhere. */
|
|
1410
|
+
position?: {
|
|
1411
|
+
x: number;
|
|
1412
|
+
y: number;
|
|
1413
|
+
z: number;
|
|
1414
|
+
};
|
|
1415
|
+
};
|
|
1416
|
+
/**
|
|
1417
|
+
* Reconciles `AudioComponent` state with the underlying THREE.js audio objects
|
|
1418
|
+
* each frame.
|
|
1419
|
+
*
|
|
1420
|
+
* **Playback** — drives `play()`, `pause()`, and `stop()` on the THREE.js
|
|
1421
|
+
* audio node based on the `isPlaying` / `isPaused` flags set by
|
|
1422
|
+
* `AudioComponent.play()`, `.pause()`, and `.stop()`.
|
|
1423
|
+
*
|
|
1424
|
+
* **Option sync** — detects changes to `loop`, `pitch`, `volume`,
|
|
1425
|
+
* `refDistance`, `distanceModel`, and `rolloffFactor` and applies them live.
|
|
1426
|
+
* Changes take effect on the next frame, so scripts and inspector edits during
|
|
1427
|
+
* runtime are reflected without reloading the scene.
|
|
1428
|
+
*
|
|
1429
|
+
* **Mixing** — every sound plays through a bus (`sfx`, `voice`, `music`) with
|
|
1430
|
+
* its own volume, and music dips while a voice plays.
|
|
1431
|
+
*
|
|
1432
|
+
* **Sound banks** — {@link loadSoundBank} and {@link playSlot} play named
|
|
1433
|
+
* sounds from a `.soundbank.json` asset, as a random take.
|
|
1434
|
+
*
|
|
1435
|
+
* Only active in **preview** mode (`isEditor: true` makes every update a
|
|
1436
|
+
* no-op so the editor is unaffected).
|
|
1437
|
+
*
|
|
1438
|
+
* @category Systems
|
|
1439
|
+
*/
|
|
1440
|
+
declare class AudioSystem implements EcsSystem {
|
|
1441
|
+
private readonly isEditor;
|
|
1442
|
+
/** THREE.js `isPlaying` state captured at the end of the previous frame. */
|
|
1443
|
+
private readonly prevPlayingState;
|
|
1444
|
+
/** Snapshot of options applied in the previous frame, for change detection. */
|
|
1445
|
+
private readonly prevOptions;
|
|
1446
|
+
/** Tracks entities that were stopped due to invisibility. */
|
|
1447
|
+
private readonly stoppedDueToInvisibility;
|
|
1448
|
+
private world;
|
|
1449
|
+
private mixer;
|
|
1450
|
+
private readonly slots;
|
|
1451
|
+
private readonly buffers;
|
|
1452
|
+
private readonly chooser;
|
|
1453
|
+
private voice;
|
|
1454
|
+
constructor({ isEditor }?: {
|
|
1455
|
+
isEditor?: boolean;
|
|
1456
|
+
});
|
|
1457
|
+
/** Scripts can load a bank in `init`, before this system's first update. */
|
|
1458
|
+
attachWorld(world: World): void;
|
|
1459
|
+
/** The mixer, made with the listener on first use. */
|
|
1460
|
+
private getMixer;
|
|
1461
|
+
/** Set a bus's volume (`0` silent, `1` as mixed). */
|
|
1462
|
+
setBusVolume(bus: AudioBus, volume: number): void;
|
|
1463
|
+
getBusVolume(bus: AudioBus): number;
|
|
1464
|
+
/**
|
|
1465
|
+
* Fetch a `.soundbank.json` and decode its recordings. Its slots add to any
|
|
1466
|
+
* loaded before, and a slot id used twice takes the later one.
|
|
1467
|
+
* @param source an asset path, or a script's `AssetInput` field
|
|
1468
|
+
*/
|
|
1469
|
+
loadSoundBank(source: string | {
|
|
1470
|
+
path: string;
|
|
1471
|
+
}): Promise<void>;
|
|
1472
|
+
/**
|
|
1473
|
+
* Play a named sound from a loaded bank. Returns whether it sounded: a slot's
|
|
1474
|
+
* chance, cooldown and priority can each keep it quiet, and that's normal.
|
|
1475
|
+
*/
|
|
1476
|
+
playSlot(id: string, options?: PlaySlotOptions): boolean;
|
|
1477
|
+
update(world: World, _deltaTime: number): void;
|
|
1478
|
+
/** Apply any changed options from the component to the THREE.js audio node. */
|
|
1479
|
+
private _syncOptions;
|
|
1480
|
+
dispose(_world: World): void;
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
/**
|
|
1484
|
+
* Runs each {@link IKComponent}'s chains after the animation: hands and feet
|
|
1485
|
+
* reach their target entities. Bones the animation doesn't drive would keep
|
|
1486
|
+
* last frame's IK pose and drift, so every bone IK touched is put back to its
|
|
1487
|
+
* pre-IK rotation first unless the animation already overwrote it.
|
|
1488
|
+
*
|
|
1489
|
+
* @category Systems
|
|
1490
|
+
*/
|
|
1491
|
+
declare class IKSystem implements EcsSystem {
|
|
1492
|
+
private readonly runtimes;
|
|
1493
|
+
private readonly reach;
|
|
1494
|
+
/** How far a limb's end stayed from its target last frame, in metres (0 = reached). */
|
|
1495
|
+
getReachError(entityId: EntityId, limb: IKLimb): number | null;
|
|
1496
|
+
private restore;
|
|
1497
|
+
update(world: World): void;
|
|
1498
|
+
dispose(): void;
|
|
1499
|
+
}
|
|
1500
|
+
|
|
849
1501
|
type StoreListener = () => void;
|
|
850
1502
|
type WorldFeatureFlags = {
|
|
851
1503
|
supportSkybox?: boolean;
|
|
@@ -864,13 +1516,21 @@ declare class World {
|
|
|
864
1516
|
private systems;
|
|
865
1517
|
private selectionListeners;
|
|
866
1518
|
private storeListeners;
|
|
1519
|
+
private scriptErrorListeners;
|
|
1520
|
+
/** Keys (`url|class|phase|message`) of script errors already reported. */
|
|
1521
|
+
private reportedScriptErrors;
|
|
867
1522
|
private scene;
|
|
868
1523
|
private camera;
|
|
869
1524
|
private renderer;
|
|
1525
|
+
private readonly rendererKind;
|
|
1526
|
+
private readonly renderBackend;
|
|
870
1527
|
private readonly featureFlags;
|
|
871
1528
|
private components;
|
|
872
1529
|
private inputSystem;
|
|
873
1530
|
private objectManagementSystem;
|
|
1531
|
+
private ikSystem;
|
|
1532
|
+
private audioSystem;
|
|
1533
|
+
private network;
|
|
874
1534
|
private environmentSyncSystem;
|
|
875
1535
|
private postprocessingSyncSystem;
|
|
876
1536
|
private rapierModule;
|
|
@@ -878,10 +1538,20 @@ declare class World {
|
|
|
878
1538
|
private physicsWorld;
|
|
879
1539
|
private isEditor;
|
|
880
1540
|
private paused;
|
|
1541
|
+
/**
|
|
1542
|
+
* @param options.renderer - A `THREE.WebGLRenderer`, or a `WebGPURenderer`
|
|
1543
|
+
* from `three/webgpu`. A `WebGPURenderer` must be initialised
|
|
1544
|
+
* (`await renderer.init()`) before the first `update()`.
|
|
1545
|
+
* @param options.backend - Renderer-specific behaviour (post-processing,
|
|
1546
|
+
* green-screen video, area lights). Defaults to the WebGL backend; pass
|
|
1547
|
+
* `webgpuBackend` from `@relu-interactives/spatial-ecs/webgpu` with a
|
|
1548
|
+
* `WebGPURenderer`.
|
|
1549
|
+
*/
|
|
881
1550
|
constructor(options: {
|
|
882
1551
|
scene: THREE.Scene;
|
|
883
1552
|
camera: THREE.PerspectiveCamera;
|
|
884
|
-
renderer:
|
|
1553
|
+
renderer: EcsRenderer;
|
|
1554
|
+
backend?: RenderBackend;
|
|
885
1555
|
featureFlags?: WorldFeatureFlags;
|
|
886
1556
|
});
|
|
887
1557
|
createEntity(): EntityId;
|
|
@@ -1013,7 +1683,20 @@ declare class World {
|
|
|
1013
1683
|
isPaused(): boolean;
|
|
1014
1684
|
getScene(): THREE.Scene;
|
|
1015
1685
|
getCamera(): THREE.PerspectiveCamera;
|
|
1016
|
-
|
|
1686
|
+
/**
|
|
1687
|
+
* The renderer this world draws with: a `THREE.WebGLRenderer`, or a
|
|
1688
|
+
* `WebGPURenderer` from `three/webgpu`. Check {@link getRendererKind} before
|
|
1689
|
+
* using an API only one of them has (for example `capabilities` exists on
|
|
1690
|
+
* WebGL only).
|
|
1691
|
+
*/
|
|
1692
|
+
getRenderer(): EcsRenderer;
|
|
1693
|
+
/** `"webgpu"` when the world renders with a `WebGPURenderer`, else `"webgl"`. */
|
|
1694
|
+
getRendererKind(): RendererKind;
|
|
1695
|
+
/**
|
|
1696
|
+
* The renderer-specific backend in use (post-processing, green-screen
|
|
1697
|
+
* video, area lights). See `RenderBackend`.
|
|
1698
|
+
*/
|
|
1699
|
+
getRenderBackend(): RenderBackend;
|
|
1017
1700
|
update(deltaTime: number): void;
|
|
1018
1701
|
dispose(): void;
|
|
1019
1702
|
setSelectedEntity(entityId: EntityId | null): void;
|
|
@@ -1037,6 +1720,14 @@ declare class World {
|
|
|
1037
1720
|
spawnPrefab(source: SpawnPrefabSource, options?: SpawnPrefabOptions): Promise<EntityId>;
|
|
1038
1721
|
/** Remove a spawned prefab instance (root + descendants). */
|
|
1039
1722
|
despawnPrefab(rootEntityId: EntityId): number;
|
|
1723
|
+
/** The shared-world connection, or `null` in a single-player run. */
|
|
1724
|
+
getNetwork(): NetworkService | null;
|
|
1725
|
+
/** Set by `NetworkSystem` when it connects and clears. */
|
|
1726
|
+
setNetwork(network: NetworkService | null): void;
|
|
1727
|
+
/** The audio system (mixer buses, sound banks), or `null` before `setup`. */
|
|
1728
|
+
getAudioSystem(): AudioSystem | null;
|
|
1729
|
+
/** The IK system (reach errors per limb), or `null` before `setup`. */
|
|
1730
|
+
getIKSystem(): IKSystem | null;
|
|
1040
1731
|
getObjectManagementSystem(): ObjectManagementSystem;
|
|
1041
1732
|
/**
|
|
1042
1733
|
* Returns the singleton {@link Environment} component for the scene, or
|
|
@@ -1127,6 +1818,41 @@ declare class World {
|
|
|
1127
1818
|
getAllEntities(): WorldEntityView[];
|
|
1128
1819
|
onSelectionChanged(listener: SelectionListener): () => void;
|
|
1129
1820
|
subscribe(listener: StoreListener): () => void;
|
|
1821
|
+
/**
|
|
1822
|
+
* Listen for script errors from Behaviours and ScriptObjects: load
|
|
1823
|
+
* failures, `init()` / `build()` / `update()` exceptions, and exceptions
|
|
1824
|
+
* thrown inside Behaviour hooks such as `onSelect` or `onUiPress`.
|
|
1825
|
+
*
|
|
1826
|
+
* Each DISTINCT error (same script URL, class, phase and message) is
|
|
1827
|
+
* delivered once, so a script that throws every frame does not flood the
|
|
1828
|
+
* listener. Returns an unsubscribe function.
|
|
1829
|
+
*
|
|
1830
|
+
* @example
|
|
1831
|
+
* ```ts
|
|
1832
|
+
* const stop = world.onScriptError((event) => {
|
|
1833
|
+
* console.warn(`${event.className} failed in ${event.phase}: ${event.message}`);
|
|
1834
|
+
* });
|
|
1835
|
+
* // later
|
|
1836
|
+
* stop();
|
|
1837
|
+
* ```
|
|
1838
|
+
*/
|
|
1839
|
+
onScriptError(listener: ScriptErrorListener): () => void;
|
|
1840
|
+
/**
|
|
1841
|
+
* Report a script error. Used by the script systems and by any system that
|
|
1842
|
+
* calls into Behaviour hooks; scripts themselves do not need to call it.
|
|
1843
|
+
*
|
|
1844
|
+
* The first occurrence of a distinct error (same script URL, class, phase
|
|
1845
|
+
* and message) is logged with `console.error` and delivered to
|
|
1846
|
+
* {@link onScriptError} listeners; repeats are dropped. Returns `true` when
|
|
1847
|
+
* the error was new.
|
|
1848
|
+
*/
|
|
1849
|
+
reportScriptError(report: ScriptErrorReport, error: unknown): boolean;
|
|
1850
|
+
/**
|
|
1851
|
+
* Forget which script errors were already reported, so their next
|
|
1852
|
+
* occurrence is logged and delivered again. Pass a script URL to forget only
|
|
1853
|
+
* that script's errors (for example after hot-reloading it).
|
|
1854
|
+
*/
|
|
1855
|
+
clearScriptErrors(scriptUrl?: string): void;
|
|
1130
1856
|
getDebugSnapshot(maxDepth?: number): unknown;
|
|
1131
1857
|
getDebugSignature(maxDepth?: number): string;
|
|
1132
1858
|
/**
|
|
@@ -1154,4 +1880,4 @@ interface EcsSystem {
|
|
|
1154
1880
|
dispose?(world: World): void;
|
|
1155
1881
|
}
|
|
1156
1882
|
|
|
1157
|
-
export { type
|
|
1883
|
+
export { type AssetInput as $, type NetPose as A, type EcsSystem as B, Component as C, DEFAULT_ENVIRONMENT_LIGHTING as D, Environment as E, type NetworkService as F, type EntityId as G, type NetworkHandle as H, type IKChain as I, type NetSpawnOptions as J, type WorldEntityView$1 as K, type SpawnPrefabOptions as L, type PlaySlotOptions as M, type NetValue as N, type ComponentClass as O, ParentId as P, type ParentLookup as Q, type RenderBackend as R, type SpawnPrefabSource as S, TransformComponent as T, type EcsEntityKind as U, type Vec3$1 as V, World as W, ObjectManagementSystem as X, type SubtreeSnapshot as Y, type ExternalRefWarning as Z, type AudioBus as _, DEFAULT_ENVIRONMENT_STATE as a, AudioSystem as a0, type CheckboxInput as a1, type ChromaKeyOptions as a2, type ColorInput as a3, type ComponentFactory as a4, type ComponentInput as a5, type ComponentKind as a6, type DropdownInput as a7, type DropdownOption as a8, type EcsComponentFactoryKind as a9, SlotChooser as aA, type SoundBankAsset as aB, type SoundSlot as aC, type SoundTake as aD, type TextInput as aE, type ToggleInput as aF, TransformSyncSystem as aG, type Vec3 as aH, type Vector2Input as aI, type Vector3Input as aJ, clearPrefabCache as aK, despawnPrefab as aL, findModelBone as aM, listModelBones as aN, loadPrefab as aO, parsePrefabAsset as aP, prefabFileVersionFor as aQ, remapSnapshotEntityIds as aR, setPrefabAssetUrlResolver as aS, soundBankFiles as aT, spawnPrefab as aU, type AnyComponent as aV, DEBUG_CHANGE_IGNORED_SYSTEMS as aW, type WorldHistorySnapshot as aX, cloneHistoryValue as aY, normalizeDebugValue as aZ, type EcsEntityEditorKind as aa, type EcsRenderer as ab, type EntityInput as ac, type FloatInput as ad, IKSystem as ae, InputSystem as af, type IntersectionResult as ag, type KeyboardKey as ah, KeyboardKeys as ai, type ModelBoneInfo as aj, type MouseButton as ak, PREFAB_FILE_VERSION as al, PREFAB_FILE_VERSION_NESTED as am, type PostprocessingBuildContext as an, type PostprocessingPipeline as ao, type PrefabAsset as ap, type RemapSnapshotOptions as aq, RenderSystem as ar, type RendererKind as as, type ScriptErrorEvent as at, type ScriptErrorListener as au, type ScriptErrorPhase as av, type ScriptErrorReport as aw, type ScriptErrorSource as ax, type SelectionListener as ay, type SliderInput as az, DEFAULT_POSTPROCESSING_STATE as b, type EnvironmentFogState as c, type EnvironmentFogType as d, type EnvironmentGradientEffect as e, type EnvironmentLightingState as f, type EnvironmentSkyboxImageProjection as g, type EnvironmentSkyboxState as h, type EnvironmentSkyboxType as i, type EnvironmentState as j, type EnvironmentToneMapping as k, IKComponent as l, type IKLimb as m, type IKOptions as n, NetworkIdentityComponent as o, NetworkSpawnerComponent as p, NetworkTransformComponent as q, type NetworkTransformOptions as r, NetworkedPropsComponent as s, Postprocessing as t, type PostprocessingState as u, type TransformData as v, normalizeEnvironmentLighting as w, normalizeIKChain as x, type NetworkTransport as y, type NetEntityView as z };
|