Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Ok i will be waiting for the minor update with lights. Now can you tell me how to declare mouse event listeners wich are taking place inside the 3d area in copperlicht? in o3d is o3djs.event.addEventListener(g_o3dElement, 'mousedown', Thefunction); what is the opposite in copperlicht? Thanks. |
||||
|
You do it just like normal JavaScript: simply register the on mousedown and on mouseup events normally in your code. And additionally, if you want CopperLicht to handle mouse events as well, call handleMouseDown, handleMouseUp and handleMouseMove just described in the documentation here: http://www.ambiera.com/copperlic... There are also some function which make this easier, for example getMouseX and getMouseY for simply getting the position of the mouse relative to the canvas. |
|