Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hi everybody, I've got a little probleme and i don't know if it's a bug or I'm doing it in the wrong way. here is my case, i load first file1.ccbj in canvas1, then i load file2.ccbj to canvas2, then i try to get a scene from the seconde canvas and add it to the first loaded engine. var engine1 = startCopperLichtFromFile('Canvas1', 'file1.ccbj'); engine1.ingComplete=function (){ var engine2 = startCopperLichtFromFile('Canvas2', 'file2.ccbj'); engine2.ingComplete=function (){ engine1.addScene(engine2.getScene()); } } All is working file, the probleme is when I have Overlay2D in the scene that will be imported, the text dont show correctly in the engine1. thanks by advence. |
||||
|
Hm, I'm not sure if this would work, it wasn't designed so you can switch scenes and data between to instances of an engine, on different canvases. I'm surprised this works at all :) |
||||
|
Is there a way to get scenes from different files ? |
||||
|
Sure, just use engine.load('somefile.ccbjs'); |
||||
|
I'm stupid, Think you bro, You made my day ! |
||||
|
engine.load('somefile.ccbjs');destroy the content of the original file, if not saved and added on reloading. (IMO) So I tried the code of @xakiru - he said that worked:
example here: http://estudio3d.eu/coppercube/t... Even if I used the same engine and same scene – in different <DIV>'s, or engine= new CL3D.CopperLicht(), engine.load() - It seems that we could control only the engine loaded in the first <DIV> - see arrow keys and F, G keys implemented from tutorial2. On trying to copy the node from one engine to another I’ve got the same error message: WebGL: INVALID_OPERATION: bind(‘something’): object not from this context. for all elements of the javascript object. The javascript object was copied but empty (only has his name and appear in nodes list) What does it mean “not for this context” webgl buffer binding error for copperlicht? How could I transfer nodes between running ccbj files? |
|