@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
package/dist/motion.js
ADDED
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
// Motion: several numbers of one object moved together, one step after another, on the Engine's scalar tween. Each
|
|
3
|
+
// step is one tween from 0 to 1 on the Engine's clock; this module only says what that fraction means.
|
|
4
|
+
import { EgretError } from '@egret/runtime';
|
|
5
|
+
const invalid = () => new EgretError('MOTION_OPTIONS_INVALID');
|
|
6
|
+
const out = (ease) => (t) => 1 - ease(1 - t);
|
|
7
|
+
const inOut = (ease) => (t) => t < 0.5 ? ease(2 * t) / 2 : 1 - ease(2 - 2 * t) / 2;
|
|
8
|
+
const power = (n) => (t) => t ** n;
|
|
9
|
+
const sine = (t) => 1 - Math.cos((t * Math.PI) / 2), expo = (t) => (t === 0 ? 0 : 2 ** (10 * t - 10));
|
|
10
|
+
const back = (t) => 2.70158 * t * t * t - 1.70158 * t * t;
|
|
11
|
+
function bounceOut(t) {
|
|
12
|
+
if (t < 1 / 2.75)
|
|
13
|
+
return 7.5625 * t * t;
|
|
14
|
+
if (t < 2 / 2.75) {
|
|
15
|
+
t -= 1.5 / 2.75;
|
|
16
|
+
return 7.5625 * t * t + 0.75;
|
|
17
|
+
}
|
|
18
|
+
if (t < 2.5 / 2.75) {
|
|
19
|
+
t -= 2.25 / 2.75;
|
|
20
|
+
return 7.5625 * t * t + 0.9375;
|
|
21
|
+
}
|
|
22
|
+
t -= 2.625 / 2.75;
|
|
23
|
+
return 7.5625 * t * t + 0.984375;
|
|
24
|
+
}
|
|
25
|
+
const EASINGS = {
|
|
26
|
+
linear: t => t,
|
|
27
|
+
quadIn: power(2),
|
|
28
|
+
quadOut: out(power(2)),
|
|
29
|
+
quadInOut: inOut(power(2)),
|
|
30
|
+
cubicIn: power(3),
|
|
31
|
+
cubicOut: out(power(3)),
|
|
32
|
+
cubicInOut: inOut(power(3)),
|
|
33
|
+
quartIn: power(4),
|
|
34
|
+
quartOut: out(power(4)),
|
|
35
|
+
quartInOut: inOut(power(4)),
|
|
36
|
+
sineIn: sine,
|
|
37
|
+
sineOut: out(sine),
|
|
38
|
+
sineInOut: inOut(sine),
|
|
39
|
+
expoIn: expo,
|
|
40
|
+
expoOut: out(expo),
|
|
41
|
+
expoInOut: inOut(expo),
|
|
42
|
+
backIn: back,
|
|
43
|
+
backOut: out(back),
|
|
44
|
+
backInOut: inOut(back),
|
|
45
|
+
elasticOut: t => (t === 0 || t === 1 ? t : 2 ** (-10 * t) * Math.sin(((t * 10 - 0.75) * 2 * Math.PI) / 3) + 1),
|
|
46
|
+
bounceOut
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* A motion of one object: `animate(engine, scope, sprite).to({ x: 100, alpha: 0.5 }, 0.5, 'quadOut').wait(0.2).to({ x: 0 }, 0.5).start()`.
|
|
50
|
+
* It runs on the Engine's clock, like a tween, and ends with its scope.
|
|
51
|
+
*/
|
|
52
|
+
export function animate(engine, scope, target) {
|
|
53
|
+
if (target === null || (typeof target !== 'object' && typeof target !== 'function'))
|
|
54
|
+
throw invalid();
|
|
55
|
+
const steps = [], record = target;
|
|
56
|
+
let state = 'idle', runs = 1, run = 0, at = 0, tween, finish;
|
|
57
|
+
const seconds = (value) => {
|
|
58
|
+
if (typeof value !== 'number' || !Number.isFinite(value) || value < 0)
|
|
59
|
+
throw invalid();
|
|
60
|
+
return value;
|
|
61
|
+
};
|
|
62
|
+
const building = () => {
|
|
63
|
+
if (state !== 'idle')
|
|
64
|
+
throw new EgretError('MOTION_ALREADY_STARTED');
|
|
65
|
+
};
|
|
66
|
+
/** One tween from 0 to 1 over seconds; a step of no length is taken at once. */
|
|
67
|
+
function span(length, update) {
|
|
68
|
+
if (length === 0) {
|
|
69
|
+
update(1);
|
|
70
|
+
next();
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
tween = engine.createTween(scope, {
|
|
74
|
+
from: 0,
|
|
75
|
+
to: 1,
|
|
76
|
+
durationSeconds: length,
|
|
77
|
+
onUpdate: (fraction) => {
|
|
78
|
+
update(fraction);
|
|
79
|
+
},
|
|
80
|
+
onComplete: () => {
|
|
81
|
+
tween = undefined;
|
|
82
|
+
next();
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
tween.start();
|
|
86
|
+
}
|
|
87
|
+
function next() {
|
|
88
|
+
// A callback may have stopped the motion.
|
|
89
|
+
while (state === 'running') {
|
|
90
|
+
if (at === steps.length) {
|
|
91
|
+
run++;
|
|
92
|
+
at = 0;
|
|
93
|
+
if (run >= runs || steps.length === 0) {
|
|
94
|
+
state = 'finished';
|
|
95
|
+
const callback = finish;
|
|
96
|
+
finish = undefined;
|
|
97
|
+
callback?.();
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
const step = steps[at++];
|
|
102
|
+
if (step.kind === 'call') {
|
|
103
|
+
step.callback();
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
if (step.kind === 'wait') {
|
|
107
|
+
span(step.seconds, () => { });
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
// The values the step starts from are the ones the object has now, not those it had when the chain was written.
|
|
111
|
+
const starts = step.names.map(name => {
|
|
112
|
+
const value = record[name];
|
|
113
|
+
if (typeof value !== 'number' || !Number.isFinite(value))
|
|
114
|
+
throw invalid();
|
|
115
|
+
return value;
|
|
116
|
+
});
|
|
117
|
+
span(step.seconds, fraction => {
|
|
118
|
+
// An object that was disposed while it moved is left alone, and the motion ends there.
|
|
119
|
+
if (record['isDisposed'] === true) {
|
|
120
|
+
motion.stop();
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
const eased = fraction === 1 ? 1 : step.ease(fraction);
|
|
124
|
+
for (let i = 0; i < step.names.length; i++)
|
|
125
|
+
record[step.names[i]] = fraction === 1 ? step.ends[i] : starts[i] + (step.ends[i] - starts[i]) * eased;
|
|
126
|
+
});
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
const motion = {
|
|
131
|
+
get state() {
|
|
132
|
+
return state;
|
|
133
|
+
},
|
|
134
|
+
to(values, length, easing = 'linear') {
|
|
135
|
+
building();
|
|
136
|
+
if (values === null || typeof values !== 'object')
|
|
137
|
+
throw invalid();
|
|
138
|
+
const ease = typeof easing === 'function' ? easing : Object.hasOwn(EASINGS, easing) ? EASINGS[easing] : undefined;
|
|
139
|
+
if (ease === undefined)
|
|
140
|
+
throw invalid();
|
|
141
|
+
const names = Object.keys(values), ends = names.map(name => values[name]);
|
|
142
|
+
if (names.length === 0 || ends.some(value => typeof value !== 'number' || !Number.isFinite(value)))
|
|
143
|
+
throw invalid();
|
|
144
|
+
steps.push({ kind: 'to', names, ends: ends, seconds: seconds(length), ease });
|
|
145
|
+
return this;
|
|
146
|
+
},
|
|
147
|
+
wait(length) {
|
|
148
|
+
building();
|
|
149
|
+
steps.push({ kind: 'wait', seconds: seconds(length) });
|
|
150
|
+
return this;
|
|
151
|
+
},
|
|
152
|
+
call(callback) {
|
|
153
|
+
building();
|
|
154
|
+
if (typeof callback !== 'function')
|
|
155
|
+
throw invalid();
|
|
156
|
+
steps.push({ kind: 'call', callback });
|
|
157
|
+
return this;
|
|
158
|
+
},
|
|
159
|
+
loop(times = Infinity) {
|
|
160
|
+
building();
|
|
161
|
+
if (typeof times !== 'number' || !(times >= 1) || (times !== Infinity && !Number.isInteger(times)))
|
|
162
|
+
throw invalid();
|
|
163
|
+
// A chain that takes no time cannot be run without end.
|
|
164
|
+
runs = times;
|
|
165
|
+
return this;
|
|
166
|
+
},
|
|
167
|
+
onFinish(callback) {
|
|
168
|
+
building();
|
|
169
|
+
if (typeof callback !== 'function')
|
|
170
|
+
throw invalid();
|
|
171
|
+
finish = callback;
|
|
172
|
+
return this;
|
|
173
|
+
},
|
|
174
|
+
start() {
|
|
175
|
+
building();
|
|
176
|
+
if (runs === Infinity && !steps.some(step => step.kind !== 'call' && step.seconds > 0))
|
|
177
|
+
throw invalid();
|
|
178
|
+
state = 'running';
|
|
179
|
+
next();
|
|
180
|
+
return this;
|
|
181
|
+
},
|
|
182
|
+
pause() {
|
|
183
|
+
if (state === 'running' && tween !== undefined) {
|
|
184
|
+
tween.pause();
|
|
185
|
+
state = 'paused';
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
resume() {
|
|
189
|
+
if (state === 'paused') {
|
|
190
|
+
state = 'running';
|
|
191
|
+
tween?.resume();
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
stop() {
|
|
195
|
+
if (state === 'finished' || state === 'stopped')
|
|
196
|
+
return;
|
|
197
|
+
state = 'stopped';
|
|
198
|
+
const active = tween;
|
|
199
|
+
tween = undefined;
|
|
200
|
+
finish = undefined;
|
|
201
|
+
active?.dispose();
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
return motion;
|
|
205
|
+
}
|
|
206
|
+
//# sourceMappingURL=motion.js.map
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { EgretError, Scope } from '@egret/runtime';
|
|
2
|
+
import type { DisplayInputOperations, DisplayObject } from '@egret/runtime';
|
|
3
|
+
import type { CancellationSignal, Diagnostic, ScopeValue } from '@egret/contracts';
|
|
4
|
+
import type { MouseInput, MouseInputEvents, MouseInputOptions, MouseInputState } from './mouseInputTypes.js';
|
|
5
|
+
import type { BitmapButtonAssociation } from './internal/mouseInputFactoryState.js';
|
|
6
|
+
export type { MouseInputOptions, MouseInput, MouseInputState, MouseInputEvents, MouseInputPayload, MouseInputCancelReason } from './mouseInputTypes.js';
|
|
7
|
+
export { createBitmapButton } from './bitmapButton.js';
|
|
8
|
+
export type { BitmapButton, BitmapButtonOptions, BitmapButtonState } from './bitmapButtonTypes.js';
|
|
9
|
+
export type MouseInputNativeKind = 'down' | 'up' | 'cancel' | 'blur' | 'pagehide';
|
|
10
|
+
export type MouseInputNativeListener = (event?: unknown) => void;
|
|
11
|
+
export interface MouseInputPoint {
|
|
12
|
+
readonly x: number;
|
|
13
|
+
readonly y: number;
|
|
14
|
+
}
|
|
15
|
+
export interface MouseInputNativePair {
|
|
16
|
+
readonly kind: MouseInputNativeKind;
|
|
17
|
+
add(listener: MouseInputNativeListener): void;
|
|
18
|
+
remove(listener: MouseInputNativeListener): void;
|
|
19
|
+
}
|
|
20
|
+
/** DOM-free assembly port; the optional browser adapter supplies genuine native operations. */
|
|
21
|
+
export interface MouseInputNativePorts {
|
|
22
|
+
readonly pairs: readonly MouseInputNativePair[];
|
|
23
|
+
pointer(event: unknown, kind: 'down' | 'up' | 'cancel', heldId: number | undefined): number | undefined;
|
|
24
|
+
windowEvent(event: unknown, kind: 'blur' | 'pagehide'): boolean;
|
|
25
|
+
point(event: unknown): MouseInputPoint;
|
|
26
|
+
}
|
|
27
|
+
export type MouseInputNativeFactory = (surface: object, width: number, height: number, assertLive: () => void) => MouseInputNativePorts;
|
|
28
|
+
interface ScopePorts {
|
|
29
|
+
readonly scope: Scope;
|
|
30
|
+
readonly signal: CancellationSignal;
|
|
31
|
+
assertOpen(): void;
|
|
32
|
+
use(value: ScopeValue): void;
|
|
33
|
+
add(listener: MouseInputNativeListener): void;
|
|
34
|
+
remove(listener: MouseInputNativeListener): void;
|
|
35
|
+
}
|
|
36
|
+
export interface MouseInputEnginePort {
|
|
37
|
+
readonly surface: object;
|
|
38
|
+
readonly operations: DisplayInputOperations;
|
|
39
|
+
assertReady(): void;
|
|
40
|
+
assertOpen(): void;
|
|
41
|
+
markStarted(): void;
|
|
42
|
+
scope(value: unknown): ScopePorts;
|
|
43
|
+
report(diagnostic: Diagnostic): void;
|
|
44
|
+
captureCleanup(cause: unknown): void;
|
|
45
|
+
onClose(listener: () => void): () => void;
|
|
46
|
+
addRecord(record: InputRecord): void;
|
|
47
|
+
removeRecord(record: InputRecord): void;
|
|
48
|
+
}
|
|
49
|
+
export interface MouseInputOwner {
|
|
50
|
+
registerScope(scope: Scope): void;
|
|
51
|
+
close(): void;
|
|
52
|
+
}
|
|
53
|
+
export interface MouseInputAssembly {
|
|
54
|
+
readonly surface: object;
|
|
55
|
+
readonly operations: DisplayInputOperations;
|
|
56
|
+
assertOpen(): void;
|
|
57
|
+
report(diagnostic: Diagnostic): void;
|
|
58
|
+
captureCleanup(cause: unknown): void;
|
|
59
|
+
}
|
|
60
|
+
/** Signal methods are captured per assembly, permitting transparent pre-assembly observation. */
|
|
61
|
+
export declare function createMouseInputOwner(engine: object, assembly: MouseInputAssembly): MouseInputOwner;
|
|
62
|
+
interface HeldPress {
|
|
63
|
+
readonly target: DisplayObject;
|
|
64
|
+
readonly id: number;
|
|
65
|
+
readonly point: MouseInputPoint;
|
|
66
|
+
beginAllowed: boolean;
|
|
67
|
+
readonly token: object;
|
|
68
|
+
readonly button: BitmapButtonAssociation | undefined;
|
|
69
|
+
}
|
|
70
|
+
interface AttemptedPair {
|
|
71
|
+
readonly listener: MouseInputNativeListener;
|
|
72
|
+
readonly add: (listener: MouseInputNativeListener) => void;
|
|
73
|
+
readonly remove: (listener: MouseInputNativeListener) => void;
|
|
74
|
+
inFlight: boolean;
|
|
75
|
+
addSucceeded: boolean;
|
|
76
|
+
removeAttempted: boolean;
|
|
77
|
+
removeSucceeded: boolean;
|
|
78
|
+
}
|
|
79
|
+
interface InputRecord {
|
|
80
|
+
state: MouseInputState;
|
|
81
|
+
phase: 'acquiring' | 'ready' | 'retiring' | 'closed';
|
|
82
|
+
busy: boolean;
|
|
83
|
+
failureEpisode: boolean;
|
|
84
|
+
failureCause: unknown;
|
|
85
|
+
failureError: EgretError | undefined;
|
|
86
|
+
owner: MouseInputEnginePort | undefined;
|
|
87
|
+
scope: ScopePorts | undefined;
|
|
88
|
+
native: MouseInputNativePorts | undefined;
|
|
89
|
+
held: HeldPress | undefined;
|
|
90
|
+
readonly events: MouseInputEvents;
|
|
91
|
+
readonly buttons: Map<DisplayObject, BitmapButtonAssociation>;
|
|
92
|
+
readonly maximum: number;
|
|
93
|
+
readonly token: object;
|
|
94
|
+
surface: object | undefined;
|
|
95
|
+
pairs: AttemptedPair[];
|
|
96
|
+
readonly cleanupErrors: unknown[];
|
|
97
|
+
retirement: 'owner' | 'explicit' | 'native' | 'setup' | undefined;
|
|
98
|
+
wasAcquiring: boolean;
|
|
99
|
+
}
|
|
100
|
+
/** The browser entry admits options before reading any DOM capabilities or installing listeners. */
|
|
101
|
+
export declare function createMouseInputWithNative(options: MouseInputOptions, nativeFactory: MouseInputNativeFactory): MouseInput;
|
|
102
|
+
//# sourceMappingURL=mouseInput.d.ts.map
|