Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperLicht
Html Error Message?

Pumuckli
Guest
Quote
2011-04-04 17:44:19

Hi everybody,

i wonder if there is a posibility to get a bit nicer "Your Browser is not compatible" Message in Copperlicht. I found the part of the copperlicht.js which outputs the message, but i have no idea how to get some HTML or image data to be displayed.

maybe there is someone who knows an easy way to do this?


niko
Moderator
Quote
2011-04-04 18:07:12

Of course, that's no problem, see for example how it is done in the quake map example here: http://www.ambiera.at/copperlich...

The code looks about like this:

var engine = new CL3D.CopperLicht('3darea');
if (!engine.initRenderer())
{
// no webgl, show your own warning message here
}



pumuckli
Guest
Quote
2011-04-05 16:15:43

Thanks for your relply!

My problem is - i am building a WebGL via Coppercube, so i just have the compressed file and no javascript code of the szene.

I tried to delete the part that prints the Coppercube-build-in Error message and include the script in my html as it is used in the Q3d Szene, bur i couldn't get it working... perhaps i'll just have to play around a bit more.


niko
Moderator
Quote
2011-04-05 17:42:45

It should work just as in the example. You now only need to manually load the Coppercube file, use this (see the last line):


var engine = new CL3D.CopperLicht('3darea');
if (!engine.initRenderer())
{
// no webgl, show your own warning message here
}

// start loading
engine.load('copperlichtdata/yourFileName.ccbjs');


Obviously, also replace yourFileNa,e.ccbjs with the name of your project.


Create reply:


Posted by: (you are not logged in)


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