由用户创建的信息 Bani
12 November 2019 12:46
[ON MODERATION]
12 November 2019 12:43
[ON MODERATION]
Yes there are many solutions!
You can set a new project and use .json export for personal programming!
Than you export your project as an json file into your project folder.
After that you have to got to your Html and javascript file and connect them both via script!
Here an example:
HTML :
<button id="play_animation"></button>
js:
var m_app = require("app");
var m_anim = require("animation");
var m_scenes = require("scenes");
//put it to the 'place your code here' section
var your_button = document.getElementbyId("play_animation");
your_button.onclick = function(){
var anim_obj = m_scenes.get_object_by_name("YOUR_OBJECT_WICH_HAS_THE_ANIMATION");
m_anim.apply(anim_obj, "ANIMATION_NAME");
m_anim.play(anim_obj);
}
I hope it was helpfull!
You can set a new project and use .json export for personal programming!
Than you export your project as an json file into your project folder.
After that you have to got to your Html and javascript file and connect them both via script!
Here an example:
HTML :
<button id="play_animation"></button>
js:
var m_app = require("app");
var m_anim = require("animation");
var m_scenes = require("scenes");
//put it to the 'place your code here' section
var your_button = document.getElementbyId("play_animation");
your_button.onclick = function(){
var anim_obj = m_scenes.get_object_by_name("YOUR_OBJECT_WICH_HAS_THE_ANIMATION");
m_anim.apply(anim_obj, "ANIMATION_NAME");
m_anim.play(anim_obj);
}
I hope it was helpfull!
12 November 2019 12:33
[ON MODERATION]
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
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