≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
loading 3d model
Posted by:
(you are not logged in)
Enter the missing letter in: "Internationa?"
(you are not logged in)
Text:
[quote][b][/b] wrote: The code doesn't work as it is. It need a delay because the second [b] engine.OnLoa_dingComplete [/b] take the control before the first [b] engine.OnLoa_dingComplete [/b] is finished completely. Something like this: [code] var savedSphere = null; engine.load('copperlichtdata/sphere.ccbjs'); engine.OnLoa_dingComplete = function() { var scene = engine.getScene(); if (scene) { savedSphere = scene.getSceneNodeFromName('sphereMesh1'); } } function callback(){ return function(){ engine.load('copperlichtdata/cube.ccbjs'); engine.OnLoa_dingComplete = function(){ var scene = engine.getScene(); if (scene) { scene.getRootSceneNode().addChild(savedSphere); } } } } setTimeout(callback(), 10); [/code] This is a sample about how to load a sphere in a main scene (cube.ccbjs). First loading cube.ccbjs. Then loading sphere.ccbjs and get the savedSphere as javaScript object. Finaly reloading cube.ccbjs and adding savedSphere. [url] http://estudio3d.eu/coppercube/trytoloadsphere.html [/url] But this is a little bit weird, loading and saving, than reloading (with the blinking delay). But only we can load objects in the same main scene. The loaded objects disappear on reloading the main scene. How could I push ccbjs geometry (copperlicht SDK) without losing the previous added geometry?[/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact