由用户创建的信息 polytriangle
22 December 2015 11:55
21 December 2015 23:37
Hi!
So I load one json containing Cube1,
then I load another json containing Cube2.
Both cubes are visible and it works nice except I can access Cube1 but not Cube2.
B4W ERROR: get object Cube2: not found
What am I missing here?
So I load one json containing Cube1,
then I load another json containing Cube2.
Both cubes are visible and it works nice except I can access Cube1 but not Cube2.
B4W ERROR: get object Cube2: not found
What am I missing here?
//load scene one
function load_sc1() {m_data.load("scene1.json",sc1_loaded_cb);} //has Cube1
//load scene two
function load_sc2() {m_data.load("scene2.json");} //has Cube2
//////——–
function sc1_loaded_cb(data_id) {
m_app.enable_controls();
m_app.enable_camera_controls();
}
//test functions
function test_one(){ var obj_one = m_scenes.get_object_by_name("Cube1");} //works
function test_two(){ var obj_two = m_scenes.get_object_by_name("Cube2");} //fails..
01 November 2015 12:49
12 October 2015 20:59
02 October 2015 22:26
28 April 2015 20:51