/** * Animation utilities for AR objects * Provides smooth animation functions for manipulating AR objects */ export declare enum ARAnimationEasing { LINEAR = "linear", EASE_IN = "easeIn", EASE_OUT = "easeOut", EASE_IN_OUT = "easeInOut", BOUNCE = "bounce", ELASTIC = "elastic" } export declare enum ARAnimationProperty { POSITION_X = "position.x", POSITION_Y = "position.y", POSITION_Z = "position.z", ROTATION_X = "rotation.x", ROTATION_Y = "rotation.y", ROTATION_Z = "rotation.z", SCALE = "scale", OPACITY = "opacity" } export interface ARAnimationConfig { /** * Duration of the animation in milliseconds */ duration: number; /** * Easing function to use */ easing?: ARAnimationEasing; /** * Delay before starting animation in milliseconds */ delay?: number; /** * Whether to loop the animation */ loop?: boolean; /** * Number of times to repeat the animation * If loop is true, this is ignored */ repeatCount?: number; /** * Whether to animate in reverse when repeating * (forward, then backward, then forward, etc.) */ autoReverse?: boolean; /** * Callback when animation completes */ onComplete?: () => void; } /** * Object placement animation types */ export declare enum ARPlacementAnimationType { NONE = "none", FADE_IN = "fadeIn", DROP = "drop", GROW = "grow", BOUNCE = "bounce", SPIRAL = "spiral", APPEAR = "appear", SLIDE_IN = "slideIn", ASSEMBLE = "assemble" } /** * Configuration for object placement animations */ export interface ARPlacementAnimationConfig { /** * Type of placement animation to use */ type: ARPlacementAnimationType; /** * Duration of the placement animation in milliseconds */ duration?: number; /** * Easing function to use for the placement animation */ easing?: ARAnimationEasing; /** * Direction for directional animations (like slideIn) * Values: 'top', 'bottom', 'left', 'right', 'forward', 'backward' */ direction?: string; /** * Initial offset for animations that start from an offset position * (in meters) */ offset?: number; /** * Initial scale for animations that start from a different scale */ initialScale?: number; /** * Intensity of the animation effect (0.0 - 1.0) * Higher values make the effect more pronounced */ intensity?: number; /** * Whether to add a small random variation to the animation * to make multiple objects placed at once look more natural */ randomizeSlightly?: boolean; /** * Optional callback when placement animation completes */ onComplete?: () => void; } export interface ARSelectionAnimationConfig { /** * Whether to enable selection animation */ enabled: boolean; /** * Y-axis float height when selected (in meters) */ floatHeight?: number; /** * Duration of the float animation (ms) */ floatDuration?: number; /** * Whether to add a pulsing scale effect */ pulseScale?: boolean; /** * Scale factor for the pulse effect (1.0 = no scale change) */ pulseScaleFactor?: number; /** * Whether to add a rotating effect */ rotate?: boolean; /** * Rotation speed in radians per second */ rotationSpeed?: number; /** * Custom material to apply when selected */ selectionMaterial?: { color?: string; opacity?: number; emissive?: string; }; } /** * Animation utilities for AR objects */ export declare class ARAnimationUtils { private static defaultSelectionConfig; private static activeAnimations; private static originalPositions; private static selectedObjectId; /** * Animates a property of an AR object */ static animateProperty(objectId: string, property: ARAnimationProperty, toValue: number, config: ARAnimationConfig): Promise; /** * Stops all animations for an object */ static stopAllAnimations(objectId: string): Promise; /** * Sets the current selected object * Applies selection animations based on config */ static selectObject(objectId: string, config?: Partial): Promise; /** * Deselects the current selected object * Stops all selection animations and returns object to original position */ static deselectObject(): Promise; /** * Animates an object to a new position */ static animatePosition(objectId: string, position: { x: number; y: number; z: number; }, duration?: number, easing?: ARAnimationEasing): Promise; /** * Animates an object's rotation */ static animateRotation(objectId: string, rotation: { x: number; y: number; z: number; }, duration?: number, easing?: ARAnimationEasing): Promise; /** * Animates an object's scale */ static animateScale(objectId: string, scale: number, duration?: number, easing?: ARAnimationEasing): Promise; /** * Creates a bouncing animation for an object */ static animateBounce(objectId: string, height?: number, duration?: number, repeatCount?: number): Promise; /** * Creates a wobble rotation animation (like the object is unstable) */ static animateWobble(objectId: string, intensity?: number, duration?: number, repeatCount?: number): Promise; /** * Default placement animation configuration */ private static defaultPlacementConfig; /** * Applies a placement animation to an object that's just been placed in the AR scene * @param objectId ID of the object to animate * @param config Animation configuration * @returns Promise that resolves when the placement animation has started * (Not when it's complete, unless you use the onComplete callback) */ static animatePlacement(objectId: string, config: Partial): Promise; /** * Fade-in placement animation */ private static _animateFadeIn; /** * Drop-from-above placement animation */ private static _animateDrop; /** * Grow-from-small placement animation */ private static _animateGrow; /** * Bounce-in placement animation */ private static _animateBounceIn; /** * Spiral-in placement animation */ private static _animateSpiral; /** * Appear with a flash effect */ private static _animateAppear; /** * Slide in from a direction */ private static _animateSlideIn; /** * Assemble the object from separate parts * (visual effect using opacity, scale and position) */ private static _animateAssemble; /** * Helper to get an object's current material */ private static _getObjectMaterial; } //# sourceMappingURL=ARAnimationUtils.d.ts.map