Forum

How to get the end of an animation in js?

28 October 2019 16:43
Hello everyone,

i try to make an if statement in javascript and want to go to another function, if my animation ends!

for example
MY Function = function(){
if(this.checked){
m_cam.eye_setup(camera, { pos: POS, look_at: LOOK_AT });
m_anim.apply(camera,"Camera_action_"+ $("#video_templates").val().toString());
m_anim.play(camera);
}
else if( "ANIMATION_ENDS!"){
m_cam.target_setup(camera, { pos: null, pivot: TARGET_PIVOT, horiz_rot_lim: null, vert_rot_lim: TARGET_VERT_LIMITS, dist_lim: null, use_panning: true });

$("#start_template").attr("checked", false);
}
}

Have anyone an Idea?

Kind regards,
Bani
Bani
 
Please register or log in to leave a reply.