ambiera home ambiera home

Ambiera Forum

Discussions, Help and Support.

Create a new account, Search, or Login:
Name:  Password:    
Ambiera Forum > CopperCube > Programming and Scripting
invalid copperlicht.js file?
Author Text

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


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?


Registered User
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.

Registered User
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: "In?ernational" (you are not logged in)




Forum Codes

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



Software: Ambiera Light Forum. © 2008-2018 Nikolaus Gebhardt, Ambiera e.U.