@egret/engine 0.0.0-stage → 7.0.2
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/LICENSE +201 -0
- package/NOTICE +21 -0
- package/README.md +101 -2
- package/README.zh-CN.md +102 -0
- package/dist/Engine.d.ts +77 -0
- package/dist/Engine.js +469 -0
- package/dist/animation/index.d.ts +6 -0
- package/dist/animation/index.js +5 -0
- package/dist/animation/sequenceController.d.ts +22 -0
- package/dist/animation/sequenceController.js +618 -0
- package/dist/animation/sequenceCoordinator.d.ts +26 -0
- package/dist/animation/sequenceCoordinator.js +161 -0
- package/dist/animation/sequenceInput.d.ts +25 -0
- package/dist/animation/sequenceInput.js +108 -0
- package/dist/animation/sequenceMath.d.ts +35 -0
- package/dist/animation/sequenceMath.js +164 -0
- package/dist/animation/sequenceResetSlot.d.ts +7 -0
- package/dist/animation/sequenceResetSlot.js +367 -0
- package/dist/animation/sequenceResetTypes.d.ts +48 -0
- package/dist/animation/sequenceResetTypes.js +2 -0
- package/dist/animation/types.d.ts +75 -0
- package/dist/animation/types.js +2 -0
- package/dist/assetBundle.d.ts +54 -0
- package/dist/assetBundle.js +173 -0
- package/dist/assetGroup.d.ts +17 -0
- package/dist/assetGroup.js +332 -0
- package/dist/assetGroupTypes.d.ts +17 -0
- package/dist/assetGroupTypes.js +2 -0
- package/dist/audio.d.ts +4 -0
- package/dist/audio.js +4 -0
- package/dist/audioCues.d.ts +47 -0
- package/dist/audioCues.js +127 -0
- package/dist/audioMixer.d.ts +7 -0
- package/dist/audioMixer.js +785 -0
- package/dist/audioTypes.d.ts +246 -0
- package/dist/audioTypes.js +3 -0
- package/dist/bitmapBindingTicket.d.ts +24 -0
- package/dist/bitmapBindingTicket.js +215 -0
- package/dist/bitmapButton.d.ts +4 -0
- package/dist/bitmapButton.js +407 -0
- package/dist/bitmapButtonTypes.d.ts +31 -0
- package/dist/bitmapButtonTypes.js +2 -0
- package/dist/bitmapFontParse.d.ts +10 -0
- package/dist/bitmapFontParse.js +246 -0
- package/dist/bitmapFontTypes.d.ts +112 -0
- package/dist/bitmapFontTypes.js +2 -0
- package/dist/bitmapResourceSlot.d.ts +26 -0
- package/dist/bitmapResourceSlot.js +340 -0
- package/dist/bitmapText.d.ts +6 -0
- package/dist/bitmapText.js +320 -0
- package/dist/bitmapfont.d.ts +5 -0
- package/dist/bitmapfont.js +5 -0
- package/dist/camera.d.ts +4 -0
- package/dist/camera.js +4 -0
- package/dist/camera2d.d.ts +7 -0
- package/dist/camera2d.js +419 -0
- package/dist/cameraTypes.d.ts +126 -0
- package/dist/cameraTypes.js +2 -0
- package/dist/closeHost.d.ts +4 -0
- package/dist/closeHost.js +66 -0
- package/dist/contentArtifacts.d.ts +12 -0
- package/dist/contentArtifacts.js +153 -0
- package/dist/contentAtlasPages.d.ts +13 -0
- package/dist/contentAtlasPages.js +117 -0
- package/dist/contentLoader.d.ts +6 -0
- package/dist/contentLoader.js +327 -0
- package/dist/contentTypes.d.ts +35 -0
- package/dist/contentTypes.js +2 -0
- package/dist/createEngine.d.ts +7 -0
- package/dist/createEngine.js +25 -0
- package/dist/createEngineForProfile.d.ts +5 -0
- package/dist/createEngineForProfile.js +45 -0
- package/dist/displaySubtreeTicket.d.ts +25 -0
- package/dist/displaySubtreeTicket.js +76 -0
- package/dist/fontContentLoader.d.ts +6 -0
- package/dist/fontContentLoader.js +298 -0
- package/dist/fontContentTypes.d.ts +39 -0
- package/dist/fontContentTypes.js +2 -0
- package/dist/gameClock.d.ts +24 -0
- package/dist/gameClock.js +246 -0
- package/dist/gameClockTypes.d.ts +37 -0
- package/dist/gameClockTypes.js +2 -0
- package/dist/gameRun.d.ts +53 -0
- package/dist/gameRun.js +97 -0
- package/dist/gamepad.d.ts +5 -0
- package/dist/gamepad.js +5 -0
- package/dist/gamepadInput.d.ts +4 -0
- package/dist/gamepadInput.js +281 -0
- package/dist/gamepadKeys.d.ts +4 -0
- package/dist/gamepadKeys.js +205 -0
- package/dist/gamepadTypes.d.ts +142 -0
- package/dist/gamepadTypes.js +3 -0
- package/dist/hover.d.ts +4 -0
- package/dist/hover.js +4 -0
- package/dist/hoverInput.d.ts +8 -0
- package/dist/hoverInput.js +503 -0
- package/dist/hoverInputTypes.d.ts +129 -0
- package/dist/hoverInputTypes.js +2 -0
- package/dist/index.d.ts +52 -0
- package/dist/index.js +21 -0
- package/dist/input.d.ts +6 -0
- package/dist/input.js +5 -0
- package/dist/inputActions.d.ts +86 -0
- package/dist/inputActions.js +330 -0
- package/dist/internal/contentFactoryState.d.ts +19 -0
- package/dist/internal/contentFactoryState.js +42 -0
- package/dist/internal/mouseInputFactoryState.d.ts +57 -0
- package/dist/internal/mouseInputFactoryState.js +125 -0
- package/dist/internal/sequenceControllerFactoryState.d.ts +42 -0
- package/dist/internal/sequenceControllerFactoryState.js +98 -0
- package/dist/internal/textFieldFactoryState.d.ts +11 -0
- package/dist/internal/textFieldFactoryState.js +32 -0
- package/dist/internal/texturedFrameState.d.ts +4 -0
- package/dist/internal/texturedFrameState.js +12 -0
- package/dist/internal/uiFactoryState.d.ts +68 -0
- package/dist/internal/uiFactoryState.js +173 -0
- package/dist/internal/uiRootState.d.ts +67 -0
- package/dist/internal/uiRootState.js +103 -0
- package/dist/keyboardInput.d.ts +13 -0
- package/dist/keyboardInput.js +579 -0
- package/dist/keyboardInputTypes.d.ts +93 -0
- package/dist/keyboardInputTypes.js +2 -0
- package/dist/kit.d.ts +16 -0
- package/dist/kit.js +10 -0
- package/dist/layout.d.ts +5 -0
- package/dist/layout.js +132 -0
- package/dist/layoutTypes.d.ts +28 -0
- package/dist/layoutTypes.js +2 -0
- package/dist/manifestAssetGroup.d.ts +10 -0
- package/dist/manifestAssetGroup.js +477 -0
- package/dist/manifestResourceState.d.ts +17 -0
- package/dist/manifestResourceState.js +58 -0
- package/dist/manifestResourceTypes.d.ts +26 -0
- package/dist/manifestResourceTypes.js +2 -0
- package/dist/motion.d.ts +35 -0
- package/dist/motion.js +206 -0
- package/dist/mouseInput.d.ts +102 -0
- package/dist/mouseInput.js +562 -0
- package/dist/mouseInputTypes.d.ts +41 -0
- package/dist/mouseInputTypes.js +2 -0
- package/dist/paragraph.d.ts +8 -0
- package/dist/paragraph.js +7 -0
- package/dist/particleEmitter.d.ts +4 -0
- package/dist/particleEmitter.js +300 -0
- package/dist/particleTypes.d.ts +115 -0
- package/dist/particleTypes.js +2 -0
- package/dist/particles.d.ts +4 -0
- package/dist/particles.js +4 -0
- package/dist/physics2d.d.ts +4 -0
- package/dist/physics2d.js +4 -0
- package/dist/physics2dGeometry.d.ts +39 -0
- package/dist/physics2dGeometry.js +230 -0
- package/dist/physics2dTypes.d.ts +221 -0
- package/dist/physics2dTypes.js +2 -0
- package/dist/physics2dWorld.d.ts +4 -0
- package/dist/physics2dWorld.js +823 -0
- package/dist/pointerInput.d.ts +12 -0
- package/dist/pointerInput.js +300 -0
- package/dist/pointerInputTypes.d.ts +41 -0
- package/dist/pointerInputTypes.js +2 -0
- package/dist/random.d.ts +30 -0
- package/dist/random.js +131 -0
- package/dist/rendering/ownedPreparationFailure2D.d.ts +5 -0
- package/dist/rendering/ownedPreparationFailure2D.js +33 -0
- package/dist/rendering/packSharedDraws2D.d.ts +50 -0
- package/dist/rendering/packSharedDraws2D.js +379 -0
- package/dist/rendering/packedOrientation.d.ts +4 -0
- package/dist/rendering/packedOrientation.js +7 -0
- package/dist/rendering/prepareRectangles2D.d.ts +92 -0
- package/dist/rendering/prepareRectangles2D.js +481 -0
- package/dist/rendering/prepareSharedDraws2D.d.ts +90 -0
- package/dist/rendering/prepareSharedDraws2D.js +663 -0
- package/dist/rendering/preparedBatches2D.d.ts +17 -0
- package/dist/rendering/preparedBatches2D.js +30 -0
- package/dist/rendering/preparedSharedBatches2D.d.ts +44 -0
- package/dist/rendering/preparedSharedBatches2D.js +247 -0
- package/dist/rendering/sharedColor2D.d.ts +52 -0
- package/dist/rendering/sharedColor2D.js +191 -0
- package/dist/rendering/sharedEffects2D.d.ts +23 -0
- package/dist/rendering/sharedEffects2D.js +126 -0
- package/dist/rendering/sharedPreparationRetention2D.d.ts +120 -0
- package/dist/rendering/sharedPreparationRetention2D.js +357 -0
- package/dist/rendering/srgbBytes.d.ts +3 -0
- package/dist/rendering/srgbBytes.js +64 -0
- package/dist/rendering/texturedPreparationBudget2D.d.ts +31 -0
- package/dist/rendering/texturedPreparationBudget2D.js +81 -0
- package/dist/rendering/world3d/Animation3D.d.ts +104 -0
- package/dist/rendering/world3d/Animation3D.js +384 -0
- package/dist/rendering/world3d/AnimationTexture3D.d.ts +163 -0
- package/dist/rendering/world3d/AnimationTexture3D.js +603 -0
- package/dist/rendering/world3d/Batch3D.d.ts +75 -0
- package/dist/rendering/world3d/Batch3D.js +332 -0
- package/dist/rendering/world3d/Camera3D.d.ts +62 -0
- package/dist/rendering/world3d/Camera3D.js +132 -0
- package/dist/rendering/world3d/Character3D.d.ts +127 -0
- package/dist/rendering/world3d/Character3D.js +305 -0
- package/dist/rendering/world3d/Cloth3D.d.ts +130 -0
- package/dist/rendering/world3d/Cloth3D.js +503 -0
- package/dist/rendering/world3d/Compression3D.d.ts +22 -0
- package/dist/rendering/world3d/Compression3D.js +703 -0
- package/dist/rendering/world3d/Curves3D.d.ts +119 -0
- package/dist/rendering/world3d/Curves3D.js +460 -0
- package/dist/rendering/world3d/Decal3D.d.ts +43 -0
- package/dist/rendering/world3d/Decal3D.js +242 -0
- package/dist/rendering/world3d/Export3D.d.ts +13 -0
- package/dist/rendering/world3d/Export3D.js +263 -0
- package/dist/rendering/world3d/Geometry3D.d.ts +95 -0
- package/dist/rendering/world3d/Geometry3D.js +335 -0
- package/dist/rendering/world3d/GeometryBuilder3D.d.ts +53 -0
- package/dist/rendering/world3d/GeometryBuilder3D.js +196 -0
- package/dist/rendering/world3d/Gizmo3D.d.ts +80 -0
- package/dist/rendering/world3d/Gizmo3D.js +514 -0
- package/dist/rendering/world3d/Gltf3D.d.ts +73 -0
- package/dist/rendering/world3d/Gltf3D.js +996 -0
- package/dist/rendering/world3d/GpuParticles3D.d.ts +109 -0
- package/dist/rendering/world3d/GpuParticles3D.js +401 -0
- package/dist/rendering/world3d/Hdr3D.d.ts +35 -0
- package/dist/rendering/world3d/Hdr3D.js +191 -0
- package/dist/rendering/world3d/Jelly3D.d.ts +77 -0
- package/dist/rendering/world3d/Jelly3D.js +267 -0
- package/dist/rendering/world3d/Ktx23D.d.ts +30 -0
- package/dist/rendering/world3d/Ktx23D.js +112 -0
- package/dist/rendering/world3d/Light3D.d.ts +84 -0
- package/dist/rendering/world3d/Light3D.js +97 -0
- package/dist/rendering/world3d/Material3D.d.ts +253 -0
- package/dist/rendering/world3d/Material3D.js +269 -0
- package/dist/rendering/world3d/Mesh3D.d.ts +112 -0
- package/dist/rendering/world3d/Mesh3D.js +337 -0
- package/dist/rendering/world3d/Meshopt3D.d.ts +15 -0
- package/dist/rendering/world3d/Meshopt3D.js +276 -0
- package/dist/rendering/world3d/Navigation3D.d.ts +213 -0
- package/dist/rendering/world3d/Navigation3D.js +1043 -0
- package/dist/rendering/world3d/Object3D.d.ts +118 -0
- package/dist/rendering/world3d/Object3D.js +315 -0
- package/dist/rendering/world3d/Particles3D.d.ts +90 -0
- package/dist/rendering/world3d/Particles3D.js +277 -0
- package/dist/rendering/world3d/Physics3D.d.ts +430 -0
- package/dist/rendering/world3d/Physics3D.js +2840 -0
- package/dist/rendering/world3d/PhysicsHull3D.d.ts +37 -0
- package/dist/rendering/world3d/PhysicsHull3D.js +229 -0
- package/dist/rendering/world3d/PhysicsMesh3D.d.ts +41 -0
- package/dist/rendering/world3d/PhysicsMesh3D.js +340 -0
- package/dist/rendering/world3d/PhysicsQueries3D.d.ts +24 -0
- package/dist/rendering/world3d/PhysicsQueries3D.js +323 -0
- package/dist/rendering/world3d/PhysicsRemote3D.d.ts +179 -0
- package/dist/rendering/world3d/PhysicsRemote3D.js +536 -0
- package/dist/rendering/world3d/Ragdoll3D.d.ts +74 -0
- package/dist/rendering/world3d/Ragdoll3D.js +202 -0
- package/dist/rendering/world3d/Raycast3D.d.ts +40 -0
- package/dist/rendering/world3d/Raycast3D.js +247 -0
- package/dist/rendering/world3d/RenderList3D.d.ts +91 -0
- package/dist/rendering/world3d/RenderList3D.js +502 -0
- package/dist/rendering/world3d/Retarget3D.d.ts +21 -0
- package/dist/rendering/world3d/Retarget3D.js +185 -0
- package/dist/rendering/world3d/Rig3D.d.ts +57 -0
- package/dist/rendering/world3d/Rig3D.js +219 -0
- package/dist/rendering/world3d/Sdf3D.d.ts +181 -0
- package/dist/rendering/world3d/Sdf3D.js +1136 -0
- package/dist/rendering/world3d/SdfLod3D.d.ts +17 -0
- package/dist/rendering/world3d/SdfLod3D.js +56 -0
- package/dist/rendering/world3d/Serialize3D.d.ts +66 -0
- package/dist/rendering/world3d/Serialize3D.js +629 -0
- package/dist/rendering/world3d/Simplify3D.d.ts +29 -0
- package/dist/rendering/world3d/Simplify3D.js +426 -0
- package/dist/rendering/world3d/StateMachine3D.d.ts +87 -0
- package/dist/rendering/world3d/StateMachine3D.js +280 -0
- package/dist/rendering/world3d/SurfaceMaterial3D.d.ts +26 -0
- package/dist/rendering/world3d/SurfaceMaterial3D.js +138 -0
- package/dist/rendering/world3d/Terrain3D.d.ts +248 -0
- package/dist/rendering/world3d/Terrain3D.js +827 -0
- package/dist/rendering/world3d/Text3D.d.ts +95 -0
- package/dist/rendering/world3d/Text3D.js +560 -0
- package/dist/rendering/world3d/Texture3D.d.ts +148 -0
- package/dist/rendering/world3d/Texture3D.js +270 -0
- package/dist/rendering/world3d/Trail3D.d.ts +62 -0
- package/dist/rendering/world3d/Trail3D.js +195 -0
- package/dist/rendering/world3d/Vehicle3D.d.ts +102 -0
- package/dist/rendering/world3d/Vehicle3D.js +228 -0
- package/dist/rendering/world3d/VolumetricFog3D.d.ts +57 -0
- package/dist/rendering/world3d/VolumetricFog3D.js +230 -0
- package/dist/rendering/world3d/Water3D.d.ts +165 -0
- package/dist/rendering/world3d/Water3D.js +607 -0
- package/dist/rendering/world3d/core3D.d.ts +36 -0
- package/dist/rendering/world3d/core3D.js +99 -0
- package/dist/rendering/world3d/debug3D.d.ts +69 -0
- package/dist/rendering/world3d/debug3D.js +262 -0
- package/dist/rendering/world3d/decoders3D.d.ts +42 -0
- package/dist/rendering/world3d/decoders3D.js +133 -0
- package/dist/rendering/world3d/geometries3D.d.ts +111 -0
- package/dist/rendering/world3d/geometries3D.js +610 -0
- package/dist/rendering/world3d/helpers3D.d.ts +67 -0
- package/dist/rendering/world3d/helpers3D.js +178 -0
- package/dist/rendering/world3d/index.d.ts +103 -0
- package/dist/rendering/world3d/index.js +62 -0
- package/dist/rendering/world3d/math3D.d.ts +114 -0
- package/dist/rendering/world3d/math3D.js +675 -0
- package/dist/rendering/world3d/primitives3D.d.ts +67 -0
- package/dist/rendering/world3d/primitives3D.js +197 -0
- package/dist/resources.d.ts +8 -0
- package/dist/resources.js +6 -0
- package/dist/saveStore.d.ts +71 -0
- package/dist/saveStore.js +182 -0
- package/dist/semanticList.d.ts +126 -0
- package/dist/semanticList.js +175 -0
- package/dist/semanticTree.d.ts +10 -0
- package/dist/semanticTree.js +539 -0
- package/dist/semanticTypes.d.ts +175 -0
- package/dist/semanticTypes.js +2 -0
- package/dist/semantics.d.ts +6 -0
- package/dist/semantics.js +5 -0
- package/dist/sequencePlayback.d.ts +19 -0
- package/dist/sequencePlayback.js +391 -0
- package/dist/sequencePlaybackTypes.d.ts +24 -0
- package/dist/sequencePlaybackTypes.js +2 -0
- package/dist/sequenceTargetClaims.d.ts +10 -0
- package/dist/sequenceTargetClaims.js +31 -0
- package/dist/srgbBytes.d.ts +3 -0
- package/dist/srgbBytes.js +64 -0
- package/dist/startEngine.d.ts +5 -0
- package/dist/startEngine.js +31 -0
- package/dist/surfaceOwnership.d.ts +3 -0
- package/dist/surfaceOwnership.js +15 -0
- package/dist/text.d.ts +24 -0
- package/dist/text.js +4 -0
- package/dist/textField.d.ts +6 -0
- package/dist/textField.js +6 -0
- package/dist/textTable.d.ts +41 -0
- package/dist/textTable.js +114 -0
- package/dist/tileMapDraw.d.ts +7 -0
- package/dist/tileMapDraw.js +310 -0
- package/dist/tiledImport.d.ts +9 -0
- package/dist/tiledImport.js +357 -0
- package/dist/tilemap.d.ts +5 -0
- package/dist/tilemap.js +5 -0
- package/dist/tilemapTypes.d.ts +182 -0
- package/dist/tilemapTypes.js +2 -0
- package/dist/timer.d.ts +34 -0
- package/dist/timer.js +119 -0
- package/dist/tween.d.ts +15 -0
- package/dist/tween.js +329 -0
- package/dist/tweenTypes.d.ts +31 -0
- package/dist/tweenTypes.js +2 -0
- package/dist/ui/controlKeys.d.ts +113 -0
- package/dist/ui/controlKeys.js +250 -0
- package/dist/ui/controls.d.ts +58 -0
- package/dist/ui/controls.js +290 -0
- package/dist/ui/editing.d.ts +3 -0
- package/dist/ui/editing.js +3 -0
- package/dist/ui/index.d.ts +19 -0
- package/dist/ui/index.js +11 -0
- package/dist/ui/keyboardFocus.d.ts +32 -0
- package/dist/ui/keyboardFocus.js +146 -0
- package/dist/ui/layerTypes.d.ts +98 -0
- package/dist/ui/layerTypes.js +2 -0
- package/dist/ui/layers.d.ts +4 -0
- package/dist/ui/layers.js +586 -0
- package/dist/ui/leafContent.d.ts +21 -0
- package/dist/ui/leafContent.js +136 -0
- package/dist/ui/rangeControl.d.ts +53 -0
- package/dist/ui/rangeControl.js +168 -0
- package/dist/ui/scrollControl.d.ts +84 -0
- package/dist/ui/scrollControl.js +222 -0
- package/dist/ui/stateControls.d.ts +90 -0
- package/dist/ui/stateControls.js +331 -0
- package/dist/ui/textEditor.d.ts +54 -0
- package/dist/ui/textEditor.js +371 -0
- package/dist/ui/textEditorTypes.d.ts +85 -0
- package/dist/ui/textEditorTypes.js +2 -0
- package/dist/ui/textFieldControl.d.ts +100 -0
- package/dist/ui/textFieldControl.js +260 -0
- package/dist/ui/theme.d.ts +64 -0
- package/dist/ui/theme.js +166 -0
- package/dist/ui/types.d.ts +285 -0
- package/dist/ui/types.js +2 -0
- package/dist/ui/uiRoot.d.ts +4 -0
- package/dist/ui/uiRoot.js +1526 -0
- package/dist/ui/uiRootDisplay.d.ts +46 -0
- package/dist/ui/uiRootDisplay.js +148 -0
- package/dist/ui/uiRootModel.d.ts +114 -0
- package/dist/ui/uiRootModel.js +66 -0
- package/dist/ui/virtualList.d.ts +20 -0
- package/dist/ui/virtualList.js +105 -0
- package/dist/video.d.ts +4 -0
- package/dist/video.js +4 -0
- package/dist/videoPlayer.d.ts +4 -0
- package/dist/videoPlayer.js +215 -0
- package/dist/videoTypes.d.ts +77 -0
- package/dist/videoTypes.js +2 -0
- package/dist/web/BrowserAssetBundle.d.ts +41 -0
- package/dist/web/BrowserAssetBundle.js +136 -0
- package/dist/web/BrowserAudio.d.ts +74 -0
- package/dist/web/BrowserAudio.js +503 -0
- package/dist/web/BrowserFrameLoop.d.ts +69 -0
- package/dist/web/BrowserFrameLoop.js +125 -0
- package/dist/web/BrowserGame.d.ts +174 -0
- package/dist/web/BrowserGame.js +473 -0
- package/dist/web/BrowserGamepadInput.d.ts +38 -0
- package/dist/web/BrowserGamepadInput.js +134 -0
- package/dist/web/BrowserHoverInput.d.ts +25 -0
- package/dist/web/BrowserHoverInput.js +266 -0
- package/dist/web/BrowserImageTextures.d.ts +72 -0
- package/dist/web/BrowserImageTextures.js +169 -0
- package/dist/web/BrowserInputActions.d.ts +63 -0
- package/dist/web/BrowserInputActions.js +345 -0
- package/dist/web/BrowserKeyboardInput.d.ts +4 -0
- package/dist/web/BrowserKeyboardInput.js +223 -0
- package/dist/web/BrowserPlay.d.ts +417 -0
- package/dist/web/BrowserPlay.js +1648 -0
- package/dist/web/BrowserPointerInput.d.ts +4 -0
- package/dist/web/BrowserPointerInput.js +511 -0
- package/dist/web/BrowserPreferences.d.ts +10 -0
- package/dist/web/BrowserPreferences.js +39 -0
- package/dist/web/BrowserSemantics.d.ts +36 -0
- package/dist/web/BrowserSemantics.js +418 -0
- package/dist/web/BrowserStatsPanel.d.ts +56 -0
- package/dist/web/BrowserStatsPanel.js +143 -0
- package/dist/web/BrowserStorage.d.ts +35 -0
- package/dist/web/BrowserStorage.js +132 -0
- package/dist/web/BrowserTextEditor.d.ts +52 -0
- package/dist/web/BrowserTextEditor.js +839 -0
- package/dist/web/BrowserTextInput.d.ts +89 -0
- package/dist/web/BrowserTextInput.js +524 -0
- package/dist/web/BrowserTextureProvider.d.ts +58 -0
- package/dist/web/BrowserTextureProvider.js +935 -0
- package/dist/web/BrowserVideo.d.ts +40 -0
- package/dist/web/BrowserVideo.js +237 -0
- package/dist/web/CanvasKitFontSetProvider.d.ts +32 -0
- package/dist/web/CanvasKitFontSetProvider.js +215 -0
- package/dist/web/CanvasKitParagraphProvider.d.ts +173 -0
- package/dist/web/CanvasKitParagraphProvider.js +692 -0
- package/dist/web/CanvasTextRasterProvider.d.ts +4 -0
- package/dist/web/CanvasTextRasterProvider.js +312 -0
- package/dist/web/ManifestByteSource.d.ts +151 -0
- package/dist/web/ManifestByteSource.js +975 -0
- package/dist/web/ManifestFontContentLoader.d.ts +13 -0
- package/dist/web/ManifestFontContentLoader.js +30 -0
- package/dist/web/MouseInput.d.ts +4 -0
- package/dist/web/MouseInput.js +218 -0
- package/dist/web/WebGL2Host.d.ts +5 -0
- package/dist/web/WebGL2Host.js +2711 -0
- package/dist/web/WebGPUHost.d.ts +100 -0
- package/dist/web/WebGPUHost.js +3430 -0
- package/dist/web/audio.d.ts +3 -0
- package/dist/web/audio.js +4 -0
- package/dist/web/canvasKitParagraphGeometry.d.ts +27 -0
- package/dist/web/canvasKitParagraphGeometry.js +83 -0
- package/dist/web/editing.d.ts +5 -0
- package/dist/web/editing.js +4 -0
- package/dist/web/editorFonts.d.ts +54 -0
- package/dist/web/editorFonts.js +297 -0
- package/dist/web/game.d.ts +5 -0
- package/dist/web/game.js +6 -0
- package/dist/web/gamepad.d.ts +3 -0
- package/dist/web/gamepad.js +4 -0
- package/dist/web/hover.d.ts +3 -0
- package/dist/web/hover.js +4 -0
- package/dist/web/image.d.ts +4 -0
- package/dist/web/image.js +4 -0
- package/dist/web/imageProjections2D.d.ts +16 -0
- package/dist/web/imageProjections2D.js +2 -0
- package/dist/web/input.d.ts +6 -0
- package/dist/web/input.js +4 -0
- package/dist/web/keyboard.d.ts +3 -0
- package/dist/web/keyboard.js +3 -0
- package/dist/web/kit.d.ts +11 -0
- package/dist/web/kit.js +8 -0
- package/dist/web/loop.d.ts +3 -0
- package/dist/web/loop.js +4 -0
- package/dist/web/paragraph.d.ts +6 -0
- package/dist/web/paragraph.js +4 -0
- package/dist/web/play.d.ts +10 -0
- package/dist/web/play.js +9 -0
- package/dist/web/playMusic.d.ts +33 -0
- package/dist/web/playMusic.js +194 -0
- package/dist/web/playSfx.d.ts +36 -0
- package/dist/web/playSfx.js +112 -0
- package/dist/web/playTouch.d.ts +45 -0
- package/dist/web/playTouch.js +141 -0
- package/dist/web/playWidgets.d.ts +71 -0
- package/dist/web/playWidgets.js +431 -0
- package/dist/web/pointer.d.ts +3 -0
- package/dist/web/pointer.js +3 -0
- package/dist/web/prepareSharedSubmission2D.d.ts +27 -0
- package/dist/web/prepareSharedSubmission2D.js +63 -0
- package/dist/web/resources.d.ts +29 -0
- package/dist/web/resources.js +96 -0
- package/dist/web/semantics.d.ts +3 -0
- package/dist/web/semantics.js +4 -0
- package/dist/web/sharedDeviceSession.d.ts +64 -0
- package/dist/web/sharedDeviceSession.js +2 -0
- package/dist/web/sharedEffectShaders.d.ts +13 -0
- package/dist/web/sharedEffectShaders.js +181 -0
- package/dist/web/sharedFrameUpload.d.ts +25 -0
- package/dist/web/sharedFrameUpload.js +2 -0
- package/dist/web/sharedHostDeferred.d.ts +7 -0
- package/dist/web/sharedHostDeferred.js +12 -0
- package/dist/web/sharedRetentionLedger.d.ts +85 -0
- package/dist/web/sharedRetentionLedger.js +391 -0
- package/dist/web/sharedSubmissionStorage2D.d.ts +56 -0
- package/dist/web/sharedSubmissionStorage2D.js +73 -0
- package/dist/web/sharedWebGL2Arena.d.ts +40 -0
- package/dist/web/sharedWebGL2Arena.js +77 -0
- package/dist/web/sharedWebGL2Options.d.ts +33 -0
- package/dist/web/sharedWebGL2Options.js +102 -0
- package/dist/web/sharedWebGL2Shaders.d.ts +33 -0
- package/dist/web/sharedWebGL2Shaders.js +408 -0
- package/dist/web/sharedWebGPUOptions.d.ts +41 -0
- package/dist/web/sharedWebGPUOptions.js +130 -0
- package/dist/web/text.d.ts +3 -0
- package/dist/web/text.js +3 -0
- package/dist/web/textInput.d.ts +3 -0
- package/dist/web/textInput.js +3 -0
- package/dist/web/video.d.ts +3 -0
- package/dist/web/video.js +4 -0
- package/dist/web/webgl2.d.ts +7 -0
- package/dist/web/webgl2.js +4 -0
- package/dist/web/webgl2LayerState.d.ts +50 -0
- package/dist/web/webgl2LayerState.js +102 -0
- package/dist/web/webgl2Native.d.ts +72 -0
- package/dist/web/webgl2Native.js +572 -0
- package/dist/web/webgl2Types.d.ts +150 -0
- package/dist/web/webgl2Types.js +2 -0
- package/dist/web/webgpu.d.ts +6 -0
- package/dist/web/webgpu.js +2 -0
- package/dist/web/webgpuBindingCache.d.ts +26 -0
- package/dist/web/webgpuBindingCache.js +223 -0
- package/dist/web/webgpuBufferPool.d.ts +51 -0
- package/dist/web/webgpuBufferPool.js +58 -0
- package/dist/web/webgpuImageResidency.d.ts +56 -0
- package/dist/web/webgpuImageResidency.js +65 -0
- package/dist/web/webgpuLifetime.d.ts +45 -0
- package/dist/web/webgpuLifetime.js +64 -0
- package/dist/web/webgpuRetentionPool.d.ts +66 -0
- package/dist/web/webgpuRetentionPool.js +85 -0
- package/dist/web/webgpuSharedPass.d.ts +7 -0
- package/dist/web/webgpuSharedPass.js +293 -0
- package/dist/web/webgpuSharedResolvePass.d.ts +3 -0
- package/dist/web/webgpuSharedResolvePass.js +34 -0
- package/dist/web/world3d/Audio3D.d.ts +85 -0
- package/dist/web/world3d/Audio3D.js +271 -0
- package/dist/web/world3d/BrowserPlay3D.d.ts +295 -0
- package/dist/web/world3d/BrowserPlay3D.js +1256 -0
- package/dist/web/world3d/FlyControls3D.d.ts +59 -0
- package/dist/web/world3d/FlyControls3D.js +162 -0
- package/dist/web/world3d/FollowControls3D.d.ts +31 -0
- package/dist/web/world3d/FollowControls3D.js +119 -0
- package/dist/web/world3d/OrbitControls3D.d.ts +58 -0
- package/dist/web/world3d/OrbitControls3D.js +189 -0
- package/dist/web/world3d/TransformControls3D.d.ts +37 -0
- package/dist/web/world3d/TransformControls3D.js +128 -0
- package/dist/web/world3d/WebGL2Renderer3D.d.ts +136 -0
- package/dist/web/world3d/WebGL2Renderer3D.js +1175 -0
- package/dist/web/world3d/WebGPURenderer3D.d.ts +112 -0
- package/dist/web/world3d/WebGPURenderer3D.js +1916 -0
- package/dist/web/world3d/World3DView.d.ts +54 -0
- package/dist/web/world3d/World3DView.js +79 -0
- package/dist/web/world3d/app3D.d.ts +143 -0
- package/dist/web/world3d/app3D.js +305 -0
- package/dist/web/world3d/assets3D.d.ts +39 -0
- package/dist/web/world3d/assets3D.js +112 -0
- package/dist/web/world3d/atmosphere3D.d.ts +56 -0
- package/dist/web/world3d/atmosphere3D.js +193 -0
- package/dist/web/world3d/canvasFont3D.d.ts +21 -0
- package/dist/web/world3d/canvasFont3D.js +165 -0
- package/dist/web/world3d/frame3D.d.ts +144 -0
- package/dist/web/world3d/frame3D.js +388 -0
- package/dist/web/world3d/gpuResources3D.d.ts +98 -0
- package/dist/web/world3d/gpuResources3D.js +901 -0
- package/dist/web/world3d/host3D.d.ts +24 -0
- package/dist/web/world3d/host3D.js +61 -0
- package/dist/web/world3d/index.d.ts +40 -0
- package/dist/web/world3d/index.js +24 -0
- package/dist/web/world3d/loaders3D.d.ts +27 -0
- package/dist/web/world3d/loaders3D.js +138 -0
- package/dist/web/world3d/markers3D.d.ts +53 -0
- package/dist/web/world3d/markers3D.js +130 -0
- package/dist/web/world3d/materialWebGL23D.d.ts +34 -0
- package/dist/web/world3d/materialWebGL23D.js +218 -0
- package/dist/web/world3d/overlay3D.d.ts +47 -0
- package/dist/web/world3d/overlay3D.js +187 -0
- package/dist/web/world3d/post3D.d.ts +116 -0
- package/dist/web/world3d/post3D.js +462 -0
- package/dist/web/world3d/postWebGL23D.d.ts +24 -0
- package/dist/web/world3d/postWebGL23D.js +237 -0
- package/dist/web/world3d/postWebGPU3D.d.ts +23 -0
- package/dist/web/world3d/postWebGPU3D.js +255 -0
- package/dist/web/world3d/probe3D.d.ts +15 -0
- package/dist/web/world3d/probe3D.js +66 -0
- package/dist/web/world3d/shaders3D.d.ts +43 -0
- package/dist/web/world3d/shaders3D.js +851 -0
- package/dist/web/world3d/stats3D.d.ts +34 -0
- package/dist/web/world3d/stats3D.js +81 -0
- package/dist/web/world3d/webGL2FrameMetrics3D.d.ts +71 -0
- package/dist/web/world3d/webGL2FrameMetrics3D.js +185 -0
- package/dist/web/world3d/webgpu.d.ts +37 -0
- package/dist/web/world3d/webgpu.js +23 -0
- package/dist/web/world3d/webgpuPacking3D.d.ts +13 -0
- package/dist/web/world3d/webgpuPacking3D.js +85 -0
- package/dist/web/world3d/wgsl3D.d.ts +68 -0
- package/dist/web/world3d/wgsl3D.js +781 -0
- package/package.json +220 -4
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
// Debug and authoring helpers: line geometries for grids, axes and bounds,
|
|
3
|
+
// plus distance-based level-of-detail switching.
|
|
4
|
+
import { World3DError, requireCount3D, requirePositive3D } from './core3D.js';
|
|
5
|
+
import { Attribute3D, Geometry3D } from './Geometry3D.js';
|
|
6
|
+
import { Material3D } from './Material3D.js';
|
|
7
|
+
import { Mesh3D } from './Mesh3D.js';
|
|
8
|
+
import { createPlaneGeometry3D } from './primitives3D.js';
|
|
9
|
+
import { Texture3D } from './Texture3D.js';
|
|
10
|
+
import { Object3D } from './Object3D.js';
|
|
11
|
+
function lineGeometry(positions, colors) {
|
|
12
|
+
const geometry = new Geometry3D();
|
|
13
|
+
geometry.topology = 'lines';
|
|
14
|
+
geometry.setAttribute('position', new Attribute3D(new Float32Array(positions), 3));
|
|
15
|
+
if (colors)
|
|
16
|
+
geometry.setAttribute('color', new Attribute3D(new Float32Array(colors), 3));
|
|
17
|
+
return geometry;
|
|
18
|
+
}
|
|
19
|
+
/** Square grid of lines on the XZ plane, centered at the origin. */
|
|
20
|
+
export function createGridGeometry3D(size = 10, divisions = 10) {
|
|
21
|
+
requirePositive3D(size, 'size');
|
|
22
|
+
const count = requireCount3D(divisions, 'divisions', 4096);
|
|
23
|
+
if (count < 1)
|
|
24
|
+
throw new World3DError('WORLD3D_INPUT_INVALID', 'divisions');
|
|
25
|
+
const half = size / 2, step = size / count, positions = [];
|
|
26
|
+
for (let i = 0; i <= count; i++) {
|
|
27
|
+
const k = -half + i * step;
|
|
28
|
+
positions.push(-half, 0, k, half, 0, k, k, 0, -half, k, 0, half);
|
|
29
|
+
}
|
|
30
|
+
return lineGeometry(positions);
|
|
31
|
+
}
|
|
32
|
+
/** Three colored segments from the origin along +X (red), +Y (green) and +Z (blue). */
|
|
33
|
+
export function createAxesGeometry3D(length = 1) {
|
|
34
|
+
requirePositive3D(length, 'length');
|
|
35
|
+
return lineGeometry([0, 0, 0, length, 0, 0, 0, 0, 0, 0, length, 0, 0, 0, 0, 0, 0, length], [1, 0.05, 0.05, 1, 0.05, 0.05, 0.05, 1, 0.05, 0.05, 1, 0.05, 0.1, 0.25, 1, 0.1, 0.25, 1]);
|
|
36
|
+
}
|
|
37
|
+
/** The twelve edges of an axis-aligned box given as [minX, minY, minZ, maxX, maxY, maxZ]. */
|
|
38
|
+
export function createBoxEdgesGeometry3D(box) {
|
|
39
|
+
if (!box || box.length !== 6)
|
|
40
|
+
throw new World3DError('WORLD3D_INPUT_INVALID', 'box');
|
|
41
|
+
const x0 = box[0], y0 = box[1], z0 = box[2], x1 = box[3], y1 = box[4], z1 = box[5];
|
|
42
|
+
const corners = [
|
|
43
|
+
[x0, y0, z0],
|
|
44
|
+
[x1, y0, z0],
|
|
45
|
+
[x1, y1, z0],
|
|
46
|
+
[x0, y1, z0],
|
|
47
|
+
[x0, y0, z1],
|
|
48
|
+
[x1, y0, z1],
|
|
49
|
+
[x1, y1, z1],
|
|
50
|
+
[x0, y1, z1]
|
|
51
|
+
];
|
|
52
|
+
const edges = [0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7], positions = [];
|
|
53
|
+
for (const index of edges)
|
|
54
|
+
positions.push(...corners[index]);
|
|
55
|
+
return lineGeometry(positions);
|
|
56
|
+
}
|
|
57
|
+
/** Unlit line or point material; pair it with a 'lines', 'line-strip' or 'points' geometry. */
|
|
58
|
+
export function createLineMaterial3D(color = 0xffffff, vertexColors = false) {
|
|
59
|
+
const material = new Material3D('unlit', { color, vertexColors });
|
|
60
|
+
material.fog = false;
|
|
61
|
+
return material;
|
|
62
|
+
}
|
|
63
|
+
/** Ready-made grid node for editors and debug views. */
|
|
64
|
+
export function createGridHelper3D(size = 10, divisions = 10, color = 0x808080) {
|
|
65
|
+
const mesh = new Mesh3D(createGridGeometry3D(size, divisions), createLineMaterial3D(color));
|
|
66
|
+
mesh.castShadow = false;
|
|
67
|
+
mesh.name = 'grid-helper';
|
|
68
|
+
return mesh;
|
|
69
|
+
}
|
|
70
|
+
/** Ready-made axes node colored X red, Y green, Z blue. */
|
|
71
|
+
export function createAxesHelper3D(length = 1) {
|
|
72
|
+
const mesh = new Mesh3D(createAxesGeometry3D(length), createLineMaterial3D(0xffffff, true));
|
|
73
|
+
mesh.castShadow = false;
|
|
74
|
+
mesh.name = 'axes-helper';
|
|
75
|
+
return mesh;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Shows exactly one child depending on the distance to the camera. Levels are
|
|
79
|
+
* kept sorted by distance; the render list calls select() once per frame.
|
|
80
|
+
*/
|
|
81
|
+
export class Lod3D extends Object3D {
|
|
82
|
+
#levels = [];
|
|
83
|
+
/** Index of the level shown by the last select(), or -1 before the first. */
|
|
84
|
+
currentLevel = -1;
|
|
85
|
+
constructor() {
|
|
86
|
+
super('object');
|
|
87
|
+
}
|
|
88
|
+
get levels() {
|
|
89
|
+
return this.#levels;
|
|
90
|
+
}
|
|
91
|
+
/** Show `object` once the camera is at least `distance` world units away. */
|
|
92
|
+
addLevel(object, distance = 0) {
|
|
93
|
+
if (!(distance >= 0) || !Number.isFinite(distance))
|
|
94
|
+
throw new World3DError('WORLD3D_INPUT_INVALID', 'distance');
|
|
95
|
+
requireCount3D(this.#levels.length + 1, 'levels', 32);
|
|
96
|
+
this.addChild(object);
|
|
97
|
+
this.#levels.push({ object, distance });
|
|
98
|
+
this.#levels.sort((a, b) => a.distance - b.distance);
|
|
99
|
+
return this;
|
|
100
|
+
}
|
|
101
|
+
/** Pick the level for a camera at world position (x, y, z). */
|
|
102
|
+
select(x, y, z) {
|
|
103
|
+
const levels = this.#levels;
|
|
104
|
+
if (levels.length === 0)
|
|
105
|
+
return;
|
|
106
|
+
const m = this.matrixWorld, distance = Math.hypot(x - m[12], y - m[13], z - m[14]);
|
|
107
|
+
let chosen = 0;
|
|
108
|
+
for (let i = 1; i < levels.length; i++)
|
|
109
|
+
if (distance >= levels[i].distance)
|
|
110
|
+
chosen = i;
|
|
111
|
+
for (let i = 0; i < levels.length; i++)
|
|
112
|
+
levels[i].object.visible = i === chosen;
|
|
113
|
+
this.currentLevel = chosen;
|
|
114
|
+
}
|
|
115
|
+
clone() {
|
|
116
|
+
const copy = new Lod3D();
|
|
117
|
+
copy.copyFrom(this);
|
|
118
|
+
for (const level of this.#levels)
|
|
119
|
+
copy.addLevel(level.object.clone(true), level.distance);
|
|
120
|
+
return copy;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
let layerGeometry;
|
|
124
|
+
/**
|
|
125
|
+
* Full-screen image drawn in the same pass as the 3D scene, typically the
|
|
126
|
+
* canvas of a 2D stage. An overlay is composited above the scene and an
|
|
127
|
+
* underlay beneath it, so interface, scene and backdrop share one surface.
|
|
128
|
+
*/
|
|
129
|
+
export class ScreenLayer3D extends Mesh3D {
|
|
130
|
+
texture;
|
|
131
|
+
autoUpdate;
|
|
132
|
+
constructor(source, options = {}) {
|
|
133
|
+
const overlay = (options.order ?? 'overlay') === 'overlay';
|
|
134
|
+
const texture = new Texture3D(source, {
|
|
135
|
+
mipmaps: false,
|
|
136
|
+
wrapS: 'clamp',
|
|
137
|
+
wrapT: 'clamp',
|
|
138
|
+
flipY: options.topRowFirst ?? true
|
|
139
|
+
});
|
|
140
|
+
const material = new Material3D('unlit', {
|
|
141
|
+
map: texture,
|
|
142
|
+
alphaMode: overlay ? 'blend' : 'opaque',
|
|
143
|
+
depthTest: false,
|
|
144
|
+
depthWrite: false,
|
|
145
|
+
opacity: options.opacity ?? 1
|
|
146
|
+
});
|
|
147
|
+
material.screenSpace = true;
|
|
148
|
+
material.fog = false;
|
|
149
|
+
material.toneMapped = false;
|
|
150
|
+
super((layerGeometry ??= createPlaneGeometry3D({ width: 2, height: 2 })), material);
|
|
151
|
+
this.texture = texture;
|
|
152
|
+
this.autoUpdate = options.autoUpdate ?? true;
|
|
153
|
+
this.name = overlay ? 'screen-overlay' : 'screen-underlay';
|
|
154
|
+
this.castShadow = false;
|
|
155
|
+
this.receiveShadow = false;
|
|
156
|
+
this.frustumCulled = false;
|
|
157
|
+
// Far outside the range applications use, so layers bracket the whole scene.
|
|
158
|
+
this.renderOrder = overlay ? 1e6 : -1e6;
|
|
159
|
+
}
|
|
160
|
+
/** Schedule a new upload of the source pixels. */
|
|
161
|
+
refreshSource() {
|
|
162
|
+
if (!this.texture.isDisposed)
|
|
163
|
+
this.texture.touch();
|
|
164
|
+
}
|
|
165
|
+
/** Release the layer's texture and material. The shared quad geometry stays alive. */
|
|
166
|
+
dispose() {
|
|
167
|
+
this.material.dispose();
|
|
168
|
+
this.texture.dispose();
|
|
169
|
+
}
|
|
170
|
+
clone() {
|
|
171
|
+
throw new World3DError('WORLD3D_INPUT_INVALID', 'a screen layer cannot be cloned; create a new one from the same source');
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
/** Makes a picture drawn over the whole screen, above or below the scene. */
|
|
175
|
+
export function createScreenLayer3D(source, options = {}) {
|
|
176
|
+
return new ScreenLayer3D(source, options);
|
|
177
|
+
}
|
|
178
|
+
//# sourceMappingURL=helpers3D.js.map
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
export { World3DError } from './core3D.js';
|
|
2
|
+
export type { World3DErrorCode, DisposeListener3D } from './core3D.js';
|
|
3
|
+
export { Resource3D } from './core3D.js';
|
|
4
|
+
export * from './math3D.js';
|
|
5
|
+
export { Object3D, Scene3D, WORLD3D_LIMITS } from './Object3D.js';
|
|
6
|
+
export type { Object3DKind, Fog3D } from './Object3D.js';
|
|
7
|
+
export { Texture3D, CubeTexture3D, RenderTarget3D, createSolidTexture3D, createGradientCubeTexture3D, isTexturePixels3D, TEXTURE3D_LIMITS } from './Texture3D.js';
|
|
8
|
+
export type { TextureWrap3D, TextureFilter3D, TextureColorSpace3D, TexturePixels3D, TextureSource3D, TextureOptions3D, RenderTargetOptions3D, RenderTargetFormat3D } from './Texture3D.js';
|
|
9
|
+
export { Attribute3D, Geometry3D, createGeometry3D, ATTRIBUTE_3D, GEOMETRY3D_LIMITS } from './Geometry3D.js';
|
|
10
|
+
export type { AttributeArray3D, Topology3D, GeometryGroup3D, MorphTarget3D, GeometryInput3D } from './Geometry3D.js';
|
|
11
|
+
export { createBoxGeometry3D, createPlaneGeometry3D, createSphereGeometry3D, createCylinderGeometry3D, createConeGeometry3D, createTorusGeometry3D, createCapsuleGeometry3D, createQuadGeometry3D } from './primitives3D.js';
|
|
12
|
+
export type { BoxGeometryOptions3D, PlaneGeometryOptions3D, SphereGeometryOptions3D, CylinderGeometryOptions3D, TorusGeometryOptions3D, CapsuleGeometryOptions3D } from './primitives3D.js';
|
|
13
|
+
export { Material3D, setColor3D, createUnlitMaterial3D, createLambertMaterial3D, createPhongMaterial3D, createStandardMaterial3D, createGlassMaterial3D, createCustomShader3D, createToonMaterial3D, createMatcapMaterial3D, createSpriteMaterial3D } from './Material3D.js';
|
|
14
|
+
export type { Shading3D, CustomShader3D, Side3D, AlphaMode3D, Blending3D, ColorInput3D, MaterialOptions3D, PhongMaterialOptions3D, StandardMaterialOptions3D, SpriteMaterialOptions3D } from './Material3D.js';
|
|
15
|
+
export { Camera3D, createPerspectiveCamera3D, createOrthographicCamera3D } from './Camera3D.js';
|
|
16
|
+
export type { PerspectiveCameraOptions3D, OrthographicCameraOptions3D } from './Camera3D.js';
|
|
17
|
+
export { Light3D, createAmbientLight3D, createHemisphereLight3D, createDirectionalLight3D, createPointLight3D, createSpotLight3D, LIGHT3D_LIMITS } from './Light3D.js';
|
|
18
|
+
export type { LightType3D, LightShadow3D, LightOptions3D, PointLightOptions3D, SpotLightOptions3D } from './Light3D.js';
|
|
19
|
+
export { Mesh3D, InstancedMesh3D, Sprite3D, createSprite3D, Bone3D, Skeleton3D, MESH3D_LIMITS } from './Mesh3D.js';
|
|
20
|
+
export { AnimationClip3D, AnimationAction3D, AnimationMixer3D, createAnimationClip3D, sampleAnimationTrack3D, ANIMATION3D_LIMITS } from './Animation3D.js';
|
|
21
|
+
export type { AnimationPath3D, AnimationInterpolation3D, AnimationLoop3D, AnimationTrackInput3D, AnimationTrack3D } from './Animation3D.js';
|
|
22
|
+
export { Raycaster3D } from './Raycast3D.js';
|
|
23
|
+
export type { RaycastHit3D, RaycastOptions3D } from './Raycast3D.js';
|
|
24
|
+
export { RenderList3D } from './RenderList3D.js';
|
|
25
|
+
export type { RenderItem3D, RenderStats3D } from './RenderList3D.js';
|
|
26
|
+
export { loadGltf3D } from './Gltf3D.js';
|
|
27
|
+
export type { GltfImageRequest3D, GltfLoadOptions3D, GltfAsset3D } from './Gltf3D.js';
|
|
28
|
+
export { ParticleEmitter3D, createParticleEmitter3D, PARTICLES3D_LIMITS } from './Particles3D.js';
|
|
29
|
+
export type { ParticleShape3D, ParticleEmitterOptions3D } from './Particles3D.js';
|
|
30
|
+
export { Lod3D, ScreenLayer3D, createScreenLayer3D, createGridGeometry3D, createAxesGeometry3D, createBoxEdgesGeometry3D, createLineMaterial3D, createGridHelper3D, createAxesHelper3D } from './helpers3D.js';
|
|
31
|
+
export type { ScreenLayerOptions3D } from './helpers3D.js';
|
|
32
|
+
export { isCompressedPixels3D, COMPRESSED_BLOCK_BYTES_3D } from './Texture3D.js';
|
|
33
|
+
export type { CompressedFormat3D, CompressedPixels3D } from './Texture3D.js';
|
|
34
|
+
export { isKtx23D, parseKtx23D } from './Ktx23D.js';
|
|
35
|
+
export type { Ktx2Info3D, Ktx2Result3D, Ktx2Options3D } from './Ktx23D.js';
|
|
36
|
+
export type { GltfMeshoptRequest3D, GltfDracoRequest3D, GltfDracoResult3D } from './Gltf3D.js';
|
|
37
|
+
export { SCENE_DOCUMENT_FORMAT_3D, SCENE_DOCUMENT_VERSION_3D, SERIALIZE3D_LIMITS, serializeScene3D, deserializeScene3D } from './Serialize3D.js';
|
|
38
|
+
export type { SceneDocument3D, SerializeOptions3D, DeserializeOptions3D, DeserializedScene3D } from './Serialize3D.js';
|
|
39
|
+
export { STATE_MACHINE3D_LIMITS, AnimationStateMachine3D, createAnimationStateMachine3D } from './StateMachine3D.js';
|
|
40
|
+
export type { StateParameter3D, StateConditionOperator3D, StateCondition3D, StateBlendEntry3D, StateOptions3D, TransitionOptions3D } from './StateMachine3D.js';
|
|
41
|
+
export { Joint3D } from './Physics3D.js';
|
|
42
|
+
export type { JointType3D, JointOptions3D } from './Physics3D.js';
|
|
43
|
+
export type { CompoundChild3D, PhysicsContact3D, PhysicsShapeCastHit3D } from './Physics3D.js';
|
|
44
|
+
export { Jelly3D, createJelly3D, createJellyShader3D } from './Jelly3D.js';
|
|
45
|
+
export type { JellyOptions3D } from './Jelly3D.js';
|
|
46
|
+
export { RAGDOLL3D_LIMITS, Ragdoll3D, createRagdoll3D } from './Ragdoll3D.js';
|
|
47
|
+
export type { RagdollJoint3D, RagdollOptions3D, RagdollPart3D } from './Ragdoll3D.js';
|
|
48
|
+
export { VEHICLE3D_LIMITS, Vehicle3D, createVehicle3D } from './Vehicle3D.js';
|
|
49
|
+
export type { VehicleOptions3D, Wheel3D, WheelOptions3D } from './Vehicle3D.js';
|
|
50
|
+
export { CLOTH3D_LIMITS, Cloth3D, Rope3D, createCloth3D, createRope3D } from './Cloth3D.js';
|
|
51
|
+
export type { ClothOptions3D, RopeOptions3D, StrandOptions3D } from './Cloth3D.js';
|
|
52
|
+
export { PhysicsClient3D, RemoteBody3D, RemoteJoint3D, connectPhysics3D, servePhysics3D } from './PhysicsRemote3D.js';
|
|
53
|
+
export type { PhysicsPort3D, RemoteBodyOptions3D, RemoteJointOptions3D, RemoteRaycastHit3D, RemoteShape3D } from './PhysicsRemote3D.js';
|
|
54
|
+
export { PHYSICS3D_LIMITS, RigidBody3D, PhysicsWorld3D, CharacterController3D, createPhysicsWorld3D, createCharacterController3D } from './Physics3D.js';
|
|
55
|
+
export type { BodyType3D, ShapeDefinition3D, RigidBodyOptions3D, PhysicsRaycastHit3D, PhysicsWorldOptions3D, CharacterControllerOptions3D } from './Physics3D.js';
|
|
56
|
+
export { CURVE3D_LIMITS, Curve3D, LineCurve3D, QuadraticBezierCurve3D, CubicBezierCurve3D, CatmullRomCurve3D, CurvePath3D, Path2D3D, Shape3D, signedArea2D, triangulateShape3D } from './Curves3D.js';
|
|
57
|
+
export type { Point3D, Point2D, CatmullRomKind3D } from './Curves3D.js';
|
|
58
|
+
export { createCircleGeometry3D, createRingGeometry3D, createTorusKnotGeometry3D, createPolyhedronGeometry3D, createTetrahedronGeometry3D, createOctahedronGeometry3D, createIcosahedronGeometry3D, createDodecahedronGeometry3D, createLatheGeometry3D, createTubeGeometry3D, createShapeGeometry3D, createExtrudeGeometry3D, createWireframeGeometry3D, createEdgesGeometry3D, toNonIndexedGeometry3D, mergeGeometries3D, mergeVertices3D, transformGeometry3D } from './geometries3D.js';
|
|
59
|
+
export type { CircleGeometryOptions3D, RingGeometryOptions3D, TorusKnotGeometryOptions3D, PolyhedronOptions3D, LatheGeometryOptions3D, TubeGeometryOptions3D, ExtrudeGeometryOptions3D } from './geometries3D.js';
|
|
60
|
+
export { computeObjectBounds3D, LineHelper3D, BoxHelper3D, ArrowHelper3D, CameraHelper3D, LightHelper3D, SkeletonHelper3D, createBoxHelper3D, createArrowHelper3D, createCameraHelper3D, createLightHelper3D, createSkeletonHelper3D } from './debug3D.js';
|
|
61
|
+
export { HDR3D_LIMITS, parseRgbe3D, createCubeTextureFromEquirect3D } from './Hdr3D.js';
|
|
62
|
+
export type { HdrImage3D, EquirectOptions3D } from './Hdr3D.js';
|
|
63
|
+
export { PHYSICS_MESH3D_LIMITS, TriangleMeshShape3D, createMeshShape3D } from './PhysicsMesh3D.js';
|
|
64
|
+
export { BATCH3D_LIMITS, BatchedMesh3D, FatLine3D, createBatchedMesh3D, createFatLine3D } from './Batch3D.js';
|
|
65
|
+
export type { FatLineOptions3D } from './Batch3D.js';
|
|
66
|
+
export { PHYSICS_HULL3D_LIMITS, ConvexHullShape3D, createConvexHullShape3D } from './PhysicsHull3D.js';
|
|
67
|
+
export { TEXT3D_LIMITS, Font3D, parseTypefaceFont3D, parseTrueTypeFont3D, createTextShapes3D, createTextGeometry3D } from './Text3D.js';
|
|
68
|
+
export type { GlyphOutline3D, FontSource3D, TextLayoutOptions3D, TextGeometryOptions3D } from './Text3D.js';
|
|
69
|
+
export { TransformGizmo3D, createTransformGizmo3D } from './Gizmo3D.js';
|
|
70
|
+
export type { GizmoMode3D, GizmoSpace3D, GizmoHandle3D, TransformGizmoOptions3D } from './Gizmo3D.js';
|
|
71
|
+
export { CharacterMotor3D, FollowCamera3D, createCharacterMotor3D, createFollowCamera3D } from './Character3D.js';
|
|
72
|
+
export type { CharacterMotorOptions3D, FollowCameraOptions3D } from './Character3D.js';
|
|
73
|
+
export { MESHOPT3D_LIMITS, decodeMeshopt3D } from './Meshopt3D.js';
|
|
74
|
+
export type { MeshoptMode3D, MeshoptFilter3D } from './Meshopt3D.js';
|
|
75
|
+
export { COMPRESSION3D_LIMITS, inflate3D, decompressZstd3D } from './Compression3D.js';
|
|
76
|
+
export { createDracoDecoder3D, createBasisTranscoder3D } from './decoders3D.js';
|
|
77
|
+
export type { DracoModule3D, BasisModule3D } from './decoders3D.js';
|
|
78
|
+
export { NAVIGATION3D_LIMITS, NavMesh3D, NavAgent3D, NavCrowd3D, createNavMesh3D, createNavCrowd3D, findGridPath3D } from './Navigation3D.js';
|
|
79
|
+
export type { NavPoint3D, NavMeshOptions3D, NavLocation3D, NavPathOptions3D, NavPath3D, NavAgentOptions3D, GridPathOptions3D } from './Navigation3D.js';
|
|
80
|
+
export { HeightField3D, Terrain3D, TerrainStream3D, createHeightField3D, createHeightFieldFromPixels3D, createTerrain3D, createTerrainMaterial3D, createTerrainStream3D, TERRAIN3D_LIMITS, type HeightFieldOptions3D, type HeightImageOptions3D, type TerrainOptions3D, type TerrainMaterialOptions3D, type TerrainStreamOptions3D, type TerrainTile3D } from './Terrain3D.js';
|
|
81
|
+
export { PlanarReflection3D, Water3D, createWater3D, createWaterMaterial3D, type PlanarReflectionPass3D, type ReflectionRenderer3D, type WaterOptions3D } from './Water3D.js';
|
|
82
|
+
export { AnimationTexture3D, SkinnedInstancedMesh3D, bakeAnimationTexture3D, createSkinnedInstancedMesh3D, ANIMATION_TEXTURE3D_LIMITS, type BakedClip3D, type BakeAnimationOptions3D, type InstanceClipOptions3D, type InstanceBlendOptions3D } from './AnimationTexture3D.js';
|
|
83
|
+
export { Trail3D, createTrail3D, TRAIL3D_LIMITS, type TrailOptions3D } from './Trail3D.js';
|
|
84
|
+
export { createDecalGeometry3D, createDecal3D, DECAL3D_LIMITS, type DecalOptions3D } from './Decal3D.js';
|
|
85
|
+
export { GpuParticles3D, createGpuParticles3D, type GpuParticlesOptions3D } from './GpuParticles3D.js';
|
|
86
|
+
export { VolumetricFog3D, createVolumetricFog3D, type VolumetricFogOptions3D } from './VolumetricFog3D.js';
|
|
87
|
+
export { createGeometryBuilder3D, linearColor3D, projectToViewport3D } from './GeometryBuilder3D.js';
|
|
88
|
+
export type { GeometryBuilder3D, GeometryPart3D, ViewportPoint3D } from './GeometryBuilder3D.js';
|
|
89
|
+
export { SdfShape3D, createSdfGeometry3D, sdfBox, sdfCapsule, sdfCone, sdfCylinder, sdfDisplace, sdfEllipsoid, sdfExtrude, sdfIntersect, sdfLathe, sdfMirror, sdfPattern, sdfRound, sdfShell, sdfSphere, sdfSubtract, sdfTorus, sdfUnion } from './Sdf3D.js';
|
|
90
|
+
export type { SdfDisplaceOptions3D, SdfGroupOptions3D, SdfMeshOptions3D, SdfOptions3D, SdfPatternOptions3D } from './Sdf3D.js';
|
|
91
|
+
export { simplifyGeometry3D } from './Simplify3D.js';
|
|
92
|
+
export { exportGlb3D } from './Export3D.js';
|
|
93
|
+
export { createSdfRig3D } from './Rig3D.js';
|
|
94
|
+
export { createSdfLod3D } from './SdfLod3D.js';
|
|
95
|
+
export { createSurfaceMaterial3D, surfaceShaderSources3D } from './SurfaceMaterial3D.js';
|
|
96
|
+
export type { SurfaceKind3D, SurfaceMaterialOptions3D } from './SurfaceMaterial3D.js';
|
|
97
|
+
export type { SdfLodOptions3D } from './SdfLod3D.js';
|
|
98
|
+
export type { SdfBone3D, SdfPoseKey3D, SdfRig3D, SdfRigOptions3D } from './Rig3D.js';
|
|
99
|
+
export type { GlbExportOptions3D } from './Export3D.js';
|
|
100
|
+
export type { SimplifyOptions3D, SimplifyResult3D } from './Simplify3D.js';
|
|
101
|
+
export { retargetAnimationClip3D } from './Retarget3D.js';
|
|
102
|
+
export type { RetargetOptions3D } from './Retarget3D.js';
|
|
103
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
// Optional DOM-free 3D entry: scene graph, geometry, materials, lights,
|
|
3
|
+
// cameras, animation, picking and glTF loading. Rendering backends live in
|
|
4
|
+
// separate explicit entries and consume these objects without mutating them.
|
|
5
|
+
export { World3DError } from './core3D.js';
|
|
6
|
+
export { Resource3D } from './core3D.js';
|
|
7
|
+
export * from './math3D.js';
|
|
8
|
+
export { Object3D, Scene3D, WORLD3D_LIMITS } from './Object3D.js';
|
|
9
|
+
export { Texture3D, CubeTexture3D, RenderTarget3D, createSolidTexture3D, createGradientCubeTexture3D, isTexturePixels3D, TEXTURE3D_LIMITS } from './Texture3D.js';
|
|
10
|
+
export { Attribute3D, Geometry3D, createGeometry3D, ATTRIBUTE_3D, GEOMETRY3D_LIMITS } from './Geometry3D.js';
|
|
11
|
+
export { createBoxGeometry3D, createPlaneGeometry3D, createSphereGeometry3D, createCylinderGeometry3D, createConeGeometry3D, createTorusGeometry3D, createCapsuleGeometry3D, createQuadGeometry3D } from './primitives3D.js';
|
|
12
|
+
export { Material3D, setColor3D, createUnlitMaterial3D, createLambertMaterial3D, createPhongMaterial3D, createStandardMaterial3D, createGlassMaterial3D, createCustomShader3D, createToonMaterial3D, createMatcapMaterial3D, createSpriteMaterial3D } from './Material3D.js';
|
|
13
|
+
export { Camera3D, createPerspectiveCamera3D, createOrthographicCamera3D } from './Camera3D.js';
|
|
14
|
+
export { Light3D, createAmbientLight3D, createHemisphereLight3D, createDirectionalLight3D, createPointLight3D, createSpotLight3D, LIGHT3D_LIMITS } from './Light3D.js';
|
|
15
|
+
export { Mesh3D, InstancedMesh3D, Sprite3D, createSprite3D, Bone3D, Skeleton3D, MESH3D_LIMITS } from './Mesh3D.js';
|
|
16
|
+
export { AnimationClip3D, AnimationAction3D, AnimationMixer3D, createAnimationClip3D, sampleAnimationTrack3D, ANIMATION3D_LIMITS } from './Animation3D.js';
|
|
17
|
+
export { Raycaster3D } from './Raycast3D.js';
|
|
18
|
+
export { RenderList3D } from './RenderList3D.js';
|
|
19
|
+
export { loadGltf3D } from './Gltf3D.js';
|
|
20
|
+
export { ParticleEmitter3D, createParticleEmitter3D, PARTICLES3D_LIMITS } from './Particles3D.js';
|
|
21
|
+
export { Lod3D, ScreenLayer3D, createScreenLayer3D, createGridGeometry3D, createAxesGeometry3D, createBoxEdgesGeometry3D, createLineMaterial3D, createGridHelper3D, createAxesHelper3D } from './helpers3D.js';
|
|
22
|
+
export { isCompressedPixels3D, COMPRESSED_BLOCK_BYTES_3D } from './Texture3D.js';
|
|
23
|
+
export { isKtx23D, parseKtx23D } from './Ktx23D.js';
|
|
24
|
+
export { SCENE_DOCUMENT_FORMAT_3D, SCENE_DOCUMENT_VERSION_3D, SERIALIZE3D_LIMITS, serializeScene3D, deserializeScene3D } from './Serialize3D.js';
|
|
25
|
+
export { STATE_MACHINE3D_LIMITS, AnimationStateMachine3D, createAnimationStateMachine3D } from './StateMachine3D.js';
|
|
26
|
+
export { Joint3D } from './Physics3D.js';
|
|
27
|
+
export { Jelly3D, createJelly3D, createJellyShader3D } from './Jelly3D.js';
|
|
28
|
+
export { RAGDOLL3D_LIMITS, Ragdoll3D, createRagdoll3D } from './Ragdoll3D.js';
|
|
29
|
+
export { VEHICLE3D_LIMITS, Vehicle3D, createVehicle3D } from './Vehicle3D.js';
|
|
30
|
+
export { CLOTH3D_LIMITS, Cloth3D, Rope3D, createCloth3D, createRope3D } from './Cloth3D.js';
|
|
31
|
+
export { PhysicsClient3D, RemoteBody3D, RemoteJoint3D, connectPhysics3D, servePhysics3D } from './PhysicsRemote3D.js';
|
|
32
|
+
export { PHYSICS3D_LIMITS, RigidBody3D, PhysicsWorld3D, CharacterController3D, createPhysicsWorld3D, createCharacterController3D } from './Physics3D.js';
|
|
33
|
+
export { CURVE3D_LIMITS, Curve3D, LineCurve3D, QuadraticBezierCurve3D, CubicBezierCurve3D, CatmullRomCurve3D, CurvePath3D, Path2D3D, Shape3D, signedArea2D, triangulateShape3D } from './Curves3D.js';
|
|
34
|
+
export { createCircleGeometry3D, createRingGeometry3D, createTorusKnotGeometry3D, createPolyhedronGeometry3D, createTetrahedronGeometry3D, createOctahedronGeometry3D, createIcosahedronGeometry3D, createDodecahedronGeometry3D, createLatheGeometry3D, createTubeGeometry3D, createShapeGeometry3D, createExtrudeGeometry3D, createWireframeGeometry3D, createEdgesGeometry3D, toNonIndexedGeometry3D, mergeGeometries3D, mergeVertices3D, transformGeometry3D } from './geometries3D.js';
|
|
35
|
+
export { computeObjectBounds3D, LineHelper3D, BoxHelper3D, ArrowHelper3D, CameraHelper3D, LightHelper3D, SkeletonHelper3D, createBoxHelper3D, createArrowHelper3D, createCameraHelper3D, createLightHelper3D, createSkeletonHelper3D } from './debug3D.js';
|
|
36
|
+
export { HDR3D_LIMITS, parseRgbe3D, createCubeTextureFromEquirect3D } from './Hdr3D.js';
|
|
37
|
+
export { PHYSICS_MESH3D_LIMITS, TriangleMeshShape3D, createMeshShape3D } from './PhysicsMesh3D.js';
|
|
38
|
+
export { BATCH3D_LIMITS, BatchedMesh3D, FatLine3D, createBatchedMesh3D, createFatLine3D } from './Batch3D.js';
|
|
39
|
+
export { PHYSICS_HULL3D_LIMITS, ConvexHullShape3D, createConvexHullShape3D } from './PhysicsHull3D.js';
|
|
40
|
+
export { TEXT3D_LIMITS, Font3D, parseTypefaceFont3D, parseTrueTypeFont3D, createTextShapes3D, createTextGeometry3D } from './Text3D.js';
|
|
41
|
+
export { TransformGizmo3D, createTransformGizmo3D } from './Gizmo3D.js';
|
|
42
|
+
export { CharacterMotor3D, FollowCamera3D, createCharacterMotor3D, createFollowCamera3D } from './Character3D.js';
|
|
43
|
+
export { MESHOPT3D_LIMITS, decodeMeshopt3D } from './Meshopt3D.js';
|
|
44
|
+
export { COMPRESSION3D_LIMITS, inflate3D, decompressZstd3D } from './Compression3D.js';
|
|
45
|
+
export { createDracoDecoder3D, createBasisTranscoder3D } from './decoders3D.js';
|
|
46
|
+
export { NAVIGATION3D_LIMITS, NavMesh3D, NavAgent3D, NavCrowd3D, createNavMesh3D, createNavCrowd3D, findGridPath3D } from './Navigation3D.js';
|
|
47
|
+
export { HeightField3D, Terrain3D, TerrainStream3D, createHeightField3D, createHeightFieldFromPixels3D, createTerrain3D, createTerrainMaterial3D, createTerrainStream3D, TERRAIN3D_LIMITS } from './Terrain3D.js';
|
|
48
|
+
export { PlanarReflection3D, Water3D, createWater3D, createWaterMaterial3D } from './Water3D.js';
|
|
49
|
+
export { AnimationTexture3D, SkinnedInstancedMesh3D, bakeAnimationTexture3D, createSkinnedInstancedMesh3D, ANIMATION_TEXTURE3D_LIMITS } from './AnimationTexture3D.js';
|
|
50
|
+
export { Trail3D, createTrail3D, TRAIL3D_LIMITS } from './Trail3D.js';
|
|
51
|
+
export { createDecalGeometry3D, createDecal3D, DECAL3D_LIMITS } from './Decal3D.js';
|
|
52
|
+
export { GpuParticles3D, createGpuParticles3D } from './GpuParticles3D.js';
|
|
53
|
+
export { VolumetricFog3D, createVolumetricFog3D } from './VolumetricFog3D.js';
|
|
54
|
+
export { createGeometryBuilder3D, linearColor3D, projectToViewport3D } from './GeometryBuilder3D.js';
|
|
55
|
+
export { SdfShape3D, createSdfGeometry3D, sdfBox, sdfCapsule, sdfCone, sdfCylinder, sdfDisplace, sdfEllipsoid, sdfExtrude, sdfIntersect, sdfLathe, sdfMirror, sdfPattern, sdfRound, sdfShell, sdfSphere, sdfSubtract, sdfTorus, sdfUnion } from './Sdf3D.js';
|
|
56
|
+
export { simplifyGeometry3D } from './Simplify3D.js';
|
|
57
|
+
export { exportGlb3D } from './Export3D.js';
|
|
58
|
+
export { createSdfRig3D } from './Rig3D.js';
|
|
59
|
+
export { createSdfLod3D } from './SdfLod3D.js';
|
|
60
|
+
export { createSurfaceMaterial3D, surfaceShaderSources3D } from './SurfaceMaterial3D.js';
|
|
61
|
+
export { retargetAnimationClip3D } from './Retarget3D.js';
|
|
62
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/** An array of numbers the 3D math writes into. */
|
|
2
|
+
export type NumericArray3D = Float32Array | Float64Array | number[];
|
|
3
|
+
/** How close two numbers must be to count as equal. */
|
|
4
|
+
export declare const EPSILON_3D = 1e-8;
|
|
5
|
+
/** Sets a vector's x, y and z. */
|
|
6
|
+
export declare function vec3Set(out: NumericArray3D, x: number, y: number, z: number): NumericArray3D;
|
|
7
|
+
/** Copies a vector. */
|
|
8
|
+
export declare function vec3Copy(out: NumericArray3D, a: ArrayLike<number>): NumericArray3D;
|
|
9
|
+
/** Adds two vectors. */
|
|
10
|
+
export declare function vec3Add(out: NumericArray3D, a: ArrayLike<number>, b: ArrayLike<number>): NumericArray3D;
|
|
11
|
+
/** Takes one vector from another. */
|
|
12
|
+
export declare function vec3Sub(out: NumericArray3D, a: ArrayLike<number>, b: ArrayLike<number>): NumericArray3D;
|
|
13
|
+
/** Multiplies a vector by a number. */
|
|
14
|
+
export declare function vec3Scale(out: NumericArray3D, a: ArrayLike<number>, s: number): NumericArray3D;
|
|
15
|
+
/** The dot product of two vectors. */
|
|
16
|
+
export declare function vec3Dot(a: ArrayLike<number>, b: ArrayLike<number>): number;
|
|
17
|
+
/** The cross product of two vectors. */
|
|
18
|
+
export declare function vec3Cross(out: NumericArray3D, a: ArrayLike<number>, b: ArrayLike<number>): NumericArray3D;
|
|
19
|
+
/** The length of a vector. */
|
|
20
|
+
export declare function vec3Length(a: ArrayLike<number>): number;
|
|
21
|
+
/** The distance between two points. */
|
|
22
|
+
export declare function vec3Distance(a: ArrayLike<number>, b: ArrayLike<number>): number;
|
|
23
|
+
/** A zero-length input yields the zero vector instead of NaN. */
|
|
24
|
+
export declare function vec3Normalize(out: NumericArray3D, a: ArrayLike<number>): NumericArray3D;
|
|
25
|
+
/** The point a fraction of the way from one vector to another. */
|
|
26
|
+
export declare function vec3Lerp(out: NumericArray3D, a: ArrayLike<number>, b: ArrayLike<number>, t: number): NumericArray3D;
|
|
27
|
+
/** Transform a point (w = 1) with perspective division. */
|
|
28
|
+
export declare function vec3TransformMat4(out: NumericArray3D, a: ArrayLike<number>, m: ArrayLike<number>): NumericArray3D;
|
|
29
|
+
/** Transform a direction (w = 0) by the upper 3x3; the result is not normalized. */
|
|
30
|
+
export declare function vec3TransformDirection(out: NumericArray3D, a: ArrayLike<number>, m: ArrayLike<number>): NumericArray3D;
|
|
31
|
+
/** Turns a vector by a quaternion. */
|
|
32
|
+
export declare function vec3TransformQuat(out: NumericArray3D, a: ArrayLike<number>, q: ArrayLike<number>): NumericArray3D;
|
|
33
|
+
/** Sets a quaternion to no rotation. */
|
|
34
|
+
export declare function quatIdentity(out: NumericArray3D): NumericArray3D;
|
|
35
|
+
/** Copies a quaternion. */
|
|
36
|
+
export declare function quatCopy(out: NumericArray3D, a: ArrayLike<number>): NumericArray3D;
|
|
37
|
+
/** Scales a quaternion to length 1. */
|
|
38
|
+
export declare function quatNormalize(out: NumericArray3D, a: ArrayLike<number>): NumericArray3D;
|
|
39
|
+
/** Multiplies two quaternions: the rotation of b, then a. */
|
|
40
|
+
export declare function quatMultiply(out: NumericArray3D, a: ArrayLike<number>, b: ArrayLike<number>): NumericArray3D;
|
|
41
|
+
/** A quaternion that turns by an angle about an axis. */
|
|
42
|
+
export declare function quatFromAxisAngle(out: NumericArray3D, axis: ArrayLike<number>, radians: number): NumericArray3D;
|
|
43
|
+
/** Intrinsic XYZ Euler angles in radians (rotate X, then Y, then Z in local axes). */
|
|
44
|
+
export declare function quatFromEuler(out: NumericArray3D, x: number, y: number, z: number): NumericArray3D;
|
|
45
|
+
/** Inverse of quatFromEuler; writes radians into out[0..2]. */
|
|
46
|
+
export declare function quatToEuler(out: NumericArray3D, q: ArrayLike<number>): NumericArray3D;
|
|
47
|
+
/** Shortest-arc spherical interpolation; falls back to nlerp for close inputs. */
|
|
48
|
+
export declare function quatSlerp(out: NumericArray3D, a: ArrayLike<number>, b: ArrayLike<number>, t: number): NumericArray3D;
|
|
49
|
+
/** Rotation part of a matrix without scale or shear. */
|
|
50
|
+
export declare function quatFromRotationMatrix(out: NumericArray3D, m: ArrayLike<number>): NumericArray3D;
|
|
51
|
+
/** Sets a 4x4 matrix to the identity. */
|
|
52
|
+
export declare function mat4Identity(out: NumericArray3D): NumericArray3D;
|
|
53
|
+
/** Copies a 4x4 matrix. */
|
|
54
|
+
export declare function mat4Copy(out: NumericArray3D, a: ArrayLike<number>): NumericArray3D;
|
|
55
|
+
/** out = a * b: with column vectors, b applies first. */
|
|
56
|
+
export declare function mat4Multiply(out: NumericArray3D, a: ArrayLike<number>, b: ArrayLike<number>): NumericArray3D;
|
|
57
|
+
/** Affine matrix from translation, unit quaternion and scale. */
|
|
58
|
+
export declare function mat4Compose(out: NumericArray3D, t: ArrayLike<number>, q: ArrayLike<number>, s: ArrayLike<number>): NumericArray3D;
|
|
59
|
+
/** Split an affine matrix; a negative determinant is folded into scale X. */
|
|
60
|
+
export declare function mat4Decompose(m: ArrayLike<number>, t: NumericArray3D, q: NumericArray3D, s: NumericArray3D): void;
|
|
61
|
+
/** The determinant of a 4x4 matrix. */
|
|
62
|
+
export declare function mat4Determinant(m: ArrayLike<number>): number;
|
|
63
|
+
/** Returns false and leaves `out` untouched when the matrix is singular. */
|
|
64
|
+
export declare function mat4Invert(out: NumericArray3D, m: ArrayLike<number>): boolean;
|
|
65
|
+
/** World matrix of an object at `eye` whose negative Z axis points at `target`. */
|
|
66
|
+
export declare function mat4LookAt(out: NumericArray3D, eye: ArrayLike<number>, target: ArrayLike<number>, up: ArrayLike<number>): NumericArray3D;
|
|
67
|
+
/** Right-handed perspective projection to clip depth [-1, 1]. */
|
|
68
|
+
export declare function mat4Perspective(out: NumericArray3D, verticalFov: number, aspect: number, near: number, far: number): NumericArray3D;
|
|
69
|
+
/** Sets a 4x4 matrix to an orthographic projection. */
|
|
70
|
+
export declare function mat4Orthographic(out: NumericArray3D, left: number, right: number, bottom: number, top: number, near: number, far: number): NumericArray3D;
|
|
71
|
+
/** 3x3 inverse transpose of the upper-left block, written as nine column-major floats. */
|
|
72
|
+
export declare function mat3NormalFromMat4(out: NumericArray3D, m: ArrayLike<number>): NumericArray3D;
|
|
73
|
+
/** The largest scale a 4x4 matrix applies along an axis. */
|
|
74
|
+
export declare function mat4MaxScaleOnAxis(m: ArrayLike<number>): number;
|
|
75
|
+
/** Sets a box to empty. */
|
|
76
|
+
export declare function box3Empty(out: NumericArray3D): NumericArray3D;
|
|
77
|
+
/** Whether a box is empty. */
|
|
78
|
+
export declare function box3IsEmpty(box: ArrayLike<number>): boolean;
|
|
79
|
+
/** Grows a box to hold a point. */
|
|
80
|
+
export declare function box3ExpandByPoint(box: NumericArray3D, x: number, y: number, z: number): void;
|
|
81
|
+
/** The box that holds two boxes. */
|
|
82
|
+
export declare function box3Union(out: NumericArray3D, a: ArrayLike<number>, b: ArrayLike<number>): NumericArray3D;
|
|
83
|
+
/** Axis-aligned bounds of a transformed box (Arvo's method). */
|
|
84
|
+
export declare function box3Transform(out: NumericArray3D, box: ArrayLike<number>, m: ArrayLike<number>): NumericArray3D;
|
|
85
|
+
/** The sphere around a box. */
|
|
86
|
+
export declare function sphereFromBox(out: NumericArray3D, box: ArrayLike<number>): NumericArray3D;
|
|
87
|
+
/** Moves and scales a sphere by a 4x4 matrix. */
|
|
88
|
+
export declare function sphereTransform(out: NumericArray3D, sphere: ArrayLike<number>, m: ArrayLike<number>): NumericArray3D;
|
|
89
|
+
/** The six planes of the frustum a projection-view matrix sees. */
|
|
90
|
+
export declare function frustumFromMatrix(out: NumericArray3D, m: ArrayLike<number>): NumericArray3D;
|
|
91
|
+
/** Whether a sphere is at least partly inside a frustum. */
|
|
92
|
+
export declare function frustumIntersectsSphere(frustum: ArrayLike<number>, sphere: ArrayLike<number>): boolean;
|
|
93
|
+
/** Whether a box is at least partly inside a frustum. */
|
|
94
|
+
export declare function frustumIntersectsBox(frustum: ArrayLike<number>, box: ArrayLike<number>): boolean;
|
|
95
|
+
/** Distance along the ray to the sphere, or -1 when it misses. */
|
|
96
|
+
export declare function rayIntersectSphere(origin: ArrayLike<number>, direction: ArrayLike<number>, sphere: ArrayLike<number>): number;
|
|
97
|
+
/** Slab test; returns the entry distance (0 when the origin is inside) or -1. */
|
|
98
|
+
export declare function rayIntersectBox(origin: ArrayLike<number>, direction: ArrayLike<number>, box: ArrayLike<number>): number;
|
|
99
|
+
/**
|
|
100
|
+
* Moller-Trumbore. Writes [distance, u, v] into `out` and returns true on a hit.
|
|
101
|
+
* `cull` rejects back faces (counter-clockwise triangles face the ray origin).
|
|
102
|
+
*/
|
|
103
|
+
export declare function rayIntersectTriangle(out: NumericArray3D, origin: ArrayLike<number>, direction: ArrayLike<number>, p: ArrayLike<number>, a: number, b: number, c: number, cull: boolean): boolean;
|
|
104
|
+
/** Turns an sRGB color value into a linear one. */
|
|
105
|
+
export declare function srgbToLinear(value: number): number;
|
|
106
|
+
/** Turns a linear color value into an sRGB one. */
|
|
107
|
+
export declare function linearToSrgb(value: number): number;
|
|
108
|
+
/** Decode a 0xRRGGBB sRGB color into linear RGB in [0, 1]. */
|
|
109
|
+
export declare function colorFromHex(out: NumericArray3D, hex: number): NumericArray3D;
|
|
110
|
+
/** The value, kept between `min` and `max`. */
|
|
111
|
+
export declare function clamp(value: number, min: number, max: number): number;
|
|
112
|
+
/** Degrees times this are radians. */
|
|
113
|
+
export declare const DEG_TO_RAD_3D: number;
|
|
114
|
+
//# sourceMappingURL=math3D.d.ts.map
|