Created
March 30, 2018 12:58
-
-
Save emilwidlund/e442e12c57c4b6e7be95dff58e1361f8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {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