Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save emilwidlund/69d6d01cd4cd00ba9236a7a0a13d3d8d 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.on Events.Pan, (e) ->
model.rotationY += e.deltaX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment