Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperLicht
scene not defined?

Registered User
2013-12-18 18:29:33

having a problem connecting my external copperlicht file (not copperlicht.js, but my own script) to the original html.

I removed the code in the inline script tag in the generated html file from CCB and moved that to an outside script. I've also tried leaving the initialization code within the html file, and simply defining the scene from my own script, regardless of how I approach it, I get the same problem every single time.

Uncaught Error: ReferenceError: scene is not defined copperlicht.js:6
(anonymous function) copperlicht.js:6

var engine;
engine = startCopperLichtFromFile('3darea','copperlichtdata/currentBlower.ccbjs');
return engine.ingComplete = function() {
var scene;
scene = engine.getScene();

I have slaved over reconfiguring this for hours, I can't access the scene at all, oddly enough


both before AND after setting the scene, the scene var is valid

scene = engine.getScene();

CL3D.Free3dScene [lots of data here] blowerLicht.js:7
Uncaught Error: ReferenceError: scene is not defined copperlicht.js:9
CL3D.Free3dScene [lots of data here] blowerLicht.js:9

clearly scene is there, and it's working nicely- but it's also prompting as undefined in copperlicht.js , i've tried overwriting this file with the most recent copperlicht, and republishing via coppercube... either way, same result. This doesn't happen in new projects, and seems to be an error or problem in this project- but I can't imagine why something i'm not manipulating suddenly became undefined?

in the code above, the engine.ingComplete should be engine.ingComplete, for some reason, it deletes the part in the forum

2013-12-19 08:13:19

Are you using the CopperLicht.js which is generated by CopperCube, or the one from the CopperLicht SDK? If you use the CopperCube generated one, use the CopperLicht SDK one instead, then this is probably the problem already.
The CopperCube one is a bit more compressed and probably lacks those symbols.

Create reply:

Posted by: (you are not logged in)

Enter the missing letter in: "In?ernational" (you are not logged in)




Possible Codes

Feature Code
Link [url] [/url]
Bold [b]bold text[/b]
Image [img][/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]



Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact