Форум

Сообщения, созданные пользователем Bani
12 ноября 2019 12:46 [ON MODERATION]
When you want to use and variable, than you could do the script that way:


play_animation.oninput = function(e){
if(this.value =="Your_Value"){
// the apply and play block here

}
}
12 ноября 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!
12 ноября 2019 12:33 [ON MODERATION]
Yes there are many solutions!

Here an example:
HTML :
<button id="play_animation"></button>

js:
var m_app = require("app");
var m_scs = require("scenes");
var m_anim = require("animation");
var m_scenes = require("scenes");

var anim_obj
04 ноября 2019 17:35 [ON MODERATION]
How can I disable the controls on keyboard?
04 ноября 2019 17:34 [ON MODERATION]
How can i disable the controls on my keyboard?
28 октября 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