Skip to content

Instantly share code, notes, and snippets.

@oal
Created March 6, 2013 12:44
Show Gist options
  • Save oal/5099062 to your computer and use it in GitHub Desktop.
Save oal/5099062 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment