@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/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
First-party code and documentation: Apache-2.0; see LICENSE.
|
|
2
|
+
|
|
3
|
+
robust-predicates 3.0.3 by Vladimir Agafonkin
|
|
4
|
+
https://github.com/mourner/robust-predicates
|
|
5
|
+
License: Unlicense. The unmodified license text is retained in
|
|
6
|
+
third-party/robust-predicates-3.0.3.LICENSE and the installed package.
|
|
7
|
+
Used through its public package root for orient2d in private DOM-free
|
|
8
|
+
rectangle preparation. This dependency does not establish native GPU,
|
|
9
|
+
browser bundle-size, performance or complete-engine acceptance.
|
|
10
|
+
|
|
11
|
+
jsonc-parser 3.3.1 by Microsoft Corporation
|
|
12
|
+
https://github.com/microsoft/node-jsonc-parser
|
|
13
|
+
License: MIT. The unmodified Microsoft copyright and permission notice is
|
|
14
|
+
retained in third-party/jsonc-parser-3.3.1.LICENSE and the installed package.
|
|
15
|
+
Only createScanner and visit are used through its public package root in
|
|
16
|
+
the private headless project adapters. First-party schema generation,
|
|
17
|
+
validation, canonical bytes, transactions and history are independently authored.
|
|
18
|
+
The 0.14.0 engineering preview has bounded headless implementation evidence;
|
|
19
|
+
editor, migration, browser/bundler, Native SDK and performance remain unaccepted.
|
|
20
|
+
Native Node public-root CJS interoperability is separate from the shipped
|
|
21
|
+
ESM entry's extensionless-import limitation.
|
package/README.md
CHANGED
|
@@ -1,3 +1,102 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @egret/engine
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
English | [简体中文](README.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
Egret's experimental public facade assembles `@egret/runtime` and `@egret/contracts`. It manages logical lifecycle, display/frame access, CPU assets and exclusive surface reservations; hosts manage physical resources and safe return. The root entry remains DOM-free. The two browser Hosts are separate entries, each imported explicitly: `@egret/engine/webgpu` and `@egret/engine/webgl2`. Engine pins `robust-predicates` 3.0.3 for rendering preparation.
|
|
6
|
+
|
|
7
|
+
## Engineering preview 0.56.0 — recoverable Bitmap resource replacement
|
|
8
|
+
|
|
9
|
+
`Engine.createBitmapResourceSlot(scope, bitmap)` adds explicit asynchronous replacement for one persistent Bitmap through the existing `@egret/engine` root. The only added root names are the erased `BitmapResourceSlot` and `BitmapResourceSlotState` types; this increment adds no runtime export value, public subpath or dependency and retains the Host protocol. The initial binding remains borrowed; the slot owns only fresh replacement leases. Pending, failed and cancelled requests retain the prior usable binding, and only the latest accepted intent may commit. Cancellation and supersession reject the affected Promise; callers follow the specification for validation, conflict, lifetime and cleanup errors.
|
|
10
|
+
|
|
11
|
+
Read the [specification](../../knowledge-base/en/docs/bitmap-resource-slot-spec.md), [evidence](../../knowledge-base/en/docs/bitmap-resource-slot-evidence.md) and [composition example](../../examples/bitmap-resource-slot/README.md). A resolved replacement means a resource-live binding was committed. GPU presentation, multi-resource transactions and animation retargeting have separate obligations. Focused behavior, strict consumers and the recorded desktop Canvas/WebGPU composition have passed their bounded checks. Full local/public gates and repository delivery are recorded separately in the linked evidence; full UI and Spine remain OPEN.
|
|
12
|
+
|
|
13
|
+
## Engineering preview 0.55.0 — explicit local linear layout
|
|
14
|
+
|
|
15
|
+
The optional built `@egret/engine/layout` entry provides `planLinearLayout` and four erased interfaces. Callers supply numeric dimensions, select membership and apply local coordinates. The planner is DOM/Node-free, writes no scene, and adds no default API, dependency or SDK Host protocol; automatic EUI layout remains open. Read the [specification](../../knowledge-base/en/docs/local-linear-layout-spec.md), [evidence](../../knowledge-base/en/docs/local-linear-layout-evidence.md) and [two-button example](../../examples/linear-layout/README.md). Recorded desktop Canvas/WebGPU checks cover the fixed two-Button workflow; their environment and limits are in the evidence record.
|
|
16
|
+
|
|
17
|
+
## Engineering preview 0.52.0 — display anchor offsets
|
|
18
|
+
|
|
19
|
+
Existing display classes inherit finite-number `anchorOffsetX` and `anchorOffsetY`, default +0. The authored pivot places scale/rotation coherently across coordinates, logical bounds, clipping, explicit picking and frame capture, with original zero-offset bytes retained. Read the [current contract](../../knowledge-base/en/docs/display-anchor-offsets-contract.md) and [bounded evidence](../../knowledge-base/en/docs/display-anchor-offsets-evidence.md).
|
|
20
|
+
|
|
21
|
+
**Historical module notes below retain their earlier cutoffs, dated before 0.52.0.** Their earlier pending statements describe those editions; the linked current evidence defines today's accepted scope. Complete EUI/layout and full Spine remain OPEN.
|
|
22
|
+
|
|
23
|
+
DisplayObjectContainer.getChildIndex(child: DisplayObject): number is a read-only query of the exact current direct child. It scans the authoritative private order in O(n), with no list snapshot/cache, tree mutation, owner transfer, resource operation or display callback. Sprite/Stage inherit it; root values/types, subpaths, dependencies and protocol are unchanged. Read the [0.50 contract](../../knowledge-base/en/docs/container-child-index-contract.md).
|
|
24
|
+
|
|
25
|
+
`DisplayObjectContainer.removeChildren(): void` clears a display layer while keeping its nodes, descendants, resources and cleanup owners alive. It authenticates the genuine receiver, checks Engine before receiver lifetime even when empty, preflights every direct edge and commits without caller hooks. Sprite and Stage inherit the method; root values/types, profiles, dependencies and protocol remain unchanged. Read the [0.49 contract](../../knowledge-base/en/docs/container-remove-children-contract.md).
|
|
26
|
+
|
|
27
|
+
Engineering preview 0.48.0 adds `NineSliceBitmap` and erased `NineSliceBitmapOptions` at the Runtime/Engine roots. It borrows a genuine Texture lease and resizes fixed-border NS1 content; both shared Hosts draw it. See the [contract](../../knowledge-base/en/docs/nine-slice-bitmap-contract.md) and [bounded evidence](../../knowledge-base/en/docs/nine-slice-bitmap-evidence.md).
|
|
28
|
+
|
|
29
|
+
The root facade exports type-only `BoundsQueryOptions` and inherited `getBounds`, reusing readonly `Rectangle2D`. Read the [receiver-local bounds contract](../../knowledge-base/en/docs/display-content-bounds-contract.md); layout and hit testing remain pending.
|
|
30
|
+
|
|
31
|
+
The root facade exports type-only `Point2D`/`CoordinateQueryOptions` and inherits `localToGlobal`/`globalToLocal` on display classes. Read the [coordinate contract](../../knowledge-base/en/docs/display-coordinate-query-contract.md).
|
|
32
|
+
|
|
33
|
+
## Public API and lifecycle
|
|
34
|
+
|
|
35
|
+
`createEngine` accepts an explicit `HostAdapter`, an optional positive-integer shutdown deadline and a diagnostic callback. It provides an `Engine`, its `Stage`, `Scope`, assets service and a single shutdown Promise. Internal assembly interfaces are not exported by the public facade.
|
|
36
|
+
|
|
37
|
+
`createEngine` reserves the surface before awaiting `host.start`; startup failure still enters cleanup. Shutdown starts immediately and waits for the current frame call to exit, then handles Scope, Stage and the CPU asset manager, stops the host and waits for `close` within bounds. Only successful close releases the reservation. Timeouts or rejection preserve isolation; late success may release it. Engine does not destroy borrowed surfaces or devices; this slice provides no forced-release or recovery entry.
|
|
38
|
+
|
|
39
|
+
Scope or Stage cleanup failures do not stop later steps. `EgretError` retains the original cause and cleanup errors collected in order.
|
|
40
|
+
|
|
41
|
+
## Display and frame execution
|
|
42
|
+
|
|
43
|
+
`DisplayObject` exposes `x`, `y`, `scaleX`, `scaleY`, `rotation`, `alpha`, `visible` and `clipRect`. `Sprite.graphics` owns rectangle fills. `Engine.captureSharedFrame` creates an immutable `SharedRenderFrame2D`; `renderSharedFrame` also submits it to the synchronous Host port that `createEngineForProfile` fixed at creation. An Engine made by `createEngine` has no render port: capture remains available, while rendering rejects. Frame reads and execution reject reentry; cleanup waits for the frame call to exit.
|
|
44
|
+
|
|
45
|
+
DOM types and execution stay in the two Host entries. Read the [shared render profile contract](../../knowledge-base/en/docs/shared-render-profile-contract.md) for exact behavior.
|
|
46
|
+
|
|
47
|
+
## WebGPU use
|
|
48
|
+
|
|
49
|
+
Supply an `HTMLCanvasElement` as `canvas`. Optional readback arms the next accepted frame; `renderSharedFrame` returns `undefined` synchronously. `result.bytes` is caller-owned premultiplied RGBA, rather than browser composition. `whenIdle` snapshots submitted work; only successful `close` proves safe return. Engine wrapping preserves the original cause.
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
import { createEngineForProfile, Sprite, SHARED_FRAME_PROFILE_2D } from '@egret/engine';
|
|
53
|
+
import { createSharedWebGPUHost } from '@egret/engine/webgpu';
|
|
54
|
+
|
|
55
|
+
const host = createSharedWebGPUHost({ canvas, enableReadback: true });
|
|
56
|
+
const engine = await createEngineForProfile({ host }, SHARED_FRAME_PROFILE_2D);
|
|
57
|
+
const rect = new Sprite();
|
|
58
|
+
rect.graphics.beginFill(0x00ff00).drawRect(4, 4, 16, 16);
|
|
59
|
+
engine.stage.addChild(rect);
|
|
60
|
+
const pixels = host.requestReadback();
|
|
61
|
+
engine.renderSharedFrame({ width: 48, height: 40, clearColor: 0, clearAlpha: 0 });
|
|
62
|
+
const result = await pixels;
|
|
63
|
+
await engine.dispose();
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Verification and scope
|
|
67
|
+
|
|
68
|
+
From the repository root, run `node tools/verify.mjs`, `node examples/headless.mjs` and `node examples/assets.mjs`. Affected rendering changes also require the corresponding real-browser gate described in the [collaboration agreement](../../AGENTS.md). Package guides describe interfaces; historical counts and delivery records live in the [knowledge base](../../knowledge-base/en/README.md) and its [changelog](../../knowledge-base/en/CHANGELOG.md).
|
|
69
|
+
|
|
70
|
+
Full text, texture, animation, UI and 3D execution, Native SDKs, target-device performance, editors, Agent services and complete legacy-project migration have separate acceptance obligations. Internal CPU scene, sequence and conversion work does not make those capabilities public or complete.
|
|
71
|
+
|
|
72
|
+
Package version `0.0.0`, protocol `1.0` and experimental API status remain unchanged. `private: true` prevents accidental npm publication. See the [source record](../../source-origin.json) for attribution and [publication guide](../../PUBLICATION.md) for delivery policy. First-party code and this document use [Apache-2.0](../../LICENSE).
|
|
73
|
+
|
|
74
|
+
## Explicit sequence animation
|
|
75
|
+
|
|
76
|
+
`createSequenceClip` owns validated atlas timing; `SequencePlayer` applies caller-supplied absolute seconds to one Bitmap and exact borrowed lease. Construction changes no crop; disposal releases no caller resource. There is no automatic scheduler. See the [contract and acceptance scope](../../knowledge-base/en/docs/sequence-player-contract.md) and public `examples/sequence-player` / `tools/sequence-player` guides.
|
|
77
|
+
|
|
78
|
+
## Owned binary reading
|
|
79
|
+
|
|
80
|
+
The root exports `ByteReader` and the frozen `BYTE_READER_LIMITS`, plus type-only `ByteOrder`. Readers copy an eligible fixed ordinary Uint8Array payload, default to bigEndian, and support bounded atomic scalar/copy reads. Returned bytes are independent copies; disposal clears owned references. Existing Scope may own a reader through its disposable shape. Read the [BR1 contract](../../knowledge-base/en/docs/byte-reader-br1-contract.md) and [recorded verification scope](../../knowledge-base/en/docs/byte-reader-br1-evidence.md). No binary format, text encoding or legacy ByteArray compatibility is promised. The Main integration and publication checks remain pending at this preparation cutoff.
|
|
81
|
+
|
|
82
|
+
<!-- NS1-DOC-0.41.0-BEGIN -->
|
|
83
|
+
## Engineering preview 0.41.0 — nine-slice stretch geometry NS1
|
|
84
|
+
|
|
85
|
+
**S094 / V045. Finite CPU, types, policy and browser observations accepted; complete publication gates and delivery remain PENDING.** Fixed-border stretch geometry reuses the existing Mesh2D texture lease; resizing replaces geometry. Runtime/engine roots expose one factory and two readonly types while retaining the original owned geometry identity.
|
|
86
|
+
|
|
87
|
+
Actual CPU checks passed 27/27: 11 NS groups, 6 Mesh groups and 10 geometry checks including nested cases. Positive type diagnostics were 0; the two intentional negative streams contained 41/35 actual diagnostics, totaling 76 precise location records. Strict type and policy guards exited 0; assigned policy controls passed 13/13. The actual browser completed 2 frames and 96 color-channel comparisons with verified cleanup; see the evidence for the exact environment and scope.
|
|
88
|
+
|
|
89
|
+
The original NSP09 13/12/1 failure and its finite test-input correction remain separate.
|
|
90
|
+
|
|
91
|
+
ByteWriter 0.40.0 merged through [PR #27](https://github.com/cnedwin/Egret_rebuild/pull/27), with Main `8e1509878252cc2a9295fcc56d7597877d023c85` and tree `ca1f2f176713e388e09016ae22d610c5c1b95201` read back. The mandatory push hook exited 0 with 63 publication and 2724 core checks. Zero remote statuses/check runs do not establish remote CI PASS. Earlier PENDING cutoffs and failure records remain preserved.
|
|
92
|
+
|
|
93
|
+
[contract](../../knowledge-base/en/docs/nine-slice-geometry-ns1-contract.md) / [evidence](../../knowledge-base/en/docs/nine-slice-geometry-ns1-evidence.md).
|
|
94
|
+
|
|
95
|
+
This bounded geometry increment contributes to complex 2D UI; it establishes no complete UI/EUI, layout, full Spine, migration, phone energy/performance or native SDK/PC acceptance.
|
|
96
|
+
<!-- NS1-DOC-0.41.0-END -->
|
|
97
|
+
|
|
98
|
+
<!-- BW1-DOC-0.40.0-BEGIN -->
|
|
99
|
+
## Owned binary authoring
|
|
100
|
+
|
|
101
|
+
The root exposes the original `ByteWriter` and frozen `BYTE_WRITER_LIMITS`: fixed capacity, strict integer domains and native IEEE floating conversion. `toUint8Array()` copies only the committed prefix; `Scope.use(writer)` uses existing lifetime ownership. ByteOrder stays type-only and optional host entries add no writer. See the [contract](../../knowledge-base/en/docs/byte-writer-bw1-contract.md) and [evidence](../../knowledge-base/en/docs/byte-writer-bw1-evidence.md) for the complete scope and separate acceptance stages. Package version, experimental status and npm publication conventions remain unchanged.
|
|
102
|
+
<!-- BW1-DOC-0.40.0-END -->
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# @egret/engine
|
|
2
|
+
|
|
3
|
+
[English](README.md) | 简体中文
|
|
4
|
+
|
|
5
|
+
白鹭实验性公共门面,装配 `@egret/runtime` 与 `@egret/contracts`,管理逻辑生命周期、显示/帧访问、CPU 资源及 surface 独占预留;物理资源和安全归还由宿主负责。根入口保持无 DOM;两个浏览器宿主是独立入口,均须显式导入:`@egret/engine/webgpu` 与 `@egret/engine/webgl2`。Engine 为渲染准备固定使用 `robust-predicates` 3.0.3。
|
|
6
|
+
|
|
7
|
+
## 工程预览 0.56.0 — 可恢复位图资源替换
|
|
8
|
+
|
|
9
|
+
`Engine.createBitmapResourceSlot(scope, bitmap)` 通过既有 `@egret/engine` 根入口,为一个持久 Bitmap 增加显式异步替换。根入口仅新增擦除类型名称 `BitmapResourceSlot` 与 `BitmapResourceSlotState`;本增量不新增运行时导出值、公共子入口或依赖,保持 Host 协议。初始绑定继续借用,槽仅拥有新获取的替换租约。请求等待、失败或取消时保留先前可用绑定,只有最新已接受意图可以提交。取消或被新请求取代会拒绝对应 Promise;校验、冲突、生命周期和清理错误依规格处理。
|
|
10
|
+
|
|
11
|
+
参阅[规格](../../knowledge-base/Cns/docs/位图资源槽规格.md)、[证据](../../knowledge-base/Cns/docs/位图资源槽核验.md)及[组合示例](../../examples/bitmap-resource-slot/README.zh-CN.md)。替换成功表示已提交有效资源绑定;GPU 呈现、多资源事务及动画重定向分别承担验收义务。聚焦行为、严格消费者及记录的桌面 Canvas/WebGPU 组合已通过各自限定检查;完整本地/公开门禁及仓库交付在所链接证据中分别记录,完整 UI 与 Spine 保持 OPEN。
|
|
12
|
+
|
|
13
|
+
## 工程预览 0.55.0 — 显式本地线性布局
|
|
14
|
+
|
|
15
|
+
可选已构建入口 `@egret/engine/layout` 提供 `planLinearLayout` 及四个擦除接口,由调用方提供数字尺寸、选择成员并应用局部坐标。规划器无 DOM/Node 依赖,不写场景,不增加默认 API、依赖或 SDK Host 协议,也不完成自动 EUI 布局。参阅[规格](../../knowledge-base/Cns/docs/local-linear-layout-spec.md)、[证据](../../knowledge-base/Cns/docs/local-linear-layout-evidence.md)和[双按钮示例](../../examples/linear-layout/README.zh-CN.md)。已记录的桌面 Canvas/WebGPU 检查覆盖固定双 Button 流程;环境及边界见证据记录。
|
|
16
|
+
|
|
17
|
+
## 工程预览 0.52.0 — 显示锚点偏移
|
|
18
|
+
|
|
19
|
+
现有显示类继承有限 number 属性 `anchorOffsetX` 与 `anchorOffsetY`,默认 +0。指定枢轴使缩放/旋转在坐标、逻辑边界、裁剪、显式命中及帧捕获中保持一致,并保留原零偏移字节。阅读[当前契约](../../knowledge-base/Cns/docs/显示锚点偏移契约.md)和[有限证据](../../knowledge-base/Cns/docs/显示锚点偏移证据.md)。
|
|
20
|
+
|
|
21
|
+
**以下模块旧说明保留早于 0.52.0 的原截止点。** 其中早先的待完成表述限定原版本;当前接受范围由所链接的新证据确定。完整 EUI/布局和完整 Spine 仍为 OPEN。
|
|
22
|
+
|
|
23
|
+
DisplayObjectContainer.getChildIndex(child: DisplayObject): number 只读查询精确当前直接子节点,以 O(n) 扫描私有真实顺序,不建立列表快照/缓存,不修改树、转移 owner、操作资源或调用显示回调。Sprite/Stage 继承,根值/类型、子入口、依赖及协议不变。 阅读 [0.50 契约](../../knowledge-base/Cns/docs/容器子节点索引契约.md).
|
|
24
|
+
|
|
25
|
+
`DisplayObjectContainer.removeChildren(): void` 清空显示层,同时保留节点、后代、资源及清理所有者。它认证真实接收者,空容器也先检查 Engine 再检查接收者生命周期,在全部直接边校验后无调用者 hook 提交;Sprite 和 Stage 继承方法,根值/类型、规格、依赖和协议不变。 阅读 [0.49 契约](../../knowledge-base/Cns/docs/容器清空子节点契约.md).
|
|
26
|
+
|
|
27
|
+
工程预览 0.48.0 在 Runtime/Engine 根入口新增 `NineSliceBitmap` 及擦除类型 `NineSliceBitmapOptions`,借用真实 Texture 租约调整固定边框 NS1 内容;两个共享宿主均可绘制。阅读[契约](../../knowledge-base/Cns/docs/九宫格位图契约.md)及[有限证据](../../knowledge-base/Cns/docs/九宫格位图证据.md)。
|
|
28
|
+
|
|
29
|
+
根门面导出类型专用 `BoundsQueryOptions` 与继承的 `getBounds`,复用只读 `Rectangle2D`,见[接收者局部边界契约](../../knowledge-base/Cns/docs/显示内容边界契约.md);布局及命中测试仍待完成。
|
|
30
|
+
|
|
31
|
+
根入口导出仅类型的 `Point2D`/`CoordinateQueryOptions`,显示类继承 `localToGlobal`/`globalToLocal`。 阅读[坐标契约](../../knowledge-base/Cns/docs/显示坐标查询契约.md)。
|
|
32
|
+
|
|
33
|
+
## 公共 API 与生命周期
|
|
34
|
+
|
|
35
|
+
`createEngine` 接收显式 `HostAdapter`、可选正整数关闭 deadline 和诊断回调,提供 `Engine`、所属 `Stage`、`Scope`、assets 服务及唯一关闭 Promise。公共门面不导出内部装配接口。
|
|
36
|
+
|
|
37
|
+
`createEngine` 在等待 `host.start` 前预留 surface;启动失败仍进入清理。关闭立即开始,等待当前帧调用退出后处理 Scope、Stage 和 CPU 资源管理器,再停止宿主并有界等待 `close`。只有 close 成功才释放预留;超时或拒绝保持隔离,迟到成功可以释放预留。Engine 不销毁借用的 surface 或 device;本切片没有强制释放或恢复入口。
|
|
38
|
+
|
|
39
|
+
Scope 或 Stage 清理失败仍继续后续步骤。`EgretError` 保留原 cause 和按顺序收集的清理错误。
|
|
40
|
+
|
|
41
|
+
## 显示与帧执行
|
|
42
|
+
|
|
43
|
+
`DisplayObject` 提供 `x`、`y`、`scaleX`、`scaleY`、`rotation`、`alpha`、`visible` 与 `clipRect`;`Sprite.graphics` 拥有矩形填充。`Engine.captureSharedFrame` 生成不可变 `SharedRenderFrame2D`,`renderSharedFrame` 另向 `createEngineForProfile` 在创建时固定的同步宿主端口提交。`createEngine` 创建的 Engine 没有渲染端口:捕获仍可用,渲染会拒绝。帧读取和执行拒绝重入;清理等待帧调用退出。
|
|
44
|
+
|
|
45
|
+
DOM 类型与执行保留在两个宿主入口。具体行为见[共享渲染 Profile 契约](../../knowledge-base/Cns/docs/shared-render-profile-contract.md)。
|
|
46
|
+
|
|
47
|
+
## WebGPU 使用
|
|
48
|
+
|
|
49
|
+
将 `HTMLCanvasElement` 作为 `canvas`。可选 readback 绑定下一次通过预检的帧;`renderSharedFrame` 同步返回 `undefined`。`result.bytes` 是调用者所有的预乘 RGBA,与浏览器合成结果不同。`whenIdle` 截取已提交工作;只有 `close` 成功才证明安全归还,Engine 包装保留原 cause。
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
import { createEngineForProfile, Sprite, SHARED_FRAME_PROFILE_2D } from '@egret/engine';
|
|
53
|
+
import { createSharedWebGPUHost } from '@egret/engine/webgpu';
|
|
54
|
+
|
|
55
|
+
const host = createSharedWebGPUHost({ canvas, enableReadback: true });
|
|
56
|
+
const engine = await createEngineForProfile({ host }, SHARED_FRAME_PROFILE_2D);
|
|
57
|
+
const rect = new Sprite();
|
|
58
|
+
rect.graphics.beginFill(0x00ff00).drawRect(4, 4, 16, 16);
|
|
59
|
+
engine.stage.addChild(rect);
|
|
60
|
+
const pixels = host.requestReadback();
|
|
61
|
+
engine.renderSharedFrame({ width: 48, height: 40, clearColor: 0, clearAlpha: 0 });
|
|
62
|
+
const result = await pixels;
|
|
63
|
+
await engine.dispose();
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## 验证与范围
|
|
67
|
+
|
|
68
|
+
在仓库根运行 `node tools/verify.mjs`、`node examples/headless.mjs` 及 `node examples/assets.mjs`。影响渲染的修改还须运行[协作约定](../../AGENTS.zh-CN.md)规定的对应真实浏览器门禁。包指南说明接口;历史数量和交付记录见[知识库](../../knowledge-base/Cns/README.md)及其[版本记录](../../knowledge-base/Cns/CHANGELOG.md)。
|
|
69
|
+
|
|
70
|
+
完整文字、纹理、动画、UI 与 3D 执行、Native SDK、目标设备性能、编辑器、Agent 服务及完整旧工程迁移各有独立验收义务。内部 CPU 场景、序列帧及转换工作不代表这些能力已公开或完整实现。
|
|
71
|
+
|
|
72
|
+
包版本 `0.0.0`、协议 `1.0` 和实验性 API 状态保持不变。`private: true` 防止意外 npm 发布。归属见[来源记录](../../source-origin.json),交付政策见[发布指南](../../PUBLICATION.zh-CN.md)。第一方代码与本文采用 [Apache-2.0](../../LICENSE)。
|
|
73
|
+
|
|
74
|
+
## 显式序列动画
|
|
75
|
+
|
|
76
|
+
`createSequenceClip` 拥有已校验图集时序;`SequencePlayer` 把调用方提供的绝对秒数应用于一个 Bitmap 与确切借用租约。构造不改变裁剪,销毁不释放调用方资源,不包含自动调度器。见[契约与验收范围](../../knowledge-base/Cns/docs/显式时间序列播放器契约.md),以及公共 `examples/sequence-player` / `tools/sequence-player` 指南。
|
|
77
|
+
|
|
78
|
+
## 自有二进制读取
|
|
79
|
+
|
|
80
|
+
根入口导出 `ByteReader` 与冻结的 `BYTE_READER_LIMITS`,以及仅类型 `ByteOrder`。读取器复制符合条件的固定普通 Uint8Array 载荷,默认 bigEndian,提供有界原子标量/复制读取;返回字节是独立副本,释放清除自有引用。既有 Scope 可通过可释放对象形状管理读取器。阅读 [BR1 契约](../../knowledge-base/Cns/docs/字节读取器BR1契约.md)与[已有验证范围](../../knowledge-base/Cns/docs/字节读取器BR1证据.md)。不承诺二进制格式、文字编码或旧 ByteArray 兼容;本准备截止点的 Main 集成与公开门禁仍待完成。
|
|
81
|
+
|
|
82
|
+
<!-- NS1-DOC-0.41.0-BEGIN -->
|
|
83
|
+
## 工程预览 0.41.0 — 九宫格拉伸几何 NS1
|
|
84
|
+
|
|
85
|
+
**S094 / V045。有限 CPU、类型、策略和浏览器结果已接受;完整发布门禁与交付仍为 PENDING。** 固定边框的拉伸网格复用现有 Mesh2D 纹理租约,调整尺寸时仅替换几何。运行时/引擎根入口提供一个工厂与两个只读类型,保留原有自有几何身份。
|
|
86
|
+
|
|
87
|
+
实际 CPU 27/27 项通过,其中 11 个 NS 组、6 个 Mesh 组及包含嵌套用例的 10 项几何检查。正例类型诊断为 0;两组刻意负例实际为 41/35 条,共 76 条精确位置记录。严格类型门禁与策略检查退出码为 0;指定策略对照 13/13 通过。实际浏览器完成 2 帧和 96 次颜色通道比较,并验证资源清理;具体环境与范围见证据。
|
|
88
|
+
|
|
89
|
+
原始 NSP09 的 13/12/1 失败与有限测试输入修正分别保留。
|
|
90
|
+
|
|
91
|
+
0.40.0 ByteWriter 已通过 [PR #27](https://github.com/cnedwin/Egret_rebuild/pull/27) 合并;已回读 Main `8e1509878252cc2a9295fcc56d7597877d023c85` 与 tree `ca1f2f176713e388e09016ae22d610c5c1b95201`。必要推送门禁退出码为 0,公开校验 63 项、核心校验 2724 项。远端状态/检查运行数均为零,不能据此声明远端 CI PASS。较早的 PENDING 截止点和失败记录继续保留。
|
|
92
|
+
|
|
93
|
+
[契约](../../knowledge-base/Cns/docs/九宫格几何NS1契约.md) / [证据](../../knowledge-base/Cns/docs/九宫格几何NS1证据.md)。
|
|
94
|
+
|
|
95
|
+
这是复杂 2D UI 的有限几何增量,不构成完整 UI/EUI、布局、完整 Spine、迁移、手机能耗/性能或原生 SDK/PC 验收。
|
|
96
|
+
<!-- NS1-DOC-0.41.0-END -->
|
|
97
|
+
|
|
98
|
+
<!-- BW1-DOC-0.40.0-BEGIN -->
|
|
99
|
+
## 自有二进制写入
|
|
100
|
+
|
|
101
|
+
根入口提供同一个 `ByteWriter` 与冻结的 `BYTE_WRITER_LIMITS`;容量固定,整数严格校验,浮点遵循原生 IEEE 转换。`toUint8Array()` 只复制已提交前缀,`Scope.use(writer)` 使用原有生命周期。ByteOrder 保持纯类型,可选宿主入口不新增写入器。完整范围与分阶段结果见[契约](../../knowledge-base/Cns/docs/字节写入器BW1契约.md)与[证据](../../knowledge-base/Cns/docs/字节写入器BW1证据.md)。包版本、实验性状态和 npm 发布约定不变。
|
|
102
|
+
<!-- BW1-DOC-0.40.0-END -->
|
package/dist/Engine.d.ts
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { DisplaySubtreeTicket } from './displaySubtreeTicket.js';
|
|
2
|
+
import type { DisplayObject, DisplayObjectContainer } from '@egret/runtime';
|
|
3
|
+
import type { SharedFrameProfile2D, SharedFrameOptions2D, SharedRenderFrame2D } from '@egret/contracts';
|
|
4
|
+
import type { DiagnosticHandler, HostAdapter } from '@egret/contracts';
|
|
5
|
+
import type { AssetManager, AssetRef, Scope, Stage } from '@egret/runtime';
|
|
6
|
+
import type { BitmapResourceSlot } from './bitmapResourceSlot.js';
|
|
7
|
+
import type { BitmapBindingTicket } from './bitmapBindingTicket.js';
|
|
8
|
+
import type { AdmittedGameClockOptions } from './gameClock.js';
|
|
9
|
+
import type { GameClock, GameClockOptions, GameClockTick } from './gameClockTypes.js';
|
|
10
|
+
import type { Tween, TweenOptions } from './tweenTypes.js';
|
|
11
|
+
import type { AssetGroup, AssetGroupOptions } from './assetGroupTypes.js';
|
|
12
|
+
import type { ManifestAssetGroup, ManifestBinding, ManifestGroupOptions } from './manifestResourceTypes.js';
|
|
13
|
+
import type { AdmittedResourceManifest } from '@egret/contracts/resources';
|
|
14
|
+
import type { SequencePlayback, SequencePlaybackOptions } from './sequencePlaybackTypes.js';
|
|
15
|
+
import type { Bitmap, SequenceClip } from '@egret/runtime';
|
|
16
|
+
export interface EngineOptions {
|
|
17
|
+
readonly host: HostAdapter;
|
|
18
|
+
readonly shutdownTimeoutMs?: number;
|
|
19
|
+
readonly onDiagnostic?: DiagnosticHandler;
|
|
20
|
+
readonly clock?: GameClockOptions;
|
|
21
|
+
}
|
|
22
|
+
export interface CapturedEngineFramePorts {
|
|
23
|
+
readonly shared: ((frame: SharedRenderFrame2D) => unknown) | undefined;
|
|
24
|
+
readonly sharedProfile: SharedFrameProfile2D | undefined;
|
|
25
|
+
}
|
|
26
|
+
export declare let constructEngine: (options: EngineOptions, timeoutMs: number, surface: object, releaseSurface: () => void, ports: CapturedEngineFramePorts, clockOptions: AdmittedGameClockOptions) => Engine;
|
|
27
|
+
/** One headless run. Construct with createEngine(), not directly. */
|
|
28
|
+
export declare class Engine {
|
|
29
|
+
#private;
|
|
30
|
+
private frameBusy;
|
|
31
|
+
private nextFrameId;
|
|
32
|
+
private frameIdle;
|
|
33
|
+
private releaseFrame;
|
|
34
|
+
private readonly sharedRenderer;
|
|
35
|
+
private readonly scopes;
|
|
36
|
+
private readonly cleanupErrors;
|
|
37
|
+
private closePromise;
|
|
38
|
+
private readonly host;
|
|
39
|
+
private readonly timeoutMs;
|
|
40
|
+
private readonly onDiagnostic;
|
|
41
|
+
private readonly releaseSurface;
|
|
42
|
+
readonly stage: Stage;
|
|
43
|
+
readonly assets: AssetManager;
|
|
44
|
+
readonly sharedFrameProfile: SharedFrameProfile2D | undefined;
|
|
45
|
+
readonly clock: GameClock;
|
|
46
|
+
private constructor();
|
|
47
|
+
advanceTime(sourceSeconds: number): GameClockTick | undefined;
|
|
48
|
+
captureSharedFrame(options: SharedFrameOptions2D): SharedRenderFrame2D;
|
|
49
|
+
/** Capture a prepared binding view without publishing it to the live scene. */
|
|
50
|
+
capturePreparedSharedFrame(ticket: BitmapBindingTicket, options: SharedFrameOptions2D): SharedRenderFrame2D;
|
|
51
|
+
/**
|
|
52
|
+
* Prepare one borrowed detached root as the target container's new sole child.
|
|
53
|
+
* Uses authenticated already-bound private state, not fresh subclass hooks/getters.
|
|
54
|
+
* Run application semantic guards before preparation; Scope ownership is not their approval.
|
|
55
|
+
*/
|
|
56
|
+
prepareDisplaySubtree(scope: Scope, target: DisplayObjectContainer, candidate: DisplayObject): DisplaySubtreeTicket;
|
|
57
|
+
/** Immutable candidate snapshot; the live Stage remains unchanged. */
|
|
58
|
+
capturePreparedDisplaySharedFrame(ticket: DisplaySubtreeTicket, options: SharedFrameOptions2D): SharedRenderFrame2D;
|
|
59
|
+
renderSharedFrame(options: SharedFrameOptions2D): SharedRenderFrame2D;
|
|
60
|
+
/** Busy precedes all external reads; cleanup waits for the finally barrier. */
|
|
61
|
+
private executeSharedFrame;
|
|
62
|
+
createScope(): Scope;
|
|
63
|
+
createTween(scope: Scope, options: TweenOptions): Tween;
|
|
64
|
+
/** Create an idle, Scope-owned sequence controller without rendering or ticking. */
|
|
65
|
+
createSequencePlayback(scope: Scope, bitmap: Bitmap, clip: SequenceClip, options?: SequencePlaybackOptions): SequencePlayback;
|
|
66
|
+
/** Preserve the current image while an explicitly requested replacement loads. */
|
|
67
|
+
createBitmapResourceSlot(scope: Scope, bitmap: Bitmap): BitmapResourceSlot;
|
|
68
|
+
/** Capture exact Bitmap bindings before asynchronously preparing a borrowed group. */
|
|
69
|
+
captureBitmapBindings(scope: Scope, targets: readonly Bitmap[]): BitmapBindingTicket;
|
|
70
|
+
createAssetGroup<T>(scope: Scope, refs: readonly AssetRef<T>[], options?: AssetGroupOptions): AssetGroup<T>;
|
|
71
|
+
/** Acquire an admitted dependency closure with independent group-owned leases. */
|
|
72
|
+
createManifestGroup(scope: Scope, manifest: AdmittedResourceManifest, roots: readonly string[], bindings: readonly ManifestBinding[], options?: ManifestGroupOptions): ManifestAssetGroup;
|
|
73
|
+
/** Every caller shares one close promise, including reentrant cleanup callbacks. */
|
|
74
|
+
dispose(): Promise<void>;
|
|
75
|
+
private runClose;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=Engine.d.ts.map
|