Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperLicht
engine.ingComplete

schizzomarino
Registered User
Quote
2013-10-21 20:41:36

Solved, I was using the automatically generated "copperlicht.js" from CopperCube instead of copying across the one from the SDK...

Hi,
I have met with a problem that I can't seem to solve. I have spent nearly 2 days at it and it is driving my insane..

As most people, I insert 3D objects from other software (licensed 3Ds for me), I then export as .obj as it does a better job with simple materials, import into CopperCube and publish as WebGL (HTML).

This all works very well, I then want to do extensive programming in JS within the HTML page so I need to get a reference to the scene to get access to the nodes within it (like in tutorial 2, where it works flawlessly)

so, I use:

<div align="center">
<canvas id="3darea" width="640" height="480"></canvas>
</div>
<script type="text/javascript">
<!--
var engine = startCopperLichtFromFile('3darea', 'copperlichtdata/ProgramMesh.ccbjs');

engine.O n L o a d i n g C o m p l e t e = function()
{ alert('1');
var scene = engine.getScene();
if (scene){
alert('2');

etc. etc.

The problem is, I never get the alerts (I do if I insert the alerts into tutorial 2 in the exact same postions):
The ingComplete never happens (neither on the server or locally), but the scene is visible and all its textures/objects (I also tried removing all objects expect one simple one without textures) on the browser.
You can find this file here:
http://rightwist.com/PrototipoCopper/ProgramMesh.html

I have played around with this non-stop since yesterday (little or no sleep), so I have reached my end...
Is there something I am doing wrong?

Thanks in advance for your time Niko and the team at AmBIERA

Daniel


schizzomarino
Registered User
Quote
2013-10-21 20:55:52

Sorry, I sorted it out...
The problem was that I was using the copperlicht.js that CopperCube creates automatically, once I replaced it, it all worked perfectly


schizzomarino
Registered User
Quote
2013-10-21 21:00:12

Sorry, I sorted it out...
The problem was that I was using the copperlicht.js that CopperCube creates automatically, once I replaced it, it all worked perfectly


schizzomarino
Registered User
Quote
2013-10-21 23:02:34

Sorry, I sorted it out...
The problem was that I was using the copperlicht.js that CopperCube creates automatically, once I replaced it, it all worked perfectly


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Inter?ational" (you are not logged in)


Text:

 

  

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