Skip to content

Instantly share code, notes, and snippets.

@xeolabs
Created October 17, 2009 07:14
Show Gist options
  • Select an option

  • Save xeolabs/212277 to your computer and use it in GitHub Desktop.

Select an option

Save xeolabs/212277 to your computer and use it in GitHub Desktop.
with (SceneJs) {
var scene = graph(
canvas({ canvasId: 'mycanvas' },
shaders.simpleShader(
lights({ lights: [{ pos: { x: 60.0, y: 60.0, z: -100.0 } } ]},
viewport({ x: 1, y: 1, width: 400, height: 400 },
perspective({ fovy: 60, aspect: 1, near: 0.1, far: 400 },
lookAt({ eye : { z: -50.0 }, up : { y: 1.0 }},
material({
diffuse: { r:0.5, g:0.5, b:0.9 },
specular: { r:0.5, g:0.5, b:0.9 },
shininess: { r:0.5, g:0.5, b:0.9 }
},
objects.teapot()
)
)
)
)
)
)
)
);
scene.traverse();
} // with
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment