Skip to content

Instantly share code, notes, and snippets.

@emilwidlund
Last active March 30, 2018 12:19
Show Gist options
  • Select an option

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

Select an option

Save emilwidlund/51120799d3f17b729dce495a9e58f4dd 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
# 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) ->
scene.animationLoop = () ->
model.rotationY += 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment