retiam 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +209 -0
- package/bin/export.js +323 -0
- package/bin/init.js +425 -0
- package/bin/lint.js +354 -0
- package/bin/render.js +600 -0
- package/bin/snapshot.js +231 -0
- package/dist/UTIF-pBEih-vH.js +2845 -0
- package/dist/assets/Excalifont-Regular.woff2 +0 -0
- package/dist/assets/FiraCode-Regular.ttf +0 -0
- package/dist/assets/FrederickatheGreat-Regular.ttf +0 -0
- package/dist/assets/Virgil.woff2 +0 -0
- package/dist/assets/roboto-msdf.json +3643 -0
- package/dist/assets/roboto-msdf.png +0 -0
- package/dist/assets/roboto-regular.ttf +0 -0
- package/dist/assets/rt_hdr_alb_nrm.tza +0 -0
- package/dist/assets/worker-DKrf-Y6u.js +1231 -0
- package/dist/decompress-D5RzmD-2.js +566 -0
- package/dist/index-CnM0BhUR.js +109423 -0
- package/dist/libs/charts/cartesian/AreaChart.d.ts +12 -0
- package/dist/libs/charts/cartesian/BarChart.d.ts +39 -0
- package/dist/libs/charts/cartesian/LineChart.d.ts +44 -0
- package/dist/libs/charts/components/Tooltip.d.ts +18 -0
- package/dist/libs/charts/core/Chart.d.ts +37 -0
- package/dist/libs/charts/core/Scale.d.ts +34 -0
- package/dist/libs/charts/core/Theme.d.ts +20 -0
- package/dist/libs/charts/index.d.ts +8 -0
- package/dist/libs/charts/index.js +639 -0
- package/dist/libs/charts/polar/PieChart.d.ts +38 -0
- package/dist/libs/graphs/automata/Automaton.d.ts +46 -0
- package/dist/libs/graphs/automata/AutomatonRunner.d.ts +22 -0
- package/dist/libs/graphs/automata/Tape.d.ts +45 -0
- package/dist/libs/graphs/core/GraphEdge.d.ts +44 -0
- package/dist/libs/graphs/core/GraphNode.d.ts +41 -0
- package/dist/libs/graphs/core/GraphTheme.d.ts +35 -0
- package/dist/libs/graphs/core/Layouts.d.ts +34 -0
- package/dist/libs/graphs/graph/Graph.d.ts +50 -0
- package/dist/libs/graphs/index.d.ts +8 -0
- package/dist/libs/graphs/index.js +802 -0
- package/dist/libs/highlights/backdrop/BackdropFade.d.ts +10 -0
- package/dist/libs/highlights/backdrop/MarkerSweep.d.ts +10 -0
- package/dist/libs/highlights/boundary/BoundaryRipple.d.ts +10 -0
- package/dist/libs/highlights/boundary/Circumscribe.d.ts +10 -0
- package/dist/libs/highlights/boundary/CornerBrackets.d.ts +10 -0
- package/dist/libs/highlights/boundary/Underline.d.ts +10 -0
- package/dist/libs/highlights/core/types.d.ts +141 -0
- package/dist/libs/highlights/core/utils.d.ts +15 -0
- package/dist/libs/highlights/finish/Flash.d.ts +21 -0
- package/dist/libs/highlights/finish/FlashFinish.d.ts +10 -0
- package/dist/libs/highlights/finish/ShimmerSweep.d.ts +9 -0
- package/dist/libs/highlights/finish/SparkleBurst.d.ts +10 -0
- package/dist/libs/highlights/index.d.ts +17 -0
- package/dist/libs/highlights/index.js +435 -0
- package/dist/libs/highlights/material/Blink.d.ts +15 -0
- package/dist/libs/highlights/material/ColorTint.d.ts +9 -0
- package/dist/libs/highlights/material/PulseGlow.d.ts +9 -0
- package/dist/libs/highlights/motion/PopHighlight.d.ts +9 -0
- package/dist/libs/highlights/motion/WiggleHighlight.d.ts +9 -0
- package/dist/libs/physics/2d/Joint2D.d.ts +37 -0
- package/dist/libs/physics/2d/Physics2D.d.ts +125 -0
- package/dist/libs/physics/2d/Physics2DTypes.d.ts +185 -0
- package/dist/libs/physics/2d/Physics2DUtils.d.ts +9 -0
- package/dist/libs/physics/2d/backends/IPhysics2DBackend.d.ts +46 -0
- package/dist/libs/physics/2d/backends/Planck2DBackend.d.ts +44 -0
- package/dist/libs/physics/2d/backends/Rapier2DBackend.d.ts +46 -0
- package/dist/libs/physics/2d/components/RigidBody2DComponent.d.ts +56 -0
- package/dist/libs/physics/2d/components/SoftBody2DComponent.d.ts +19 -0
- package/dist/libs/physics/3d/Physics3D.d.ts +66 -0
- package/dist/libs/physics/3d/Physics3DTypes.d.ts +100 -0
- package/dist/libs/physics/3d/PhysicsUtils.d.ts +9 -0
- package/dist/libs/physics/3d/backends/Box3DBackend.d.ts +66 -0
- package/dist/libs/physics/3d/backends/IPhysics3DBackend.d.ts +22 -0
- package/dist/libs/physics/3d/backends/Rapier3DBackend.d.ts +33 -0
- package/dist/libs/physics/3d/components/RigidBodyComponent.d.ts +100 -0
- package/dist/libs/physics/3d/components/SoftBodyComponent.d.ts +26 -0
- package/dist/libs/physics/index.d.ts +17 -0
- package/dist/libs/physics/index.js +18697 -0
- package/dist/libs/rough/RoughModifier.d.ts +72 -0
- package/dist/libs/rough/RoughShape.d.ts +175 -0
- package/dist/libs/rough/index.d.ts +5 -0
- package/dist/libs/rough/index.js +1488 -0
- package/dist/libs/shapes/2d/Annulus.d.ts +33 -0
- package/dist/libs/shapes/2d/ArchitecturalProfile.d.ts +42 -0
- package/dist/libs/shapes/2d/Capsule.d.ts +33 -0
- package/dist/libs/shapes/2d/Chevron.d.ts +37 -0
- package/dist/libs/shapes/2d/Crescent.d.ts +27 -0
- package/dist/libs/shapes/2d/Cross.d.ts +32 -0
- package/dist/libs/shapes/2d/CurvedArrow.d.ts +53 -0
- package/dist/libs/shapes/2d/Diamond.d.ts +32 -0
- package/dist/libs/shapes/2d/DoubleArrow.d.ts +28 -0
- package/dist/libs/shapes/2d/Gear2D.d.ts +42 -0
- package/dist/libs/shapes/2d/Heart.d.ts +28 -0
- package/dist/libs/shapes/2d/Parallelogram.d.ts +37 -0
- package/dist/libs/shapes/2d/RegularPolygon.d.ts +41 -0
- package/dist/libs/shapes/2d/Sector.d.ts +27 -0
- package/dist/libs/shapes/2d/Spiral2D.d.ts +42 -0
- package/dist/libs/shapes/2d/Squircle.d.ts +39 -0
- package/dist/libs/shapes/2d/Star.d.ts +47 -0
- package/dist/libs/shapes/2d/Teardrop.d.ts +27 -0
- package/dist/libs/shapes/2d/Trapezoid.d.ts +37 -0
- package/dist/libs/shapes/2d/Waveform2D.d.ts +47 -0
- package/dist/libs/shapes/2d/index.d.ts +20 -0
- package/dist/libs/shapes/3d/Bipyramid3D.d.ts +27 -0
- package/dist/libs/shapes/3d/Capsule3D.d.ts +33 -0
- package/dist/libs/shapes/3d/Diamond3D.d.ts +42 -0
- package/dist/libs/shapes/3d/Ellipsoid3D.d.ts +37 -0
- package/dist/libs/shapes/3d/Gear3D.d.ts +42 -0
- package/dist/libs/shapes/3d/Helix3D.d.ts +43 -0
- package/dist/libs/shapes/3d/PlatonicSolids.d.ts +42 -0
- package/dist/libs/shapes/3d/Prism3D.d.ts +32 -0
- package/dist/libs/shapes/3d/Pyramid3D.d.ts +32 -0
- package/dist/libs/shapes/3d/RoundedBox3D.d.ts +37 -0
- package/dist/libs/shapes/3d/Superellipsoid3D.d.ts +48 -0
- package/dist/libs/shapes/3d/TorusKnot3D.d.ts +42 -0
- package/dist/libs/shapes/3d/TruncatedCone3D.d.ts +37 -0
- package/dist/libs/shapes/3d/Tube3D.d.ts +39 -0
- package/dist/libs/shapes/3d/Wedge3D.d.ts +27 -0
- package/dist/libs/shapes/3d/index.d.ts +15 -0
- package/dist/libs/shapes/index.d.ts +8 -0
- package/dist/libs/shapes/index.js +3196 -0
- package/dist/libs/shapes/types.d.ts +32 -0
- package/dist/libs/shapes/utils/index.d.ts +2 -0
- package/dist/libs/shapes/utils/meshGenerators.d.ts +71 -0
- package/dist/libs/shapes/utils/pathCalculations.d.ts +81 -0
- package/dist/libs/tts/animations/Speak.d.ts +79 -0
- package/dist/libs/tts/components/Subtitles.d.ts +141 -0
- package/dist/libs/tts/components/TTSNarrationComponent.d.ts +57 -0
- package/dist/libs/tts/core/MsEdgeVoices.d.ts +29 -0
- package/dist/libs/tts/core/TTSAudio.d.ts +80 -0
- package/dist/libs/tts/core/TTSCache.d.ts +15 -0
- package/dist/libs/tts/core/TTSClient.d.ts +66 -0
- package/dist/libs/tts/core/mp3Utils.d.ts +19 -0
- package/dist/libs/tts/core/msEdgeV2.d.ts +4 -0
- package/dist/libs/tts/core/types.d.ts +84 -0
- package/dist/libs/tts/index.d.ts +16 -0
- package/dist/libs/tts/index.js +1611 -0
- package/dist/libs/tts/providers/ITTSProvider.d.ts +30 -0
- package/dist/libs/tts/providers/MsEdgeTTSProvider.d.ts +61 -0
- package/dist/main-Bw2LTrnR.js +22927 -0
- package/dist/opentype.module-D6jx0UDN.js +8689 -0
- package/dist/retiam.es.js +814 -0
- package/dist/src/engine/_core/Always.d.ts +181 -0
- package/dist/src/engine/_core/Component.d.ts +43 -0
- package/dist/src/engine/_core/Constants.d.ts +168 -0
- package/dist/src/engine/_core/Entity.d.ts +725 -0
- package/dist/src/engine/_core/Fill.d.ts +34 -0
- package/dist/src/engine/_core/Group.d.ts +88 -0
- package/dist/src/engine/_core/IPlugin.d.ts +44 -0
- package/dist/src/engine/_core/Interfaces.d.ts +50 -0
- package/dist/src/engine/_core/Material.d.ts +184 -0
- package/dist/src/engine/_core/OfflineRenderManager.d.ts +10 -0
- package/dist/src/engine/_core/Paint.d.ts +155 -0
- package/dist/src/engine/_core/Scene.d.ts +399 -0
- package/dist/src/engine/_core/SceneComposer.d.ts +269 -0
- package/dist/src/engine/_core/SceneInterface.d.ts +55 -0
- package/dist/src/engine/_core/SnapshotManager.d.ts +56 -0
- package/dist/src/engine/_core/State.d.ts +106 -0
- package/dist/src/engine/_core/StateDataManager.d.ts +61 -0
- package/dist/src/engine/_core/TextureManager.d.ts +20 -0
- package/dist/src/engine/_core/Transform.d.ts +344 -0
- package/dist/src/engine/_core/UIManager.d.ts +28 -0
- package/dist/src/engine/_core/VectorEntity.d.ts +151 -0
- package/dist/src/engine/_core/VideoData.d.ts +47 -0
- package/dist/src/engine/animation/AnimOptions.d.ts +93 -0
- package/dist/src/engine/animation/Animation.d.ts +134 -0
- package/dist/src/engine/animation/AnimationFrameScheduler.d.ts +26 -0
- package/dist/src/engine/animation/AnimationFunctions.d.ts +105 -0
- package/dist/src/engine/animation/Animator.d.ts +153 -0
- package/dist/src/engine/animation/BlurIn.d.ts +40 -0
- package/dist/src/engine/animation/BlurOut.d.ts +41 -0
- package/dist/src/engine/animation/BlurPulse.d.ts +33 -0
- package/dist/src/engine/animation/BlurTarget.d.ts +25 -0
- package/dist/src/engine/animation/BlurTo.d.ts +30 -0
- package/dist/src/engine/animation/Concurrent.d.ts +52 -0
- package/dist/src/engine/animation/CustomAnimation.d.ts +24 -0
- package/dist/src/engine/animation/Delay.d.ts +68 -0
- package/dist/src/engine/animation/FadeIn.d.ts +7 -0
- package/dist/src/engine/animation/FadeOut.d.ts +17 -0
- package/dist/src/engine/animation/GroupAnimator.d.ts +106 -0
- package/dist/src/engine/animation/Rate.d.ts +80 -0
- package/dist/src/engine/animation/Sequential.d.ts +29 -0
- package/dist/src/engine/animation/StateAnimation.d.ts +46 -0
- package/dist/src/engine/animation/TrackAnimation.d.ts +22 -0
- package/dist/src/engine/animation/TrackBuilder.d.ts +44 -0
- package/dist/src/engine/animation/Waiting.d.ts +32 -0
- package/dist/src/engine/animation/Write.d.ts +8 -0
- package/dist/src/engine/animation/camera/CameraDollyZoom.d.ts +18 -0
- package/dist/src/engine/animation/camera/CameraLookAt.d.ts +18 -0
- package/dist/src/engine/animation/camera/CameraMove.d.ts +24 -0
- package/dist/src/engine/animation/camera/CameraOrbit.d.ts +19 -0
- package/dist/src/engine/animation/creation/AppearInstant.d.ts +30 -0
- package/dist/src/engine/animation/creation/BatchIntroduce.d.ts +36 -0
- package/dist/src/engine/animation/creation/BloomIn.d.ts +46 -0
- package/dist/src/engine/animation/creation/BurstIn.d.ts +42 -0
- package/dist/src/engine/animation/creation/CascadeIn.d.ts +64 -0
- package/dist/src/engine/animation/creation/Create.d.ts +38 -0
- package/dist/src/engine/animation/creation/Create3D.d.ts +12 -0
- package/dist/src/engine/animation/creation/CrystallizeIn.d.ts +46 -0
- package/dist/src/engine/animation/creation/DrawBorderOnly.d.ts +27 -0
- package/dist/src/engine/animation/creation/DrawBorderThenFill.d.ts +24 -0
- package/dist/src/engine/animation/creation/DropIn.d.ts +29 -0
- package/dist/src/engine/animation/creation/EraseIn.d.ts +48 -0
- package/dist/src/engine/animation/creation/GlowIn.d.ts +56 -0
- package/dist/src/engine/animation/creation/GrowFromCenter.d.ts +27 -0
- package/dist/src/engine/animation/creation/GrowFromEdge.d.ts +33 -0
- package/dist/src/engine/animation/creation/IrisIn.d.ts +38 -0
- package/dist/src/engine/animation/creation/MaterializeFrom.d.ts +50 -0
- package/dist/src/engine/animation/creation/PopIn.d.ts +45 -0
- package/dist/src/engine/animation/creation/RevealFromClip.d.ts +36 -0
- package/dist/src/engine/animation/creation/ScatterAssemble.d.ts +51 -0
- package/dist/src/engine/animation/creation/ShimmerIn.d.ts +52 -0
- package/dist/src/engine/animation/creation/SlideIn.d.ts +33 -0
- package/dist/src/engine/animation/creation/SpinIn.d.ts +45 -0
- package/dist/src/engine/animation/creation/StaggerWrite.d.ts +31 -0
- package/dist/src/engine/animation/creation/TelegraphThenReveal.d.ts +56 -0
- package/dist/src/engine/animation/creation/TraceBack.d.ts +46 -0
- package/dist/src/engine/animation/creation/TransmitIn.d.ts +46 -0
- package/dist/src/engine/animation/creation/Typewriter.d.ts +149 -0
- package/dist/src/engine/animation/creation/TypewriterIn.d.ts +93 -0
- package/dist/src/engine/animation/creation/Uncreate.d.ts +34 -0
- package/dist/src/engine/animation/creation/UnfoldFromCenter.d.ts +40 -0
- package/dist/src/engine/animation/creation/Unwrite.d.ts +18 -0
- package/dist/src/engine/animation/creation/WaveIn.d.ts +46 -0
- package/dist/src/engine/animation/creation/WipeIn.d.ts +50 -0
- package/dist/src/engine/animation/layout/ArrangeReveal.d.ts +51 -0
- package/dist/src/engine/animation/layout/ArrangeRipple.d.ts +51 -0
- package/dist/src/engine/animation/layout/MorphArrange.d.ts +38 -0
- package/dist/src/engine/animation/motion/LissajousAnimation.d.ts +50 -0
- package/dist/src/engine/animation/motion/MotionPath.d.ts +73 -0
- package/dist/src/engine/animation/motion/OrbitAnimation.d.ts +41 -0
- package/dist/src/engine/animation/motion/ShakeAnimation.d.ts +37 -0
- package/dist/src/engine/animation/motion/SpiralAnimation.d.ts +49 -0
- package/dist/src/engine/animation/motion/SplineAnimation.d.ts +107 -0
- package/dist/src/engine/animation/motion/SpringAnimation.d.ts +50 -0
- package/dist/src/engine/animation/transform/HomotopyAnimation.d.ts +23 -0
- package/dist/src/engine/animation/transform/ModelTransform.d.ts +19 -0
- package/dist/src/engine/animation/transform/Morph.d.ts +18 -0
- package/dist/src/engine/animation/transform/SDF3DTransform.d.ts +12 -0
- package/dist/src/engine/animation/transform/SpaceTransform.d.ts +14 -0
- package/dist/src/engine/animation/transform/TransformMatch.d.ts +14 -0
- package/dist/src/engine/animation/transform/TransformMatchingShapes.d.ts +21 -0
- package/dist/src/engine/animation/transform/TransformMatchingTex.d.ts +17 -0
- package/dist/src/engine/animation/transform/TransformMatchingText.d.ts +19 -0
- package/dist/src/engine/animation/transform/VectorTransform.d.ts +22 -0
- package/dist/src/engine/audio/AudioAnalyzer.d.ts +80 -0
- package/dist/src/engine/audio/AudioLoader.d.ts +29 -0
- package/dist/src/engine/audio/AudioManager.d.ts +186 -0
- package/dist/src/engine/audio/AudioPlugin.d.ts +46 -0
- package/dist/src/engine/audio/AudioTimeline.d.ts +111 -0
- package/dist/src/engine/audio/audioUtils.d.ts +8 -0
- package/dist/src/engine/audio/components/AudioListenerComponent.d.ts +11 -0
- package/dist/src/engine/audio/components/SpatialAudioComponent.d.ts +48 -0
- package/dist/src/engine/audio/index.d.ts +8 -0
- package/dist/src/engine/camera/Camera.d.ts +293 -0
- package/dist/src/engine/camera/Camera2DController.d.ts +393 -0
- package/dist/src/engine/camera/CameraController.d.ts +78 -0
- package/dist/src/engine/camera/OrbitCameraController.d.ts +138 -0
- package/dist/src/engine/camera/RenderView.d.ts +73 -0
- package/dist/src/engine/components/FragmentComponent.d.ts +30 -0
- package/dist/src/engine/components/GeometryComponent.d.ts +52 -0
- package/dist/src/engine/components/InteractionComponent.d.ts +47 -0
- package/dist/src/engine/components/RendererComponent.d.ts +38 -0
- package/dist/src/engine/components/fragment/Fragment2D.d.ts +10 -0
- package/dist/src/engine/components/fragment/IndexFragment2D.d.ts +10 -0
- package/dist/src/engine/components/fragment/Line3DFragment.d.ts +16 -0
- package/dist/src/engine/components/fragment/LineFragment.d.ts +5 -0
- package/dist/src/engine/components/fragment/ManimSurfaceFragment.d.ts +13 -0
- package/dist/src/engine/components/fragment/MathSurfaceFragment.d.ts +6 -0
- package/dist/src/engine/components/fragment/ModelFragment.d.ts +20 -0
- package/dist/src/engine/components/fragment/ParametricSurfaceFragment.d.ts +24 -0
- package/dist/src/engine/components/fragment/PathFragment.d.ts +37 -0
- package/dist/src/engine/components/fragment/PolyFragment.d.ts +20 -0
- package/dist/src/engine/components/fragment/SDF2DFragment.d.ts +22 -0
- package/dist/src/engine/components/fragment/SDFFragment.d.ts +25 -0
- package/dist/src/engine/components/fragment/ShaderFragment.d.ts +12 -0
- package/dist/src/engine/components/fragment/SplatFragment.d.ts +14 -0
- package/dist/src/engine/components/fragment/SpriteFragment.d.ts +30 -0
- package/dist/src/engine/components/fragment/SurfaceFragment.d.ts +16 -0
- package/dist/src/engine/components/fragment/TextFragment.d.ts +15 -0
- package/dist/src/engine/components/fragment/TriangulatedPathFragment.d.ts +14 -0
- package/dist/src/engine/components/geometry/BezierGeometry.d.ts +27 -0
- package/dist/src/engine/components/geometry/DeformableMeshGeometry.d.ts +31 -0
- package/dist/src/engine/components/geometry/Geometry2D.d.ts +18 -0
- package/dist/src/engine/components/geometry/IndexGeometry2D.d.ts +26 -0
- package/dist/src/engine/components/geometry/Line3DGeometry.d.ts +27 -0
- package/dist/src/engine/components/geometry/LineGeometry.d.ts +15 -0
- package/dist/src/engine/components/geometry/ModelGeometry.d.ts +29 -0
- package/dist/src/engine/components/geometry/MorphGeometry.d.ts +44 -0
- package/dist/src/engine/components/geometry/PathGeometry.d.ts +73 -0
- package/dist/src/engine/components/geometry/PolyGeometry.d.ts +31 -0
- package/dist/src/engine/components/geometry/QuadGeometry.d.ts +26 -0
- package/dist/src/engine/components/geometry/TextGeometry.d.ts +23 -0
- package/dist/src/engine/components/geometry/TriangulatedPathGeometry.d.ts +116 -0
- package/dist/src/engine/components/geometry/morph/DualContouringProcessor.d.ts +11 -0
- package/dist/src/engine/components/geometry/morph/MorphProcessor.d.ts +12 -0
- package/dist/src/engine/components/geometry/morph/NaiveProcessor.d.ts +6 -0
- package/dist/src/engine/components/geometry/morph/SdfVolumetricProcessor.d.ts +12 -0
- package/dist/src/engine/components/geometry/morph/SwarmProcessor.d.ts +9 -0
- package/dist/src/engine/components/renderers/MeshRenderer.d.ts +8 -0
- package/dist/src/engine/components/renderers/ModelRenderer.d.ts +9 -0
- package/dist/src/engine/components/renderers/PathRenderer.d.ts +9 -0
- package/dist/src/engine/components/renderers/TriangulatedPathRenderer.d.ts +32 -0
- package/dist/src/engine/compute/Compute.d.ts +322 -0
- package/dist/src/engine/compute/ComputeKernel.d.ts +39 -0
- package/dist/src/engine/control/InputRecorder.d.ts +62 -0
- package/dist/src/engine/control/InteractionManager.d.ts +49 -0
- package/dist/src/engine/control/PlayerControls.d.ts +60 -0
- package/dist/src/engine/control/menu.d.ts +56 -0
- package/dist/src/engine/entities/Instanced.d.ts +114 -0
- package/dist/src/engine/entities/SubScene.d.ts +10 -0
- package/dist/src/engine/entities/composites/PlotPrimitiveFactory.d.ts +22 -0
- package/dist/src/engine/entities/composites/PlotPrimitiveType.d.ts +15 -0
- package/dist/src/engine/entities/composites/coordinates/Axes.d.ts +88 -0
- package/dist/src/engine/entities/composites/coordinates/ComplexPlane.d.ts +49 -0
- package/dist/src/engine/entities/composites/coordinates/CoordinateSystem.d.ts +130 -0
- package/dist/src/engine/entities/composites/coordinates/NumberPlane.d.ts +129 -0
- package/dist/src/engine/entities/composites/coordinates/PolarAxes.d.ts +84 -0
- package/dist/src/engine/entities/composites/coordinates/ThreeDAxes.d.ts +74 -0
- package/dist/src/engine/entities/composites/geometry/Arrow.d.ts +109 -0
- package/dist/src/engine/entities/composites/geometry/Arrow3D.d.ts +34 -0
- package/dist/src/engine/entities/composites/geometry/BooleanOps.d.ts +40 -0
- package/dist/src/engine/entities/composites/geometry/Brace.d.ts +31 -0
- package/dist/src/engine/entities/composites/geometry/MathShape3D.d.ts +36 -0
- package/dist/src/engine/entities/composites/geometry/MeshSprite.d.ts +66 -0
- package/dist/src/engine/entities/composites/geometry/PixelGrid.d.ts +51 -0
- package/dist/src/engine/entities/composites/plotting/Calculus.d.ts +64 -0
- package/dist/src/engine/entities/composites/plotting/FunctionGraph2D.d.ts +48 -0
- package/dist/src/engine/entities/composites/plotting/ImplicitCurve2D.d.ts +39 -0
- package/dist/src/engine/entities/composites/plotting/ImplicitCurve2DGPU.d.ts +20 -0
- package/dist/src/engine/entities/composites/plotting/ImplicitSurface3D.d.ts +32 -0
- package/dist/src/engine/entities/composites/plotting/ParametricCurve2D.d.ts +49 -0
- package/dist/src/engine/entities/composites/plotting/ParametricCurve3D.d.ts +40 -0
- package/dist/src/engine/entities/composites/plotting/ParametricSurface3D.d.ts +42 -0
- package/dist/src/engine/entities/composites/plotting/PolarCurve.d.ts +26 -0
- package/dist/src/engine/entities/composites/plotting/RaymarchPlot3D.d.ts +65 -0
- package/dist/src/engine/entities/composites/plotting/Streamlines2D.d.ts +29 -0
- package/dist/src/engine/entities/composites/plotting/SurfaceGraph3D.d.ts +29 -0
- package/dist/src/engine/entities/composites/plotting/VectorField2D.d.ts +23 -0
- package/dist/src/engine/entities/composites/plotting/VectorField3D.d.ts +20 -0
- package/dist/src/engine/entities/composites/svg/SVG.d.ts +32 -0
- package/dist/src/engine/entities/composites/svg/SVGPath.d.ts +12 -0
- package/dist/src/engine/entities/composites/text/Code.d.ts +197 -0
- package/dist/src/engine/entities/composites/text/MarkupText.d.ts +175 -0
- package/dist/src/engine/entities/composites/text/SDFText.d.ts +92 -0
- package/dist/src/engine/entities/composites/text/Tex.d.ts +80 -0
- package/dist/src/engine/entities/composites/text/TexFontPatcher.d.ts +15 -0
- package/dist/src/engine/entities/composites/text/Text.d.ts +91 -0
- package/dist/src/engine/entities/composites/text/TextSplitter.d.ts +44 -0
- package/dist/src/engine/entities/composites/text/excalifontMathJaxData.d.ts +8 -0
- package/dist/src/engine/entities/composites/text/virgilMathJaxData.d.ts +3 -0
- package/dist/src/engine/entities/composites/trackers/ValueTrackers.d.ts +14 -0
- package/dist/src/engine/entities/composites/trackers/alwaysRedraw.d.ts +8 -0
- package/dist/src/engine/entities/layout/Arrange.d.ts +359 -0
- package/dist/src/engine/entities/layout/FeedbackZoomView.d.ts +25 -0
- package/dist/src/engine/entities/layout/HBox.d.ts +80 -0
- package/dist/src/engine/entities/layout/Mask.d.ts +17 -0
- package/dist/src/engine/entities/layout/VBox.d.ts +80 -0
- package/dist/src/engine/entities/layout/VGroup.d.ts +17 -0
- package/dist/src/engine/entities/layout/ZoomView.d.ts +49 -0
- package/dist/src/engine/entities/primitives/2d/AnimatedSprite.d.ts +28 -0
- package/dist/src/engine/entities/primitives/2d/Arc.d.ts +51 -0
- package/dist/src/engine/entities/primitives/2d/Bezier.d.ts +102 -0
- package/dist/src/engine/entities/primitives/2d/Circle.d.ts +20 -0
- package/dist/src/engine/entities/primitives/2d/Dot.d.ts +274 -0
- package/dist/src/engine/entities/primitives/2d/Ellipse.d.ts +14 -0
- package/dist/src/engine/entities/primitives/2d/Line.d.ts +72 -0
- package/dist/src/engine/entities/primitives/2d/Mesh2D.d.ts +44 -0
- package/dist/src/engine/entities/primitives/2d/Path.d.ts +328 -0
- package/dist/src/engine/entities/primitives/2d/Poly.d.ts +73 -0
- package/dist/src/engine/entities/primitives/2d/Rect.d.ts +37 -0
- package/dist/src/engine/entities/primitives/2d/SDF2D.d.ts +125 -0
- package/dist/src/engine/entities/primitives/2d/Shader.d.ts +77 -0
- package/dist/src/engine/entities/primitives/2d/Spline.d.ts +122 -0
- package/dist/src/engine/entities/primitives/2d/Spring.d.ts +135 -0
- package/dist/src/engine/entities/primitives/2d/Sprite.d.ts +27 -0
- package/dist/src/engine/entities/primitives/2d/Triangle.d.ts +44 -0
- package/dist/src/engine/entities/primitives/2d/curves/BSplineEvaluator.d.ts +20 -0
- package/dist/src/engine/entities/primitives/2d/curves/BezierEvaluator.d.ts +21 -0
- package/dist/src/engine/entities/primitives/2d/curves/CatmullRomEvaluator.d.ts +20 -0
- package/dist/src/engine/entities/primitives/2d/curves/CurveEvaluator.d.ts +68 -0
- package/dist/src/engine/entities/primitives/2d/curves/HermiteEvaluator.d.ts +19 -0
- package/dist/src/engine/entities/primitives/2d/curves/NaturalSplineEvaluator.d.ts +31 -0
- package/dist/src/engine/entities/primitives/2d/sdf/SDFCircle.d.ts +53 -0
- package/dist/src/engine/entities/primitives/3d/Box.d.ts +9 -0
- package/dist/src/engine/entities/primitives/3d/Cone.d.ts +6 -0
- package/dist/src/engine/entities/primitives/3d/Cylinder.d.ts +13 -0
- package/dist/src/engine/entities/primitives/3d/Environment.d.ts +8 -0
- package/dist/src/engine/entities/primitives/3d/Light.d.ts +8 -0
- package/dist/src/engine/entities/primitives/3d/Line3D.d.ts +78 -0
- package/dist/src/engine/entities/primitives/3d/Model.d.ts +79 -0
- package/dist/src/engine/entities/primitives/3d/MorphModel.d.ts +13 -0
- package/dist/src/engine/entities/primitives/3d/MorphOptions.d.ts +132 -0
- package/dist/src/engine/entities/primitives/3d/ParametricModel.d.ts +36 -0
- package/dist/src/engine/entities/primitives/3d/Plane.d.ts +30 -0
- package/dist/src/engine/entities/primitives/3d/RTHTML.d.ts +47 -0
- package/dist/src/engine/entities/primitives/3d/RTImage.d.ts +7 -0
- package/dist/src/engine/entities/primitives/3d/RTVideo.d.ts +12 -0
- package/dist/src/engine/entities/primitives/3d/SDFVolume.d.ts +7 -0
- package/dist/src/engine/entities/primitives/3d/Sphere.d.ts +9 -0
- package/dist/src/engine/entities/primitives/3d/Terrain3D.d.ts +39 -0
- package/dist/src/engine/entities/primitives/3d/Torus.d.ts +8 -0
- package/dist/src/engine/entities/primitives/3d/TracePath.d.ts +38 -0
- package/dist/src/engine/entities/sdf/SDFEntity3D.d.ts +13 -0
- package/dist/src/engine/entities/sdf/SDFMorph3D.d.ts +12 -0
- package/dist/src/engine/entities/sdf/SDFNode.d.ts +148 -0
- package/dist/src/engine/font/Font.d.ts +39 -0
- package/dist/src/engine/font/FontCache.d.ts +31 -0
- package/dist/src/engine/font/FontLoader.d.ts +38 -0
- package/dist/src/engine/font/FontResolver.d.ts +27 -0
- package/dist/src/engine/font/MSDFGenerator.d.ts +28 -0
- package/dist/src/engine/font/types.d.ts +76 -0
- package/dist/src/engine/loader/SubTexture.d.ts +61 -0
- package/dist/src/engine/loader/TextureAtlas.d.ts +84 -0
- package/dist/src/engine/material/FillEffect.d.ts +108 -0
- package/dist/src/engine/material/FillEffectBase.d.ts +34 -0
- package/dist/src/engine/material/PathEffect.d.ts +254 -0
- package/dist/src/engine/material/PathEffectBase.d.ts +34 -0
- package/dist/src/engine/material/fill_effects/CheckerboardFillEffect.d.ts +8 -0
- package/dist/src/engine/material/fill_effects/CustomFillEffect.d.ts +11 -0
- package/dist/src/engine/material/fill_effects/DotsFillEffect.d.ts +8 -0
- package/dist/src/engine/material/fill_effects/GlowFillEffect.d.ts +22 -0
- package/dist/src/engine/material/fill_effects/LinearGradientFillEffect.d.ts +8 -0
- package/dist/src/engine/material/fill_effects/OpacityFillEffect.d.ts +7 -0
- package/dist/src/engine/material/fill_effects/RadialGradientFillEffect.d.ts +8 -0
- package/dist/src/engine/material/fill_effects/SolidFillEffect.d.ts +7 -0
- package/dist/src/engine/material/fill_effects/StripesFillEffect.d.ts +8 -0
- package/dist/src/engine/material/fill_effects/TintFillEffect.d.ts +8 -0
- package/dist/src/engine/material/fill_effects/VignetteFillEffect.d.ts +7 -0
- package/dist/src/engine/material/fill_effects/colorMixer.d.ts +5 -0
- package/dist/src/engine/material/fill_effects/glowShader.d.ts +31 -0
- package/dist/src/engine/material/fill_effects/index.d.ts +13 -0
- package/dist/src/engine/material/fills/GradientFill.d.ts +32 -0
- package/dist/src/engine/material/fills/SolidFill.d.ts +6 -0
- package/dist/src/engine/material/fills/TextureFill.d.ts +24 -0
- package/dist/src/engine/material/fills/VideoFill.d.ts +12 -0
- package/dist/src/engine/material/path_effects/BrushEffect.d.ts +24 -0
- package/dist/src/engine/material/path_effects/CalligraphicEffect.d.ts +23 -0
- package/dist/src/engine/material/path_effects/ChalkEffect.d.ts +58 -0
- package/dist/src/engine/material/path_effects/CustomPathEffect.d.ts +11 -0
- package/dist/src/engine/material/path_effects/DashEffect.d.ts +14 -0
- package/dist/src/engine/material/path_effects/DynamicStrokeEffect.d.ts +25 -0
- package/dist/src/engine/material/path_effects/FluidEffect.d.ts +21 -0
- package/dist/src/engine/material/path_effects/GlowPathEffect.d.ts +7 -0
- package/dist/src/engine/material/path_effects/GradientPathEffect.d.ts +8 -0
- package/dist/src/engine/material/path_effects/OpacityPathEffect.d.ts +7 -0
- package/dist/src/engine/material/path_effects/PencilEffect.d.ts +22 -0
- package/dist/src/engine/material/path_effects/SketchEffect.d.ts +31 -0
- package/dist/src/engine/material/path_effects/SolidPathEffect.d.ts +7 -0
- package/dist/src/engine/material/path_effects/SpontaneousEffect.d.ts +23 -0
- package/dist/src/engine/material/path_effects/TaperEffect.d.ts +19 -0
- package/dist/src/engine/material/path_effects/WaveEffect.d.ts +7 -0
- package/dist/src/engine/material/path_effects/chalkShader.d.ts +36 -0
- package/dist/src/engine/material/path_effects/dynamicStrokeShader.d.ts +165 -0
- package/dist/src/engine/material/path_effects/index.d.ts +18 -0
- package/dist/src/engine/material/path_effects/sketchShader.d.ts +41 -0
- package/dist/src/engine/math/AABB.d.ts +95 -0
- package/dist/src/engine/math/Color.d.ts +221 -0
- package/dist/src/engine/math/Complex.d.ts +51 -0
- package/dist/src/engine/math/FourierTransform.d.ts +120 -0
- package/dist/src/engine/math/Frustum.d.ts +30 -0
- package/dist/src/engine/math/Math3D.d.ts +121 -0
- package/dist/src/engine/math/fields/SpatialField.d.ts +37 -0
- package/dist/src/engine/math/fields/StandardFields.d.ts +146 -0
- package/dist/src/engine/math/noise/BaseNoise.d.ts +80 -0
- package/dist/src/engine/math/noise/Noise.d.ts +55 -0
- package/dist/src/engine/math/noise/NoiseParams.d.ts +42 -0
- package/dist/src/engine/math/noise/NoiseScaler.d.ts +48 -0
- package/dist/src/engine/math/noise/PerlinNoise.d.ts +17 -0
- package/dist/src/engine/math/noise/SimplexNoise.d.ts +12 -0
- package/dist/src/engine/math/noise/ValueNoise.d.ts +15 -0
- package/dist/src/engine/math/noise/WhiteNoise.d.ts +13 -0
- package/dist/src/engine/math/noise/WorleyNoise.d.ts +20 -0
- package/dist/src/engine/math/vector/GPUData.d.ts +5 -0
- package/dist/src/engine/math/vector/Mat3.d.ts +111 -0
- package/dist/src/engine/math/vector/Mat4.d.ts +209 -0
- package/dist/src/engine/math/vector/Point.d.ts +38 -0
- package/dist/src/engine/math/vector/Quaternion.d.ts +83 -0
- package/dist/src/engine/math/vector/Vec2.d.ts +118 -0
- package/dist/src/engine/math/vector/Vec3.d.ts +120 -0
- package/dist/src/engine/modifiers/IPathModifier.d.ts +41 -0
- package/dist/src/engine/modifiers/PathModifier.d.ts +113 -0
- package/dist/src/engine/modifiers/PathModifierBase.d.ts +41 -0
- package/dist/src/engine/modifiers/PathModifierPipeline.d.ts +52 -0
- package/dist/src/engine/modifiers/path/CustomModifier.d.ts +14 -0
- package/dist/src/engine/modifiers/path/DashModifier.d.ts +23 -0
- package/dist/src/engine/modifiers/path/ExcalidrawModifier.d.ts +29 -0
- package/dist/src/engine/modifiers/path/OffsetModifier.d.ts +42 -0
- package/dist/src/engine/modifiers/path/PathModifierUtils.d.ts +50 -0
- package/dist/src/engine/modifiers/path/PuckerBloatModifier.d.ts +22 -0
- package/dist/src/engine/modifiers/path/ResampleModifier.d.ts +23 -0
- package/dist/src/engine/modifiers/path/ReverseModifier.d.ts +10 -0
- package/dist/src/engine/modifiers/path/RoundCornersModifier.d.ts +22 -0
- package/dist/src/engine/modifiers/path/SmoothModifier.d.ts +25 -0
- package/dist/src/engine/modifiers/path/TrimModifier.d.ts +40 -0
- package/dist/src/engine/modifiers/path/TwistModifier.d.ts +28 -0
- package/dist/src/engine/modifiers/path/WiggleModifier.d.ts +52 -0
- package/dist/src/engine/modifiers/path/WobbleModifier.d.ts +132 -0
- package/dist/src/engine/modifiers/path/ZigZagModifier.d.ts +33 -0
- package/dist/src/engine/recorder/OfflineRecorder.d.ts +11 -0
- package/dist/src/engine/recorder/Recorder.d.ts +65 -0
- package/dist/src/engine/render/RenderConfig.d.ts +65 -0
- package/dist/src/engine/render/RenderStateCache.d.ts +39 -0
- package/dist/src/engine/render/RenderTarget.d.ts +141 -0
- package/dist/src/engine/render/Renderer.d.ts +67 -0
- package/dist/src/engine/render/allocator/DirtyBufferTracker.d.ts +70 -0
- package/dist/src/engine/render/allocator/GPUStrokePipeline.d.ts +67 -0
- package/dist/src/engine/render/allocator/GlobalAnalyticalAllocator.d.ts +78 -0
- package/dist/src/engine/render/allocator/GlobalAnalyticalPipeline.d.ts +43 -0
- package/dist/src/engine/render/allocator/GlobalGeometryAllocator.d.ts +140 -0
- package/dist/src/engine/render/allocator/GlobalStateAllocator.d.ts +70 -0
- package/dist/src/engine/render/allocator/MegaDrawBatchManager.d.ts +45 -0
- package/dist/src/engine/render/features/CoreFeatures.d.ts +28 -0
- package/dist/src/engine/render/frame_graph/FrameGraph.d.ts +30 -0
- package/dist/src/engine/render/frame_graph/GraphBuilder.d.ts +11 -0
- package/dist/src/engine/render/frame_graph/Pass.d.ts +27 -0
- package/dist/src/engine/render/frame_graph/RenderContext.d.ts +13 -0
- package/dist/src/engine/render/frame_graph/Resource.d.ts +70 -0
- package/dist/src/engine/render/frame_graph/ResourcePool.d.ts +14 -0
- package/dist/src/engine/render/passes/AntiAliasingPass.d.ts +25 -0
- package/dist/src/engine/render/passes/BlurPass.d.ts +49 -0
- package/dist/src/engine/render/passes/ComputeUpdate.d.ts +8 -0
- package/dist/src/engine/render/passes/CreateTexturePass.d.ts +14 -0
- package/dist/src/engine/render/passes/CustomComputePass.d.ts +14 -0
- package/dist/src/engine/render/passes/FeedbackPass.d.ts +39 -0
- package/dist/src/engine/render/passes/OffscreenRenderPass.d.ts +49 -0
- package/dist/src/engine/render/passes/PPLLCompositePass.d.ts +13 -0
- package/dist/src/engine/render/passes/PPLLPreparePass.d.ts +12 -0
- package/dist/src/engine/render/passes/PersistentRenderTexture.d.ts +53 -0
- package/dist/src/engine/render/passes/PostProcessPass.d.ts +17 -0
- package/dist/src/engine/render/passes/PresentPass.d.ts +12 -0
- package/dist/src/engine/render/passes/RaytracePasses.d.ts +42 -0
- package/dist/src/engine/render/passes/RenderPass.d.ts +33 -0
- package/dist/src/engine/render/passes/ShadowPass.d.ts +19 -0
- package/dist/src/engine/render/passes/denoisers/OIDNDenoisePass.d.ts +28 -0
- package/dist/src/engine/render/passes/denoisers/SpatialDenoisePass.d.ts +12 -0
- package/dist/src/engine/render/pipelines/PipeLineDescriptors.d.ts +56 -0
- package/dist/src/engine/render/pipelines/Pipeline.d.ts +27 -0
- package/dist/src/engine/render/pipelines/ResourceLayouts.d.ts +37 -0
- package/dist/src/engine/render/pipelines/WGSLReflector.d.ts +25 -0
- package/dist/src/engine/render/ppll_oit/PPLLManager.d.ts +25 -0
- package/dist/src/engine/render/ppll_oit/PPLLManagerGlobal.d.ts +17 -0
- package/dist/src/engine/render/ppll_oit/PPLLManagerLocal.d.ts +12 -0
- package/dist/src/engine/render/raytrace/BVHBuilder.d.ts +13 -0
- package/dist/src/engine/render/raytrace/GPUArena.d.ts +22 -0
- package/dist/src/engine/render/raytrace/RaytraceManager.d.ts +36 -0
- package/dist/src/engine/render/raytrace/RaytraceShaders.d.ts +5 -0
- package/dist/src/engine/render/shader_system/ChunkRegistry.d.ts +25 -0
- package/dist/src/engine/render/shader_system/Domains.d.ts +12 -0
- package/dist/src/engine/render/shader_system/PipelineCache.d.ts +20 -0
- package/dist/src/engine/render/shader_system/ShaderBuilder.d.ts +61 -0
- package/dist/src/engine/render/shader_system/schemas/Schemas.d.ts +2 -0
- package/dist/src/engine/render/shader_system/schemas/ShaderTypes.d.ts +54 -0
- package/dist/src/engine/render/shader_system/schemas/UniformSchema.d.ts +36 -0
- package/dist/src/engine/render/shader_system/schemas/VaryingSchema.d.ts +15 -0
- package/dist/src/engine/render/shader_system/schemas/VertexSchema.d.ts +9 -0
- package/dist/src/engine/render/targets/ComputeStorageTexture.d.ts +22 -0
- package/dist/src/engine/render/targets/GBufferRenderTarget.d.ts +33 -0
- package/dist/src/engine/render/targets/PingPongRenderTarget.d.ts +34 -0
- package/dist/src/engine/style/excalidraw/Excalidraw.d.ts +117 -0
- package/dist/src/engine/style/excalidraw/ExcalidrawAnimation.d.ts +27 -0
- package/dist/src/engine/style/excalidraw/ExcalidrawTypes.d.ts +102 -0
- package/dist/src/engine/style/excalidraw/HachureGenerator.d.ts +85 -0
- package/dist/src/engine/style/excalidraw/index.d.ts +4 -0
- package/dist/src/engine/utils/Builder.d.ts +74 -0
- package/dist/src/engine/utils/Builder3D.d.ts +50 -0
- package/dist/src/engine/utils/CurveSampleUtils.d.ts +61 -0
- package/dist/src/engine/utils/CurveUtil.d.ts +39 -0
- package/dist/src/engine/utils/GeometrySnapshot.d.ts +17 -0
- package/dist/src/engine/utils/MarchingSquares.d.ts +10 -0
- package/dist/src/engine/utils/OBJLoader.d.ts +15 -0
- package/dist/src/engine/utils/PathEqualizer.d.ts +37 -0
- package/dist/src/engine/utils/PathGeometryUtils.d.ts +61 -0
- package/dist/src/engine/utils/PathTriangulator.d.ts +128 -0
- package/dist/src/engine/utils/Raycaster.d.ts +48 -0
- package/dist/src/engine/utils/RealTime.d.ts +16 -0
- package/dist/src/engine/utils/ShapeMatcher.d.ts +21 -0
- package/dist/src/engine/utils/SubdivisionEngine.d.ts +63 -0
- package/dist/src/engine/utils/Utility.d.ts +51 -0
- package/dist/src/engine/utils/gpu_utils.d.ts +80 -0
- package/dist/src/index.d.ts +438 -0
- package/dist/src/main.d.ts +5 -0
- package/dist/src/plugins/OutlinePlugin.d.ts +36 -0
- package/package.json +117 -6
- package/readme.md +145 -0
- package/README.md +0 -3
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { RenderView } from '../camera/RenderView';
|
|
2
|
+
import { GeometryComponent } from '../components/GeometryComponent';
|
|
3
|
+
import { FragmentComponent } from '../components/FragmentComponent';
|
|
4
|
+
import { RendererComponent } from '../components/RendererComponent';
|
|
5
|
+
import { ComputeCommand } from '../compute/Compute';
|
|
6
|
+
import { Entity } from './Entity';
|
|
7
|
+
import { State } from './State';
|
|
8
|
+
import { AABB } from '../math/AABB';
|
|
9
|
+
import { RenderConfig } from '../render/RenderConfig';
|
|
10
|
+
export interface SceneConfig {
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
clear_color: {
|
|
14
|
+
r: number;
|
|
15
|
+
g: number;
|
|
16
|
+
b: number;
|
|
17
|
+
a: number;
|
|
18
|
+
};
|
|
19
|
+
/** Set to false to retain the previous frame's pixels. Defaults to true. */
|
|
20
|
+
autoClear?: boolean;
|
|
21
|
+
/** Normalized region [0.0 - 1.0] representing the area that will NOT be cleared. */
|
|
22
|
+
preserveArea?: {
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
w: number;
|
|
26
|
+
h: number;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export interface RenderCommand {
|
|
30
|
+
entity: Entity;
|
|
31
|
+
renderer: RendererComponent;
|
|
32
|
+
geometry: GeometryComponent;
|
|
33
|
+
fragment: FragmentComponent;
|
|
34
|
+
state: State;
|
|
35
|
+
stateIndex?: number;
|
|
36
|
+
state_bindgroup?: {
|
|
37
|
+
bindGroup: GPUBindGroup;
|
|
38
|
+
dynamicOffset: number;
|
|
39
|
+
offsets?: [number, number, number];
|
|
40
|
+
};
|
|
41
|
+
zIndex: number;
|
|
42
|
+
scissorBox?: AABB;
|
|
43
|
+
sortDepth?: number;
|
|
44
|
+
sortIndex?: number;
|
|
45
|
+
}
|
|
46
|
+
export interface SceneData {
|
|
47
|
+
texture: GPUTexture;
|
|
48
|
+
views: RenderView[];
|
|
49
|
+
render_queue: RenderCommand[];
|
|
50
|
+
compute_queue: ComputeCommand[];
|
|
51
|
+
config: SceneConfig;
|
|
52
|
+
renderConfig: RenderConfig;
|
|
53
|
+
isMoving: boolean;
|
|
54
|
+
accumulatedFrames: number;
|
|
55
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Scene } from './Scene';
|
|
2
|
+
export interface EntitySnapshot {
|
|
3
|
+
id: number;
|
|
4
|
+
visibility: boolean;
|
|
5
|
+
stateData: Float32Array;
|
|
6
|
+
}
|
|
7
|
+
export interface AnimationSnapshot {
|
|
8
|
+
type: string;
|
|
9
|
+
targetEntityId?: number;
|
|
10
|
+
elapsed: number;
|
|
11
|
+
duration: number;
|
|
12
|
+
delay: number;
|
|
13
|
+
}
|
|
14
|
+
export interface CameraSnapshot {
|
|
15
|
+
position: [number, number, number];
|
|
16
|
+
rotation: [number, number, number, number];
|
|
17
|
+
pitch: number;
|
|
18
|
+
yaw: number;
|
|
19
|
+
fov: number;
|
|
20
|
+
orthoScale: number;
|
|
21
|
+
aperture: number;
|
|
22
|
+
focusDist: number;
|
|
23
|
+
targetCenter?: [number, number, number];
|
|
24
|
+
targetRadius?: number;
|
|
25
|
+
}
|
|
26
|
+
export interface SceneSnapshot {
|
|
27
|
+
time: number;
|
|
28
|
+
label?: string;
|
|
29
|
+
camera: CameraSnapshot;
|
|
30
|
+
entities: EntitySnapshot[];
|
|
31
|
+
animations: AnimationSnapshot[];
|
|
32
|
+
isPaused: boolean;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Manages deterministic scene state checkpoints and snapshots.
|
|
36
|
+
* Allows instant restoration to user-defined checkpoint milestones during timeline seeking.
|
|
37
|
+
*/
|
|
38
|
+
export declare class SnapshotManager {
|
|
39
|
+
private snapshots;
|
|
40
|
+
/**
|
|
41
|
+
* Captures a complete, byte-accurate snapshot of the current scene state.
|
|
42
|
+
*/
|
|
43
|
+
capture(scene: Scene, label?: string): SceneSnapshot;
|
|
44
|
+
/**
|
|
45
|
+
* Finds the latest checkpoint captured prior to or at targetTimeMs.
|
|
46
|
+
*/
|
|
47
|
+
getLatestCheckpointBefore(targetTimeMs: number): SceneSnapshot | null;
|
|
48
|
+
/**
|
|
49
|
+
* Restores a scene instance to the exact state saved in a SceneSnapshot.
|
|
50
|
+
*/
|
|
51
|
+
restore(scene: Scene, snapshot: SceneSnapshot): void;
|
|
52
|
+
/**
|
|
53
|
+
* Clears all stored checkpoints.
|
|
54
|
+
*/
|
|
55
|
+
clear(): void;
|
|
56
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { Material } from './Material';
|
|
2
|
+
import { Paint } from './Paint';
|
|
3
|
+
import { Transform } from './Transform';
|
|
4
|
+
/**
|
|
5
|
+
* Represents the unified styling, transform, and material state layout of an [[Entity]],
|
|
6
|
+
* mapped directly to a single contiguous GPU Float32 memory buffer block.
|
|
7
|
+
* Organizes sub-buffers: [[Paint]] (style/opacity), [[Transform]] (spatial location), and [[Material]] (shading).
|
|
8
|
+
*/
|
|
9
|
+
export declare class State {
|
|
10
|
+
/** Total byte length of a single state layout aligned to 16 bytes. */
|
|
11
|
+
static BYTELENGTH: number;
|
|
12
|
+
/** Total Float32 elements (fields) in the state buffer slice. */
|
|
13
|
+
static F32LENGTH: number;
|
|
14
|
+
/** Contiguous Float32 memory buffer block holding all state values. */
|
|
15
|
+
readonly data: Float32Array;
|
|
16
|
+
/** Aggregated Paint styling details instance. */
|
|
17
|
+
readonly paint: Paint;
|
|
18
|
+
/** Aggregated Transform spatial coordinates details instance. */
|
|
19
|
+
readonly transform: Transform;
|
|
20
|
+
/** Aggregated Material shading details instance. */
|
|
21
|
+
readonly material: Material;
|
|
22
|
+
/** Dynamic offset address mapping in WebGPU Uniform buffers [page number, slot index]. */
|
|
23
|
+
index: number[];
|
|
24
|
+
/**
|
|
25
|
+
* Creates a new State instance.
|
|
26
|
+
*
|
|
27
|
+
* @param data Optional pre-allocated Float32Array slice to map.
|
|
28
|
+
* @param copy If true, skip writing defaults.
|
|
29
|
+
*/
|
|
30
|
+
constructor(data?: Float32Array, copy?: boolean);
|
|
31
|
+
/** General animation parameter / progress [0.0 - 1.0]. */
|
|
32
|
+
get t(): number;
|
|
33
|
+
set t(val: number);
|
|
34
|
+
/** Animation timeline start variable mapping. */
|
|
35
|
+
get t1(): number;
|
|
36
|
+
/** Animation timeline completion variable mapping. */
|
|
37
|
+
get t2(): number;
|
|
38
|
+
set t1(val: number);
|
|
39
|
+
set t2(val: number);
|
|
40
|
+
/** Sets local paint values. */
|
|
41
|
+
setPaint(paint: Paint): State;
|
|
42
|
+
/** Sets local transform values. */
|
|
43
|
+
setTransform(transform: Transform): State;
|
|
44
|
+
/** Sets local material values. */
|
|
45
|
+
setMaterial(material: Material): State;
|
|
46
|
+
static _globalVersion: number;
|
|
47
|
+
version: number;
|
|
48
|
+
get localVersion(): number;
|
|
49
|
+
/**
|
|
50
|
+
* Appends and evaluates a parent state layout combined with local overrides.
|
|
51
|
+
*
|
|
52
|
+
* @param state Child state overrides.
|
|
53
|
+
* @param state_in Parent state layout.
|
|
54
|
+
*/
|
|
55
|
+
apply(state: State, state_in: State): void;
|
|
56
|
+
/** Size computation of the structure alignment in bytes. */
|
|
57
|
+
size(): number;
|
|
58
|
+
/** Flag all sub-buffers dirty, forcing VRAM updates. */
|
|
59
|
+
invalidate(): void;
|
|
60
|
+
/** Reset change update flags. */
|
|
61
|
+
updated(): void;
|
|
62
|
+
/** Copies raw Float data from another state. */
|
|
63
|
+
copyFrom(state: State): void;
|
|
64
|
+
/** Clones this State instance. */
|
|
65
|
+
copy(): State;
|
|
66
|
+
/** Synchronizes all paint, transform, and material values. */
|
|
67
|
+
set(state: State): void;
|
|
68
|
+
/** Explicit copy of raw floats. */
|
|
69
|
+
setData(state: State): State;
|
|
70
|
+
/** Applies a sequence of style/transform/material methods incrementally. */
|
|
71
|
+
applyMethods(methods: string[], ...args: any[]): State;
|
|
72
|
+
/**
|
|
73
|
+
* Inspects and executes a given paint/transform/material method by name.
|
|
74
|
+
*
|
|
75
|
+
* @param method Target method name.
|
|
76
|
+
* @param args Dynamic arguments list.
|
|
77
|
+
*/
|
|
78
|
+
applyMethod(method: string, ...args: any[]): State;
|
|
79
|
+
/**
|
|
80
|
+
* Linearly interpolates between two state configurations over progress range [0.0 - 1.0].
|
|
81
|
+
*
|
|
82
|
+
* @param start Initial state.
|
|
83
|
+
* @param target Target state.
|
|
84
|
+
* @param t Progress interpolation factor.
|
|
85
|
+
* @param state Optional pre-allocated state to write results.
|
|
86
|
+
*/
|
|
87
|
+
static interpolate(start: State, target: State, t: number, state?: State): State;
|
|
88
|
+
/**
|
|
89
|
+
* Analyzes and returns indices of fields that differ between start and target states.
|
|
90
|
+
* Used to optimize interpolations via selective masking.
|
|
91
|
+
*
|
|
92
|
+
* @param start Initial state.
|
|
93
|
+
* @param target Target state.
|
|
94
|
+
*/
|
|
95
|
+
static getInterpolationMask(start: State, target: State): [number[], number[], number[]];
|
|
96
|
+
/**
|
|
97
|
+
* Performs interpolation only on the specified masked fields to optimize CPU overhead.
|
|
98
|
+
*
|
|
99
|
+
* @param mask Selected list of indices that differ.
|
|
100
|
+
* @param start Initial state.
|
|
101
|
+
* @param target Target state.
|
|
102
|
+
* @param t Progress factor.
|
|
103
|
+
* @param state Result destination state.
|
|
104
|
+
*/
|
|
105
|
+
static interpolateWithMask(mask: [number[], number[], number[]], start: State, target: State, t: number, state?: State): State;
|
|
106
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { State } from './State';
|
|
2
|
+
/**
|
|
3
|
+
* GPU Buffer binding definitions for managing scene states.
|
|
4
|
+
*/
|
|
5
|
+
export interface UniformBuffer {
|
|
6
|
+
/** Layout representing global scene-level properties. */
|
|
7
|
+
global: GPUBufferBinding;
|
|
8
|
+
/** Layout representing individual entity states. */
|
|
9
|
+
state: GPUBufferBinding;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Unified state data manager backed by [[GlobalStateAllocator]].
|
|
13
|
+
* Manages continuous global storage buffer allocation for entity transforms, paints, and materials.
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
export declare class StateDataManager {
|
|
17
|
+
private allocator;
|
|
18
|
+
private device;
|
|
19
|
+
/**
|
|
20
|
+
* Creates a new StateDataManager.
|
|
21
|
+
*
|
|
22
|
+
* @param device Active GPUDevice.
|
|
23
|
+
* @param layout WebGPU Bind group layout descriptor.
|
|
24
|
+
*/
|
|
25
|
+
constructor(device: GPUDevice, layout?: GPUBindGroupLayout);
|
|
26
|
+
/**
|
|
27
|
+
* Resets indices to start refilling from the beginning of the frame.
|
|
28
|
+
*/
|
|
29
|
+
resetForNewFrame(): void;
|
|
30
|
+
/**
|
|
31
|
+
* Directly acquires the next pre-mapped State instance inside the GlobalStateAllocator.
|
|
32
|
+
* Any mutations on this State write directly into the storage buffer memory in-place (Zero-Copy).
|
|
33
|
+
*
|
|
34
|
+
* @param out Output object populated with stateIndex and globalBindGroup.
|
|
35
|
+
*/
|
|
36
|
+
allocateDirect(out?: any): State;
|
|
37
|
+
/**
|
|
38
|
+
* Allocates a slot for an entity's State, copying data into the global storage buffer.
|
|
39
|
+
*
|
|
40
|
+
* @param state The entity's state to pack.
|
|
41
|
+
*/
|
|
42
|
+
allocate(state: State, out?: {
|
|
43
|
+
stateIndex?: number;
|
|
44
|
+
bindGroup?: GPUBindGroup;
|
|
45
|
+
dynamicOffset?: number;
|
|
46
|
+
offsets?: [number, number, number];
|
|
47
|
+
}): {
|
|
48
|
+
stateIndex: number;
|
|
49
|
+
bindGroup: GPUBindGroup;
|
|
50
|
+
dynamicOffset: number;
|
|
51
|
+
offsets: [number, number, number];
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Flushes all coalesced dirty state ranges to the GPU using command queue write operations.
|
|
55
|
+
*/
|
|
56
|
+
uploadToGPU(): void;
|
|
57
|
+
/**
|
|
58
|
+
* Accessor for the global state bind group.
|
|
59
|
+
*/
|
|
60
|
+
get globalBindGroup(): GPUBindGroup;
|
|
61
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Entity } from './Entity';
|
|
2
|
+
import { Renderer } from '../render/Renderer';
|
|
3
|
+
/**
|
|
4
|
+
* Manages texture array synchronization between Scene entities and the Renderer.
|
|
5
|
+
*/
|
|
6
|
+
export declare class TextureManager {
|
|
7
|
+
texturesDirty: boolean;
|
|
8
|
+
videoDirty: boolean;
|
|
9
|
+
isBuildingTextures: boolean;
|
|
10
|
+
queuedTextureRebuild: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Checks if a texture array rebuild is needed and triggers non-blocking sync.
|
|
13
|
+
*/
|
|
14
|
+
processPendingRebuild(entities: Entity[], renderer: Renderer, onInvalidate: () => void): void;
|
|
15
|
+
/**
|
|
16
|
+
* Traverses the scene graph to extract texture sources, passes them to the renderer,
|
|
17
|
+
* and maps the resulting GPU array indices back to entity materials.
|
|
18
|
+
*/
|
|
19
|
+
syncTextureArrays(entities: Entity[], renderer: Renderer, isFullRebuild: boolean): Promise<void>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
import { Mat4 } from '../math/vector/Mat4';
|
|
2
|
+
import { Quaternion } from '../math/vector/Quaternion';
|
|
3
|
+
import { Vec3, Vec3Type } from '../math/vector/Vec3';
|
|
4
|
+
import { TransformFunctions } from '../animation/AnimationFunctions';
|
|
5
|
+
/**
|
|
6
|
+
* Represents the spatial transformation state of an [[Entity]], mapped directly to GPU-readable Float32 memory.
|
|
7
|
+
* Manages position, rotation, scaling, offsets, and timing variables (`t1`, `t2`) for animations.
|
|
8
|
+
*/
|
|
9
|
+
export declare class Transform implements TransformFunctions<Transform> {
|
|
10
|
+
/**
|
|
11
|
+
* Total byte length of a single transform structure in memory.
|
|
12
|
+
*/
|
|
13
|
+
static BYTELENGTH: number;
|
|
14
|
+
/**
|
|
15
|
+
* Total number of Float32 elements (fields) in the raw buffer slice.
|
|
16
|
+
*/
|
|
17
|
+
static F32LENGTH: number;
|
|
18
|
+
onChange?: () => void;
|
|
19
|
+
static _globalVersion: number;
|
|
20
|
+
private _updateFlag;
|
|
21
|
+
version: number;
|
|
22
|
+
/**
|
|
23
|
+
* Flag indicating whether the CPU-side data has changed and needs to be synchronized to the GPU.
|
|
24
|
+
*/
|
|
25
|
+
get UPDATE_FLAG(): boolean;
|
|
26
|
+
set UPDATE_FLAG(val: boolean);
|
|
27
|
+
/**
|
|
28
|
+
* Buffer binding details for WebGPU alignment.
|
|
29
|
+
*/
|
|
30
|
+
binding: GPUBufferBinding;
|
|
31
|
+
/**
|
|
32
|
+
* The raw Float32 array slice containing the transform matrix and variables.
|
|
33
|
+
*/
|
|
34
|
+
readonly data: Float32Array;
|
|
35
|
+
/**
|
|
36
|
+
* The underlying 4x4 matrix mapping local space to parent/world space.
|
|
37
|
+
*/
|
|
38
|
+
readonly _matrix: Mat4;
|
|
39
|
+
/**
|
|
40
|
+
* Local offset/anchor coordinate mapping.
|
|
41
|
+
*/
|
|
42
|
+
readonly _offset: Vec3;
|
|
43
|
+
readonly _position: Vec3;
|
|
44
|
+
/**
|
|
45
|
+
* General animation progress/parameter variable slice (t) accessible in GPU shaders.
|
|
46
|
+
*/
|
|
47
|
+
readonly _t: Float32Array;
|
|
48
|
+
/**
|
|
49
|
+
* Animation variable slice typically used for interpolations or drawing parameters (e.g., start time).
|
|
50
|
+
*/
|
|
51
|
+
readonly _t1: Float32Array;
|
|
52
|
+
/**
|
|
53
|
+
* Animation variable slice typically used for interpolations or drawing parameters (e.g., completion time).
|
|
54
|
+
*/
|
|
55
|
+
readonly _t2: Float32Array;
|
|
56
|
+
/**
|
|
57
|
+
* Bit mask field for entity categorization or state tracking.
|
|
58
|
+
*/
|
|
59
|
+
readonly _bit_mask: Uint32Array;
|
|
60
|
+
/**
|
|
61
|
+
* Creates a new Transform instance mapped to a shared Float32Array slice.
|
|
62
|
+
*
|
|
63
|
+
* @param data The array slice representing this transform in memory.
|
|
64
|
+
* @param copy If true, skip setting default identity parameters.
|
|
65
|
+
*/
|
|
66
|
+
constructor(data: Float32Array, copy?: boolean);
|
|
67
|
+
/**
|
|
68
|
+
* Initializes default values: matrix to identity, offset to zero, t1 to 0, and t2 to 1.
|
|
69
|
+
*/
|
|
70
|
+
init(): void;
|
|
71
|
+
private bindMethods;
|
|
72
|
+
/**
|
|
73
|
+
* Gets or sets the local pivot offset (anchor point) of the entity.
|
|
74
|
+
*/
|
|
75
|
+
get offset(): Vec3;
|
|
76
|
+
set offset(offset: Vec3Type);
|
|
77
|
+
/**
|
|
78
|
+
* Gets or sets the translation (position) components of the transformation matrix.
|
|
79
|
+
*/
|
|
80
|
+
get position(): Vec3;
|
|
81
|
+
set position(p: Vec3Type);
|
|
82
|
+
/**
|
|
83
|
+
* Gets or sets the rotation component as a Quaternion.
|
|
84
|
+
*/
|
|
85
|
+
get rotation(): Quaternion;
|
|
86
|
+
set rotation(q: Quaternion);
|
|
87
|
+
/**
|
|
88
|
+
* General animation parameter / progress [0.0 - 1.0] accessible in GPU shaders.
|
|
89
|
+
*/
|
|
90
|
+
get t(): number;
|
|
91
|
+
set t(val: number);
|
|
92
|
+
/**
|
|
93
|
+
* The first animation variable (t1).
|
|
94
|
+
*/
|
|
95
|
+
get t1(): number;
|
|
96
|
+
set t1(t: number);
|
|
97
|
+
/**
|
|
98
|
+
* The second animation variable (t2).
|
|
99
|
+
*/
|
|
100
|
+
get t2(): number;
|
|
101
|
+
set t2(t: number);
|
|
102
|
+
get bit_mask(): number;
|
|
103
|
+
set bit_mask(bit_value: number);
|
|
104
|
+
/**
|
|
105
|
+
* Secondary metadata / custom state parameter (e.g. analytical contourStartIndex).
|
|
106
|
+
*/
|
|
107
|
+
get pad2(): number;
|
|
108
|
+
set pad2(val: number);
|
|
109
|
+
get scaling(): Vec3;
|
|
110
|
+
set scaling(s: Vec3Type | number);
|
|
111
|
+
/** Reads the current X coordinate without allocating a Vec3 wrapper. */
|
|
112
|
+
get positionX(): number;
|
|
113
|
+
/** Sets the X coordinate without allocating a Vec3 wrapper. */
|
|
114
|
+
set positionX(x: number);
|
|
115
|
+
/** Reads the current Y coordinate without allocating a Vec3 wrapper. */
|
|
116
|
+
get positionY(): number;
|
|
117
|
+
/** Sets the Y coordinate without allocating a Vec3 wrapper. */
|
|
118
|
+
set positionY(y: number);
|
|
119
|
+
/** Reads the current Z coordinate without allocating a Vec3 wrapper. */
|
|
120
|
+
get positionZ(): number;
|
|
121
|
+
/** Sets the Z coordinate without allocating a Vec3 wrapper. */
|
|
122
|
+
set positionZ(z: number);
|
|
123
|
+
/**
|
|
124
|
+
* Returns the current position as a Vec3.
|
|
125
|
+
* Equivalent to the `position` getter but in method form for API symmetry.
|
|
126
|
+
*/
|
|
127
|
+
getPosition(): Vec3;
|
|
128
|
+
/**
|
|
129
|
+
* Directly overwrites the position column in-place.
|
|
130
|
+
* Zero-allocations.
|
|
131
|
+
*/
|
|
132
|
+
setPositionXYZ(x: number, y: number, z: number): Transform;
|
|
133
|
+
/**
|
|
134
|
+
* Directly compiles and overwrites the rotation matrix from a Quaternion.
|
|
135
|
+
* Preserves existing 3D reflections and scaling factors.
|
|
136
|
+
* Zero-allocations.
|
|
137
|
+
*/
|
|
138
|
+
setRotationQuaternionXYZW(x: number, y: number, z: number, w: number): Transform;
|
|
139
|
+
/**
|
|
140
|
+
* Directly sets Euler rotations along X, Y, and Z axes (in radians).
|
|
141
|
+
*/
|
|
142
|
+
setRotationXYZ(x: number, y: number, z: number): Transform;
|
|
143
|
+
/**
|
|
144
|
+
* Sets the general animation progress / parameter (t).
|
|
145
|
+
*
|
|
146
|
+
* @param t The animation parameter [0.0 - 1.0].
|
|
147
|
+
* @returns This Transform instance.
|
|
148
|
+
*/
|
|
149
|
+
setT(t: number): Transform;
|
|
150
|
+
/**
|
|
151
|
+
* Sets the first animation variable (t1).
|
|
152
|
+
*
|
|
153
|
+
* @param t1 The animation start limit.
|
|
154
|
+
* @returns This Transform instance.
|
|
155
|
+
*/
|
|
156
|
+
setT1(t1: number): Transform;
|
|
157
|
+
/**
|
|
158
|
+
* Sets the second animation variable (t2).
|
|
159
|
+
*
|
|
160
|
+
* @param t2 The animation end limit.
|
|
161
|
+
* @returns This Transform instance.
|
|
162
|
+
*/
|
|
163
|
+
setT2(t2: number): Transform;
|
|
164
|
+
/**
|
|
165
|
+
* Sets the absolute translation coordinate.
|
|
166
|
+
*/
|
|
167
|
+
move(p: Vec3Type): Transform;
|
|
168
|
+
/**
|
|
169
|
+
* Translates (shifts) the coordinate relative to its current orientation in local space.
|
|
170
|
+
*
|
|
171
|
+
* @param offset The distance vector to shift.
|
|
172
|
+
* @returns This Transform instance.
|
|
173
|
+
*/
|
|
174
|
+
shift(offset: Vec3Type): Transform;
|
|
175
|
+
/**
|
|
176
|
+
* Translates (shifts) the coordinate relative to the world coordinate system.
|
|
177
|
+
*
|
|
178
|
+
* @param offset The distance vector to shift in world space.
|
|
179
|
+
* @returns This Transform instance.
|
|
180
|
+
*/
|
|
181
|
+
shiftWorld(offset: Vec3Type): Transform;
|
|
182
|
+
/**
|
|
183
|
+
* Sets the absolute rotation of the matrix using a Quaternion, euler angles, or axis angle.
|
|
184
|
+
*
|
|
185
|
+
* @param angle Rotation angle details.
|
|
186
|
+
* @returns This Transform instance.
|
|
187
|
+
*/
|
|
188
|
+
setRotation(angle: Quaternion | Vec3Type | number): Transform;
|
|
189
|
+
/**
|
|
190
|
+
* Returns the current rotation as a Quaternion.
|
|
191
|
+
* Equivalent to the `rotation` getter but in method form for API symmetry.
|
|
192
|
+
*/
|
|
193
|
+
getRotation(): Quaternion;
|
|
194
|
+
/**
|
|
195
|
+
* @internal Accumulated Euler angle (radians) used internally by {@link setRotationX}.
|
|
196
|
+
* **Do not set this field directly** — doing so will desynchronize the quaternion.
|
|
197
|
+
* Use {@link setRotationX} instead.
|
|
198
|
+
*/
|
|
199
|
+
rotation_x: number;
|
|
200
|
+
/**
|
|
201
|
+
* @internal Accumulated Euler angle (radians) used internally by {@link setRotationY}.
|
|
202
|
+
* **Do not set this field directly** — use {@link setRotationY} instead.
|
|
203
|
+
*/
|
|
204
|
+
rotation_y: number;
|
|
205
|
+
/**
|
|
206
|
+
* @internal Accumulated Euler angle (radians) used internally by {@link setRotationZ}.
|
|
207
|
+
* **Do not set this field directly** — use {@link setRotationZ} instead.
|
|
208
|
+
*/
|
|
209
|
+
rotation_z: number;
|
|
210
|
+
/**
|
|
211
|
+
* Sets rotation around the X-axis.
|
|
212
|
+
*
|
|
213
|
+
* @param angle Target angle in radians.
|
|
214
|
+
* @param anchor Optional local-space anchor to rotate around.
|
|
215
|
+
*/
|
|
216
|
+
setRotationX(angle: number, anchor?: Vec3Type): Transform;
|
|
217
|
+
/**
|
|
218
|
+
* Sets rotation around the Y-axis.
|
|
219
|
+
*
|
|
220
|
+
* @param angle Target angle in radians.
|
|
221
|
+
* @param anchor Optional local-space anchor to rotate around.
|
|
222
|
+
*/
|
|
223
|
+
setRotationY(angle: number, anchor?: Vec3Type): Transform;
|
|
224
|
+
/**
|
|
225
|
+
* Sets rotation around the Z-axis.
|
|
226
|
+
*
|
|
227
|
+
* @param angle Target angle in radians.
|
|
228
|
+
* @param anchor Optional local-space anchor to rotate around.
|
|
229
|
+
*/
|
|
230
|
+
setRotationZ(angle: number, anchor?: Vec3Type): Transform;
|
|
231
|
+
/**
|
|
232
|
+
* Applies incremental local rotation.
|
|
233
|
+
*
|
|
234
|
+
* @param angle Incremental rotation details.
|
|
235
|
+
*/
|
|
236
|
+
rotate(angle: Quaternion | Vec3Type | number, anchor?: Vec3Type): Transform;
|
|
237
|
+
/**
|
|
238
|
+
* Rotates the transform around its local X-axis.
|
|
239
|
+
*
|
|
240
|
+
* @param angle Angle to rotate in radians.
|
|
241
|
+
* @param anchor Optional local-space anchor to rotate around.
|
|
242
|
+
*/
|
|
243
|
+
rotateX(angle: number, anchor?: Vec3Type): Transform;
|
|
244
|
+
/**
|
|
245
|
+
* Rotates the transform around its local Y-axis.
|
|
246
|
+
*
|
|
247
|
+
* @param angle Angle to rotate in radians.
|
|
248
|
+
* @param anchor Optional local-space anchor to rotate around.
|
|
249
|
+
*/
|
|
250
|
+
rotateY(angle: number, anchor?: Vec3Type): Transform;
|
|
251
|
+
/**
|
|
252
|
+
* Rotates the transform around its local Z-axis.
|
|
253
|
+
*
|
|
254
|
+
* @param angle Angle to rotate in radians.
|
|
255
|
+
* @param anchor Optional local-space anchor to rotate around.
|
|
256
|
+
*/
|
|
257
|
+
rotateZ(angle: number, anchor?: Vec3Type): Transform;
|
|
258
|
+
/**
|
|
259
|
+
* Applies incremental world rotation.
|
|
260
|
+
*
|
|
261
|
+
* @param angle Incremental rotation details in world space.
|
|
262
|
+
*/
|
|
263
|
+
rotateWorld(angle: Quaternion | Vec3Type | number, anchorWorld?: Vec3Type): Transform;
|
|
264
|
+
/**
|
|
265
|
+
* Applies incremental world rotation around the X-axis.
|
|
266
|
+
* @param anchorWorld Optional world-space anchor to rotate around.
|
|
267
|
+
*/
|
|
268
|
+
rotateWorldX(angle: number, anchorWorld?: Vec3Type): Transform;
|
|
269
|
+
/**
|
|
270
|
+
* Applies incremental world rotation around the Y-axis.
|
|
271
|
+
* @param anchorWorld Optional world-space anchor to rotate around.
|
|
272
|
+
*/
|
|
273
|
+
rotateWorldY(angle: number, anchorWorld?: Vec3Type): Transform;
|
|
274
|
+
/**
|
|
275
|
+
* Applies incremental world rotation around the Z-axis.
|
|
276
|
+
* @param anchorWorld Optional world-space anchor to rotate around.
|
|
277
|
+
*/
|
|
278
|
+
rotateWorldZ(angle: number, anchorWorld?: Vec3Type): Transform;
|
|
279
|
+
/**
|
|
280
|
+
* Sets absolute scale.
|
|
281
|
+
* Optionally scales around a specific local anchor point.
|
|
282
|
+
*/
|
|
283
|
+
setScale(scale: Vec3Type | number, anchor?: Vec3Type): Transform;
|
|
284
|
+
/**
|
|
285
|
+
* Applies incremental scaling relative to local coordinates.
|
|
286
|
+
* Optionally scales around a specific local anchor point.
|
|
287
|
+
*/
|
|
288
|
+
scale(factor: Vec3Type | number, anchor?: Vec3Type): Transform;
|
|
289
|
+
/**
|
|
290
|
+
* Applies incremental scaling relative to world axes.
|
|
291
|
+
* Optionally scales around a specific world-space anchor point.
|
|
292
|
+
*/
|
|
293
|
+
scaleWorld(factor: Vec3Type | number, anchor?: Vec3Type): Transform;
|
|
294
|
+
/**
|
|
295
|
+
* Updates the offset to a new value, and counter-translates the matrix
|
|
296
|
+
* so that the absolute world position of the geometry remains perfectly stationary.
|
|
297
|
+
*/
|
|
298
|
+
syncOffset(newOffset: Vec3Type): Transform;
|
|
299
|
+
/**
|
|
300
|
+
* Moves the local origin (offset) to the specified world coordinate,
|
|
301
|
+
* maintaining the object's exact visual position in the world.
|
|
302
|
+
* If the entity belongs to a parent hierarchy, pass the effective parent
|
|
303
|
+
* world matrix to correctly invert through all parent transformations.
|
|
304
|
+
*
|
|
305
|
+
* @param anchorWorld The world coordinate to become the new pivot.
|
|
306
|
+
* @param parentMatrix Optional parent effective world matrix.
|
|
307
|
+
*/
|
|
308
|
+
setPivot(anchorWorld: Vec3Type, parentMatrix?: Mat4): Transform;
|
|
309
|
+
/**
|
|
310
|
+
* Returns the current offset as a Vec3.
|
|
311
|
+
* Equivalent to the `offset` getter but in method form for API symmetry.
|
|
312
|
+
*/
|
|
313
|
+
getOffset(): Vec3;
|
|
314
|
+
/**
|
|
315
|
+
* Retrieves the scaling components of the transformation matrix as a Vec3.
|
|
316
|
+
*/
|
|
317
|
+
getScale(): Vec3;
|
|
318
|
+
/** Reads the current X scale factor. Zero-allocations. */
|
|
319
|
+
getScaleX(): number;
|
|
320
|
+
/** Reads the current Y scale factor. Zero-allocations. */
|
|
321
|
+
getScaleY(): number;
|
|
322
|
+
/** Reads the current Z scale factor. Zero-allocations. */
|
|
323
|
+
getScaleZ(): number;
|
|
324
|
+
/**
|
|
325
|
+
* Returns the size (in bytes) of a single transform data layout.
|
|
326
|
+
*/
|
|
327
|
+
static size(): number;
|
|
328
|
+
private static _scratchMat;
|
|
329
|
+
/**
|
|
330
|
+
* Combines a parent transform with a child transform.
|
|
331
|
+
* Correctly incorporates the parent's local offset into the hierarchical world matrix.
|
|
332
|
+
*/
|
|
333
|
+
apply(childTransform: Transform, parentTransform: Transform): void;
|
|
334
|
+
/**
|
|
335
|
+
* Synchronizes raw data from another Transform instance.
|
|
336
|
+
*
|
|
337
|
+
* @param transform Source transform.
|
|
338
|
+
*/
|
|
339
|
+
set(transform: Transform): void;
|
|
340
|
+
/**
|
|
341
|
+
* Clones this transform into a new separate memory buffer instance.
|
|
342
|
+
*/
|
|
343
|
+
copy(): Transform;
|
|
344
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { RenderView } from '../camera/RenderView';
|
|
2
|
+
export interface PersistentRegion {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
w: number;
|
|
6
|
+
h: number;
|
|
7
|
+
}
|
|
8
|
+
export interface UIConfig {
|
|
9
|
+
orthoScale?: number;
|
|
10
|
+
position?: [number, number, number];
|
|
11
|
+
clearDepth?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Manages UI camera initialization and canvas persistence state.
|
|
15
|
+
*/
|
|
16
|
+
export declare class UIManager {
|
|
17
|
+
isPersistent: boolean;
|
|
18
|
+
persistentRegion?: PersistentRegion;
|
|
19
|
+
forceClearNext: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Initializes an orthographic camera dedicated to rendering UI layers over 3D scenes.
|
|
22
|
+
*/
|
|
23
|
+
setupUICamera(uiView: RenderView | null, canvasWidth: number, canvasHeight: number, createViewFn: (w: number, h: number) => RenderView, config?: UIConfig): RenderView | null;
|
|
24
|
+
setPersistence(enable: boolean, onInvalidate: () => void): void;
|
|
25
|
+
setPersistentRegion(x: number, y: number, w: number, h: number, onInvalidate: () => void): void;
|
|
26
|
+
clearPersistentRegion(onInvalidate: () => void): void;
|
|
27
|
+
clearNextFrame(onInvalidate: () => void): void;
|
|
28
|
+
}
|