ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperLicht
forum topic indicator scene not defined?
person icon
domitall
Registered User
Quote
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

console.log(engine.getScene());

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


console.log(engine.getScene());
scene = engine.getScene();
console.log(scene);


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

person icon
niko
Moderator
Quote
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:










 

  

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


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






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