Ambiera Forum

Discussions, Help and Support.

Create a new account, Search, or Login:
Name: Password:
Ambiera Forum > CopperCube > Programming and Scripting
webgl - accessing copperlicht engine from extension
Author Text

ssatguru
Registered User
Quote
2022-04-03 21:18:21

For target webgl is there a way to access copperlicht engine from within extensions?

Currently I can do it this way

In the html file generated, if I update the line
---------------------------------------------------------------
<script type="text/javascript">
<!--
startCopperLichtFromFile(
------------------------------------------------------------------

with
---------------------------------------------------------------
<script type="text/javascript">
<!--
var eng =startCopperLichtFromFile(
-----------------------------------------------------------
then I can access the engine using this global variable "eng".

Is there a way to generate the html file with the above?
I can do it manually of course but during testing the change would get overridden every time.

It would be nice if coppercube can do this or better take a html template to do a build.


sulbcon
Registered User
Quote
2022-04-04 01:21:55

Sorry... Currently coppercube can't access copperlicht from extensions... I also made a request for that kind of thing but we'll have to keep waiting, if @niko can one day decide to add it.


ssatguru
Registered User
Quote
2022-04-04 02:37:38

I think if you replace the "minified and uglyfied" version of "copperlichtdata\copperlicht.js" in your coppercube project with just the "minifed" version of "copperlicht.js" from the copperlicht sdk, then using the method I described above you should be able to access the copperlicht api from your extensions.

But I haven't tried this a whole lot.
Let me try some more and see if I run into any issues.


sulbcon
Registered User
Quote
2022-04-04 07:24:46

Well wish you the best result and I hope it works because I'm pretty sure that @niko has already converted your ccb scripts to copperlicht scripts while building it but if it works please give me a response. I'm hoping to hear from you cos I don't have access to my PC this period.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "In?ernational" (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© 2020 Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact