import { Object3D } from "three";

import { AnimationUtils } from "../engine/engine_animation.js";

/** Internal method - This marks an object as being animated. Make sure to always call isAnimated=false if you stop animating the object
 * @param obj The object to mark
 * @param isAnimated Whether the object is animated or not
 * @deprecated Use {@link AnimationUtils.setObjectAnimated} instead
 */
export function setObjectAnimated(obj: Object3D, animatedBy: object, isAnimated: boolean) {
    return AnimationUtils.setObjectAnimated(obj, animatedBy, isAnimated);
}

/** Get is the object is currently animated. Currently used by the Animator to check if a timeline animationtrack is actively animating an object 
 * @deprecated Use {@link AnimationUtils.getObjectAnimated} instead
*/
export function getObjectAnimated(obj: Object3D): boolean {
    return AnimationUtils.getObjectAnimated(obj) || false;
}