Skip to content

Instantly share code, notes, and snippets.

View oal's full-sized avatar

Olav Lindekleiv oal

View GitHub Profile
@oal
oal / threejs.coffee
Created March 6, 2013 12:44
A short example showing how to subclass THREE.Mesh in CoffeeScript.
class Entity extends THREE.Mesh
constructor: ->
geometry = new THREE.CubeGeometry(200,200,200)
material = new THREE.MeshBasicMaterial
color: 0xffffff
THREE.Mesh.call @, geometry, material