论坛

由用户创建的信息 Roman_Sementsov
07 December 2015 16:38
I've got iPhone 5S and 6. I couldn't reproduce this issue.
We'll try to find 4,5 iPhones and test this bug.
07 December 2015 15:36
Hello.

We'll test it. Thank you for your feedback!
07 December 2015 12:03
Добрый день.

В настоящее время канвас-текстуры копируются по ссылке, то есть берутся с объекта оригинала. В ближайшем будущем (очень надеюсь, что в этом релизе) они будут копироваться по значению (то есть будут уникальными при копировании).
04 December 2015 18:44
А пирожок будет с CG Event'a
04 December 2015 18:38
Take a look at this file, please
04 December 2015 18:32
Can I give you an advice?

You should disable scenes dynamic loading if you've already loaded one and don't unload it. I can press loading button 100 times and, when I press unload button, only the latest loaded scene will be unloaded.
04 December 2015 18:21
Hi.

I've corrected your "setObjectMaterialParameterHeightToRandomValue" function. Take a look at the following code lines, please:

function setObjectMaterialParameterHeightToRandomValue(){
        var sceneName = "TorusScene";
        var objName = "Torus";
        //objName = "Plane";
        var materialName = "Material";
        var parameterName = "Height";
        var value = Math.random()*2.5;

        //console.log( "Before: ", m_scenes.get_active() );
        //console.log( "All scene names: ", m_scenes.get_scenes() );
        //m_scenes.set_active(sceneName);
        //console.log( "After: ", m_scenes.get_active() );
        //console.log( "All scene names: ", m_scenes.get_scenes() );

        // get_object_by_name("Torus") finds nothing.
        var objFoundWithAPICall = m_scenes.get_object_by_name(objName, objectID);
        console.log( "Found Object via API-Call get_object_by_name('Torus'): ", objFoundWithAPICall );
        // var obj = findObjectByName(objName);
        // console.log( "Found Object by Name 'Torus' over all objects via get_all_objects(): ", obj );

        m_obj.set_nodemat_value(objFoundWithAPICall, [materialName, parameterName], value);
    }


I appended your global variable "objectID" to m_scenes.get_object_by_name function. It's necessary, because this function uses 0 value by default. And the engine tries to find your object in main scene objects. The "get_all_objects" function uses m_obj.DATA_ID_ALL as a default data_id value.

The m_scenes.get_object_by_name cannot use DATA_ID_ALL by default value for data_id variable, because you can load the same scene twice or more times. In this case this function will have to return two or more objects, but it must return only one object.

script.js
04 December 2015 16:32
We are going to add a lot of interesting and useful examples in the future.
04 December 2015 15:09
Мы перенесем "Просмотреть последние обновления в темах" с самого низа наверх??
04 December 2015 15:01
Hello,

For example, you've prepared actions in Blender and exported scene. Now you should apply this actions to the object:

function load_cb(data_id) {
    m_app.enable_controls();
    m_app.enable_camera_controls();

    var obj = m_scenes.get_object_by_name("NAME");
    if (obj) {
        m_anim.apply(obj, "ACTION_NAME_0", 0); // 0 -is slot num
        m_anim.apply(obj, "ACTION_NAME_1", 1); // 1 -is slot num
        m_anim.apply(obj, "ACTION_NAME_2", 2); // 2 -is slot num
    }
}


And if you want to play the 1th animation, for example, you should call the following code lines:
var obj = m_scenes.get_object_by_name("NAME");
var anim_callback = function() {};
m_anim.play(obj, anim_callback, 1); // 1 -is slot num

The "anim_callback" function will be called after animation will have finished.