manim-web 0.2.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/LICENSE +21 -0
- package/README.md +109 -0
- package/dist/animation/Animation.d.ts +69 -0
- package/dist/animation/Animation.d.ts.map +1 -0
- package/dist/animation/AnimationGroup.d.ts +48 -0
- package/dist/animation/AnimationGroup.d.ts.map +1 -0
- package/dist/animation/LaggedStart.d.ts +25 -0
- package/dist/animation/LaggedStart.d.ts.map +1 -0
- package/dist/animation/MaintainPositionRelativeTo.d.ts +23 -0
- package/dist/animation/MaintainPositionRelativeTo.d.ts.map +1 -0
- package/dist/animation/Succession.d.ts +19 -0
- package/dist/animation/Succession.d.ts.map +1 -0
- package/dist/animation/Timeline.d.ts +89 -0
- package/dist/animation/Timeline.d.ts.map +1 -0
- package/dist/animation/UpdateFromAlphaFunc.d.ts +32 -0
- package/dist/animation/UpdateFromAlphaFunc.d.ts.map +1 -0
- package/dist/animation/UpdateFromFunc.d.ts +30 -0
- package/dist/animation/UpdateFromFunc.d.ts.map +1 -0
- package/dist/animation/changing/index.d.ts +213 -0
- package/dist/animation/changing/index.d.ts.map +1 -0
- package/dist/animation/composition/LaggedStartMap.d.ts +47 -0
- package/dist/animation/composition/LaggedStartMap.d.ts.map +1 -0
- package/dist/animation/composition/index.d.ts +5 -0
- package/dist/animation/composition/index.d.ts.map +1 -0
- package/dist/animation/creation/Create.d.ts +232 -0
- package/dist/animation/creation/Create.d.ts.map +1 -0
- package/dist/animation/creation/CreationExtensions.d.ts +127 -0
- package/dist/animation/creation/CreationExtensions.d.ts.map +1 -0
- package/dist/animation/creation/TypeWithCursor.d.ts +133 -0
- package/dist/animation/creation/TypeWithCursor.d.ts.map +1 -0
- package/dist/animation/creation/index.d.ts +4 -0
- package/dist/animation/creation/index.d.ts.map +1 -0
- package/dist/animation/fading/FadeIn.d.ts +31 -0
- package/dist/animation/fading/FadeIn.d.ts.map +1 -0
- package/dist/animation/fading/FadeOut.d.ts +32 -0
- package/dist/animation/fading/FadeOut.d.ts.map +1 -0
- package/dist/animation/fading/index.d.ts +3 -0
- package/dist/animation/fading/index.d.ts.map +1 -0
- package/dist/animation/growing/index.d.ts +103 -0
- package/dist/animation/growing/index.d.ts.map +1 -0
- package/dist/animation/index.d.ts +20 -0
- package/dist/animation/index.d.ts.map +1 -0
- package/dist/animation/indication/ApplyWave.d.ts +51 -0
- package/dist/animation/indication/ApplyWave.d.ts.map +1 -0
- package/dist/animation/indication/Blink.d.ts +34 -0
- package/dist/animation/indication/Blink.d.ts.map +1 -0
- package/dist/animation/indication/Circumscribe.d.ts +54 -0
- package/dist/animation/indication/Circumscribe.d.ts.map +1 -0
- package/dist/animation/indication/Flash.d.ts +45 -0
- package/dist/animation/indication/Flash.d.ts.map +1 -0
- package/dist/animation/indication/FocusOn.d.ts +79 -0
- package/dist/animation/indication/FocusOn.d.ts.map +1 -0
- package/dist/animation/indication/Indicate.d.ts +30 -0
- package/dist/animation/indication/Indicate.d.ts.map +1 -0
- package/dist/animation/indication/ShowCreationThenDestruction.d.ts +26 -0
- package/dist/animation/indication/ShowCreationThenDestruction.d.ts.map +1 -0
- package/dist/animation/indication/ShowPassingFlash.d.ts +47 -0
- package/dist/animation/indication/ShowPassingFlash.d.ts.map +1 -0
- package/dist/animation/indication/ShowPassingFlashWithThinningStrokeWidth.d.ts +21 -0
- package/dist/animation/indication/ShowPassingFlashWithThinningStrokeWidth.d.ts.map +1 -0
- package/dist/animation/indication/Wiggle.d.ts +48 -0
- package/dist/animation/indication/Wiggle.d.ts.map +1 -0
- package/dist/animation/indication/WiggleOutThenIn.d.ts +44 -0
- package/dist/animation/indication/WiggleOutThenIn.d.ts.map +1 -0
- package/dist/animation/indication/index.d.ts +20 -0
- package/dist/animation/indication/index.d.ts.map +1 -0
- package/dist/animation/movement/Homotopy.d.ts +204 -0
- package/dist/animation/movement/Homotopy.d.ts.map +1 -0
- package/dist/animation/movement/MoveAlongPath.d.ts +48 -0
- package/dist/animation/movement/MoveAlongPath.d.ts.map +1 -0
- package/dist/animation/movement/Rotate.d.ts +47 -0
- package/dist/animation/movement/Rotate.d.ts.map +1 -0
- package/dist/animation/movement/Scale.d.ts +74 -0
- package/dist/animation/movement/Scale.d.ts.map +1 -0
- package/dist/animation/movement/Shift.d.ts +74 -0
- package/dist/animation/movement/Shift.d.ts.map +1 -0
- package/dist/animation/movement/index.d.ts +6 -0
- package/dist/animation/movement/index.d.ts.map +1 -0
- package/dist/animation/numbers/index.d.ts +152 -0
- package/dist/animation/numbers/index.d.ts.map +1 -0
- package/dist/animation/speed/index.d.ts +114 -0
- package/dist/animation/speed/index.d.ts.map +1 -0
- package/dist/animation/transform/ApplyPointwiseFunction.d.ts +23 -0
- package/dist/animation/transform/ApplyPointwiseFunction.d.ts.map +1 -0
- package/dist/animation/transform/Transform.d.ts +89 -0
- package/dist/animation/transform/Transform.d.ts.map +1 -0
- package/dist/animation/transform/TransformExtensions.d.ts +444 -0
- package/dist/animation/transform/TransformExtensions.d.ts.map +1 -0
- package/dist/animation/transform/TransformMatching.d.ts +138 -0
- package/dist/animation/transform/TransformMatching.d.ts.map +1 -0
- package/dist/animation/transform/index.d.ts +5 -0
- package/dist/animation/transform/index.d.ts.map +1 -0
- package/dist/animation/utility/index.d.ts +171 -0
- package/dist/animation/utility/index.d.ts.map +1 -0
- package/dist/constants/colors.d.ts +72 -0
- package/dist/constants/colors.d.ts.map +1 -0
- package/dist/constants/colors.test.d.ts +2 -0
- package/dist/constants/colors.test.d.ts.map +1 -0
- package/dist/constants/directions.test.d.ts +2 -0
- package/dist/constants/directions.test.d.ts.map +1 -0
- package/dist/constants/index.d.ts +16 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/core/AudioManager.d.ts +203 -0
- package/dist/core/AudioManager.d.ts.map +1 -0
- package/dist/core/Camera.d.ts +172 -0
- package/dist/core/Camera.d.ts.map +1 -0
- package/dist/core/Camera2DFrame.d.ts +31 -0
- package/dist/core/Camera2DFrame.d.ts.map +1 -0
- package/dist/core/CameraExtensions.d.ts +420 -0
- package/dist/core/CameraExtensions.d.ts.map +1 -0
- package/dist/core/CameraFrame.d.ts +178 -0
- package/dist/core/CameraFrame.d.ts.map +1 -0
- package/dist/core/Group.d.ts +139 -0
- package/dist/core/Group.d.ts.map +1 -0
- package/dist/core/InteractiveScene.d.ts +122 -0
- package/dist/core/InteractiveScene.d.ts.map +1 -0
- package/dist/core/Lighting.d.ts +128 -0
- package/dist/core/Lighting.d.ts.map +1 -0
- package/dist/core/Mobject.d.ts +488 -0
- package/dist/core/Mobject.d.ts.map +1 -0
- package/dist/core/Renderer.d.ts +84 -0
- package/dist/core/Renderer.d.ts.map +1 -0
- package/dist/core/Scene.d.ts +353 -0
- package/dist/core/Scene.d.ts.map +1 -0
- package/dist/core/SceneExtensions.d.ts +640 -0
- package/dist/core/SceneExtensions.d.ts.map +1 -0
- package/dist/core/SceneExtensions.test.d.ts +2 -0
- package/dist/core/SceneExtensions.test.d.ts.map +1 -0
- package/dist/core/StateManager.d.ts +193 -0
- package/dist/core/StateManager.d.ts.map +1 -0
- package/dist/core/VDict.d.ts +229 -0
- package/dist/core/VDict.d.ts.map +1 -0
- package/dist/core/VGroup.d.ts +200 -0
- package/dist/core/VGroup.d.ts.map +1 -0
- package/dist/core/VMobject.d.ts +419 -0
- package/dist/core/VMobject.d.ts.map +1 -0
- package/dist/core/index.d.ts +16 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/examples.test.d.ts +2 -0
- package/dist/examples.test.d.ts.map +1 -0
- package/dist/export/GifExporter.d.ts +40 -0
- package/dist/export/GifExporter.d.ts.map +1 -0
- package/dist/export/VideoExporter.d.ts +135 -0
- package/dist/export/VideoExporter.d.ts.map +1 -0
- package/dist/export/index.d.ts +3 -0
- package/dist/export/index.d.ts.map +1 -0
- package/dist/index.d.ts +65 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +49064 -0
- package/dist/integrations/index.d.ts +1 -0
- package/dist/integrations/index.d.ts.map +1 -0
- package/dist/integrations/react.d.ts +144 -0
- package/dist/integrations/react.d.ts.map +1 -0
- package/dist/integrations/react.js +570 -0
- package/dist/integrations/vue.d.ts +249 -0
- package/dist/integrations/vue.d.ts.map +1 -0
- package/dist/integrations/vue.js +560 -0
- package/dist/interaction/Clickable.d.ts +71 -0
- package/dist/interaction/Clickable.d.ts.map +1 -0
- package/dist/interaction/Controls.d.ts +174 -0
- package/dist/interaction/Controls.d.ts.map +1 -0
- package/dist/interaction/Draggable.d.ts +88 -0
- package/dist/interaction/Draggable.d.ts.map +1 -0
- package/dist/interaction/Hoverable.d.ts +82 -0
- package/dist/interaction/Hoverable.d.ts.map +1 -0
- package/dist/interaction/OrbitControls.d.ts +139 -0
- package/dist/interaction/OrbitControls.d.ts.map +1 -0
- package/dist/interaction/PlaybackControls.d.ts +113 -0
- package/dist/interaction/PlaybackControls.d.ts.map +1 -0
- package/dist/interaction/SelectionManager.d.ts +125 -0
- package/dist/interaction/SelectionManager.d.ts.map +1 -0
- package/dist/interaction/index.d.ts +12 -0
- package/dist/interaction/index.d.ts.map +1 -0
- package/dist/mobjects/fractals/MandelbrotSet.d.ts +92 -0
- package/dist/mobjects/fractals/MandelbrotSet.d.ts.map +1 -0
- package/dist/mobjects/fractals/NewtonFractal.d.ts +121 -0
- package/dist/mobjects/fractals/NewtonFractal.d.ts.map +1 -0
- package/dist/mobjects/fractals/index.d.ts +3 -0
- package/dist/mobjects/fractals/index.d.ts.map +1 -0
- package/dist/mobjects/frame/index.d.ts +188 -0
- package/dist/mobjects/frame/index.d.ts.map +1 -0
- package/dist/mobjects/geometry/AngleShapes.d.ts +326 -0
- package/dist/mobjects/geometry/AngleShapes.d.ts.map +1 -0
- package/dist/mobjects/geometry/Arc.d.ts +111 -0
- package/dist/mobjects/geometry/Arc.d.ts.map +1 -0
- package/dist/mobjects/geometry/ArcBetweenPoints.d.ts +68 -0
- package/dist/mobjects/geometry/ArcBetweenPoints.d.ts.map +1 -0
- package/dist/mobjects/geometry/ArcShapes.d.ts +659 -0
- package/dist/mobjects/geometry/ArcShapes.d.ts.map +1 -0
- package/dist/mobjects/geometry/Arrow.d.ts +130 -0
- package/dist/mobjects/geometry/Arrow.d.ts.map +1 -0
- package/dist/mobjects/geometry/ArrowTips.d.ts +238 -0
- package/dist/mobjects/geometry/ArrowTips.d.ts.map +1 -0
- package/dist/mobjects/geometry/BooleanOperations.d.ts +163 -0
- package/dist/mobjects/geometry/BooleanOperations.d.ts.map +1 -0
- package/dist/mobjects/geometry/Circle.d.ts +92 -0
- package/dist/mobjects/geometry/Circle.d.ts.map +1 -0
- package/dist/mobjects/geometry/CubicBezier.d.ts +126 -0
- package/dist/mobjects/geometry/CubicBezier.d.ts.map +1 -0
- package/dist/mobjects/geometry/DashedLine.d.ts +109 -0
- package/dist/mobjects/geometry/DashedLine.d.ts.map +1 -0
- package/dist/mobjects/geometry/DashedVMobject.d.ts +96 -0
- package/dist/mobjects/geometry/DashedVMobject.d.ts.map +1 -0
- package/dist/mobjects/geometry/Dot.d.ts +100 -0
- package/dist/mobjects/geometry/Dot.d.ts.map +1 -0
- package/dist/mobjects/geometry/LabeledGeometry.d.ts +372 -0
- package/dist/mobjects/geometry/LabeledGeometry.d.ts.map +1 -0
- package/dist/mobjects/geometry/Line.d.ts +83 -0
- package/dist/mobjects/geometry/Line.d.ts.map +1 -0
- package/dist/mobjects/geometry/Polygon.d.ts +155 -0
- package/dist/mobjects/geometry/Polygon.d.ts.map +1 -0
- package/dist/mobjects/geometry/PolygonExtensions.d.ts +412 -0
- package/dist/mobjects/geometry/PolygonExtensions.d.ts.map +1 -0
- package/dist/mobjects/geometry/Rectangle.d.ts +123 -0
- package/dist/mobjects/geometry/Rectangle.d.ts.map +1 -0
- package/dist/mobjects/geometry/ShapeMatchers.d.ts +252 -0
- package/dist/mobjects/geometry/ShapeMatchers.d.ts.map +1 -0
- package/dist/mobjects/geometry/index.d.ts +25 -0
- package/dist/mobjects/geometry/index.d.ts.map +1 -0
- package/dist/mobjects/graph/index.d.ts +425 -0
- package/dist/mobjects/graph/index.d.ts.map +1 -0
- package/dist/mobjects/graphing/Axes.d.ts +254 -0
- package/dist/mobjects/graphing/Axes.d.ts.map +1 -0
- package/dist/mobjects/graphing/BarChart.d.ts +241 -0
- package/dist/mobjects/graphing/BarChart.d.ts.map +1 -0
- package/dist/mobjects/graphing/ComplexPlane.d.ts +311 -0
- package/dist/mobjects/graphing/ComplexPlane.d.ts.map +1 -0
- package/dist/mobjects/graphing/FunctionGraph.d.ts +123 -0
- package/dist/mobjects/graphing/FunctionGraph.d.ts.map +1 -0
- package/dist/mobjects/graphing/ImplicitFunction.d.ts +131 -0
- package/dist/mobjects/graphing/ImplicitFunction.d.ts.map +1 -0
- package/dist/mobjects/graphing/NumberLine.d.ts +195 -0
- package/dist/mobjects/graphing/NumberLine.d.ts.map +1 -0
- package/dist/mobjects/graphing/NumberPlane.d.ts +91 -0
- package/dist/mobjects/graphing/NumberPlane.d.ts.map +1 -0
- package/dist/mobjects/graphing/ParametricFunction.d.ts +111 -0
- package/dist/mobjects/graphing/ParametricFunction.d.ts.map +1 -0
- package/dist/mobjects/graphing/Vector.d.ts +121 -0
- package/dist/mobjects/graphing/Vector.d.ts.map +1 -0
- package/dist/mobjects/graphing/VectorField.d.ts +321 -0
- package/dist/mobjects/graphing/VectorField.d.ts.map +1 -0
- package/dist/mobjects/graphing/index.d.ts +18 -0
- package/dist/mobjects/graphing/index.d.ts.map +1 -0
- package/dist/mobjects/image/index.d.ts +223 -0
- package/dist/mobjects/image/index.d.ts.map +1 -0
- package/dist/mobjects/matrix/Matrix.d.ts +260 -0
- package/dist/mobjects/matrix/Matrix.d.ts.map +1 -0
- package/dist/mobjects/matrix/index.d.ts +8 -0
- package/dist/mobjects/matrix/index.d.ts.map +1 -0
- package/dist/mobjects/point/index.d.ts +707 -0
- package/dist/mobjects/point/index.d.ts.map +1 -0
- package/dist/mobjects/probability/DiceFace.d.ts +137 -0
- package/dist/mobjects/probability/DiceFace.d.ts.map +1 -0
- package/dist/mobjects/probability/SampleSpace.d.ts +267 -0
- package/dist/mobjects/probability/SampleSpace.d.ts.map +1 -0
- package/dist/mobjects/probability/index.d.ts +9 -0
- package/dist/mobjects/probability/index.d.ts.map +1 -0
- package/dist/mobjects/svg/Brace.d.ts +308 -0
- package/dist/mobjects/svg/Brace.d.ts.map +1 -0
- package/dist/mobjects/svg/SVGMobject.d.ts +64 -0
- package/dist/mobjects/svg/SVGMobject.d.ts.map +1 -0
- package/dist/mobjects/svg/index.d.ts +10 -0
- package/dist/mobjects/svg/index.d.ts.map +1 -0
- package/dist/mobjects/table/Table.d.ts +315 -0
- package/dist/mobjects/table/Table.d.ts.map +1 -0
- package/dist/mobjects/table/index.d.ts +8 -0
- package/dist/mobjects/table/index.d.ts.map +1 -0
- package/dist/mobjects/text/Code.d.ts +244 -0
- package/dist/mobjects/text/Code.d.ts.map +1 -0
- package/dist/mobjects/text/DecimalNumber.d.ts +199 -0
- package/dist/mobjects/text/DecimalNumber.d.ts.map +1 -0
- package/dist/mobjects/text/GlyphVMobject.d.ts +76 -0
- package/dist/mobjects/text/GlyphVMobject.d.ts.map +1 -0
- package/dist/mobjects/text/MarkupText.d.ts +161 -0
- package/dist/mobjects/text/MarkupText.d.ts.map +1 -0
- package/dist/mobjects/text/MathJaxRenderer.d.ts +49 -0
- package/dist/mobjects/text/MathJaxRenderer.d.ts.map +1 -0
- package/dist/mobjects/text/MathTex.d.ts +242 -0
- package/dist/mobjects/text/MathTex.d.ts.map +1 -0
- package/dist/mobjects/text/Paragraph.d.ts +86 -0
- package/dist/mobjects/text/Paragraph.d.ts.map +1 -0
- package/dist/mobjects/text/Tex.d.ts +40 -0
- package/dist/mobjects/text/Tex.d.ts.map +1 -0
- package/dist/mobjects/text/Text.d.ts +171 -0
- package/dist/mobjects/text/Text.d.ts.map +1 -0
- package/dist/mobjects/text/TextExtensions.d.ts +383 -0
- package/dist/mobjects/text/TextExtensions.d.ts.map +1 -0
- package/dist/mobjects/text/TextGlyphGroup.d.ts +48 -0
- package/dist/mobjects/text/TextGlyphGroup.d.ts.map +1 -0
- package/dist/mobjects/text/Variable.d.ts +160 -0
- package/dist/mobjects/text/Variable.d.ts.map +1 -0
- package/dist/mobjects/text/index.d.ts +21 -0
- package/dist/mobjects/text/index.d.ts.map +1 -0
- package/dist/mobjects/text/katex-styles.d.ts +23 -0
- package/dist/mobjects/text/katex-styles.d.ts.map +1 -0
- package/dist/mobjects/text/svgPathParser.d.ts +39 -0
- package/dist/mobjects/text/svgPathParser.d.ts.map +1 -0
- package/dist/mobjects/three-d/Arrow3D.d.ts +136 -0
- package/dist/mobjects/three-d/Arrow3D.d.ts.map +1 -0
- package/dist/mobjects/three-d/Cube.d.ts +186 -0
- package/dist/mobjects/three-d/Cube.d.ts.map +1 -0
- package/dist/mobjects/three-d/Cylinder.d.ts +189 -0
- package/dist/mobjects/three-d/Cylinder.d.ts.map +1 -0
- package/dist/mobjects/three-d/Line3D.d.ts +100 -0
- package/dist/mobjects/three-d/Line3D.d.ts.map +1 -0
- package/dist/mobjects/three-d/ParametricSurface.d.ts +86 -0
- package/dist/mobjects/three-d/ParametricSurface.d.ts.map +1 -0
- package/dist/mobjects/three-d/Polyhedra.d.ts +271 -0
- package/dist/mobjects/three-d/Polyhedra.d.ts.map +1 -0
- package/dist/mobjects/three-d/Sphere.d.ts +100 -0
- package/dist/mobjects/three-d/Sphere.d.ts.map +1 -0
- package/dist/mobjects/three-d/Surface3D.d.ts +156 -0
- package/dist/mobjects/three-d/Surface3D.d.ts.map +1 -0
- package/dist/mobjects/three-d/TexturedSurface.d.ts +208 -0
- package/dist/mobjects/three-d/TexturedSurface.d.ts.map +1 -0
- package/dist/mobjects/three-d/ThreeDAxes.d.ts +172 -0
- package/dist/mobjects/three-d/ThreeDAxes.d.ts.map +1 -0
- package/dist/mobjects/three-d/ThreeDExtensions.d.ts +335 -0
- package/dist/mobjects/three-d/ThreeDExtensions.d.ts.map +1 -0
- package/dist/mobjects/three-d/Torus.d.ts +123 -0
- package/dist/mobjects/three-d/Torus.d.ts.map +1 -0
- package/dist/mobjects/three-d/index.d.ts +19 -0
- package/dist/mobjects/three-d/index.d.ts.map +1 -0
- package/dist/mobjects/value-tracker/ValueTracker.d.ts +248 -0
- package/dist/mobjects/value-tracker/ValueTracker.d.ts.map +1 -0
- package/dist/mobjects/value-tracker/index.d.ts +9 -0
- package/dist/mobjects/value-tracker/index.d.ts.map +1 -0
- package/dist/rate-functions/index.d.ts +81 -0
- package/dist/rate-functions/index.d.ts.map +1 -0
- package/dist/rate-functions/rateFunctions.test.d.ts +2 -0
- package/dist/rate-functions/rateFunctions.test.d.ts.map +1 -0
- package/dist/rendering/BezierRenderer.d.ts +112 -0
- package/dist/rendering/BezierRenderer.d.ts.map +1 -0
- package/dist/rendering/BezierShaderMaterial.d.ts +50 -0
- package/dist/rendering/BezierShaderMaterial.d.ts.map +1 -0
- package/dist/rendering/index.d.ts +10 -0
- package/dist/rendering/index.d.ts.map +1 -0
- package/dist/utils/Performance.d.ts +118 -0
- package/dist/utils/Performance.d.ts.map +1 -0
- package/dist/utils/featureFlags.d.ts +15 -0
- package/dist/utils/featureFlags.d.ts.map +1 -0
- package/dist/utils/hungarian.d.ts +66 -0
- package/dist/utils/hungarian.d.ts.map +1 -0
- package/dist/utils/logger.d.ts +14 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/math.d.ts +52 -0
- package/dist/utils/math.d.ts.map +1 -0
- package/dist/utils/ode.d.ts +135 -0
- package/dist/utils/ode.d.ts.map +1 -0
- package/dist/utils/skeletonize.d.ts +35 -0
- package/dist/utils/skeletonize.d.ts.map +1 -0
- package/dist/utils/triangulate.d.ts +54 -0
- package/dist/utils/triangulate.d.ts.map +1 -0
- package/dist/utils/vectors.d.ts +57 -0
- package/dist/utils/vectors.d.ts.map +1 -0
- package/package.json +122 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { Mobject, Vector3Tuple } from './Mobject';
|
|
2
|
+
/**
|
|
3
|
+
* Group class for grouping multiple mobjects together.
|
|
4
|
+
* Transformations applied to the group cascade to all children.
|
|
5
|
+
*/
|
|
6
|
+
import * as THREE from 'three';
|
|
7
|
+
/**
|
|
8
|
+
* A Group is a Mobject that contains other Mobjects.
|
|
9
|
+
* Operations on the group apply to all children.
|
|
10
|
+
*/
|
|
11
|
+
export declare class Group extends Mobject {
|
|
12
|
+
/**
|
|
13
|
+
* Create a new Group containing the given mobjects.
|
|
14
|
+
* @param mobjects - Mobjects to add to the group
|
|
15
|
+
*/
|
|
16
|
+
constructor(...mobjects: Mobject[]);
|
|
17
|
+
/**
|
|
18
|
+
* Add a mobject to this group.
|
|
19
|
+
* @param mobject - Mobject to add
|
|
20
|
+
* @returns this for chaining
|
|
21
|
+
*/
|
|
22
|
+
add(mobject: Mobject): this;
|
|
23
|
+
/**
|
|
24
|
+
* Remove a mobject from this group.
|
|
25
|
+
* @param mobject - Mobject to remove
|
|
26
|
+
* @returns this for chaining
|
|
27
|
+
*/
|
|
28
|
+
remove(mobject: Mobject): this;
|
|
29
|
+
/**
|
|
30
|
+
* Remove all children from this group.
|
|
31
|
+
* @returns this for chaining
|
|
32
|
+
*/
|
|
33
|
+
clear(): this;
|
|
34
|
+
/**
|
|
35
|
+
* Get the center of the group (average of all children centers).
|
|
36
|
+
* Children maintain world-space coordinates, so no group position offset
|
|
37
|
+
* is added (shift/moveTo only update children, not group position).
|
|
38
|
+
* @returns Center position as [x, y, z]
|
|
39
|
+
*/
|
|
40
|
+
getCenter(): Vector3Tuple;
|
|
41
|
+
/**
|
|
42
|
+
* Shift all children by the given delta.
|
|
43
|
+
* Only children are shifted (they maintain world-space coordinates).
|
|
44
|
+
* The group's own position is NOT updated to avoid double-counting
|
|
45
|
+
* when getCenter() computes the average of children centers.
|
|
46
|
+
* @param delta - Translation vector [x, y, z]
|
|
47
|
+
* @returns this for chaining
|
|
48
|
+
*/
|
|
49
|
+
shift(delta: Vector3Tuple): this;
|
|
50
|
+
/**
|
|
51
|
+
* Move the group center to the given point, or align with another Mobject.
|
|
52
|
+
* @param target - Target position [x, y, z] or Mobject to align with
|
|
53
|
+
* @param alignedEdge - Optional edge direction to align (e.g., UL aligns upper-left edges)
|
|
54
|
+
* @returns this for chaining
|
|
55
|
+
*/
|
|
56
|
+
moveTo(target: Vector3Tuple | Mobject, alignedEdge?: Vector3Tuple): this;
|
|
57
|
+
/**
|
|
58
|
+
* Rotate all children around an axis.
|
|
59
|
+
* Only children are rotated to avoid double-counting with Three.js hierarchy.
|
|
60
|
+
* @param angle - Rotation angle in radians
|
|
61
|
+
* @param axis - Axis of rotation [x, y, z], defaults to Z axis
|
|
62
|
+
* @returns this for chaining
|
|
63
|
+
*/
|
|
64
|
+
rotate(angle: number, axis?: Vector3Tuple): this;
|
|
65
|
+
/**
|
|
66
|
+
* Scale all children.
|
|
67
|
+
* Only children are scaled to avoid double-counting with Three.js hierarchy.
|
|
68
|
+
* @param factor - Scale factor (number for uniform, tuple for non-uniform)
|
|
69
|
+
* @returns this for chaining
|
|
70
|
+
*/
|
|
71
|
+
scale(factor: number | Vector3Tuple): this;
|
|
72
|
+
/**
|
|
73
|
+
* Set the color of all children.
|
|
74
|
+
* @param color - CSS color string
|
|
75
|
+
* @returns this for chaining
|
|
76
|
+
*/
|
|
77
|
+
setColor(color: string): this;
|
|
78
|
+
/**
|
|
79
|
+
* Set the opacity of all children.
|
|
80
|
+
* @param opacity - Opacity value (0-1)
|
|
81
|
+
* @returns this for chaining
|
|
82
|
+
*/
|
|
83
|
+
setOpacity(opacity: number): this;
|
|
84
|
+
/**
|
|
85
|
+
* Set the stroke width of all children.
|
|
86
|
+
* @param width - Stroke width in pixels
|
|
87
|
+
* @returns this for chaining
|
|
88
|
+
*/
|
|
89
|
+
setStrokeWidth(width: number): this;
|
|
90
|
+
/**
|
|
91
|
+
* Set the fill opacity of all children.
|
|
92
|
+
* @param opacity - Fill opacity (0-1)
|
|
93
|
+
* @returns this for chaining
|
|
94
|
+
*/
|
|
95
|
+
setFillOpacity(opacity: number): this;
|
|
96
|
+
/**
|
|
97
|
+
* Create the Three.js backing object for this Group.
|
|
98
|
+
* A group is simply a THREE.Group that contains children.
|
|
99
|
+
*/
|
|
100
|
+
protected _createThreeObject(): THREE.Object3D;
|
|
101
|
+
/**
|
|
102
|
+
* Create a copy of this Group.
|
|
103
|
+
*/
|
|
104
|
+
protected _createCopy(): Group;
|
|
105
|
+
/**
|
|
106
|
+
* Get the number of mobjects in this group.
|
|
107
|
+
*/
|
|
108
|
+
get length(): number;
|
|
109
|
+
/**
|
|
110
|
+
* Get a mobject by index.
|
|
111
|
+
* @param index - Index of the mobject
|
|
112
|
+
* @returns The mobject at the given index, or undefined
|
|
113
|
+
*/
|
|
114
|
+
get(index: number): Mobject | undefined;
|
|
115
|
+
/**
|
|
116
|
+
* Iterate over all mobjects in the group.
|
|
117
|
+
*/
|
|
118
|
+
[Symbol.iterator](): Iterator<Mobject>;
|
|
119
|
+
/**
|
|
120
|
+
* Apply a function to each mobject in the group.
|
|
121
|
+
* @param fn - Function to apply
|
|
122
|
+
* @returns this for chaining
|
|
123
|
+
*/
|
|
124
|
+
forEach(fn: (mobject: Mobject, index: number) => void): this;
|
|
125
|
+
/**
|
|
126
|
+
* Map over all mobjects in the group.
|
|
127
|
+
* @param fn - Mapping function
|
|
128
|
+
* @returns Array of mapped values
|
|
129
|
+
*/
|
|
130
|
+
map<T>(fn: (mobject: Mobject, index: number) => T): T[];
|
|
131
|
+
/**
|
|
132
|
+
* Filter mobjects in the group.
|
|
133
|
+
* @param fn - Filter predicate
|
|
134
|
+
* @returns New Group with filtered mobjects
|
|
135
|
+
*/
|
|
136
|
+
filter(fn: (mobject: Mobject, index: number) => boolean): Group;
|
|
137
|
+
}
|
|
138
|
+
export default Group;
|
|
139
|
+
//# sourceMappingURL=Group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Group.d.ts","sourceRoot":"","sources":["../../src/core/Group.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AAK,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS;IAIvC;;OAEG;IACH,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,OAAO,CAAC;IAItC;;;;OAIG;IACH,OAAO,CAAC,EAAE,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI;IAK5D;;;;OAIG;IACH,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,EAAE;IAIvD;;;;OAIG;IACH,MAAM,CAAC,EAAE,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,GAAG,KAAK;CAIhE;AAED,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { Scene, SceneOptions } from './Scene';
|
|
2
|
+
import { SelectionManager, SelectionManagerOptions } from '../interaction/SelectionManager';
|
|
3
|
+
/**
|
|
4
|
+
* InteractiveScene - ManimGL-style authoring tools for interactive editing.
|
|
5
|
+
*
|
|
6
|
+
* Extends Scene with:
|
|
7
|
+
* - Mouse-based mobject selection (via SelectionManager)
|
|
8
|
+
* - Keyboard shortcuts: undo/redo, delete, copy/paste, group/ungroup
|
|
9
|
+
* - Color palette HUD for quick color application
|
|
10
|
+
* - Drag-to-reposition for selected mobjects
|
|
11
|
+
*
|
|
12
|
+
* Usage is opt-in: create an InteractiveScene instead of Scene to enable
|
|
13
|
+
* interactive authoring tools. Regular Scene is unaffected.
|
|
14
|
+
*/
|
|
15
|
+
import * as THREE from 'three';
|
|
16
|
+
/**
|
|
17
|
+
* Options for configuring an InteractiveScene.
|
|
18
|
+
*/
|
|
19
|
+
export interface InteractiveSceneOptions extends SceneOptions {
|
|
20
|
+
/** SelectionManager configuration. */
|
|
21
|
+
selection?: SelectionManagerOptions;
|
|
22
|
+
/** Whether to show the color palette HUD on launch. Defaults to false. */
|
|
23
|
+
showColorPalette?: boolean;
|
|
24
|
+
/** Hotkey to toggle color palette. Defaults to 'c'. */
|
|
25
|
+
colorPaletteToggleKey?: string;
|
|
26
|
+
/** Whether drag-to-reposition is enabled. Defaults to true. */
|
|
27
|
+
enableDragMove?: boolean;
|
|
28
|
+
/** Whether keyboard shortcuts are enabled. Defaults to true. */
|
|
29
|
+
enableKeyboardShortcuts?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* A Scene with ManimGL-style interactive authoring tools.
|
|
33
|
+
*
|
|
34
|
+
* Features:
|
|
35
|
+
* - **Selection**: click, shift+click, box-select mobjects
|
|
36
|
+
* - **Undo/Redo**: Ctrl+Z / Ctrl+Shift+Z (uses SceneStateManager)
|
|
37
|
+
* - **Delete**: Delete/Backspace removes selected mobjects
|
|
38
|
+
* - **Copy/Paste**: Ctrl+C / Ctrl+V with slight offset
|
|
39
|
+
* - **Group/Ungroup**: Ctrl+G / Ctrl+Shift+G
|
|
40
|
+
* - **Color Palette**: press 'C' to toggle an overlay with Manim colors
|
|
41
|
+
* - **Drag Move**: drag selected mobjects to reposition them
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* const scene = new InteractiveScene(container, { showColorPalette: true });
|
|
46
|
+
* scene.add(new Circle(), new Square());
|
|
47
|
+
* // Now you can click, drag, Ctrl+Z, etc.
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
export declare class InteractiveScene extends Scene {
|
|
51
|
+
/** The selection manager handling click/box-select. */
|
|
52
|
+
readonly selection: SelectionManager;
|
|
53
|
+
private _clipboard;
|
|
54
|
+
private _interactiveOptions;
|
|
55
|
+
private _paletteContainer;
|
|
56
|
+
private _paletteVisible;
|
|
57
|
+
private _isDragging;
|
|
58
|
+
private _dragLastWorld;
|
|
59
|
+
private _mousePoint;
|
|
60
|
+
private _onKeyDown;
|
|
61
|
+
private _onMouseDownDrag;
|
|
62
|
+
private _onMouseMoveDrag;
|
|
63
|
+
private _onMouseUpDrag;
|
|
64
|
+
/**
|
|
65
|
+
* Create a new InteractiveScene.
|
|
66
|
+
* @param container - DOM element to render into
|
|
67
|
+
* @param options - Interactive scene configuration
|
|
68
|
+
*/
|
|
69
|
+
constructor(container: HTMLElement, options?: InteractiveSceneOptions);
|
|
70
|
+
/**
|
|
71
|
+
* Get the current mouse position in world coordinates.
|
|
72
|
+
* Updated on every mouse move (like ManimGL's mouse_point).
|
|
73
|
+
*/
|
|
74
|
+
get mousePoint(): THREE.Vector3;
|
|
75
|
+
/**
|
|
76
|
+
* Toggle the color palette HUD visibility.
|
|
77
|
+
*/
|
|
78
|
+
toggleColorPalette(): void;
|
|
79
|
+
/**
|
|
80
|
+
* Programmatically delete the currently selected mobjects.
|
|
81
|
+
* Saves state for undo before removing.
|
|
82
|
+
*/
|
|
83
|
+
deleteSelected(): void;
|
|
84
|
+
/**
|
|
85
|
+
* Copy selected mobjects to the internal clipboard.
|
|
86
|
+
*/
|
|
87
|
+
copySelected(): void;
|
|
88
|
+
/**
|
|
89
|
+
* Paste mobjects from the clipboard into the scene.
|
|
90
|
+
* Copies are offset slightly from the originals.
|
|
91
|
+
*/
|
|
92
|
+
pasteFromClipboard(): void;
|
|
93
|
+
/**
|
|
94
|
+
* Group all selected mobjects into a new VGroup.
|
|
95
|
+
* The individual mobjects are removed from the scene and replaced
|
|
96
|
+
* by the group.
|
|
97
|
+
*/
|
|
98
|
+
groupSelected(): void;
|
|
99
|
+
/**
|
|
100
|
+
* Ungroup selected VGroups: replace each group with its children.
|
|
101
|
+
*/
|
|
102
|
+
ungroupSelected(): void;
|
|
103
|
+
/**
|
|
104
|
+
* Apply a color to all selected mobjects.
|
|
105
|
+
* @param color - CSS color string
|
|
106
|
+
*/
|
|
107
|
+
applyColorToSelected(color: string): void;
|
|
108
|
+
private _handleKeyDown;
|
|
109
|
+
private _handleMouseDownDrag;
|
|
110
|
+
private _handleMouseMoveDrag;
|
|
111
|
+
private _handleMouseUpDrag;
|
|
112
|
+
/** Standard Manim colors for the palette. */
|
|
113
|
+
private static readonly PALETTE_COLORS;
|
|
114
|
+
private _showColorPalette;
|
|
115
|
+
private _hideColorPalette;
|
|
116
|
+
private _screenToWorldIScene;
|
|
117
|
+
/**
|
|
118
|
+
* Clean up all resources including event listeners and HUD.
|
|
119
|
+
*/
|
|
120
|
+
dispose(): void;
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=InteractiveScene.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InteractiveScene.d.ts","sourceRoot":"","sources":["../../src/core/InteractiveScene.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAK9C,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,iCAAiC,CAAC;AAUzC;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,YAAY;IAC3D,sCAAsC;IACtC,SAAS,CAAC,EAAE,uBAAuB,CAAC;IACpC,0EAA0E;IAC1E,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,uDAAuD;IACvD,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,+DAA+D;IAC/D,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,gEAAgE;IAChE,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;AAeD;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,gBAAiB,SAAQ,KAAK;IACzC,uDAAuD;IACvD,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAC;IAGrC,OAAO,CAAC,UAAU,CAAwB;IAG1C,OAAO,CAAC,mBAAmB,CAKzB;IAGF,OAAO,CAAC,iBAAiB,CAA+B;IACxD,OAAO,CAAC,eAAe,CAAkB;IAGzC,OAAO,CAAC,WAAW,CAAkB;IACrC,OAAO,CAAC,cAAc,CAA6B;IAGnD,OAAO,CAAC,WAAW,CAAsC;IAGzD,OAAO,CAAC,UAAU,CAA6B;IAC/C,OAAO,CAAC,gBAAgB,CAA0B;IAClD,OAAO,CAAC,gBAAgB,CAA0B;IAClD,OAAO,CAAC,cAAc,CAA0B;IAEhD;;;;OAIG;gBACS,SAAS,EAAE,WAAW,EAAE,OAAO,GAAE,uBAA4B;IAyCzE;;;OAGG;IACH,IAAI,UAAU,IAAI,KAAK,CAAC,OAAO,CAE9B;IAED;;OAEG;IACH,kBAAkB,IAAI,IAAI;IAQ1B;;;OAGG;IACH,cAAc,IAAI,IAAI;IAatB;;OAEG;IACH,YAAY,IAAI,IAAI;IAUpB;;;OAGG;IACH,kBAAkB,IAAI,IAAI;IAoB1B;;;;OAIG;IACH,aAAa,IAAI,IAAI;IAsBrB;;OAEG;IACH,eAAe,IAAI,IAAI;IAsBvB;;;OAGG;IACH,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAiBzC,OAAO,CAAC,cAAc;IAgFtB,OAAO,CAAC,oBAAoB;IAuB5B,OAAO,CAAC,oBAAoB;IAwB5B,OAAO,CAAC,kBAAkB;IAS1B,6CAA6C;IAC7C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAapC;IAEF,OAAO,CAAC,iBAAiB;IAkDzB,OAAO,CAAC,iBAAiB;IAYzB,OAAO,CAAC,oBAAoB;IAkB5B;;OAEG;IACM,OAAO,IAAI,IAAI;CAmBzB"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
/**
|
|
3
|
+
* Options for configuring an ambient light.
|
|
4
|
+
*/
|
|
5
|
+
export interface AmbientLightOptions {
|
|
6
|
+
/** Light color. Defaults to '#ffffff'. */
|
|
7
|
+
color?: string;
|
|
8
|
+
/** Light intensity. Defaults to 0.5. */
|
|
9
|
+
intensity?: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Options for configuring a directional light.
|
|
13
|
+
*/
|
|
14
|
+
export interface DirectionalLightOptions {
|
|
15
|
+
/** Light color. Defaults to '#ffffff'. */
|
|
16
|
+
color?: string;
|
|
17
|
+
/** Light intensity. Defaults to 1. */
|
|
18
|
+
intensity?: number;
|
|
19
|
+
/** Light position [x, y, z]. Defaults to [5, 10, 7]. */
|
|
20
|
+
position?: [number, number, number];
|
|
21
|
+
/** Whether the light casts shadows. Defaults to false. */
|
|
22
|
+
castShadow?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Options for configuring a point light.
|
|
26
|
+
*/
|
|
27
|
+
export interface PointLightOptions {
|
|
28
|
+
/** Light color. Defaults to '#ffffff'. */
|
|
29
|
+
color?: string;
|
|
30
|
+
/** Light intensity. Defaults to 1. */
|
|
31
|
+
intensity?: number;
|
|
32
|
+
/** Light position [x, y, z]. Defaults to [0, 5, 0]. */
|
|
33
|
+
position?: [number, number, number];
|
|
34
|
+
/** Maximum range of the light. Defaults to 0 (no limit). */
|
|
35
|
+
distance?: number;
|
|
36
|
+
/** Light decay rate. Defaults to 2 (physically correct). */
|
|
37
|
+
decay?: number;
|
|
38
|
+
/** Whether the light casts shadows. Defaults to false. */
|
|
39
|
+
castShadow?: boolean;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Options for configuring a spot light.
|
|
43
|
+
*/
|
|
44
|
+
export interface SpotLightOptions {
|
|
45
|
+
/** Light color. Defaults to '#ffffff'. */
|
|
46
|
+
color?: string;
|
|
47
|
+
/** Light intensity. Defaults to 1. */
|
|
48
|
+
intensity?: number;
|
|
49
|
+
/** Light position [x, y, z]. Defaults to [0, 10, 0]. */
|
|
50
|
+
position?: [number, number, number];
|
|
51
|
+
/** Maximum range of the light. Defaults to 0 (no limit). */
|
|
52
|
+
distance?: number;
|
|
53
|
+
/** Maximum angle of light dispersion from its direction (radians). Defaults to PI/3. */
|
|
54
|
+
angle?: number;
|
|
55
|
+
/** Percent of the cone attenuated due to penumbra. Defaults to 0. */
|
|
56
|
+
penumbra?: number;
|
|
57
|
+
/** Light decay rate. Defaults to 2 (physically correct). */
|
|
58
|
+
decay?: number;
|
|
59
|
+
/** Whether the light casts shadows. Defaults to false. */
|
|
60
|
+
castShadow?: boolean;
|
|
61
|
+
/** Target position for the light to point at [x, y, z]. Defaults to origin. */
|
|
62
|
+
target?: [number, number, number];
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Lighting system for 3D manimweb scenes.
|
|
66
|
+
* Manages multiple lights attached to a Three.js scene.
|
|
67
|
+
*/
|
|
68
|
+
export declare class Lighting {
|
|
69
|
+
private _lights;
|
|
70
|
+
private _scene;
|
|
71
|
+
/**
|
|
72
|
+
* Create a new lighting system.
|
|
73
|
+
* @param threeScene - The Three.js scene to add lights to
|
|
74
|
+
*/
|
|
75
|
+
constructor(threeScene: THREE.Scene);
|
|
76
|
+
/**
|
|
77
|
+
* Add an ambient light to the scene.
|
|
78
|
+
* Ambient lights illuminate all objects equally from all directions.
|
|
79
|
+
* @param options - Light configuration options
|
|
80
|
+
* @returns The created AmbientLight
|
|
81
|
+
*/
|
|
82
|
+
addAmbient(options?: AmbientLightOptions): THREE.AmbientLight;
|
|
83
|
+
/**
|
|
84
|
+
* Add a directional light to the scene.
|
|
85
|
+
* Directional lights emit parallel rays, like sunlight.
|
|
86
|
+
* @param options - Light configuration options
|
|
87
|
+
* @returns The created DirectionalLight
|
|
88
|
+
*/
|
|
89
|
+
addDirectional(options?: DirectionalLightOptions): THREE.DirectionalLight;
|
|
90
|
+
/**
|
|
91
|
+
* Add a point light to the scene.
|
|
92
|
+
* Point lights emit in all directions from a single point.
|
|
93
|
+
* @param options - Light configuration options
|
|
94
|
+
* @returns The created PointLight
|
|
95
|
+
*/
|
|
96
|
+
addPoint(options?: PointLightOptions): THREE.PointLight;
|
|
97
|
+
/**
|
|
98
|
+
* Add a spot light to the scene.
|
|
99
|
+
* Spot lights emit in a cone from a single point.
|
|
100
|
+
* @param options - Light configuration options
|
|
101
|
+
* @returns The created SpotLight
|
|
102
|
+
*/
|
|
103
|
+
addSpot(options?: SpotLightOptions): THREE.SpotLight;
|
|
104
|
+
/**
|
|
105
|
+
* Set up default 3-point lighting.
|
|
106
|
+
* Creates ambient light plus two directional lights for balanced illumination.
|
|
107
|
+
*/
|
|
108
|
+
setupDefault(): void;
|
|
109
|
+
/**
|
|
110
|
+
* Get all lights in the system.
|
|
111
|
+
* @returns Array of all lights
|
|
112
|
+
*/
|
|
113
|
+
getLights(): THREE.Light[];
|
|
114
|
+
/**
|
|
115
|
+
* Remove a specific light from the scene.
|
|
116
|
+
* @param light - The light to remove
|
|
117
|
+
*/
|
|
118
|
+
remove(light: THREE.Light): void;
|
|
119
|
+
/**
|
|
120
|
+
* Remove all lights from the scene.
|
|
121
|
+
*/
|
|
122
|
+
removeAll(): void;
|
|
123
|
+
/**
|
|
124
|
+
* Dispose of all lights and clean up resources.
|
|
125
|
+
*/
|
|
126
|
+
dispose(): void;
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=Lighting.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Lighting.d.ts","sourceRoot":"","sources":["../../src/core/Lighting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACp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