Questions tagged [copperlicht]

CopperLicht is an open source JavaScript library/API for creating games and interactive 3D applications using WebGL, developed by Ambiera. It is supposed to be used together with its commercial 3D world editor CopperCube, but it can also be used without, losing the ability to directly load a scene.

CopperLicht is an open source JavaScript library/API for creating games and interactive 3D applications using WebGL, developed by Ambiera. The aim of the library is to provide an API for making it easier developing 3D content for the web. It is supposed to be used together with its commercial 3D world editor CopperCube, but it can also be used without.

The engine was released first in February 2010, by a demo website, showing a Quake III Arena level rendered in real time in the browser window. The library was originally intended to be used a WebGL backend for the CopperCube editor, another Amberia creation, but then the developers decided to make the library free to be used by the public. In November 2014, CopperLicht was made free and open source, based on a zlib style license.

Features:

The 1.9 release includes the following features:

3D rendering based on a hierarchical Scene graph.
Pre-created materials and shaders, including pre-calculated lightmap support
Skeletal animation
Built-in Collision detection and simple Physics engine
Dynamic light support
System to create and use custom shaders and materials based on the OpenGL Shading Language(GLSL) Impostors like Billboards and Skyboxes
Paths and Splines
Behavior and Action system
Texture animation
Vertex color support
Integrated 2D font and 2D primitives rendering system
Automatic redraw reduction system

Exemple code:

Render a cube with a FPS Camera:

<html>
    <head>
        <title>CopperLicht Hello World</title>
    </head>
    <body>  
        <div align="center">
            <canvas id="3darea" width="640" height="480" style="background-color:#000000">
            </canvas>
        </div>  

        <script type="text/javascript">
            // create the 3d engine
            var engine = new CL3D.CopperLicht('3darea');

            if (engine.initRenderer())
            {
              // add a new 3d scene
              var scene = new CL3D.Scene();
              engine.addScene(scene);

              scene.setBackgroundColor(CL3D.createColor(1, 100, 0, 0));
              scene.setRedrawMode(CL3D.Scene.REDRAW_WHEN_SCENE_CHANGED);

              // add a cube to test out
              var cubenode = new CL3D.CubeSceneNode();
              scene.getRootSceneNode().addChild(cubenode);
              cubenode.getMaterial(0).Tex1 = engine.getTextureManager().getTexture("test.jpg", true);

              // add a user controlled camera with a first person shooter style camera controller
              var cam = new CL3D.CameraSceneNode();
              cam.Pos.X = 20;
              cam.Pos.Y = 15;

              var animator = new CL3D.AnimatorCameraFPS(cam, engine);                              
              cam.addAnimator(animator);                              
              animator.lookAt(new CL3D.Vect3d(0,0,0));         

              scene.getRootSceneNode().addChild(cam);
              scene.setActiveCamera(cam);     
            }
        </script>
    </body>
</html>

Useful links:

6 questions
33
votes
8 answers

How can I implement a FPS view with WebGL inside a browser?

I'm using Copperlicht, and I want to create a usable FPS. The demo controls shows why the browser environment makes this a pain. In order to implement FPS camera control, you need to track the relative mouse position - in other words, its motion,…
JRowe
  • 363
  • 4
  • 7
3
votes
1 answer

Collecting webGL app framerate histogram data

I'm thinking to stick for a particular framework to work for my academic course but only based on results I should prove. I want to plot the graph for all the three frameworks where No.of Vertices is one axis and FPS (threshold is 60) is on other…
three.jsaddict
  • 265
  • 2
  • 7
  • 21
1
vote
1 answer

THREE.js + Mesh Modifiers

Coming from ActionScript + Papervision I am familiar with "AS3DMod" a library that modifies 3D meshes to bend, twist,etc. Now I am working with THREE.js and found this:"#MOD3 As3dMod 3D Modifier Library port for Javascript and Three.js, Pre3d and…
user864381
  • 65
  • 7
0
votes
0 answers

How to use Coppercube 6 on HTML?

I just downloaded Coppercube 6. I learn that you can deploy your game into a webserver. The problem is I have to tell coppercube 6 to use my javascript function to communicate to the server. I have written simple games using javascript but not with…
Aedric
  • 55
  • 8
0
votes
1 answer

blender export / one sided polygons

I'm really new to 3d modeling, blender, etc. I created a model with blender (a room). Now I exported it (as .obj) so that I can import it to CopperCube (a tool to create 3d scences). The problem is, that the walls are only visible from outside. Take…
appsthatmatter
  • 6,201
  • 3
  • 32
  • 39
-1
votes
1 answer

How do I add a parameter to the Chrome browser

How do I add a paremeter to the chrome browser when starting the browser? I try to view a local copy of a copercube 3d plug-in to a chrome browser, I get this error:
xarzu
  • 7,579
  • 35
  • 100
  • 140