Skip to content

Instantly share code, notes, and snippets.

@emilwidlund
Created March 30, 2018 12:58
Show Gist options
  • Select an option

  • Save emilwidlund/e442e12c57c4b6e7be95dff58e1361f8 to your computer and use it in GitHub Desktop.

Select an option

Save emilwidlund/e442e12c57c4b6e7be95dff58e1361f8 to your computer and use it in GitHub Desktop.
{Scene, Light, Model} = require 'form'
# Create a scene
scene = new Scene
width: Screen.width
height: Screen.height
camera:
orbitControls: true # Enables orbit controls
enableRotate: true # Enables click & drag orbiting
# Create a light
new Light
parent: scene
type: 'point'
y: 400
z: 300
# Import a 3D-model
new Model
path: 'models/monster.fbx'
parent: scene
onLoad: (model) ->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment