Last active
January 23, 2016 02:46
-
-
Save egbulmer/23f38aa47579b30774a2 to your computer and use it in GitHub Desktop.
Example of hypothetical `render-scene` call
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
| ; This a hypothetical example of a Render call for a ClojureScript wrapper of | |
| ; the Three.JS rendering library. | |
| ; Replica of the scene in the introductory Three.JS tutorial: | |
| ; http://threejs.org/docs/index.html#Manual/Introduction/Creating_a_scene | |
| (render-scene | |
| [:mesh {:geometry [:box 1 1 1] | |
| :material [:mesh-basic {:color 0x00ff00}]]) | |
| ; Another call, child objects are in-line after the property map. | |
| (render-scene | |
| [:mesh {:geometry [:circle {:radius 30 :segments 16}] | |
| :material [:mesh-basic {:color 0xff0000}]} | |
| ; Two child cubes - one red and one blue. Positions will be | |
| ; local to the parent object. | |
| [:mesh {:position [1 0 1] | |
| :geometry [:box 1 1 1] | |
| :material [:mesh-basic {:color 0x00ff00}]}] | |
| [:mesh {:position [1 1 0] | |
| :geometry [:box 1 1 1] | |
| :material [:mesh-basic {:color 0x0000ff}]}]]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment