@relu-interactives/spatial-ecs 0.5.3 → 0.9.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-CWSrsnYN.d.ts} +236 -3
- package/dist/{XRHandPose-CQTLGxFC.d.cts → XRHandPose-Dn2yiALk.d.cts} +236 -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-GSWC6LLD.js +241 -0
- package/dist/chunk-GSWC6LLD.js.map +1 -0
- package/dist/chunk-JEPUCLZX.js +1237 -0
- package/dist/chunk-JEPUCLZX.js.map +1 -0
- package/dist/{chunk-BUEKOSR5.js → chunk-JNYPJB55.js} +435 -14
- package/dist/chunk-JNYPJB55.js.map +1 -0
- package/dist/{chunk-RXBLOO5B.js → chunk-NXASMBDS.js} +105 -715
- package/dist/chunk-NXASMBDS.js.map +1 -0
- package/dist/chunk-OHCNPPMX.js +334 -0
- package/dist/chunk-OHCNPPMX.js.map +1 -0
- package/dist/{chunk-DF5SSRN6.js → chunk-VYIWOXAY.js} +2574 -3381
- package/dist/chunk-VYIWOXAY.js.map +1 -0
- package/dist/chunk-WWP46AEF.js +2878 -0
- package/dist/chunk-WWP46AEF.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 +334 -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/spatial-ui.md +83 -7
- 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 +921 -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-C3ik3sA1.d.ts → index-CAZHrh0q.d.cts} +28 -3
- package/dist/{index-Dlr-7-4m.d.cts → index-CLtSMf2M.d.ts} +28 -3
- package/dist/{index-D2Jt_JzH.d.ts → index-D5MmJNyj.d.ts} +161 -43
- package/dist/{index-DaG03vyN.d.cts → index-DiIjV2lm.d.cts} +161 -43
- package/dist/index.cjs +4959 -1414
- 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 +5069 -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 +5319 -1957
- 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,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Component } from './chunk-CKTHDXPS.js';
|
|
2
|
+
import { __export, __name } from './chunk-XE4OXN2W.js';
|
|
2
3
|
import * as THREE5 from 'three';
|
|
3
4
|
import { Vector3, Euler, Quaternion } from 'three';
|
|
4
5
|
|
|
@@ -7,8 +8,10 @@ var components_exports = {};
|
|
|
7
8
|
__export(components_exports, {
|
|
8
9
|
AnimationComponent: () => AnimationComponent,
|
|
9
10
|
AudioComponent: () => AudioComponent,
|
|
11
|
+
BoneAttachmentComponent: () => BoneAttachmentComponent,
|
|
10
12
|
CameraComponent: () => CameraComponent,
|
|
11
13
|
DEFAULT_COLLIDER_STATE: () => DEFAULT_COLLIDER_STATE,
|
|
14
|
+
DEFAULT_ENVIRONMENT_LIGHTING: () => DEFAULT_ENVIRONMENT_LIGHTING,
|
|
12
15
|
DEFAULT_ENVIRONMENT_STATE: () => DEFAULT_ENVIRONMENT_STATE,
|
|
13
16
|
DEFAULT_INSTANCED_MESH_PARAMETERS: () => DEFAULT_INSTANCED_MESH_PARAMETERS,
|
|
14
17
|
DEFAULT_INSTANCE_TRANSFORM: () => DEFAULT_INSTANCE_TRANSFORM,
|
|
@@ -20,17 +23,23 @@ __export(components_exports, {
|
|
|
20
23
|
DEFAULT_RIGIDBODY_STATE: () => DEFAULT_RIGIDBODY_STATE,
|
|
21
24
|
EntityType: () => EntityType,
|
|
22
25
|
Environment: () => Environment,
|
|
26
|
+
IKComponent: () => IKComponent,
|
|
23
27
|
ImageComponent: () => ImageComponent,
|
|
24
28
|
ImageTarget: () => ImageTarget,
|
|
25
29
|
ImageTargetAnchor: () => ImageTargetAnchor,
|
|
26
30
|
InstanceSlotComponent: () => InstanceSlotComponent,
|
|
27
31
|
InstancedMeshComponent: () => InstancedMeshComponent,
|
|
28
32
|
LightComponent: () => LightComponent,
|
|
33
|
+
MODEL_NO_PATH_MESSAGE: () => MODEL_NO_PATH_MESSAGE,
|
|
29
34
|
MaterialComponent: () => MaterialComponent,
|
|
30
35
|
MeshComponent: () => MeshComponent,
|
|
31
36
|
MeshGeometryComponent: () => MeshGeometryComponent,
|
|
32
37
|
ModelComponent: () => ModelComponent,
|
|
33
38
|
Name: () => Name,
|
|
39
|
+
NetworkIdentityComponent: () => NetworkIdentityComponent,
|
|
40
|
+
NetworkSpawnerComponent: () => NetworkSpawnerComponent,
|
|
41
|
+
NetworkTransformComponent: () => NetworkTransformComponent,
|
|
42
|
+
NetworkedPropsComponent: () => NetworkedPropsComponent,
|
|
34
43
|
Object3DRef: () => Object3DRef,
|
|
35
44
|
ParentId: () => ParentId,
|
|
36
45
|
PhysicsComponent: () => PhysicsComponent,
|
|
@@ -61,7 +70,10 @@ __export(components_exports, {
|
|
|
61
70
|
createHandPoseEntry: () => createHandPoseEntry,
|
|
62
71
|
defaultMaterialValue: () => defaultMaterialValue,
|
|
63
72
|
handPoseDefinitionFor: () => handPoseDefinitionFor,
|
|
73
|
+
normalizeEnvironmentLighting: () => normalizeEnvironmentLighting,
|
|
74
|
+
normalizeIKChain: () => normalizeIKChain,
|
|
64
75
|
normalizePhysicsState: () => normalizePhysicsState,
|
|
76
|
+
setModelLoadState: () => setModelLoadState,
|
|
65
77
|
setPhysicsLiveRef: () => setPhysicsLiveRef
|
|
66
78
|
});
|
|
67
79
|
|
|
@@ -575,7 +587,8 @@ var DEFAULT_AUDIO_OPTIONS = {
|
|
|
575
587
|
positional: false,
|
|
576
588
|
refDistance: 1,
|
|
577
589
|
distanceModel: "inverse",
|
|
578
|
-
rolloffFactor: 1
|
|
590
|
+
rolloffFactor: 1,
|
|
591
|
+
bus: "sfx"
|
|
579
592
|
};
|
|
580
593
|
var _AudioComponent = class _AudioComponent extends Component {
|
|
581
594
|
constructor(path, options = {}) {
|
|
@@ -631,6 +644,16 @@ __name(_AudioComponent, "AudioComponent");
|
|
|
631
644
|
var AudioComponent = _AudioComponent;
|
|
632
645
|
|
|
633
646
|
// core/components/Environment.ts
|
|
647
|
+
var DEFAULT_ENVIRONMENT_LIGHTING = {
|
|
648
|
+
envMapUrl: "",
|
|
649
|
+
envIntensity: 1,
|
|
650
|
+
envRotationY: 0,
|
|
651
|
+
useAsBackground: false,
|
|
652
|
+
backgroundBlurriness: 0,
|
|
653
|
+
backgroundIntensity: 1,
|
|
654
|
+
toneMapping: "none",
|
|
655
|
+
exposure: 1
|
|
656
|
+
};
|
|
634
657
|
var DEFAULT_ENVIRONMENT_STATE = {
|
|
635
658
|
skybox: {
|
|
636
659
|
type: "none",
|
|
@@ -703,22 +726,62 @@ function toFiniteNumber(value, fallback) {
|
|
|
703
726
|
return value;
|
|
704
727
|
}
|
|
705
728
|
__name(toFiniteNumber, "toFiniteNumber");
|
|
729
|
+
function normalizeImageProjection(value) {
|
|
730
|
+
return value === "screen" || value === "equirect" ? value : void 0;
|
|
731
|
+
}
|
|
732
|
+
__name(normalizeImageProjection, "normalizeImageProjection");
|
|
733
|
+
function normalizeToneMapping(value) {
|
|
734
|
+
if (value === "none" || value === "aces" || value === "agx" || value === "neutral") {
|
|
735
|
+
return value;
|
|
736
|
+
}
|
|
737
|
+
return DEFAULT_ENVIRONMENT_LIGHTING.toneMapping;
|
|
738
|
+
}
|
|
739
|
+
__name(normalizeToneMapping, "normalizeToneMapping");
|
|
740
|
+
function normalizeEnvironmentLighting(value) {
|
|
741
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
742
|
+
return void 0;
|
|
743
|
+
}
|
|
744
|
+
const lighting = value;
|
|
745
|
+
const defaults = DEFAULT_ENVIRONMENT_LIGHTING;
|
|
746
|
+
return {
|
|
747
|
+
envMapUrl: typeof lighting.envMapUrl === "string" ? lighting.envMapUrl : defaults.envMapUrl,
|
|
748
|
+
envIntensity: Math.max(0, toFiniteNumber(lighting.envIntensity, defaults.envIntensity)),
|
|
749
|
+
envRotationY: toFiniteNumber(lighting.envRotationY, defaults.envRotationY),
|
|
750
|
+
useAsBackground: typeof lighting.useAsBackground === "boolean" ? lighting.useAsBackground : defaults.useAsBackground,
|
|
751
|
+
backgroundBlurriness: Math.min(
|
|
752
|
+
1,
|
|
753
|
+
Math.max(0, toFiniteNumber(lighting.backgroundBlurriness, defaults.backgroundBlurriness))
|
|
754
|
+
),
|
|
755
|
+
backgroundIntensity: Math.max(
|
|
756
|
+
0,
|
|
757
|
+
toFiniteNumber(lighting.backgroundIntensity, defaults.backgroundIntensity)
|
|
758
|
+
),
|
|
759
|
+
toneMapping: normalizeToneMapping(lighting.toneMapping),
|
|
760
|
+
exposure: Math.max(0, toFiniteNumber(lighting.exposure, defaults.exposure))
|
|
761
|
+
};
|
|
762
|
+
}
|
|
763
|
+
__name(normalizeEnvironmentLighting, "normalizeEnvironmentLighting");
|
|
706
764
|
var _Environment = class _Environment extends Component {
|
|
707
765
|
constructor(values) {
|
|
708
766
|
super();
|
|
709
767
|
const skybox = values?.skybox;
|
|
710
768
|
const fog = values?.fog;
|
|
711
769
|
const gravity = values?.gravity;
|
|
770
|
+
const skyboxState = {
|
|
771
|
+
type: normalizeSkyboxType(skybox?.type),
|
|
772
|
+
color: typeof skybox?.color === "string" ? skybox.color : DEFAULT_ENVIRONMENT_STATE.skybox.color,
|
|
773
|
+
imageUrl: typeof skybox?.imageUrl === "string" ? skybox.imageUrl : DEFAULT_ENVIRONMENT_STATE.skybox.imageUrl,
|
|
774
|
+
gradient: {
|
|
775
|
+
colors: normalizeColors(skybox?.gradient?.colors),
|
|
776
|
+
effect: normalizeGradientEffect(skybox?.gradient?.effect)
|
|
777
|
+
}
|
|
778
|
+
};
|
|
779
|
+
const imageProjection = normalizeImageProjection(skybox?.imageProjection);
|
|
780
|
+
if (imageProjection) {
|
|
781
|
+
skyboxState.imageProjection = imageProjection;
|
|
782
|
+
}
|
|
712
783
|
this.values = {
|
|
713
|
-
skybox:
|
|
714
|
-
type: normalizeSkyboxType(skybox?.type),
|
|
715
|
-
color: typeof skybox?.color === "string" ? skybox.color : DEFAULT_ENVIRONMENT_STATE.skybox.color,
|
|
716
|
-
imageUrl: typeof skybox?.imageUrl === "string" ? skybox.imageUrl : DEFAULT_ENVIRONMENT_STATE.skybox.imageUrl,
|
|
717
|
-
gradient: {
|
|
718
|
-
colors: normalizeColors(skybox?.gradient?.colors),
|
|
719
|
-
effect: normalizeGradientEffect(skybox?.gradient?.effect)
|
|
720
|
-
}
|
|
721
|
-
},
|
|
784
|
+
skybox: skyboxState,
|
|
722
785
|
fog: {
|
|
723
786
|
type: normalizeFogType(fog?.type),
|
|
724
787
|
color: typeof fog?.color === "string" ? fog.color : DEFAULT_ENVIRONMENT_STATE.fog.color,
|
|
@@ -749,6 +812,10 @@ var _Environment = class _Environment extends Component {
|
|
|
749
812
|
DEFAULT_ENVIRONMENT_STATE.fixedTimeStep
|
|
750
813
|
)
|
|
751
814
|
};
|
|
815
|
+
const lighting = normalizeEnvironmentLighting(values?.lighting);
|
|
816
|
+
if (lighting) {
|
|
817
|
+
this.values.lighting = lighting;
|
|
818
|
+
}
|
|
752
819
|
}
|
|
753
820
|
};
|
|
754
821
|
__name(_Environment, "Environment");
|
|
@@ -1616,11 +1683,32 @@ __name(_MeshComponent, "MeshComponent");
|
|
|
1616
1683
|
var MeshComponent = _MeshComponent;
|
|
1617
1684
|
|
|
1618
1685
|
// core/components/Model.ts
|
|
1686
|
+
var MODEL_NO_PATH_MESSAGE = "No model path set.";
|
|
1687
|
+
function setModelLoadState(component, state, error) {
|
|
1688
|
+
Object.defineProperty(component, "loadState", {
|
|
1689
|
+
value: state,
|
|
1690
|
+
writable: true,
|
|
1691
|
+
configurable: true,
|
|
1692
|
+
enumerable: false
|
|
1693
|
+
});
|
|
1694
|
+
Object.defineProperty(component, "loadError", {
|
|
1695
|
+
value: state === "error" ? error ?? "Failed to load model." : void 0,
|
|
1696
|
+
writable: true,
|
|
1697
|
+
configurable: true,
|
|
1698
|
+
enumerable: false
|
|
1699
|
+
});
|
|
1700
|
+
}
|
|
1701
|
+
__name(setModelLoadState, "setModelLoadState");
|
|
1619
1702
|
var _ModelComponent = class _ModelComponent extends Component {
|
|
1620
1703
|
constructor(path) {
|
|
1621
1704
|
super();
|
|
1622
1705
|
this.path = path;
|
|
1623
1706
|
this.object = null;
|
|
1707
|
+
if (path) {
|
|
1708
|
+
setModelLoadState(this, "loading");
|
|
1709
|
+
} else {
|
|
1710
|
+
setModelLoadState(this, "error", MODEL_NO_PATH_MESSAGE);
|
|
1711
|
+
}
|
|
1624
1712
|
}
|
|
1625
1713
|
};
|
|
1626
1714
|
__name(_ModelComponent, "ModelComponent");
|
|
@@ -2039,6 +2127,309 @@ var _XRAnchorComponent = class _XRAnchorComponent extends Component {
|
|
|
2039
2127
|
__name(_XRAnchorComponent, "XRAnchorComponent");
|
|
2040
2128
|
var XRAnchorComponent = _XRAnchorComponent;
|
|
2041
2129
|
|
|
2130
|
+
// core/components/BoneAttachment.ts
|
|
2131
|
+
var _BoneAttachmentComponent = class _BoneAttachmentComponent extends Component {
|
|
2132
|
+
constructor(options) {
|
|
2133
|
+
super();
|
|
2134
|
+
this.bone = options?.bone ?? "";
|
|
2135
|
+
this.humanoid = options?.humanoid ?? null;
|
|
2136
|
+
this.compensateScale = options?.compensateScale ?? true;
|
|
2137
|
+
this.enabled = options?.enabled ?? true;
|
|
2138
|
+
}
|
|
2139
|
+
};
|
|
2140
|
+
__name(_BoneAttachmentComponent, "BoneAttachmentComponent");
|
|
2141
|
+
var BoneAttachmentComponent = _BoneAttachmentComponent;
|
|
2142
|
+
|
|
2143
|
+
// core/components/Network.ts
|
|
2144
|
+
var _NetworkIdentityComponent = class _NetworkIdentityComponent extends Component {
|
|
2145
|
+
constructor() {
|
|
2146
|
+
super();
|
|
2147
|
+
for (const key of ["networkId", "owner"]) {
|
|
2148
|
+
Object.defineProperty(this, key, {
|
|
2149
|
+
value: "",
|
|
2150
|
+
writable: true,
|
|
2151
|
+
configurable: true,
|
|
2152
|
+
enumerable: false
|
|
2153
|
+
});
|
|
2154
|
+
}
|
|
2155
|
+
}
|
|
2156
|
+
};
|
|
2157
|
+
__name(_NetworkIdentityComponent, "NetworkIdentityComponent");
|
|
2158
|
+
var NetworkIdentityComponent = _NetworkIdentityComponent;
|
|
2159
|
+
var _NetworkTransformComponent = class _NetworkTransformComponent extends Component {
|
|
2160
|
+
constructor(options = {}) {
|
|
2161
|
+
super();
|
|
2162
|
+
this.enabled = true;
|
|
2163
|
+
/** Updates per second the owner sends. */
|
|
2164
|
+
this.sendRate = 20;
|
|
2165
|
+
/** How far in the past others see it, in ms. More is smoother; less is more current. */
|
|
2166
|
+
this.interpolationMs = 100;
|
|
2167
|
+
this.syncRotation = true;
|
|
2168
|
+
/** A jump longer than this (m) snaps instead of sliding, for respawns and teleports. */
|
|
2169
|
+
this.teleportDistance = 5;
|
|
2170
|
+
Object.assign(this, options);
|
|
2171
|
+
}
|
|
2172
|
+
};
|
|
2173
|
+
__name(_NetworkTransformComponent, "NetworkTransformComponent");
|
|
2174
|
+
var NetworkTransformComponent = _NetworkTransformComponent;
|
|
2175
|
+
var _NetworkedPropsComponent = class _NetworkedPropsComponent extends Component {
|
|
2176
|
+
constructor(values = {}) {
|
|
2177
|
+
super();
|
|
2178
|
+
this.values = values;
|
|
2179
|
+
}
|
|
2180
|
+
};
|
|
2181
|
+
__name(_NetworkedPropsComponent, "NetworkedPropsComponent");
|
|
2182
|
+
var NetworkedPropsComponent = _NetworkedPropsComponent;
|
|
2183
|
+
var _NetworkSpawnerComponent = class _NetworkSpawnerComponent extends Component {
|
|
2184
|
+
constructor(playerPrefab = "", spawnRadius = 2) {
|
|
2185
|
+
super();
|
|
2186
|
+
this.playerPrefab = playerPrefab;
|
|
2187
|
+
this.spawnRadius = spawnRadius;
|
|
2188
|
+
}
|
|
2189
|
+
};
|
|
2190
|
+
__name(_NetworkSpawnerComponent, "NetworkSpawnerComponent");
|
|
2191
|
+
var NetworkSpawnerComponent = _NetworkSpawnerComponent;
|
|
2192
|
+
|
|
2193
|
+
// core/components/IK.ts
|
|
2194
|
+
function normalizeIKChain(chain) {
|
|
2195
|
+
const weight = typeof chain.weight === "number" && Number.isFinite(chain.weight) ? chain.weight : 1;
|
|
2196
|
+
return {
|
|
2197
|
+
limb: chain.limb,
|
|
2198
|
+
target: typeof chain.target === "number" ? chain.target : null,
|
|
2199
|
+
pole: typeof chain.pole === "number" ? chain.pole : null,
|
|
2200
|
+
weight: Math.min(1, Math.max(0, weight)),
|
|
2201
|
+
matchRotation: chain.matchRotation ?? false,
|
|
2202
|
+
enabled: chain.enabled ?? true
|
|
2203
|
+
};
|
|
2204
|
+
}
|
|
2205
|
+
__name(normalizeIKChain, "normalizeIKChain");
|
|
2206
|
+
var _IKComponent = class _IKComponent extends Component {
|
|
2207
|
+
constructor(options) {
|
|
2208
|
+
super();
|
|
2209
|
+
this.chains = (options?.chains ?? []).map(normalizeIKChain);
|
|
2210
|
+
this.enabled = options?.enabled ?? true;
|
|
2211
|
+
}
|
|
2212
|
+
};
|
|
2213
|
+
__name(_IKComponent, "IKComponent");
|
|
2214
|
+
var IKComponent = _IKComponent;
|
|
2215
|
+
|
|
2216
|
+
// core/ui/uiStyle.ts
|
|
2217
|
+
var isRecord = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isRecord");
|
|
2218
|
+
var finite = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value), "finite");
|
|
2219
|
+
var nonEmpty = /* @__PURE__ */ __name((value) => typeof value === "string" && value.length > 0, "nonEmpty");
|
|
2220
|
+
function normalizeStops(value) {
|
|
2221
|
+
if (!Array.isArray(value)) return null;
|
|
2222
|
+
const stops = [];
|
|
2223
|
+
for (const stop of value) {
|
|
2224
|
+
if (isRecord(stop) && finite(stop.at) && nonEmpty(stop.color)) {
|
|
2225
|
+
stops.push({ at: Math.min(1, Math.max(0, stop.at)), color: stop.color });
|
|
2226
|
+
}
|
|
2227
|
+
}
|
|
2228
|
+
return stops.length >= 2 ? stops : null;
|
|
2229
|
+
}
|
|
2230
|
+
__name(normalizeStops, "normalizeStops");
|
|
2231
|
+
function normalizePaint(value) {
|
|
2232
|
+
if (!isRecord(value)) return void 0;
|
|
2233
|
+
if (value.kind === "solid" && nonEmpty(value.color)) {
|
|
2234
|
+
return { kind: "solid", color: value.color };
|
|
2235
|
+
}
|
|
2236
|
+
if (value.kind === "linear") {
|
|
2237
|
+
const stops = normalizeStops(value.stops);
|
|
2238
|
+
if (stops) {
|
|
2239
|
+
return {
|
|
2240
|
+
kind: "linear",
|
|
2241
|
+
angle: finite(value.angle) ? value.angle : 180,
|
|
2242
|
+
stops
|
|
2243
|
+
};
|
|
2244
|
+
}
|
|
2245
|
+
}
|
|
2246
|
+
if (value.kind === "radial") {
|
|
2247
|
+
const stops = normalizeStops(value.stops);
|
|
2248
|
+
if (stops) return { kind: "radial", stops };
|
|
2249
|
+
}
|
|
2250
|
+
if (value.kind === "image" && nonEmpty(value.src)) {
|
|
2251
|
+
const fit = value.fit === "contain" || value.fit === "fill" ? value.fit : "cover";
|
|
2252
|
+
return {
|
|
2253
|
+
kind: "image",
|
|
2254
|
+
src: value.src,
|
|
2255
|
+
fit,
|
|
2256
|
+
...nonEmpty(value.tint) ? { tint: value.tint } : {}
|
|
2257
|
+
};
|
|
2258
|
+
}
|
|
2259
|
+
return void 0;
|
|
2260
|
+
}
|
|
2261
|
+
__name(normalizePaint, "normalizePaint");
|
|
2262
|
+
function normalizeShadow(value) {
|
|
2263
|
+
if (!isRecord(value) || !nonEmpty(value.color)) return void 0;
|
|
2264
|
+
return {
|
|
2265
|
+
x: finite(value.x) ? value.x : 0,
|
|
2266
|
+
y: finite(value.y) ? value.y : 0,
|
|
2267
|
+
blur: finite(value.blur) ? Math.max(0, value.blur) : 0,
|
|
2268
|
+
color: value.color
|
|
2269
|
+
};
|
|
2270
|
+
}
|
|
2271
|
+
__name(normalizeShadow, "normalizeShadow");
|
|
2272
|
+
function normalizeText(value) {
|
|
2273
|
+
if (!isRecord(value)) return void 0;
|
|
2274
|
+
const text = {};
|
|
2275
|
+
if (nonEmpty(value.font)) text.font = value.font;
|
|
2276
|
+
if (finite(value.weight)) text.weight = value.weight;
|
|
2277
|
+
if (finite(value.tracking)) text.tracking = value.tracking;
|
|
2278
|
+
if (value.transform === "upper" || value.transform === "lower") {
|
|
2279
|
+
text.transform = value.transform;
|
|
2280
|
+
}
|
|
2281
|
+
const paint = normalizePaint(value.paint);
|
|
2282
|
+
if (paint) text.paint = paint;
|
|
2283
|
+
if (finite(value.maxLines) && value.maxLines >= 1) {
|
|
2284
|
+
text.maxLines = Math.floor(value.maxLines);
|
|
2285
|
+
}
|
|
2286
|
+
const shadow = normalizeShadow(value.shadow);
|
|
2287
|
+
if (shadow) text.shadow = shadow;
|
|
2288
|
+
return Object.keys(text).length > 0 ? text : void 0;
|
|
2289
|
+
}
|
|
2290
|
+
__name(normalizeText, "normalizeText");
|
|
2291
|
+
function normalizeUiStyle(value) {
|
|
2292
|
+
if (!isRecord(value)) return void 0;
|
|
2293
|
+
const style = {};
|
|
2294
|
+
const fill = normalizePaint(value.fill);
|
|
2295
|
+
if (fill) style.fill = fill;
|
|
2296
|
+
if (isRecord(value.border) && finite(value.border.width)) {
|
|
2297
|
+
const paint = normalizePaint(value.border.paint);
|
|
2298
|
+
if (paint) {
|
|
2299
|
+
style.border = { width: Math.max(0, value.border.width), paint };
|
|
2300
|
+
}
|
|
2301
|
+
}
|
|
2302
|
+
if (finite(value.radius)) {
|
|
2303
|
+
style.radius = Math.max(0, value.radius);
|
|
2304
|
+
} else if (Array.isArray(value.radius) && value.radius.length === 4 && value.radius.every(finite)) {
|
|
2305
|
+
style.radius = value.radius.map((r) => Math.max(0, r));
|
|
2306
|
+
}
|
|
2307
|
+
if (Array.isArray(value.shadows)) {
|
|
2308
|
+
const shadows = value.shadows.map(normalizeShadow).filter((s) => !!s);
|
|
2309
|
+
if (shadows.length > 0) style.shadows = shadows;
|
|
2310
|
+
}
|
|
2311
|
+
if (isRecord(value.edge) && finite(value.edge.width) && nonEmpty(value.edge.color)) {
|
|
2312
|
+
style.edge = {
|
|
2313
|
+
width: Math.max(0, value.edge.width),
|
|
2314
|
+
color: value.edge.color
|
|
2315
|
+
};
|
|
2316
|
+
}
|
|
2317
|
+
if (finite(value.opacity)) {
|
|
2318
|
+
style.opacity = Math.min(1, Math.max(0, value.opacity));
|
|
2319
|
+
}
|
|
2320
|
+
const text = normalizeText(value.text);
|
|
2321
|
+
if (text) style.text = text;
|
|
2322
|
+
return Object.keys(style).length > 0 ? style : void 0;
|
|
2323
|
+
}
|
|
2324
|
+
__name(normalizeUiStyle, "normalizeUiStyle");
|
|
2325
|
+
function normalizeUiTokens(value) {
|
|
2326
|
+
if (!isRecord(value)) return void 0;
|
|
2327
|
+
const tokens = {};
|
|
2328
|
+
for (const [key, token] of Object.entries(value)) {
|
|
2329
|
+
if (nonEmpty(token) && key.length > 0 && !key.includes("/")) {
|
|
2330
|
+
tokens[key] = token;
|
|
2331
|
+
}
|
|
2332
|
+
}
|
|
2333
|
+
return Object.keys(tokens).length > 0 ? tokens : void 0;
|
|
2334
|
+
}
|
|
2335
|
+
__name(normalizeUiTokens, "normalizeUiTokens");
|
|
2336
|
+
function resolveToken(value, tokens, fallback = value) {
|
|
2337
|
+
if (!value.startsWith("$")) return value;
|
|
2338
|
+
return tokens?.[value.slice(1)] ?? fallback;
|
|
2339
|
+
}
|
|
2340
|
+
__name(resolveToken, "resolveToken");
|
|
2341
|
+
function resolvePaint(paint, tokens) {
|
|
2342
|
+
switch (paint.kind) {
|
|
2343
|
+
case "solid":
|
|
2344
|
+
return { kind: "solid", color: resolveToken(paint.color, tokens) };
|
|
2345
|
+
case "linear":
|
|
2346
|
+
case "radial":
|
|
2347
|
+
return {
|
|
2348
|
+
...paint,
|
|
2349
|
+
stops: paint.stops.map((stop) => ({
|
|
2350
|
+
at: stop.at,
|
|
2351
|
+
color: resolveToken(stop.color, tokens)
|
|
2352
|
+
}))
|
|
2353
|
+
};
|
|
2354
|
+
case "image":
|
|
2355
|
+
return {
|
|
2356
|
+
...paint,
|
|
2357
|
+
src: resolveToken(paint.src, tokens),
|
|
2358
|
+
...paint.tint ? { tint: resolveToken(paint.tint, tokens) } : {}
|
|
2359
|
+
};
|
|
2360
|
+
}
|
|
2361
|
+
}
|
|
2362
|
+
__name(resolvePaint, "resolvePaint");
|
|
2363
|
+
function solidOf(paint) {
|
|
2364
|
+
if (paint.kind === "solid") return paint.color;
|
|
2365
|
+
if (paint.kind === "image") return paint.tint ?? "#ffffff";
|
|
2366
|
+
return paint.stops[0].color;
|
|
2367
|
+
}
|
|
2368
|
+
__name(solidOf, "solidOf");
|
|
2369
|
+
function radiusOf(radius, fallback) {
|
|
2370
|
+
if (Array.isArray(radius)) return radius;
|
|
2371
|
+
const r = radius ?? fallback;
|
|
2372
|
+
return [r, r, r, r];
|
|
2373
|
+
}
|
|
2374
|
+
__name(radiusOf, "radiusOf");
|
|
2375
|
+
function resolveChrome(flat, style, tokens) {
|
|
2376
|
+
const borderWidth = style?.border?.width ?? flat.borderWidth;
|
|
2377
|
+
const border = borderWidth > 0 ? {
|
|
2378
|
+
width: borderWidth,
|
|
2379
|
+
color: style?.border ? solidOf(resolvePaint(style.border.paint, tokens)) : resolveToken(flat.borderColor, tokens)
|
|
2380
|
+
} : null;
|
|
2381
|
+
return {
|
|
2382
|
+
fill: style?.fill ? resolvePaint(style.fill, tokens) : { kind: "solid", color: resolveToken(flat.backgroundColor, tokens) },
|
|
2383
|
+
fillOpacity: style?.fill ? 1 : flat.backgroundOpacity,
|
|
2384
|
+
radius: radiusOf(style?.radius, flat.cornerRadius),
|
|
2385
|
+
border,
|
|
2386
|
+
shadows: (style?.shadows ?? []).map((shadow) => ({
|
|
2387
|
+
...shadow,
|
|
2388
|
+
color: resolveToken(shadow.color, tokens)
|
|
2389
|
+
})),
|
|
2390
|
+
edge: style?.edge ? { ...style.edge, color: resolveToken(style.edge.color, tokens) } : null
|
|
2391
|
+
};
|
|
2392
|
+
}
|
|
2393
|
+
__name(resolveChrome, "resolveChrome");
|
|
2394
|
+
function resolveText(flat, style, tokens) {
|
|
2395
|
+
const text = style?.text;
|
|
2396
|
+
return {
|
|
2397
|
+
...flat,
|
|
2398
|
+
color: resolveToken(flat.color, tokens),
|
|
2399
|
+
fontWeight: text?.weight ?? flat.fontWeight,
|
|
2400
|
+
paint: text?.paint ? resolvePaint(text.paint, tokens) : { kind: "solid", color: resolveToken(flat.color, tokens) },
|
|
2401
|
+
font: text?.font ? resolveToken(text.font, tokens) : null,
|
|
2402
|
+
tracking: text?.tracking ?? 0,
|
|
2403
|
+
transform: text?.transform ?? null,
|
|
2404
|
+
maxLines: text?.maxLines ?? null,
|
|
2405
|
+
shadow: text?.shadow ? {
|
|
2406
|
+
...text.shadow,
|
|
2407
|
+
color: resolveToken(text.shadow.color, tokens)
|
|
2408
|
+
} : null
|
|
2409
|
+
};
|
|
2410
|
+
}
|
|
2411
|
+
__name(resolveText, "resolveText");
|
|
2412
|
+
function chromeBleed(chrome) {
|
|
2413
|
+
let bleed = 0;
|
|
2414
|
+
for (const shadow of chrome.shadows) {
|
|
2415
|
+
bleed = Math.max(
|
|
2416
|
+
bleed,
|
|
2417
|
+
shadow.blur + Math.max(Math.abs(shadow.x), Math.abs(shadow.y))
|
|
2418
|
+
);
|
|
2419
|
+
}
|
|
2420
|
+
return bleed;
|
|
2421
|
+
}
|
|
2422
|
+
__name(chromeBleed, "chromeBleed");
|
|
2423
|
+
function styleAssets(chrome, text) {
|
|
2424
|
+
const images = [];
|
|
2425
|
+
const fonts = [];
|
|
2426
|
+
if (chrome?.fill?.kind === "image") images.push(chrome.fill.src);
|
|
2427
|
+
if (text?.paint.kind === "image") images.push(text.paint.src);
|
|
2428
|
+
if (text?.font) fonts.push(text.font);
|
|
2429
|
+
return { images, fonts };
|
|
2430
|
+
}
|
|
2431
|
+
__name(styleAssets, "styleAssets");
|
|
2432
|
+
|
|
2042
2433
|
// core/components/UIPanel.ts
|
|
2043
2434
|
var _UIPanelComponent = class _UIPanelComponent extends Component {
|
|
2044
2435
|
constructor(options) {
|
|
@@ -2052,6 +2443,10 @@ var _UIPanelComponent = class _UIPanelComponent extends Component {
|
|
|
2052
2443
|
this.borderColor = options?.borderColor ?? "#333333";
|
|
2053
2444
|
this.pixelDensity = options?.pixelDensity ?? 1024;
|
|
2054
2445
|
this.follow = options?.follow ?? "world";
|
|
2446
|
+
const style = normalizeUiStyle(options?.style);
|
|
2447
|
+
if (style) this.style = style;
|
|
2448
|
+
const tokens = normalizeUiTokens(options?.tokens);
|
|
2449
|
+
if (tokens) this.tokens = tokens;
|
|
2055
2450
|
}
|
|
2056
2451
|
};
|
|
2057
2452
|
__name(_UIPanelComponent, "UIPanelComponent");
|
|
@@ -2071,6 +2466,11 @@ var _UITextComponent = class _UITextComponent extends Component {
|
|
|
2071
2466
|
this.valign = options?.valign ?? "middle";
|
|
2072
2467
|
this.lineHeight = options?.lineHeight ?? 1.25;
|
|
2073
2468
|
this.padding = options?.padding ?? 0.01;
|
|
2469
|
+
if (options?.pixelDensity !== void 0) {
|
|
2470
|
+
this.pixelDensity = options.pixelDensity;
|
|
2471
|
+
}
|
|
2472
|
+
const style = normalizeUiStyle(options?.style);
|
|
2473
|
+
if (style) this.style = style;
|
|
2074
2474
|
}
|
|
2075
2475
|
};
|
|
2076
2476
|
__name(_UITextComponent, "UITextComponent");
|
|
@@ -2092,6 +2492,13 @@ var _UIButtonComponent = class _UIButtonComponent extends Component {
|
|
|
2092
2492
|
this.cornerRadius = options?.cornerRadius ?? 0.02;
|
|
2093
2493
|
this.borderWidth = options?.borderWidth ?? 2e-3;
|
|
2094
2494
|
this.borderColor = options?.borderColor ?? "#3a3a3a";
|
|
2495
|
+
if (options?.pixelDensity !== void 0) {
|
|
2496
|
+
this.pixelDensity = options.pixelDensity;
|
|
2497
|
+
}
|
|
2498
|
+
const style = normalizeUiStyle(options?.style);
|
|
2499
|
+
if (style) this.style = style;
|
|
2500
|
+
if (options?.icon) this.icon = options.icon;
|
|
2501
|
+
if (options?.iconPosition) this.iconPosition = options.iconPosition;
|
|
2095
2502
|
}
|
|
2096
2503
|
};
|
|
2097
2504
|
__name(_UIButtonComponent, "UIButtonComponent");
|
|
@@ -2108,6 +2515,12 @@ var _UIToggleComponent = class _UIToggleComponent extends Component {
|
|
|
2108
2515
|
this.trackColor = options?.trackColor ?? "#2a2a2a";
|
|
2109
2516
|
this.accentColor = options?.accentColor ?? "#ff6b35";
|
|
2110
2517
|
this.knobColor = options?.knobColor ?? "#ffffff";
|
|
2518
|
+
if (options?.pixelDensity !== void 0) {
|
|
2519
|
+
this.pixelDensity = options.pixelDensity;
|
|
2520
|
+
}
|
|
2521
|
+
const style = normalizeUiStyle(options?.style);
|
|
2522
|
+
if (style) this.style = style;
|
|
2523
|
+
if (options?.variant) this.variant = options.variant;
|
|
2111
2524
|
}
|
|
2112
2525
|
};
|
|
2113
2526
|
__name(_UIToggleComponent, "UIToggleComponent");
|
|
@@ -2128,6 +2541,14 @@ var _UISliderComponent = class _UISliderComponent extends Component {
|
|
|
2128
2541
|
this.trackColor = options?.trackColor ?? "#2a2a2a";
|
|
2129
2542
|
this.accentColor = options?.accentColor ?? "#ff6b35";
|
|
2130
2543
|
this.knobColor = options?.knobColor ?? "#ffffff";
|
|
2544
|
+
if (options?.pixelDensity !== void 0) {
|
|
2545
|
+
this.pixelDensity = options.pixelDensity;
|
|
2546
|
+
}
|
|
2547
|
+
const style = normalizeUiStyle(options?.style);
|
|
2548
|
+
if (style) this.style = style;
|
|
2549
|
+
if (options?.variant) this.variant = options.variant;
|
|
2550
|
+
if (options?.step !== void 0) this.step = options.step;
|
|
2551
|
+
if (options?.readOnly !== void 0) this.readOnly = options.readOnly;
|
|
2131
2552
|
}
|
|
2132
2553
|
};
|
|
2133
2554
|
__name(_UISliderComponent, "UISliderComponent");
|
|
@@ -2391,6 +2812,6 @@ var _XRHandPoseComponent = class _XRHandPoseComponent extends Component {
|
|
|
2391
2812
|
__name(_XRHandPoseComponent, "XRHandPoseComponent");
|
|
2392
2813
|
var XRHandPoseComponent = _XRHandPoseComponent;
|
|
2393
2814
|
|
|
2394
|
-
export { AnimationComponent, AnimationStateMachine, AnimationStateManager, AudioComponent, CameraComponent, DEFAULT_COLLIDER_STATE, DEFAULT_ENVIRONMENT_STATE, DEFAULT_INSTANCED_MESH_PARAMETERS, DEFAULT_INSTANCE_TRANSFORM, DEFAULT_MESH_GEOMETRY_PARAMETERS, DEFAULT_PHYSICS_STATE, DEFAULT_POSE_CURLS, DEFAULT_POSE_DIRECTIONS, DEFAULT_POSTPROCESSING_STATE, DEFAULT_RIGIDBODY_STATE, EntityType, Environment, HAND_POSE_PRESETS, HAND_POSE_PRESET_IDS, ImageComponent, ImageTarget, ImageTargetAnchor, InstanceSlotComponent, InstancedMeshComponent, LightComponent, MaterialComponent, MeshComponent, MeshGeometryComponent, ModelComponent, Name, Object3DRef, ParentId, PhysicsComponent, Postprocessing, PrefabInstance, PrefabNode, ScriptComponent, ScriptObjectComponent, Selectable, SelectionTransformState, SpriteComponent, TransformComponent, UIButtonComponent, UIPanelComponent, UISliderComponent, UITextComponent, UIToggleComponent, VRTeleportAreaComponent, VideoComponent, XRAnchorComponent, XREnvironmentComponent, XRHandPoseComponent, XRInteractableComponent, XRInteractorComponent, XRInteractorSideComponent, XRRigComponent, cloneHandPose, components_exports, createAttachPoint, createHandPoseEntry, defaultMaterialValue, getHandPosePreset, handPoseDefinitionFor, handPoseFromCurls, normalizePhysicsState, setPhysicsLiveRef };
|
|
2395
|
-
//# sourceMappingURL=chunk-
|
|
2396
|
-
//# sourceMappingURL=chunk-
|
|
2815
|
+
export { AnimationComponent, AnimationStateMachine, AnimationStateManager, AudioComponent, BoneAttachmentComponent, CameraComponent, DEFAULT_COLLIDER_STATE, DEFAULT_ENVIRONMENT_LIGHTING, DEFAULT_ENVIRONMENT_STATE, DEFAULT_INSTANCED_MESH_PARAMETERS, DEFAULT_INSTANCE_TRANSFORM, DEFAULT_MESH_GEOMETRY_PARAMETERS, DEFAULT_PHYSICS_STATE, DEFAULT_POSE_CURLS, DEFAULT_POSE_DIRECTIONS, DEFAULT_POSTPROCESSING_STATE, DEFAULT_RIGIDBODY_STATE, EntityType, Environment, HAND_POSE_PRESETS, HAND_POSE_PRESET_IDS, IKComponent, ImageComponent, ImageTarget, ImageTargetAnchor, InstanceSlotComponent, InstancedMeshComponent, LightComponent, MODEL_NO_PATH_MESSAGE, MaterialComponent, MeshComponent, MeshGeometryComponent, ModelComponent, Name, NetworkIdentityComponent, NetworkSpawnerComponent, NetworkTransformComponent, NetworkedPropsComponent, Object3DRef, ParentId, PhysicsComponent, Postprocessing, PrefabInstance, PrefabNode, ScriptComponent, ScriptObjectComponent, Selectable, SelectionTransformState, SpriteComponent, TransformComponent, UIButtonComponent, UIPanelComponent, UISliderComponent, UITextComponent, UIToggleComponent, VRTeleportAreaComponent, VideoComponent, XRAnchorComponent, XREnvironmentComponent, XRHandPoseComponent, XRInteractableComponent, XRInteractorComponent, XRInteractorSideComponent, XRRigComponent, chromeBleed, cloneHandPose, components_exports, createAttachPoint, createHandPoseEntry, defaultMaterialValue, getHandPosePreset, handPoseDefinitionFor, handPoseFromCurls, normalizeEnvironmentLighting, normalizeIKChain, normalizePhysicsState, normalizeUiStyle, normalizeUiTokens, resolveChrome, resolveText, resolveToken, setModelLoadState, setPhysicsLiveRef, styleAssets };
|
|
2816
|
+
//# sourceMappingURL=chunk-JNYPJB55.js.map
|
|
2817
|
+
//# sourceMappingURL=chunk-JNYPJB55.js.map
|