Skip to content

Instantly share code, notes, and snippets.

@kumavis
Created September 10, 2013 16:46
Show Gist options
  • Save kumavis/6512154 to your computer and use it in GitHub Desktop.
Save kumavis/6512154 to your computer and use it in GitHub Desktop.
voxel js codegun - stairs
// hello world
var pos
for (var i=0;i<10;i++)
{
pos = hitBlock.slice()
pos[0] += i
for (var g=0;g<i;g++)
{
newPos = pos.slice()
newPos[1] = pos[1]
newPos[1] += g
setBlock(newPos,game.avatar.currentMaterial)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment