af-motion 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/CHANGELOG.md +33 -0
- package/LICENSE +201 -0
- package/README.md +203 -3
- package/RELEASE_NOTES.md +115 -0
- package/bin/af-motion.js +16 -0
- package/bin/mcp-server.js +21 -0
- package/dist/3d/adapter.d.ts +29 -0
- package/dist/3d/assets/cache.d.ts +71 -0
- package/dist/3d/assets/index.d.ts +10 -0
- package/dist/3d/assets/inspection.d.ts +19 -0
- package/dist/3d/assets/loaders.d.ts +30 -0
- package/dist/3d/assets/manager.d.ts +69 -0
- package/dist/3d/assets/scene-integration.d.ts +23 -0
- package/dist/3d/assets/types.d.ts +80 -0
- package/dist/3d/assets/validation.d.ts +12 -0
- package/dist/3d/camera/index.d.ts +7 -0
- package/dist/3d/camera/presets.d.ts +8 -0
- package/dist/3d/camera/transitions.d.ts +19 -0
- package/dist/3d/camera/types.d.ts +37 -0
- package/dist/3d/camera/validation.d.ts +9 -0
- package/dist/3d/capabilities.d.ts +11 -0
- package/dist/3d/composition/fallback.d.ts +20 -0
- package/dist/3d/composition/generation.d.ts +24 -0
- package/dist/3d/composition/index.d.ts +12 -0
- package/dist/3d/composition/quality.d.ts +35 -0
- package/dist/3d/composition/recipes.d.ts +34 -0
- package/dist/3d/composition/types.d.ts +88 -0
- package/dist/3d/composition/unified.d.ts +18 -0
- package/dist/3d/environment/index.d.ts +6 -0
- package/dist/3d/environment/presets.d.ts +8 -0
- package/dist/3d/environment/types.d.ts +36 -0
- package/dist/3d/environment/validation.d.ts +9 -0
- package/dist/3d/geometry/cache.d.ts +37 -0
- package/dist/3d/geometry/generators.d.ts +24 -0
- package/dist/3d/geometry/hash.d.ts +10 -0
- package/dist/3d/geometry/index.d.ts +9 -0
- package/dist/3d/geometry/three-adapter.d.ts +15 -0
- package/dist/3d/geometry/types.d.ts +120 -0
- package/dist/3d/geometry/validation.d.ts +6 -0
- package/dist/3d/index.d.ts +32 -0
- package/dist/3d/interaction/camera-controls.d.ts +58 -0
- package/dist/3d/interaction/index.d.ts +8 -0
- package/dist/3d/interaction/manager.d.ts +61 -0
- package/dist/3d/interaction/presets.d.ts +9 -0
- package/dist/3d/interaction/raycaster.d.ts +20 -0
- package/dist/3d/interaction/types.d.ts +78 -0
- package/dist/3d/lighting/index.d.ts +6 -0
- package/dist/3d/lighting/presets.d.ts +8 -0
- package/dist/3d/lighting/types.d.ts +31 -0
- package/dist/3d/lighting/validation.d.ts +17 -0
- package/dist/3d/materials/bridge.d.ts +11 -0
- package/dist/3d/materials/index.d.ts +7 -0
- package/dist/3d/materials/presets.d.ts +9 -0
- package/dist/3d/materials/types.d.ts +43 -0
- package/dist/3d/materials/validation.d.ts +9 -0
- package/dist/3d/morphing/animator.d.ts +19 -0
- package/dist/3d/morphing/correspondence.d.ts +32 -0
- package/dist/3d/morphing/geometry.d.ts +28 -0
- package/dist/3d/morphing/index.d.ts +16 -0
- package/dist/3d/morphing/interpolation.d.ts +45 -0
- package/dist/3d/morphing/morph.d.ts +18 -0
- package/dist/3d/morphing/presets.d.ts +31 -0
- package/dist/3d/morphing/react.d.ts +29 -0
- package/dist/3d/morphing/topology.d.ts +34 -0
- package/dist/3d/morphing/types.d.ts +138 -0
- package/dist/3d/morphing/validation.d.ts +19 -0
- package/dist/3d/optimization/analysis.d.ts +14 -0
- package/dist/3d/optimization/colliders.d.ts +16 -0
- package/dist/3d/optimization/geometry.d.ts +22 -0
- package/dist/3d/optimization/hierarchy.d.ts +14 -0
- package/dist/3d/optimization/index.d.ts +33 -0
- package/dist/3d/optimization/lod.d.ts +13 -0
- package/dist/3d/optimization/materials.d.ts +12 -0
- package/dist/3d/optimization/recommendations.d.ts +13 -0
- package/dist/3d/optimization/skeleton.d.ts +20 -0
- package/dist/3d/optimization/types.d.ts +252 -0
- package/dist/3d/physics/benchmark.d.ts +76 -0
- package/dist/3d/physics/body/inertia.d.ts +61 -0
- package/dist/3d/physics/collision/ccd.d.ts +26 -0
- package/dist/3d/physics/collision/narrowphase.d.ts +15 -0
- package/dist/3d/physics/collision/shapes.d.ts +45 -0
- package/dist/3d/physics/constraints/advanced.d.ts +40 -0
- package/dist/3d/physics/constraints/solver.d.ts +34 -0
- package/dist/3d/physics/constraints/types.d.ts +106 -0
- package/dist/3d/physics/events.d.ts +34 -0
- package/dist/3d/physics/index.d.ts +29 -0
- package/dist/3d/physics/material.d.ts +27 -0
- package/dist/3d/physics/math.d.ts +79 -0
- package/dist/3d/physics/soft/cloth.d.ts +12 -0
- package/dist/3d/physics/soft/collision.d.ts +12 -0
- package/dist/3d/physics/soft/gpu.d.ts +19 -0
- package/dist/3d/physics/soft/pbd.d.ts +20 -0
- package/dist/3d/physics/soft/rope.d.ts +16 -0
- package/dist/3d/physics/soft/soft-body.d.ts +12 -0
- package/dist/3d/physics/soft/types.d.ts +212 -0
- package/dist/3d/physics/solver/integrators.d.ts +25 -0
- package/dist/3d/physics/solver/types.d.ts +28 -0
- package/dist/3d/physics/spatial/spatial-hash.d.ts +51 -0
- package/dist/3d/physics/types.d.ts +579 -0
- package/dist/3d/physics/world.d.ts +106 -0
- package/dist/3d/r3f.d.ts +34 -0
- package/dist/3d/scene.d.ts +8 -0
- package/dist/3d/schema.d.ts +739 -0
- package/dist/3d/schemas/ai-integration.d.ts +201 -0
- package/dist/3d/schemas/correction.d.ts +11 -0
- package/dist/3d/schemas/index.d.ts +12 -0
- package/dist/3d/schemas/schemas.d.ts +361 -0
- package/dist/3d/schemas/serialization.d.ts +22 -0
- package/dist/3d/schemas/types.d.ts +199 -0
- package/dist/3d/schemas/validation.d.ts +33 -0
- package/dist/3d/scroll/controller.d.ts +32 -0
- package/dist/3d/scroll/index.d.ts +6 -0
- package/dist/3d/scroll/presets.d.ts +9 -0
- package/dist/3d/scroll/types.d.ts +53 -0
- package/dist/3d/terrain/biomes.d.ts +18 -0
- package/dist/3d/terrain/chunks.d.ts +20 -0
- package/dist/3d/terrain/erosion.d.ts +15 -0
- package/dist/3d/terrain/heightmap.d.ts +27 -0
- package/dist/3d/terrain/index.d.ts +18 -0
- package/dist/3d/terrain/materials.d.ts +20 -0
- package/dist/3d/terrain/noise.d.ts +25 -0
- package/dist/3d/terrain/physics.d.ts +34 -0
- package/dist/3d/terrain/terrain.d.ts +12 -0
- package/dist/3d/terrain/types.d.ts +235 -0
- package/dist/3d/terrain/vegetation.d.ts +14 -0
- package/dist/3d/types.d.ts +176 -0
- package/dist/3d/world/hydrology.d.ts +12 -0
- package/dist/3d/world/index.d.ts +15 -0
- package/dist/3d/world/lighting.d.ts +16 -0
- package/dist/3d/world/pipeline.d.ts +20 -0
- package/dist/3d/world/population.d.ts +12 -0
- package/dist/3d/world/presets.d.ts +11 -0
- package/dist/3d/world/streaming.d.ts +13 -0
- package/dist/3d/world/types.d.ts +272 -0
- package/dist/3d/world/world.d.ts +64 -0
- package/dist/backgrounds/advanced-gradient.d.ts +32 -0
- package/dist/backgrounds/atmospheric-backgrounds.d.ts +79 -0
- package/dist/backgrounds/aurora.d.ts +24 -0
- package/dist/backgrounds/cosmic-background.d.ts +31 -0
- package/dist/backgrounds/energy-effects.d.ts +78 -0
- package/dist/backgrounds/floating-orbs.d.ts +26 -0
- package/dist/backgrounds/fluid-backgrounds.d.ts +72 -0
- package/dist/backgrounds/geometric-backgrounds.d.ts +78 -0
- package/dist/backgrounds/gradient.d.ts +20 -0
- package/dist/backgrounds/grid.d.ts +22 -0
- package/dist/backgrounds/internal/canvas-lifecycle.d.ts +29 -0
- package/dist/backgrounds/noise.d.ts +20 -0
- package/dist/backgrounds/particle-background.d.ts +37 -0
- package/dist/backgrounds/particle-field.d.ts +22 -0
- package/dist/backgrounds/spotlight.d.ts +20 -0
- package/dist/backgrounds/wave.d.ts +22 -0
- package/dist/catalogue.d.ts +227 -0
- package/dist/catalogue.js +4 -0
- package/dist/chunks/catalogue-ZmbeEdRo.js +59850 -0
- package/dist/chunks/core-animation-CeiI_TEe.js +1394 -0
- package/dist/chunks/motion-choreography-DC6LWvDk.js +4089 -0
- package/dist/chunks/pointer-capture-lrnKAl2I.js +158 -0
- package/dist/chunks/safe-json-D5j34GEB.js +62 -0
- package/dist/chunks/scroll-velocity-BNUHaS0-.js +904 -0
- package/dist/cli/commands/doctor.d.ts +9 -0
- package/dist/cli/commands/example.d.ts +9 -0
- package/dist/cli/commands/info.d.ts +8 -0
- package/dist/cli/commands/init.d.ts +9 -0
- package/dist/cli/commands/presets.d.ts +10 -0
- package/dist/cli/commands/validate.d.ts +9 -0
- package/dist/cli/index.d.ts +22 -0
- package/dist/cli/types.d.ts +115 -0
- package/dist/cli/utils/safety.d.ts +11 -0
- package/dist/cli/utils/templates.d.ts +16 -0
- package/dist/cli/utils/terminal.d.ts +29 -0
- package/dist/cli.js +825 -0
- package/dist/core/adaptive-motion.d.ts +100 -0
- package/dist/core/adaptive-quality/controller.d.ts +61 -0
- package/dist/core/adaptive-quality/index.d.ts +13 -0
- package/dist/core/adaptive-quality/metrics.d.ts +33 -0
- package/dist/core/adaptive-quality/policies.d.ts +40 -0
- package/dist/core/adaptive-quality/profile.d.ts +58 -0
- package/dist/core/adaptive-quality/react.d.ts +57 -0
- package/dist/core/adaptive-quality/recommendation.d.ts +12 -0
- package/dist/core/adaptive-quality/resolution.d.ts +22 -0
- package/dist/core/adaptive-quality/types.d.ts +362 -0
- package/dist/core/advanced-motion/adapters.d.ts +20 -0
- package/dist/core/advanced-motion/controller.d.ts +52 -0
- package/dist/core/advanced-motion/index.d.ts +12 -0
- package/dist/core/advanced-motion/recipes.d.ts +16 -0
- package/dist/core/advanced-motion/timeline.d.ts +35 -0
- package/dist/core/advanced-motion/types.d.ts +174 -0
- package/dist/core/advanced-motion/validation.d.ts +11 -0
- package/dist/core/agent-workflows/agent-registry.d.ts +21 -0
- package/dist/core/agent-workflows/agents/accessibility-agent.d.ts +9 -0
- package/dist/core/agent-workflows/agents/composition-agent.d.ts +9 -0
- package/dist/core/agent-workflows/agents/design-to-motion-agent.d.ts +9 -0
- package/dist/core/agent-workflows/agents/index.d.ts +13 -0
- package/dist/core/agent-workflows/agents/motion-intelligence-agent.d.ts +9 -0
- package/dist/core/agent-workflows/agents/performance-agent.d.ts +9 -0
- package/dist/core/agent-workflows/agents/scene-generation-agent.d.ts +9 -0
- package/dist/core/agent-workflows/collaboration-planner.d.ts +38 -0
- package/dist/core/agent-workflows/collaboration-workflows.d.ts +83 -0
- package/dist/core/agent-workflows/communication.d.ts +29 -0
- package/dist/core/agent-workflows/conflict-resolver.d.ts +25 -0
- package/dist/core/agent-workflows/context.d.ts +36 -0
- package/dist/core/agent-workflows/execution-engine.d.ts +30 -0
- package/dist/core/agent-workflows/index.d.ts +20 -0
- package/dist/core/agent-workflows/orchestration-types.d.ts +144 -0
- package/dist/core/agent-workflows/orchestrator.d.ts +29 -0
- package/dist/core/agent-workflows/react.d.ts +71 -0
- package/dist/core/agent-workflows/shared-context.d.ts +36 -0
- package/dist/core/agent-workflows/task-planner.d.ts +42 -0
- package/dist/core/agent-workflows/templates.d.ts +14 -0
- package/dist/core/agent-workflows/tool-registry.d.ts +24 -0
- package/dist/core/agent-workflows/types.d.ts +167 -0
- package/dist/core/ai-ecosystem/capability-registry.d.ts +23 -0
- package/dist/core/ai-ecosystem/index.d.ts +13 -0
- package/dist/core/ai-ecosystem/pipeline.d.ts +19 -0
- package/dist/core/ai-ecosystem/provider.d.ts +19 -0
- package/dist/core/ai-ecosystem/types.d.ts +69 -0
- package/dist/core/ai-motion-intelligence/engine.d.ts +51 -0
- package/dist/core/ai-motion-intelligence/explanation-engine.d.ts +8 -0
- package/dist/core/ai-motion-intelligence/index.d.ts +15 -0
- package/dist/core/ai-motion-intelligence/intent-classifier.d.ts +14 -0
- package/dist/core/ai-motion-intelligence/knowledge-base.d.ts +12 -0
- package/dist/core/ai-motion-intelligence/provider.d.ts +31 -0
- package/dist/core/ai-motion-intelligence/quality-evaluator.d.ts +9 -0
- package/dist/core/ai-motion-intelligence/react.d.ts +14 -0
- package/dist/core/ai-motion-intelligence/recommendation-engine.d.ts +16 -0
- package/dist/core/ai-motion-intelligence/types.d.ts +134 -0
- package/dist/core/ai-motion-registry.d.ts +201 -0
- package/dist/core/animate.d.ts +57 -0
- package/dist/core/animation-intelligence/engine.d.ts +42 -0
- package/dist/core/animation-intelligence/index.d.ts +11 -0
- package/dist/core/animation-intelligence/intent.d.ts +15 -0
- package/dist/core/animation-intelligence/schema.d.ts +42 -0
- package/dist/core/animation-intelligence/scoring.d.ts +15 -0
- package/dist/core/animation-intelligence/types.d.ts +91 -0
- package/dist/core/animation-parallel.d.ts +37 -0
- package/dist/core/animation-presets.d.ts +56 -0
- package/dist/core/animation-sequence.d.ts +37 -0
- package/dist/core/animation-timeline.d.ts +46 -0
- package/dist/core/animation.d.ts +48 -0
- package/dist/core/built-in-palettes.d.ts +331 -0
- package/dist/core/choreography-intelligence/bridge.d.ts +43 -0
- package/dist/core/choreography-intelligence/generator.d.ts +11 -0
- package/dist/core/choreography-intelligence/index.d.ts +11 -0
- package/dist/core/choreography-intelligence/intent.d.ts +11 -0
- package/dist/core/choreography-intelligence/schema.d.ts +76 -0
- package/dist/core/choreography-intelligence/types.d.ts +87 -0
- package/dist/core/composition.d.ts +170 -0
- package/dist/core/configuration-corrector.d.ts +85 -0
- package/dist/core/design-intelligence.d.ts +199 -0
- package/dist/core/design-system.d.ts +206 -0
- package/dist/core/design-to-motion/design-analyzer.d.ts +13 -0
- package/dist/core/design-to-motion/engine.d.ts +34 -0
- package/dist/core/design-to-motion/generator.d.ts +16 -0
- package/dist/core/design-to-motion/index.d.ts +15 -0
- package/dist/core/design-to-motion/input-parser.d.ts +17 -0
- package/dist/core/design-to-motion/motion-planner.d.ts +11 -0
- package/dist/core/design-to-motion/presets.d.ts +11 -0
- package/dist/core/design-to-motion/react.d.ts +13 -0
- package/dist/core/design-to-motion/types.d.ts +221 -0
- package/dist/core/design-to-motion/validator.d.ts +13 -0
- package/dist/core/device-capabilities/classification.d.ts +25 -0
- package/dist/core/device-capabilities/detection.d.ts +27 -0
- package/dist/core/device-capabilities/graphics.d.ts +22 -0
- package/dist/core/device-capabilities/hardware.d.ts +27 -0
- package/dist/core/device-capabilities/index.d.ts +14 -0
- package/dist/core/device-capabilities/monitor.d.ts +19 -0
- package/dist/core/device-capabilities/react.d.ts +24 -0
- package/dist/core/device-capabilities/runtime.d.ts +11 -0
- package/dist/core/device-capabilities/scoring.d.ts +18 -0
- package/dist/core/device-capabilities/types.d.ts +171 -0
- package/dist/core/effect-composer.d.ts +41 -0
- package/dist/core/generation-pipeline.d.ts +135 -0
- package/dist/core/inertia.d.ts +30 -0
- package/dist/core/interactions/cursor-controller.d.ts +9 -0
- package/dist/core/interactions/custom-gestures.d.ts +28 -0
- package/dist/core/interactions/device-capabilities.d.ts +12 -0
- package/dist/core/interactions/drag-controller.d.ts +60 -0
- package/dist/core/interactions/errors.d.ts +13 -0
- package/dist/core/interactions/gesture-classifier.d.ts +43 -0
- package/dist/core/interactions/gesture-intelligence-controller.d.ts +9 -0
- package/dist/core/interactions/gesture-recognizers.d.ts +160 -0
- package/dist/core/interactions/gesture-sequence.d.ts +9 -0
- package/dist/core/interactions/index.d.ts +27 -0
- package/dist/core/interactions/input-normalizer.d.ts +8 -0
- package/dist/core/interactions/interaction-manager.d.ts +43 -0
- package/dist/core/interactions/keyboard-manager.d.ts +16 -0
- package/dist/core/interactions/magnetic-controller.d.ts +9 -0
- package/dist/core/interactions/magnetic-group.d.ts +11 -0
- package/dist/core/interactions/multitouch-controller.d.ts +62 -0
- package/dist/core/interactions/pointer-controller.d.ts +34 -0
- package/dist/core/interactions/pointer-tracker.d.ts +32 -0
- package/dist/core/interactions/prioritizer.d.ts +17 -0
- package/dist/core/interactions/touch-controller.d.ts +35 -0
- package/dist/core/interactions/types.d.ts +710 -0
- package/dist/core/layout/controller.d.ts +56 -0
- package/dist/core/layout/flip.d.ts +21 -0
- package/dist/core/layout/group.d.ts +46 -0
- package/dist/core/layout/index.d.ts +12 -0
- package/dist/core/layout/measure.d.ts +30 -0
- package/dist/core/layout/presets.d.ts +24 -0
- package/dist/core/layout/types.d.ts +189 -0
- package/dist/core/microinteractions/generator.d.ts +11 -0
- package/dist/core/microinteractions/index.d.ts +11 -0
- package/dist/core/microinteractions/intent.d.ts +11 -0
- package/dist/core/microinteractions/runtime.d.ts +25 -0
- package/dist/core/microinteractions/schema.d.ts +82 -0
- package/dist/core/microinteractions/types.d.ts +79 -0
- package/dist/core/motion-choreography.d.ts +163 -0
- package/dist/core/motion-dna.d.ts +129 -0
- package/dist/core/motion-path/animator.d.ts +13 -0
- package/dist/core/motion-path/engine.d.ts +27 -0
- package/dist/core/motion-path/follower.d.ts +8 -0
- package/dist/core/motion-path/index.d.ts +15 -0
- package/dist/core/motion-path/lut.d.ts +33 -0
- package/dist/core/motion-path/parser.d.ts +26 -0
- package/dist/core/motion-path/segments.d.ts +16 -0
- package/dist/core/motion-path/types.d.ts +178 -0
- package/dist/core/motion-path/vector3.d.ts +49 -0
- package/dist/core/motion-recipe.d.ts +171 -0
- package/dist/core/motion-states.d.ts +43 -0
- package/dist/core/motion-validation/consistency.d.ts +11 -0
- package/dist/core/motion-validation/index.d.ts +11 -0
- package/dist/core/motion-validation/optimizer.d.ts +11 -0
- package/dist/core/motion-validation/schema.d.ts +81 -0
- package/dist/core/motion-validation/types.d.ts +53 -0
- package/dist/core/motion-validation/validator.d.ts +11 -0
- package/dist/core/motion.d.ts +7 -0
- package/dist/core/natural-motion.d.ts +110 -0
- package/dist/core/palette-colors.d.ts +16 -0
- package/dist/core/palette-styles.d.ts +12 -0
- package/dist/core/palettes.d.ts +59 -0
- package/dist/core/performance-intelligence/conflicts.d.ts +21 -0
- package/dist/core/performance-intelligence/context.d.ts +48 -0
- package/dist/core/performance-intelligence/coordinator.d.ts +84 -0
- package/dist/core/performance-intelligence/decisions.d.ts +17 -0
- package/dist/core/performance-intelligence/history.d.ts +44 -0
- package/dist/core/performance-intelligence/index.d.ts +15 -0
- package/dist/core/performance-intelligence/policies.d.ts +59 -0
- package/dist/core/performance-intelligence/react.d.ts +78 -0
- package/dist/core/performance-intelligence/report.d.ts +16 -0
- package/dist/core/performance-intelligence/scoring.d.ts +16 -0
- package/dist/core/performance-intelligence/types.d.ts +203 -0
- package/dist/core/performance-optimizer/bottlenecks.d.ts +9 -0
- package/dist/core/performance-optimizer/index.d.ts +13 -0
- package/dist/core/performance-optimizer/optimizer.d.ts +43 -0
- package/dist/core/performance-optimizer/profiler.d.ts +38 -0
- package/dist/core/performance-optimizer/react.d.ts +55 -0
- package/dist/core/performance-optimizer/strategies.d.ts +22 -0
- package/dist/core/performance-optimizer/types.d.ts +227 -0
- package/dist/core/performance-optimizer/workers.d.ts +27 -0
- package/dist/core/physics/collision-constraints.d.ts +15 -0
- package/dist/core/physics/collision-detection.d.ts +93 -0
- package/dist/core/physics/collision-response.d.ts +24 -0
- package/dist/core/physics/collision-types.d.ts +381 -0
- package/dist/core/physics/collision-world.d.ts +11 -0
- package/dist/core/physics/composition-behaviors.d.ts +97 -0
- package/dist/core/physics/composition-choreography.d.ts +14 -0
- package/dist/core/physics/composition-engine.d.ts +25 -0
- package/dist/core/physics/composition-recipes.d.ts +46 -0
- package/dist/core/physics/composition-types.d.ts +265 -0
- package/dist/core/physics/composition-validation.d.ts +33 -0
- package/dist/core/physics/index.d.ts +37 -0
- package/dist/core/physics/inertia-animation.d.ts +11 -0
- package/dist/core/physics/inertia-math.d.ts +56 -0
- package/dist/core/physics/inertia-presets.d.ts +25 -0
- package/dist/core/physics/inertia-simulation.d.ts +11 -0
- package/dist/core/physics/inertia-types.d.ts +355 -0
- package/dist/core/physics/inertia-validation.d.ts +22 -0
- package/dist/core/physics/math.d.ts +99 -0
- package/dist/core/physics/presets.d.ts +28 -0
- package/dist/core/physics/simulation.d.ts +11 -0
- package/dist/core/physics/spring-animation.d.ts +11 -0
- package/dist/core/physics/spring-math.d.ts +47 -0
- package/dist/core/physics/spring-presets.d.ts +29 -0
- package/dist/core/physics/spring-simulation.d.ts +11 -0
- package/dist/core/physics/spring-types.d.ts +350 -0
- package/dist/core/physics/spring-validation.d.ts +22 -0
- package/dist/core/physics/stepper.d.ts +24 -0
- package/dist/core/physics/types.d.ts +280 -0
- package/dist/core/physics/validation.d.ts +62 -0
- package/dist/core/pointer-capture.d.ts +7 -0
- package/dist/core/reference-analysis/index.d.ts +10 -0
- package/dist/core/reference-analysis/interpreter.d.ts +12 -0
- package/dist/core/reference-analysis/planner.d.ts +15 -0
- package/dist/core/reference-analysis/specification.d.ts +14 -0
- package/dist/core/reference-analysis/types.d.ts +244 -0
- package/dist/core/resource-intelligence/cache.d.ts +43 -0
- package/dist/core/resource-intelligence/gpu.d.ts +19 -0
- package/dist/core/resource-intelligence/index.d.ts +16 -0
- package/dist/core/resource-intelligence/leaks.d.ts +13 -0
- package/dist/core/resource-intelligence/memory.d.ts +27 -0
- package/dist/core/resource-intelligence/pooling.d.ts +32 -0
- package/dist/core/resource-intelligence/pressure.d.ts +32 -0
- package/dist/core/resource-intelligence/react.d.ts +63 -0
- package/dist/core/resource-intelligence/registry.d.ts +33 -0
- package/dist/core/resource-intelligence/reports.d.ts +14 -0
- package/dist/core/resource-intelligence/types.d.ts +232 -0
- package/dist/core/scene-generation/engine.d.ts +31 -0
- package/dist/core/scene-generation/generator.d.ts +14 -0
- package/dist/core/scene-generation/index.d.ts +14 -0
- package/dist/core/scene-generation/input-parser.d.ts +24 -0
- package/dist/core/scene-generation/presets.d.ts +10 -0
- package/dist/core/scene-generation/react.d.ts +13 -0
- package/dist/core/scene-generation/scene-analyzer.d.ts +9 -0
- package/dist/core/scene-generation/scene-planner.d.ts +12 -0
- package/dist/core/scene-generation/types.d.ts +236 -0
- package/dist/core/scene-generation/validator.d.ts +18 -0
- package/dist/core/schema.d.ts +185 -0
- package/dist/core/scroll-intelligence/generator.d.ts +11 -0
- package/dist/core/scroll-intelligence/index.d.ts +11 -0
- package/dist/core/scroll-intelligence/intent.d.ts +11 -0
- package/dist/core/scroll-intelligence/runtime.d.ts +21 -0
- package/dist/core/scroll-intelligence/schema.d.ts +78 -0
- package/dist/core/scroll-intelligence/types.d.ts +85 -0
- package/dist/core/spring.d.ts +38 -0
- package/dist/core/svg-morph/animator.d.ts +10 -0
- package/dist/core/svg-morph/arc-to-cubic.d.ts +11 -0
- package/dist/core/svg-morph/index.d.ts +10 -0
- package/dist/core/svg-morph/interpolate.d.ts +23 -0
- package/dist/core/svg-morph/normalize.d.ts +34 -0
- package/dist/core/svg-morph/parser.d.ts +13 -0
- package/dist/core/svg-morph/shapes.d.ts +32 -0
- package/dist/core/svg-morph/types.d.ts +144 -0
- package/dist/core/transform.d.ts +27 -0
- package/dist/core/transitions/controller.d.ts +45 -0
- package/dist/core/transitions/engine.d.ts +26 -0
- package/dist/core/transitions/group-transition.d.ts +30 -0
- package/dist/core/transitions/index.d.ts +15 -0
- package/dist/core/transitions/presets.d.ts +16 -0
- package/dist/core/transitions/schema.d.ts +71 -0
- package/dist/core/transitions/shared-element-transition.d.ts +88 -0
- package/dist/core/transitions/shared-element.d.ts +84 -0
- package/dist/core/transitions/types.d.ts +185 -0
- package/dist/core/transitions/view-transition.d.ts +25 -0
- package/dist/core/typography/engine.d.ts +19 -0
- package/dist/core/typography/index.d.ts +15 -0
- package/dist/core/typography/path-motion.d.ts +24 -0
- package/dist/core/typography/presets.d.ts +14 -0
- package/dist/core/typography/properties.d.ts +19 -0
- package/dist/core/typography/segmenter.d.ts +32 -0
- package/dist/core/typography/stagger.d.ts +15 -0
- package/dist/core/typography/transitions.d.ts +11 -0
- package/dist/core/typography/types.d.ts +154 -0
- package/dist/core/utils/safe-json.d.ts +50 -0
- package/dist/core/visual-style-registry.d.ts +659 -0
- package/dist/easing/easings.d.ts +44 -0
- package/dist/effects/border-beam.d.ts +28 -0
- package/dist/effects/count-up.d.ts +30 -0
- package/dist/effects/cursor-trail.d.ts +23 -0
- package/dist/effects/drag.d.ts +41 -0
- package/dist/effects/draw-svg.d.ts +19 -0
- package/dist/effects/follow-pointer.d.ts +19 -0
- package/dist/effects/glow.d.ts +25 -0
- package/dist/effects/gradient-text.d.ts +22 -0
- package/dist/effects/hover-motion.d.ts +32 -0
- package/dist/effects/in-view.d.ts +14 -0
- package/dist/effects/magnetic.d.ts +40 -0
- package/dist/effects/morph-svg.d.ts +15 -0
- package/dist/effects/parallax.d.ts +42 -0
- package/dist/effects/pinch.d.ts +27 -0
- package/dist/effects/reveal.d.ts +33 -0
- package/dist/effects/ripple.d.ts +21 -0
- package/dist/effects/scroll-animate.d.ts +23 -0
- package/dist/effects/scroll-direction.d.ts +19 -0
- package/dist/effects/scroll-progress.d.ts +29 -0
- package/dist/effects/scroll-trigger.d.ts +22 -0
- package/dist/effects/scroll-velocity.d.ts +29 -0
- package/dist/effects/shine.d.ts +23 -0
- package/dist/effects/split-text.d.ts +17 -0
- package/dist/effects/spotlight.d.ts +24 -0
- package/dist/effects/stagger.d.ts +46 -0
- package/dist/effects/swipe.d.ts +27 -0
- package/dist/effects/text-highlight.d.ts +25 -0
- package/dist/effects/text-mask.d.ts +25 -0
- package/dist/effects/text-reveal.d.ts +28 -0
- package/dist/effects/text-scramble.d.ts +18 -0
- package/dist/effects/tilt.d.ts +42 -0
- package/dist/effects/typewriter.d.ts +26 -0
- package/dist/graphics/capabilities.d.ts +12 -0
- package/dist/graphics/composition/engine.d.ts +14 -0
- package/dist/graphics/composition/fallback.d.ts +13 -0
- package/dist/graphics/composition/index.d.ts +10 -0
- package/dist/graphics/composition/ordering.d.ts +29 -0
- package/dist/graphics/composition/quality.d.ts +24 -0
- package/dist/graphics/composition/schema.d.ts +156 -0
- package/dist/graphics/composition/types.d.ts +81 -0
- package/dist/graphics/composition/unified.d.ts +23 -0
- package/dist/graphics/effects/advanced/engine.d.ts +9 -0
- package/dist/graphics/effects/advanced/index.d.ts +1 -0
- package/dist/graphics/effects/composer.d.ts +9 -0
- package/dist/graphics/effects/distortion/engine.d.ts +9 -0
- package/dist/graphics/effects/distortion/index.d.ts +1 -0
- package/dist/graphics/effects/fluid/engine.d.ts +9 -0
- package/dist/graphics/effects/fluid/index.d.ts +1 -0
- package/dist/graphics/effects/index.d.ts +10 -0
- package/dist/graphics/effects/particles/engine.d.ts +9 -0
- package/dist/graphics/effects/particles/index.d.ts +2 -0
- package/dist/graphics/effects/particles/pool.d.ts +17 -0
- package/dist/graphics/effects/schema.d.ts +312 -0
- package/dist/graphics/effects/types.d.ts +85 -0
- package/dist/graphics/engine.d.ts +5 -0
- package/dist/graphics/environment/clouds.d.ts +28 -0
- package/dist/graphics/environment/environment.d.ts +50 -0
- package/dist/graphics/environment/fire-smoke.d.ts +32 -0
- package/dist/graphics/environment/fog.d.ts +28 -0
- package/dist/graphics/environment/index.d.ts +18 -0
- package/dist/graphics/environment/lightning.d.ts +33 -0
- package/dist/graphics/environment/rain.d.ts +33 -0
- package/dist/graphics/environment/snow.d.ts +30 -0
- package/dist/graphics/environment/types.d.ts +184 -0
- package/dist/graphics/environment/weather.d.ts +19 -0
- package/dist/graphics/environment/wind.d.ts +23 -0
- package/dist/graphics/fluid/flow-field.d.ts +74 -0
- package/dist/graphics/fluid/grid.d.ts +43 -0
- package/dist/graphics/fluid/index.d.ts +13 -0
- package/dist/graphics/fluid/interactions.d.ts +39 -0
- package/dist/graphics/fluid/rendering.d.ts +32 -0
- package/dist/graphics/fluid/simulation.d.ts +50 -0
- package/dist/graphics/fluid/solver.d.ts +19 -0
- package/dist/graphics/fluid/types.d.ts +186 -0
- package/dist/graphics/gpu-simulation/backends/backend.d.ts +24 -0
- package/dist/graphics/gpu-simulation/backends/cpu.d.ts +21 -0
- package/dist/graphics/gpu-simulation/backends/selection.d.ts +15 -0
- package/dist/graphics/gpu-simulation/backends/webgl2.d.ts +28 -0
- package/dist/graphics/gpu-simulation/backends/webgpu.d.ts +23 -0
- package/dist/graphics/gpu-simulation/capabilities.d.ts +14 -0
- package/dist/graphics/gpu-simulation/device.d.ts +17 -0
- package/dist/graphics/gpu-simulation/engine.d.ts +8 -0
- package/dist/graphics/gpu-simulation/index.d.ts +22 -0
- package/dist/graphics/gpu-simulation/ping-pong.d.ts +23 -0
- package/dist/graphics/gpu-simulation/pipeline.d.ts +18 -0
- package/dist/graphics/gpu-simulation/resource-manager.d.ts +8 -0
- package/dist/graphics/gpu-simulation/shaders.d.ts +50 -0
- package/dist/graphics/gpu-simulation/types.d.ts +288 -0
- package/dist/graphics/index.d.ts +23 -0
- package/dist/graphics/materials/glass.d.ts +22 -0
- package/dist/graphics/materials/index.d.ts +9 -0
- package/dist/graphics/materials/lighting.d.ts +22 -0
- package/dist/graphics/materials/presets.d.ts +28 -0
- package/dist/graphics/materials/schema.d.ts +574 -0
- package/dist/graphics/materials/surface.d.ts +13 -0
- package/dist/graphics/materials/types.d.ts +150 -0
- package/dist/graphics/particle-fields/composition.d.ts +32 -0
- package/dist/graphics/particle-fields/forces.d.ts +103 -0
- package/dist/graphics/particle-fields/index.d.ts +12 -0
- package/dist/graphics/particle-fields/interaction.d.ts +32 -0
- package/dist/graphics/particle-fields/spatial-index.d.ts +20 -0
- package/dist/graphics/particle-fields/system.d.ts +52 -0
- package/dist/graphics/particle-fields/types.d.ts +138 -0
- package/dist/graphics/particles/behaviors.d.ts +11 -0
- package/dist/graphics/particles/controller.d.ts +82 -0
- package/dist/graphics/particles/data-layout.d.ts +51 -0
- package/dist/graphics/particles/emitters.d.ts +24 -0
- package/dist/graphics/particles/index.d.ts +15 -0
- package/dist/graphics/particles/random.d.ts +25 -0
- package/dist/graphics/particles/rendering.d.ts +16 -0
- package/dist/graphics/particles/simulation.d.ts +23 -0
- package/dist/graphics/particles/types.d.ts +282 -0
- package/dist/graphics/renderer.d.ts +66 -0
- package/dist/graphics/resource-manager.d.ts +6 -0
- package/dist/graphics/schema.d.ts +177 -0
- package/dist/graphics/simulation/adapters.d.ts +36 -0
- package/dist/graphics/simulation/coordinator.d.ts +64 -0
- package/dist/graphics/simulation/index.d.ts +11 -0
- package/dist/graphics/simulation/optimizer.d.ts +101 -0
- package/dist/graphics/simulation/resource-manager.d.ts +40 -0
- package/dist/graphics/simulation/types.d.ts +126 -0
- package/dist/graphics/textures/cache.d.ts +29 -0
- package/dist/graphics/textures/canvas-utils.d.ts +31 -0
- package/dist/graphics/textures/engine.d.ts +34 -0
- package/dist/graphics/textures/generators.d.ts +29 -0
- package/dist/graphics/textures/index.d.ts +11 -0
- package/dist/graphics/textures/material-integration.d.ts +20 -0
- package/dist/graphics/textures/prng.d.ts +27 -0
- package/dist/graphics/textures/schema.d.ts +219 -0
- package/dist/graphics/textures/types.d.ts +80 -0
- package/dist/graphics/types.d.ts +152 -0
- package/dist/graphics/viewport.d.ts +32 -0
- package/dist/index.d.ts +132 -0
- package/dist/index.js +4921 -0
- package/dist/mcp/index.d.ts +12 -0
- package/dist/mcp/prompts.d.ts +9 -0
- package/dist/mcp/resources.d.ts +9 -0
- package/dist/mcp/server.d.ts +29 -0
- package/dist/mcp/tools.d.ts +9 -0
- package/dist/mcp/transport.d.ts +33 -0
- package/dist/mcp/types.d.ts +96 -0
- package/dist/presets.d.ts +176 -0
- package/dist/presets.js +3 -0
- package/dist/react.d.ts +5358 -0
- package/dist/react.js +7557 -0
- package/package.json +112 -6
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AF Motion — Adaptive Rendering & Quality Engine Types
|
|
3
|
+
*
|
|
4
|
+
* Core interfaces, presets, setting keys, metrics, system policies,
|
|
5
|
+
* and controller contracts for real-time adaptive rendering and simulation.
|
|
6
|
+
*/
|
|
7
|
+
import type { DeviceCapabilityProfile } from "../device-capabilities/types.js";
|
|
8
|
+
/**
|
|
9
|
+
* Standard named quality presets.
|
|
10
|
+
*/
|
|
11
|
+
export type QualityPresetName = "ultra" | "high" | "balanced" | "performance" | "battery-saver" | "custom";
|
|
12
|
+
/**
|
|
13
|
+
* Categorical quality tiers for individual subsystems and features.
|
|
14
|
+
*/
|
|
15
|
+
export type FeatureQualityTier = "low" | "medium" | "high" | "ultra";
|
|
16
|
+
export type ShadowQualityTier = "disabled" | "low" | "medium" | "high";
|
|
17
|
+
export type LightingQualityTier = "simple" | "standard" | "advanced";
|
|
18
|
+
export type MaterialQualityTier = "basic" | "standard" | "pbr";
|
|
19
|
+
export type TextureQualityTier = "low" | "medium" | "high" | "full";
|
|
20
|
+
export type PostProcessingQualityTier = "disabled" | "low" | "medium" | "high";
|
|
21
|
+
export type EnvironmentalQualityTier = "low" | "medium" | "high";
|
|
22
|
+
export type GpuSimulationQualityTier = "cpu" | "webgl2" | "webgpu";
|
|
23
|
+
/**
|
|
24
|
+
* Individual quality setting descriptor containing value, bounds, priority, and override state.
|
|
25
|
+
*/
|
|
26
|
+
export interface QualitySettingDescriptor<T> {
|
|
27
|
+
/** Current effective value (override if set, otherwise auto value). */
|
|
28
|
+
readonly current: T;
|
|
29
|
+
/** Auto-computed value derived from active preset or adaptation logic. */
|
|
30
|
+
readonly autoValue: T;
|
|
31
|
+
/** Minimum permitted value (for numeric dimensions). */
|
|
32
|
+
readonly min?: number;
|
|
33
|
+
/** Maximum permitted value (for numeric dimensions). */
|
|
34
|
+
readonly max?: number;
|
|
35
|
+
/** Overall quality level associated with this setting. */
|
|
36
|
+
readonly qualityLevel: QualityPresetName;
|
|
37
|
+
/** Adaptation priority (1 = lowest/cut first, 10 = highest/preserve longest). */
|
|
38
|
+
readonly adaptationPriority: number;
|
|
39
|
+
/** Estimated relative performance impact of this dimension. */
|
|
40
|
+
readonly estimatedImpact: "low" | "medium" | "high";
|
|
41
|
+
/** Optional user override value. */
|
|
42
|
+
readonly override?: T;
|
|
43
|
+
/** Mode: "auto" when driven by the engine, "manual" when user override is active. */
|
|
44
|
+
readonly mode: "auto" | "manual";
|
|
45
|
+
/** Whether this setting is locked against automated adaptation. */
|
|
46
|
+
readonly isLocked?: boolean;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Unified quality settings map containing all 15 adaptive rendering dimensions.
|
|
50
|
+
*/
|
|
51
|
+
export interface UnifiedQualitySettings {
|
|
52
|
+
/** Resolution scale factor (e.g. 0.25 to 1.0). */
|
|
53
|
+
resolutionScale: QualitySettingDescriptor<number>;
|
|
54
|
+
/** Device pixel ratio cap (e.g. 1.0 to 3.0). */
|
|
55
|
+
dpr: QualitySettingDescriptor<number>;
|
|
56
|
+
/** Geometry detail tier. */
|
|
57
|
+
geometryDetail: QualitySettingDescriptor<FeatureQualityTier>;
|
|
58
|
+
/** Model LOD level index (0 = full detail, 1 = 50%, 2 = 25%, 3 = 10%). */
|
|
59
|
+
modelLod: QualitySettingDescriptor<number>;
|
|
60
|
+
/** Shadow rendering quality. */
|
|
61
|
+
shadowQuality: QualitySettingDescriptor<ShadowQualityTier>;
|
|
62
|
+
/** Lighting computation quality. */
|
|
63
|
+
lightingQuality: QualitySettingDescriptor<LightingQualityTier>;
|
|
64
|
+
/** Material rendering quality. */
|
|
65
|
+
materialQuality: QualitySettingDescriptor<MaterialQualityTier>;
|
|
66
|
+
/** Texture resolution tier. */
|
|
67
|
+
textureResolution: QualitySettingDescriptor<TextureQualityTier>;
|
|
68
|
+
/** Post-processing effects tier. */
|
|
69
|
+
postProcessing: QualitySettingDescriptor<PostProcessingQualityTier>;
|
|
70
|
+
/** Particle density multiplier (e.g. 0.1 to 2.0). */
|
|
71
|
+
particleDensity: QualitySettingDescriptor<number>;
|
|
72
|
+
/** Fluid simulation resolution multiplier (e.g. 0.25 to 1.0). */
|
|
73
|
+
fluidResolution: QualitySettingDescriptor<number>;
|
|
74
|
+
/** Environmental effects detail tier. */
|
|
75
|
+
environmentalDetail: QualitySettingDescriptor<EnvironmentalQualityTier>;
|
|
76
|
+
/** Physics simulation frequency in Hz (e.g. 30 to 120). */
|
|
77
|
+
physicsFrequency: QualitySettingDescriptor<number>;
|
|
78
|
+
/** Animation update quality tier. */
|
|
79
|
+
animationQuality: QualitySettingDescriptor<FeatureQualityTier>;
|
|
80
|
+
/** GPU simulation compute backend and precision tier. */
|
|
81
|
+
gpuSimulationQuality: QualitySettingDescriptor<GpuSimulationQualityTier>;
|
|
82
|
+
}
|
|
83
|
+
export type QualitySettingKey = keyof UnifiedQualitySettings;
|
|
84
|
+
/**
|
|
85
|
+
* Raw values of all settings in a quality profile.
|
|
86
|
+
*/
|
|
87
|
+
export type QualityValues = {
|
|
88
|
+
[K in QualitySettingKey]: UnifiedQualitySettings[K]["current"];
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Partial overrides for quality values.
|
|
92
|
+
*/
|
|
93
|
+
export type QualityOverrides = Partial<QualityValues>;
|
|
94
|
+
/**
|
|
95
|
+
* Unified quality profile object.
|
|
96
|
+
*/
|
|
97
|
+
export interface QualityProfile {
|
|
98
|
+
/** Active preset name or "custom". */
|
|
99
|
+
readonly preset: QualityPresetName;
|
|
100
|
+
/** Full settings map with descriptors, limits, priorities, and override states. */
|
|
101
|
+
readonly settings: UnifiedQualitySettings;
|
|
102
|
+
/** Fast lookup of current values. */
|
|
103
|
+
readonly values: QualityValues;
|
|
104
|
+
/** Whether overall automatic adaptation is currently enabled. */
|
|
105
|
+
readonly isAutoAdaptive: boolean;
|
|
106
|
+
/** Whether the entire profile is locked against automated adaptation. */
|
|
107
|
+
readonly isLocked: boolean;
|
|
108
|
+
/** Timestamp when this profile was generated or modified. */
|
|
109
|
+
readonly timestamp: number;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Initial quality recommendation result based on device capabilities.
|
|
113
|
+
*/
|
|
114
|
+
export interface QualityRecommendation {
|
|
115
|
+
/** Recommended preset name. */
|
|
116
|
+
readonly preset: QualityPresetName;
|
|
117
|
+
/** Recommended baseline values. */
|
|
118
|
+
readonly values: QualityValues;
|
|
119
|
+
/** Human-readable rationale explaining the recommendation. */
|
|
120
|
+
readonly rationale: string[];
|
|
121
|
+
/** Underlying capability scores used for the decision. */
|
|
122
|
+
readonly scores: {
|
|
123
|
+
cpu: number;
|
|
124
|
+
memory: number;
|
|
125
|
+
gpu: number;
|
|
126
|
+
composite: number;
|
|
127
|
+
};
|
|
128
|
+
/** Device category identified during detection. */
|
|
129
|
+
readonly deviceCategory: string;
|
|
130
|
+
/** Confidence score (0 to 1) for the recommendation. */
|
|
131
|
+
readonly confidence: number;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Real-time performance metrics snapshot.
|
|
135
|
+
*/
|
|
136
|
+
export interface PerformanceMetrics {
|
|
137
|
+
/** Duration of the latest measured frame in milliseconds. */
|
|
138
|
+
readonly frameDurationMs: number;
|
|
139
|
+
/** Rolling average frames per second. */
|
|
140
|
+
readonly averageFps: number;
|
|
141
|
+
/** Frame duration variance (standard deviation in ms). */
|
|
142
|
+
readonly frameTimeVariance: number;
|
|
143
|
+
/** Total frame drops detected within the current sampling window. */
|
|
144
|
+
readonly frameDrops: number;
|
|
145
|
+
/** Count of long frames (> 33.3ms) in the sampling window. */
|
|
146
|
+
readonly longFrames: number;
|
|
147
|
+
/** CPU execution time spent on simulation in ms (if recorded). */
|
|
148
|
+
readonly simulationTimeMs: number;
|
|
149
|
+
/** CPU execution time spent on render submission in ms (if recorded). */
|
|
150
|
+
readonly renderTimeMs: number;
|
|
151
|
+
/** GPU timing in ms (if supported by WebGL timer queries or WebGPU). */
|
|
152
|
+
readonly gpuTimeMs?: number;
|
|
153
|
+
/** Whether true hardware GPU timing is supported in the current environment. */
|
|
154
|
+
readonly isGpuTimingSupported: boolean;
|
|
155
|
+
/** Workload complexity score or item count (e.g. active particles + meshes). */
|
|
156
|
+
readonly workloadComplexity: number;
|
|
157
|
+
/** Resource pressure score (0 to 1, estimated memory/thermal load). */
|
|
158
|
+
readonly resourcePressure: number;
|
|
159
|
+
/** Timestamp of the metrics snapshot. */
|
|
160
|
+
readonly timestamp: number;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Real-time frame submission input for recording.
|
|
164
|
+
*/
|
|
165
|
+
export interface FrameMetricsInput {
|
|
166
|
+
/** Frame duration in milliseconds (required). */
|
|
167
|
+
frameDurationMs: number;
|
|
168
|
+
/** Optional simulation CPU duration in ms. */
|
|
169
|
+
simulationTimeMs?: number;
|
|
170
|
+
/** Optional render CPU duration in ms. */
|
|
171
|
+
renderTimeMs?: number;
|
|
172
|
+
/** Optional hardware GPU duration in ms. */
|
|
173
|
+
gpuTimeMs?: number;
|
|
174
|
+
/** Optional workload item count or complexity score. */
|
|
175
|
+
workloadComplexity?: number;
|
|
176
|
+
/** Optional resource pressure (0 to 1). */
|
|
177
|
+
resourcePressure?: number;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Adaptation event record stored in bounded history.
|
|
181
|
+
*/
|
|
182
|
+
export interface QualityAdaptationEvent {
|
|
183
|
+
readonly timestamp: number;
|
|
184
|
+
readonly type: "degrade" | "recover" | "preset_change" | "user_override" | "power_save";
|
|
185
|
+
readonly previousPreset: QualityPresetName;
|
|
186
|
+
readonly newPreset: QualityPresetName;
|
|
187
|
+
readonly changedSettings: Partial<Record<QualitySettingKey, {
|
|
188
|
+
from: any;
|
|
189
|
+
to: any;
|
|
190
|
+
}>>;
|
|
191
|
+
readonly reason: string;
|
|
192
|
+
readonly triggerMetric?: {
|
|
193
|
+
averageFps: number;
|
|
194
|
+
frameDurationMs: number;
|
|
195
|
+
frameDrops: number;
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* System-specific policy configurations derived from active quality values.
|
|
200
|
+
*/
|
|
201
|
+
export interface System3DQualityPolicy {
|
|
202
|
+
maxLodLevel: number;
|
|
203
|
+
shadowResolution: number;
|
|
204
|
+
shadowsEnabled: boolean;
|
|
205
|
+
maxLights: number;
|
|
206
|
+
pbrMaterials: boolean;
|
|
207
|
+
antialiasing: boolean;
|
|
208
|
+
maxDrawCalls: number;
|
|
209
|
+
}
|
|
210
|
+
export interface SystemParticlesQualityPolicy {
|
|
211
|
+
activeCountMultiplier: number;
|
|
212
|
+
maxActiveParticles: number;
|
|
213
|
+
spawnRateFactor: number;
|
|
214
|
+
updateFrequency: number;
|
|
215
|
+
useInstancing: boolean;
|
|
216
|
+
}
|
|
217
|
+
export interface SystemFluidQualityPolicy {
|
|
218
|
+
gridResolutionScale: number;
|
|
219
|
+
solverIterations: number;
|
|
220
|
+
updateFrequency: number;
|
|
221
|
+
highPrecision: boolean;
|
|
222
|
+
}
|
|
223
|
+
export interface SystemEnvironmentQualityPolicy {
|
|
224
|
+
rainSnowDensityFactor: number;
|
|
225
|
+
fogQuality: EnvironmentalQualityTier;
|
|
226
|
+
cloudsEnabled: boolean;
|
|
227
|
+
cloudDetail: EnvironmentalQualityTier;
|
|
228
|
+
fireSmokeMaxParticles: number;
|
|
229
|
+
}
|
|
230
|
+
export interface SystemGpuSimulationQualityPolicy {
|
|
231
|
+
preferredBackend: GpuSimulationQualityTier;
|
|
232
|
+
workgroupSize: number;
|
|
233
|
+
maxComputeBufferBytes: number;
|
|
234
|
+
allowCpuFallback: boolean;
|
|
235
|
+
}
|
|
236
|
+
export interface SystemPhysicsQualityPolicy {
|
|
237
|
+
substeps: number;
|
|
238
|
+
simulationHz: number;
|
|
239
|
+
solverIterations: number;
|
|
240
|
+
enableSleeping: boolean;
|
|
241
|
+
throttleNonCritical: boolean;
|
|
242
|
+
}
|
|
243
|
+
export interface SystemModelLodQualityPolicy {
|
|
244
|
+
distanceMultiplier: number;
|
|
245
|
+
targetTriangleRatio: number;
|
|
246
|
+
maxLODIndex: number;
|
|
247
|
+
allowSimplification: boolean;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Aggregated system-specific policies container.
|
|
251
|
+
*/
|
|
252
|
+
export interface SystemQualityPolicies {
|
|
253
|
+
scene3d: System3DQualityPolicy;
|
|
254
|
+
particles: SystemParticlesQualityPolicy;
|
|
255
|
+
fluid: SystemFluidQualityPolicy;
|
|
256
|
+
environment: SystemEnvironmentQualityPolicy;
|
|
257
|
+
gpuSimulation: SystemGpuSimulationQualityPolicy;
|
|
258
|
+
physics: SystemPhysicsQualityPolicy;
|
|
259
|
+
modelLod: SystemModelLodQualityPolicy;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Dynamic resolution calculation result.
|
|
263
|
+
*/
|
|
264
|
+
export interface DynamicResolutionResult {
|
|
265
|
+
/** Scaled width in physical canvas pixels. */
|
|
266
|
+
readonly physicalWidth: number;
|
|
267
|
+
/** Scaled height in physical canvas pixels. */
|
|
268
|
+
readonly physicalHeight: number;
|
|
269
|
+
/** Scaled width in CSS logical pixels. */
|
|
270
|
+
readonly cssWidth: number;
|
|
271
|
+
/** Scaled height in CSS logical pixels. */
|
|
272
|
+
readonly cssHeight: number;
|
|
273
|
+
/** Effective device pixel ratio applied. */
|
|
274
|
+
readonly effectiveDpr: number;
|
|
275
|
+
/** Resolution scale applied (e.g. 0.25 to 1.0). */
|
|
276
|
+
readonly resolutionScale: number;
|
|
277
|
+
/** Total physical pixels. */
|
|
278
|
+
readonly totalPixels: number;
|
|
279
|
+
/** Whether the resolution was capped by the maximum pixel budget. */
|
|
280
|
+
readonly isPixelBudgetCapped: boolean;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* User quality preferences supplied during controller initialization or recommendation.
|
|
284
|
+
*/
|
|
285
|
+
export interface UserQualityPreferences {
|
|
286
|
+
/** Desired target frame rate (default 60, e.g. 30, 60, 120). */
|
|
287
|
+
targetFps?: number;
|
|
288
|
+
/** Priority preference: "quality" favors visual fidelity, "performance" favors smooth frame rates, "power" favors battery. */
|
|
289
|
+
preference?: "quality" | "performance" | "power";
|
|
290
|
+
/** Maximum allowable DPR regardless of screen density. */
|
|
291
|
+
maxDpr?: number;
|
|
292
|
+
/** Minimum allowable resolution scale. */
|
|
293
|
+
minResolutionScale?: number;
|
|
294
|
+
/** Hard cap on total physical pixels (e.g. 1920 * 1080 = 2073600). */
|
|
295
|
+
maxPixelBudget?: number;
|
|
296
|
+
/** Initial preset choice to start with. */
|
|
297
|
+
initialPreset?: QualityPresetName;
|
|
298
|
+
/** Explicit per-setting overrides. */
|
|
299
|
+
overrides?: QualityOverrides;
|
|
300
|
+
/** Whether automated adaptation should be enabled initially (default true). */
|
|
301
|
+
autoAdapt?: boolean;
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Configuration options for creating an Adaptive Quality Controller.
|
|
305
|
+
*/
|
|
306
|
+
export interface AdaptiveQualityControllerOptions {
|
|
307
|
+
/** Optional pre-detected device capability profile (falls back to detection). */
|
|
308
|
+
deviceProfile?: DeviceCapabilityProfile;
|
|
309
|
+
/** User quality preferences. */
|
|
310
|
+
preferences?: UserQualityPreferences;
|
|
311
|
+
/** Number of frame measurements kept in sliding window (default 60, min 10, max 120). */
|
|
312
|
+
samplingWindowSize?: number;
|
|
313
|
+
/** FPS drop tolerance before triggering degradation (default: 8 FPS below target). */
|
|
314
|
+
degradeFpsTolerance?: number;
|
|
315
|
+
/** FPS recovery tolerance above target before triggering recovery (default: 2 FPS below target). */
|
|
316
|
+
recoverFpsTolerance?: number;
|
|
317
|
+
/** Consecutive slow frames needed to trigger degradation (default 15). */
|
|
318
|
+
consecutiveSlowFramesThreshold?: number;
|
|
319
|
+
/** Consecutive fast frames needed to trigger recovery (default 45). */
|
|
320
|
+
consecutiveFastFramesThreshold?: number;
|
|
321
|
+
/** Minimum cooldown between adaptation steps in milliseconds (default 1500). */
|
|
322
|
+
adaptationCooldownMs?: number;
|
|
323
|
+
/** Whether to automatically adapt to battery and power states (default true). */
|
|
324
|
+
powerAware?: boolean;
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Listener function called when quality profile or metrics adapt.
|
|
328
|
+
*/
|
|
329
|
+
export type QualityChangeListener = (profile: QualityProfile, event?: QualityAdaptationEvent) => void;
|
|
330
|
+
/**
|
|
331
|
+
* Subscription handle for unsubscribing listeners.
|
|
332
|
+
*/
|
|
333
|
+
export interface QualitySubscription {
|
|
334
|
+
unsubscribe: () => void;
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Public interface of an Adaptive Quality Controller instance.
|
|
338
|
+
*/
|
|
339
|
+
export interface IAdaptiveQualityController {
|
|
340
|
+
readonly profile: QualityProfile;
|
|
341
|
+
readonly metrics: PerformanceMetrics;
|
|
342
|
+
readonly recommendation: QualityRecommendation;
|
|
343
|
+
getCurrentQuality(): QualityPresetName;
|
|
344
|
+
getQualityProfile(): QualityProfile;
|
|
345
|
+
getRecommendedProfile(): QualityRecommendation;
|
|
346
|
+
getPerformanceMetrics(): PerformanceMetrics;
|
|
347
|
+
getEffectiveResolution(cssWidth: number, cssHeight: number): DynamicResolutionResult;
|
|
348
|
+
getSystemPolicies(): SystemQualityPolicies;
|
|
349
|
+
recordFrame(deltaTimeMs: number, extraMetrics?: Partial<FrameMetricsInput>): PerformanceMetrics;
|
|
350
|
+
updatePerformanceMetrics(input: FrameMetricsInput): PerformanceMetrics;
|
|
351
|
+
adaptQuality(): boolean;
|
|
352
|
+
setQualityPreset(preset: QualityPresetName): void;
|
|
353
|
+
setQualityOverride<K extends QualitySettingKey>(key: K, value: UnifiedQualitySettings[K]["current"]): void;
|
|
354
|
+
clearQualityOverride(key: QualitySettingKey): void;
|
|
355
|
+
clearAllQualityOverrides(): void;
|
|
356
|
+
lockQualitySettings(locked: boolean): void;
|
|
357
|
+
unlockQualitySettings(): void;
|
|
358
|
+
resetToRecommendedQuality(): void;
|
|
359
|
+
getQualityAdaptationHistory(): readonly QualityAdaptationEvent[];
|
|
360
|
+
subscribe(listener: QualityChangeListener): QualitySubscription;
|
|
361
|
+
dispose(): void;
|
|
362
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AF Motion Multi-System Motion Adapters
|
|
3
|
+
*
|
|
4
|
+
* Normalizes disparate motion engine controls (SVG morph, motion paths,
|
|
5
|
+
* kinetic typography, shared elements, view transitions, animation, physics, custom)
|
|
6
|
+
* into a unified participant contract with lifecycle safety.
|
|
7
|
+
*/
|
|
8
|
+
import type { MotionEngineAdapter, MotionParticipantConfig, MotionParticipantInstance } from "./types.js";
|
|
9
|
+
/**
|
|
10
|
+
* Registers a custom motion engine adapter.
|
|
11
|
+
*/
|
|
12
|
+
export declare function registerMotionAdapter(system: string, adapter: MotionEngineAdapter): void;
|
|
13
|
+
/**
|
|
14
|
+
* Retrieves a registered motion engine adapter.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getMotionAdapter(system: string): MotionEngineAdapter | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Creates an instance of a motion participant according to its system type.
|
|
19
|
+
*/
|
|
20
|
+
export declare function createParticipantInstance(config: MotionParticipantConfig): MotionParticipantInstance;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AF Motion Unified Advanced Motion Composition Controller
|
|
3
|
+
*
|
|
4
|
+
* Coordinates playback, seeking, pausing, reversal, shared RAF animation,
|
|
5
|
+
* and lifecycle safety across multiple synchronized motion engines.
|
|
6
|
+
*/
|
|
7
|
+
import type { AdvancedMotionCompositionController, AdvancedMotionCompositionDefinition, CompositionPlaybackState, MotionParticipantState, ScheduledTrack } from "./types.js";
|
|
8
|
+
export declare class AdvancedMotionCompositionControllerImpl implements AdvancedMotionCompositionController {
|
|
9
|
+
readonly id: string;
|
|
10
|
+
private readonly definition;
|
|
11
|
+
private readonly tracks;
|
|
12
|
+
private readonly trackMap;
|
|
13
|
+
private readonly totalDuration;
|
|
14
|
+
private _state;
|
|
15
|
+
private _progress;
|
|
16
|
+
private _isPlaying;
|
|
17
|
+
private _error;
|
|
18
|
+
private animControls;
|
|
19
|
+
private resolvePlayPromise;
|
|
20
|
+
private rejectPlayPromise;
|
|
21
|
+
constructor(definition: AdvancedMotionCompositionDefinition);
|
|
22
|
+
get state(): CompositionPlaybackState;
|
|
23
|
+
get progress(): number;
|
|
24
|
+
get isPlaying(): boolean;
|
|
25
|
+
get duration(): number;
|
|
26
|
+
get error(): Error | null;
|
|
27
|
+
get activeParticipants(): readonly string[];
|
|
28
|
+
getState(): CompositionPlaybackState;
|
|
29
|
+
getTracks(): readonly ScheduledTrack[];
|
|
30
|
+
getParticipantProgress(id: string): number;
|
|
31
|
+
getParticipantState(id: string): MotionParticipantState | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Applies global timeline progress (0 to 1) across all scheduled participant tracks.
|
|
34
|
+
*/
|
|
35
|
+
private applyProgress;
|
|
36
|
+
/**
|
|
37
|
+
* Plays the composition from current progress to completion.
|
|
38
|
+
*/
|
|
39
|
+
play(): Promise<void>;
|
|
40
|
+
pause(): void;
|
|
41
|
+
resume(): void;
|
|
42
|
+
reverse(): void;
|
|
43
|
+
seek(progressOrLabel: number | string): void;
|
|
44
|
+
restart(): Promise<void>;
|
|
45
|
+
cancel(): void;
|
|
46
|
+
finish(): void;
|
|
47
|
+
dispose(): void;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Creates an advanced motion composition controller.
|
|
51
|
+
*/
|
|
52
|
+
export declare function createAdvancedComposition(definition: AdvancedMotionCompositionDefinition): AdvancedMotionCompositionController;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AF Motion Unified Advanced Motion Composition Module
|
|
3
|
+
*
|
|
4
|
+
* Orchestrates SVG morphing, motion paths, kinetic typography, shared elements,
|
|
5
|
+
* view transitions, layout, and physics into cohesive, deterministic motion experiences.
|
|
6
|
+
*/
|
|
7
|
+
export * from "./types.js";
|
|
8
|
+
export * from "./validation.js";
|
|
9
|
+
export * from "./adapters.js";
|
|
10
|
+
export * from "./timeline.js";
|
|
11
|
+
export * from "./controller.js";
|
|
12
|
+
export * from "./recipes.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AF Motion Advanced Composition Recipes & Presets
|
|
3
|
+
*
|
|
4
|
+
* Pre-configured recipes combining SVG morphing, motion paths, kinetic typography,
|
|
5
|
+
* shared elements, layout, and physics into cohesive multi-system motion experiences.
|
|
6
|
+
*/
|
|
7
|
+
import type { AdvancedCompositionPresetName, AdvancedMotionCompositionDefinition } from "./types.js";
|
|
8
|
+
export declare const ADVANCED_COMPOSITION_PRESETS: Record<AdvancedCompositionPresetName, (overrides?: Partial<AdvancedMotionCompositionDefinition>) => AdvancedMotionCompositionDefinition>;
|
|
9
|
+
/**
|
|
10
|
+
* Returns a configured Advanced Motion Composition definition from a preset name.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getAdvancedCompositionPreset(name: AdvancedCompositionPresetName, overrides?: Partial<AdvancedMotionCompositionDefinition>): AdvancedMotionCompositionDefinition;
|
|
13
|
+
/**
|
|
14
|
+
* Lists all available preset names.
|
|
15
|
+
*/
|
|
16
|
+
export declare function listAdvancedCompositionPresets(): AdvancedCompositionPresetName[];
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AF Motion Advanced Timeline & Dependency Scheduler
|
|
3
|
+
*
|
|
4
|
+
* Computes deterministic track schedules, resolves relative offsets,
|
|
5
|
+
* maps timeline labels, enforces topological dependencies, and calculates total duration.
|
|
6
|
+
*/
|
|
7
|
+
import type { AdvancedMotionCompositionDefinition, MotionParticipantConfig, ScheduledTrack } from "./types.js";
|
|
8
|
+
/**
|
|
9
|
+
* Parses time offsets such as "+=150", "-=100", ">", "<", or direct milliseconds / labels.
|
|
10
|
+
*/
|
|
11
|
+
export declare function parseTimelineOffset(at: number | string | undefined, previousTrackEnd: number, previousTrackStart: number, labels?: Record<string, number>): number;
|
|
12
|
+
/**
|
|
13
|
+
* Computes deterministic scheduled tracks from composition participants.
|
|
14
|
+
*/
|
|
15
|
+
export declare function scheduleCompositionTracks(definition: AdvancedMotionCompositionDefinition): {
|
|
16
|
+
tracks: ScheduledTrack[];
|
|
17
|
+
totalDuration: number;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Standalone Advanced Timeline class for incremental track building.
|
|
21
|
+
*/
|
|
22
|
+
export declare class AdvancedTimeline {
|
|
23
|
+
private readonly participants;
|
|
24
|
+
private readonly labels;
|
|
25
|
+
add(participant: MotionParticipantConfig): this;
|
|
26
|
+
addLabel(name: string, timeMs: number): this;
|
|
27
|
+
getSchedule(id?: string): {
|
|
28
|
+
tracks: ScheduledTrack[];
|
|
29
|
+
totalDuration: number;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Creates an Advanced Timeline builder.
|
|
34
|
+
*/
|
|
35
|
+
export declare function createAdvancedTimeline(): AdvancedTimeline;
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AF Motion Unified Advanced Motion Composition Contracts
|
|
3
|
+
*
|
|
4
|
+
* Framework-independent contracts for orchestrating SVG morphing, motion paths,
|
|
5
|
+
* kinetic typography, shared elements, view transitions, layout, and physics.
|
|
6
|
+
*/
|
|
7
|
+
import type { EasingFunction } from "../animation.js";
|
|
8
|
+
import type { MorphAnimationOptions } from "../svg-morph/types.js";
|
|
9
|
+
import type { PathAnimationOptions, MotionPathDefinition } from "../motion-path/types.js";
|
|
10
|
+
import type { TypographyAnimationOptions } from "../typography/types.js";
|
|
11
|
+
import type { SharedElementTransitionConfig, SharedElementRect } from "../transitions/types.js";
|
|
12
|
+
export declare const ADVANCED_MOTION_SPEC_VERSION = "1.0.0";
|
|
13
|
+
export type MotionParticipantSystem = "svg-morph" | "motion-path" | "typography" | "shared-element" | "view-transition" | "animation" | "physics" | "custom";
|
|
14
|
+
export type MotionParticipantState = "idle" | "pending" | "running" | "paused" | "completed" | "cancelled" | "failed";
|
|
15
|
+
export type CompositionPlaybackState = "idle" | "running" | "paused" | "completed" | "cancelled" | "disposed";
|
|
16
|
+
export type CompositionFailurePolicy = "abort" | "continue" | "rollback";
|
|
17
|
+
export interface BaseParticipantConfig {
|
|
18
|
+
/** Unique participant identifier within the composition. */
|
|
19
|
+
readonly id: string;
|
|
20
|
+
/** Motion system type. */
|
|
21
|
+
readonly system: MotionParticipantSystem;
|
|
22
|
+
/** Explicit list of participant IDs that must complete before this starts. */
|
|
23
|
+
readonly dependsOn?: readonly string[];
|
|
24
|
+
/** Absolute start time in ms or timeline label/offset (e.g., 200, "+=100", ">", "<", "labelName"). */
|
|
25
|
+
readonly at?: number | string;
|
|
26
|
+
/** Duration in milliseconds. If omitted, derived from system config. */
|
|
27
|
+
readonly duration?: number;
|
|
28
|
+
/** Initial delay before this participant runs once scheduled. */
|
|
29
|
+
readonly delay?: number;
|
|
30
|
+
/** Easing curve for progress distribution. */
|
|
31
|
+
readonly easing?: string | EasingFunction;
|
|
32
|
+
/** Optional human-readable label. */
|
|
33
|
+
readonly label?: string;
|
|
34
|
+
/** Whether this participant can be skipped if reduced-motion is preferred. */
|
|
35
|
+
readonly respectReducedMotion?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface SVGMorphParticipantConfig extends BaseParticipantConfig {
|
|
38
|
+
readonly system: "svg-morph";
|
|
39
|
+
readonly target: SVGPathElement | string;
|
|
40
|
+
readonly to: string;
|
|
41
|
+
readonly options?: MorphAnimationOptions;
|
|
42
|
+
}
|
|
43
|
+
export interface MotionPathParticipantConfig extends BaseParticipantConfig {
|
|
44
|
+
readonly system: "motion-path";
|
|
45
|
+
readonly target: HTMLElement | SVGElement | string;
|
|
46
|
+
readonly path: MotionPathDefinition;
|
|
47
|
+
readonly options?: PathAnimationOptions;
|
|
48
|
+
}
|
|
49
|
+
export interface TypographyParticipantConfig extends BaseParticipantConfig {
|
|
50
|
+
readonly system: "typography";
|
|
51
|
+
readonly target: HTMLElement | string;
|
|
52
|
+
readonly options?: TypographyAnimationOptions;
|
|
53
|
+
}
|
|
54
|
+
export interface SharedElementParticipantConfig extends BaseParticipantConfig {
|
|
55
|
+
readonly system: "shared-element";
|
|
56
|
+
readonly source?: HTMLElement | string | SharedElementRect;
|
|
57
|
+
readonly destination?: HTMLElement | string | SharedElementRect;
|
|
58
|
+
readonly options?: SharedElementTransitionConfig;
|
|
59
|
+
}
|
|
60
|
+
export interface ViewTransitionParticipantConfig extends BaseParticipantConfig {
|
|
61
|
+
readonly system: "view-transition";
|
|
62
|
+
readonly update: () => void | Promise<void>;
|
|
63
|
+
readonly options?: Record<string, unknown>;
|
|
64
|
+
}
|
|
65
|
+
export interface AnimationParticipantConfig extends BaseParticipantConfig {
|
|
66
|
+
readonly system: "animation";
|
|
67
|
+
readonly target: HTMLElement | SVGElement | string;
|
|
68
|
+
readonly keyframes: Record<string, unknown>;
|
|
69
|
+
readonly options?: Record<string, unknown>;
|
|
70
|
+
}
|
|
71
|
+
export interface PhysicsParticipantConfig extends BaseParticipantConfig {
|
|
72
|
+
readonly system: "physics";
|
|
73
|
+
readonly target: HTMLElement | string;
|
|
74
|
+
readonly type?: "spring" | "inertia";
|
|
75
|
+
readonly options?: Record<string, unknown>;
|
|
76
|
+
}
|
|
77
|
+
export interface CustomParticipantConfig extends BaseParticipantConfig {
|
|
78
|
+
readonly system: "custom";
|
|
79
|
+
readonly run: (progress: number, state: MotionParticipantState) => void | Promise<void>;
|
|
80
|
+
readonly onCancel?: () => void;
|
|
81
|
+
readonly onFinish?: () => void;
|
|
82
|
+
readonly onDispose?: () => void;
|
|
83
|
+
}
|
|
84
|
+
export type MotionParticipantConfig = SVGMorphParticipantConfig | MotionPathParticipantConfig | TypographyParticipantConfig | SharedElementParticipantConfig | ViewTransitionParticipantConfig | AnimationParticipantConfig | PhysicsParticipantConfig | CustomParticipantConfig;
|
|
85
|
+
export interface AdvancedMotionCompositionDefinition {
|
|
86
|
+
/** Unique composition identifier. */
|
|
87
|
+
readonly id: string;
|
|
88
|
+
/** Optional human-readable title. */
|
|
89
|
+
readonly name?: string;
|
|
90
|
+
/** Motion participants in this composition. */
|
|
91
|
+
readonly participants: readonly MotionParticipantConfig[];
|
|
92
|
+
/** Overall composition timing overrides. */
|
|
93
|
+
readonly duration?: number;
|
|
94
|
+
readonly delay?: number;
|
|
95
|
+
readonly easing?: string | EasingFunction;
|
|
96
|
+
readonly iterations?: number;
|
|
97
|
+
readonly playbackRate?: number;
|
|
98
|
+
readonly respectReducedMotion?: boolean;
|
|
99
|
+
readonly failurePolicy?: CompositionFailurePolicy;
|
|
100
|
+
/** Named timeline markers mapping name to millisecond timestamp. */
|
|
101
|
+
readonly labels?: Record<string, number>;
|
|
102
|
+
/** Metadata and developer diagnostics. */
|
|
103
|
+
readonly metadata?: Record<string, unknown>;
|
|
104
|
+
/** Lifecycle callbacks. */
|
|
105
|
+
readonly onStart?: () => void;
|
|
106
|
+
readonly onUpdate?: (progress: number) => void;
|
|
107
|
+
readonly onComplete?: () => void;
|
|
108
|
+
readonly onError?: (error: Error) => void;
|
|
109
|
+
readonly onCancel?: () => void;
|
|
110
|
+
}
|
|
111
|
+
export interface MotionParticipantInstance {
|
|
112
|
+
readonly id: string;
|
|
113
|
+
readonly system: MotionParticipantSystem;
|
|
114
|
+
start(): Promise<void> | void;
|
|
115
|
+
pause(): void;
|
|
116
|
+
resume(): void;
|
|
117
|
+
reverse(): void;
|
|
118
|
+
seek(progress: number): void;
|
|
119
|
+
cancel(): void;
|
|
120
|
+
finish(): void;
|
|
121
|
+
dispose(): void;
|
|
122
|
+
getProgress(): number;
|
|
123
|
+
getState(): MotionParticipantState;
|
|
124
|
+
readonly finished?: Promise<void>;
|
|
125
|
+
}
|
|
126
|
+
export interface MotionEngineAdapter {
|
|
127
|
+
readonly system: MotionParticipantSystem;
|
|
128
|
+
createInstance(config: MotionParticipantConfig): MotionParticipantInstance;
|
|
129
|
+
}
|
|
130
|
+
export interface ScheduledTrack {
|
|
131
|
+
readonly participant: MotionParticipantConfig;
|
|
132
|
+
readonly instance: MotionParticipantInstance;
|
|
133
|
+
readonly startTime: number;
|
|
134
|
+
readonly endTime: number;
|
|
135
|
+
readonly duration: number;
|
|
136
|
+
state: MotionParticipantState;
|
|
137
|
+
progress: number;
|
|
138
|
+
}
|
|
139
|
+
export interface AdvancedMotionCompositionController {
|
|
140
|
+
readonly id: string;
|
|
141
|
+
readonly state: CompositionPlaybackState;
|
|
142
|
+
readonly progress: number;
|
|
143
|
+
readonly isPlaying: boolean;
|
|
144
|
+
readonly duration: number;
|
|
145
|
+
readonly activeParticipants: readonly string[];
|
|
146
|
+
readonly error: Error | null;
|
|
147
|
+
play(): Promise<void>;
|
|
148
|
+
pause(): void;
|
|
149
|
+
resume(): void;
|
|
150
|
+
reverse(): void;
|
|
151
|
+
seek(progressOrLabel: number | string): void;
|
|
152
|
+
restart(): Promise<void>;
|
|
153
|
+
cancel(): void;
|
|
154
|
+
finish(): void;
|
|
155
|
+
dispose(): void;
|
|
156
|
+
getState(): CompositionPlaybackState;
|
|
157
|
+
getParticipantProgress(id: string): number;
|
|
158
|
+
getParticipantState(id: string): MotionParticipantState | undefined;
|
|
159
|
+
getTracks(): readonly ScheduledTrack[];
|
|
160
|
+
}
|
|
161
|
+
export interface AdvancedCompositionValidationError {
|
|
162
|
+
readonly participantId?: string;
|
|
163
|
+
readonly field?: string;
|
|
164
|
+
readonly code: "DUPLICATE_ID" | "EMPTY_ID" | "UNKNOWN_SYSTEM" | "INVALID_TIMING" | "CIRCULAR_DEPENDENCY" | "MISSING_DEPENDENCY" | "ADAPTER_ERROR" | "INVALID_PARTICIPANT";
|
|
165
|
+
readonly message: string;
|
|
166
|
+
}
|
|
167
|
+
export type CompositionValidationError = AdvancedCompositionValidationError;
|
|
168
|
+
export interface AdvancedCompositionValidationResult {
|
|
169
|
+
readonly valid: boolean;
|
|
170
|
+
readonly errors: readonly AdvancedCompositionValidationError[];
|
|
171
|
+
readonly warnings: readonly string[];
|
|
172
|
+
}
|
|
173
|
+
export type CompositionValidationResult = AdvancedCompositionValidationResult;
|
|
174
|
+
export type AdvancedCompositionPresetName = "svg-morph-and-path" | "typography-and-path" | "shared-element-and-layout" | "typography-and-shared-element" | "multi-element-coordinated-reveal" | "morphing-scene-transition" | "cinematic-page-transition" | "physics-path-choreography";
|