Skip to content

Instantly share code, notes, and snippets.

@claytantor
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save claytantor/62163a243d30bf7954a9 to your computer and use it in GitHub Desktop.
Save claytantor/62163a243d30bf7954a9 to your computer and use it in GitHub Desktop.
looking to create a scene graph for three.js and jquery
{
"scene":{
"renderer":{
"id":"main-renderer",
"type":"WebGLRenderer",
"alpha":true
},
"cameras":[
{
"id":"camera1",
"type":"PerspectiveCamera",
"fov":75,
"aspect":"window-centered",
"near":0.1,
"far":1000,
"position":{
"z":5
}
}
],
"lights":[
{
"id":"light1",
"type":"PointLight",
"color":0xffffff,
"position":{
"x":10,
"y":50,
"z":130
}
}
],
"objects":[
{
"id":"box1",
"type":"Mesh",
"geometry":{
"type":"BoxGeometry",
"value":[1,1,1]
},
"material": {
"id":"mat1",
"type":"MeshLambertMaterial",
"color": 0x00ff00
}
}
]
}
}
@claytantor
Copy link
Author

window-centered=window.innerWidth / window.innerHeight

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment