Skip to content

Instantly share code, notes, and snippets.

@mikolalysenko
Created June 3, 2014 21:01
Show Gist options
  • Save mikolalysenko/7ea211792046e1e45f88 to your computer and use it in GitHub Desktop.
Save mikolalysenko/7ea211792046e1e45f88 to your computer and use it in GitHub Desktop.
var shell = require("gl-now")
var camera = require("gl-camera")(shell)
var createPoints = require("gl-point-cloud")
var points, axes
shell.on("gl-init", function() {
var gl = shell.gl
points = createPoints(gl, {
positions: [[1, 0, 0], [0, 1, 0], [0, 0, 1]],
glyphs: [ "●", "■", "★" ]
})
axes = createAxes(gl, {
bounds: [[-1,-1,-1], [1,1,1]]
})
})
shell.on("gl-render", function() {
points.draw(camera)
axes.draw(camera)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment