Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
invalid copperlicht.js file?

ddabrahim
Registered User
Quote
2017-12-12 18:42:00

Hi.

I'm new to CopperCube and CopperLicht.
I'm using only the demo version of CopperCube from Steam at the moment and I have some problems with the copperlicht.js file that is exported when I publish a WebGL game.

What I'm trying to do, after I have the game published, I would like to use some JavaScript to manipulate and control the game. I know I can use JavaScript inside CopperCube but the reason I'm trying to do it after it published is because I would like to sort of embed the game in to my website and generate Java Script on my website to control the game so it need to be done after the game is published.

I was looking at the CopperLicht tutorials to see how it can be done and my problem is that, I'm getting errors for classes and functions are undefined. But, nothing wrong with my code I just simply try to change position of a scene node on key press. If I replace the copperlicht.js coming from CopperCube with the one comes with the tutorials I have downloaded from the CopperLicht website, everything works.

Since I'm new to all this, I'm not too sure what to make out of this. Is it a bug or something has changed in the engine but the tutorials are not updated maybe or it is normal and I need to use the one coming from the CopperLicth website?
There is also a size difference between the two, the one coming from CopperCube is only 231kb while the one coming from the website is 417kb in size.

Anyone could confirm please it if it a bug or not?

Thanks.


erik
Registered User
Quote
2017-12-13 11:15:13

The one generated from CopperCube is minified, so that it is smaller, but you won't have some classes visible in there (which CopperCube itself won't need). If you are writing your own WebGL based code, use the one you downloaded (save it somewhere else and reference it from your html file, otherwise CopperCube will always overwrite that file when you hit 'publish' or 'preview'). That's how it is supposed to work.


ddabrahim
Registered User
Quote
2017-12-13 13:07:14

I see. Thank you for the reply.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "I?ternational" (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