Adding logo.js
This commit is contained in:
parent
871ae40e37
commit
36255359c4
1 changed files with 173 additions and 0 deletions
173
src/main/javascript/drone/logo.js
Normal file
173
src/main/javascript/drone/logo.js
Normal file
|
@ -0,0 +1,173 @@
|
|||
load(__folder + "drone.js");
|
||||
//
|
||||
// Constructs the JS logo
|
||||
// https://raw.github.com/voodootikigod/logo.js/master/js.png
|
||||
//
|
||||
// fg
|
||||
// the material that the letters JS will be made of
|
||||
// bg
|
||||
// the material that the square will be made of
|
||||
//
|
||||
Drone.extend('logojs', function(fg, bg) {
|
||||
fg = '35:7'; // default to gray wool
|
||||
bg = 41; // default to gold blocks
|
||||
|
||||
// Draw the sqaure
|
||||
this.up()
|
||||
.box(bg, 100, 100, 1);
|
||||
|
||||
// Draw the J, starting with the hook
|
||||
this.right(30).up(13)
|
||||
.box(fg)
|
||||
.right().down()
|
||||
.box(fg, 1, 3, 1)
|
||||
.right().down()
|
||||
.box(fg, 1, 5, 1)
|
||||
.right().down()
|
||||
.box(fg, 1, 7, 1)
|
||||
.right()
|
||||
.box(fg, 1, 8, 1)
|
||||
.right().down()
|
||||
.box(fg, 1, 10, 1)
|
||||
.right()
|
||||
.box(fg, 1, 9, 1)
|
||||
.right()
|
||||
.box(fg, 1, 8, 1)
|
||||
.right().down()
|
||||
.box(fg, 2, 8, 1)
|
||||
.right(2)
|
||||
.box(fg, 4, 7, 1)
|
||||
.right(4)
|
||||
.box(fg, 1, 8, 1)
|
||||
.right()
|
||||
.box(fg, 1, 9, 1)
|
||||
.right().up()
|
||||
.box(fg, 3, 10, 1)
|
||||
.right(3).up()
|
||||
.box(fg, 2, 9, 1)
|
||||
.right(2).up()
|
||||
.box(fg, 2, 8, 1)
|
||||
.right(2).up()
|
||||
.box(fg, 1, 7, 1)
|
||||
.right().up()
|
||||
.box(fg, 1, 6, 1)
|
||||
.right().up()
|
||||
.box(fg, 1, 5, 1)
|
||||
.right().up(2)
|
||||
.box(fg, 1, 3, 1)
|
||||
.left(9).up(3)
|
||||
.box(fg, 10, 30, 1);
|
||||
|
||||
// Draw the S
|
||||
// It's drawn in three strokes from bottom to top. Look for when
|
||||
// it switches from .right() to .left() then back again
|
||||
this.move('start')
|
||||
// move to starting point for S
|
||||
.right(64).up(13)
|
||||
// stroke 1
|
||||
.box(fg)
|
||||
.right().down()
|
||||
.box(fg, 1, 3, 1)
|
||||
.right().down()
|
||||
.box(fg, 1, 5, 1)
|
||||
.right().down()
|
||||
.box(fg, 1, 7, 1)
|
||||
.right()
|
||||
.box(fg, 1, 8, 1)
|
||||
.right().down()
|
||||
.box(fg, 1, 10, 1)
|
||||
.right()
|
||||
.box(fg, 1, 9, 1)
|
||||
.right()
|
||||
.box(fg, 1, 8, 1)
|
||||
.right().down()
|
||||
.box(fg, 2, 8, 1)
|
||||
.right(2)
|
||||
.box(fg, 4, 7, 1)
|
||||
.right(4)
|
||||
.box(fg, 2, 8, 1)
|
||||
.right(2)
|
||||
.box(fg, 1, 9, 1)
|
||||
.right().up()
|
||||
.box(fg, 1, 9, 1)
|
||||
.right()
|
||||
.box(fg, 1, 10, 1)
|
||||
.right()
|
||||
.box(fg, 1, 22, 1)
|
||||
.right().up()
|
||||
.box(fg, 2, 20, 1)
|
||||
.right().up()
|
||||
.box(fg, 1, 18, 1)
|
||||
.right().up()
|
||||
.box(fg, 1, 17, 1)
|
||||
.right().up()
|
||||
.box(fg, 1, 15, 1)
|
||||
.right().up()
|
||||
.box(fg, 1, 13, 1)
|
||||
.right().up(2)
|
||||
.box(fg, 1, 9, 1)
|
||||
.right().up(2)
|
||||
.box(fg, 1, 5, 1)
|
||||
// stroke 2
|
||||
.left(8).up(4)
|
||||
.box(fg, 1, 9, 1)
|
||||
.left().up()
|
||||
.box(fg, 1, 9, 1)
|
||||
.left().up()
|
||||
.box(fg, 1, 8, 1)
|
||||
.left(2).up()
|
||||
.box(fg, 2, 8, 1)
|
||||
.left(2).up()
|
||||
.box(fg, 2, 7, 1)
|
||||
.left(2).up()
|
||||
.box(fg, 2, 7, 1)
|
||||
.left()
|
||||
.box(fg, 1, 8, 1)
|
||||
.left().up()
|
||||
.box(fg, 1, 8, 1)
|
||||
.left()
|
||||
.box(fg, 1, 9, 1)
|
||||
.left(2).up()
|
||||
.box(fg, 2, 19, 1)
|
||||
.left().up()
|
||||
.box(fg, 1, 17, 1)
|
||||
.left()
|
||||
.box(fg, 1, 16, 1)
|
||||
.left().up()
|
||||
.box(fg, 1, 14, 1)
|
||||
.left().up(2)
|
||||
.box(fg, 1, 10, 1)
|
||||
.left().up(2)
|
||||
.box(fg, 1, 6, 1)
|
||||
// stroke 3
|
||||
.right(7).up(6)
|
||||
.box(fg, 1, 8, 1)
|
||||
.right().up()
|
||||
.box(fg, 1, 7, 1)
|
||||
.right().up()
|
||||
.box(fg, 2, 7, 1)
|
||||
.right(2).up()
|
||||
.box(fg, 4, 6, 1)
|
||||
.right(4).down()
|
||||
.box(fg, 2, 7, 1)
|
||||
.right().down()
|
||||
.box(fg, 1, 8, 1)
|
||||
.right()
|
||||
.box(fg, 1, 7, 1)
|
||||
.right().down()
|
||||
.box(fg, 1, 8, 1)
|
||||
.right().down()
|
||||
.box(fg, 1, 9, 1)
|
||||
.right().down()
|
||||
.box(fg, 1, 9, 1)
|
||||
.right().up()
|
||||
.box(fg, 1, 8, 1)
|
||||
.right().up()
|
||||
.box(fg, 1, 6, 1)
|
||||
.right().up()
|
||||
.box(fg, 1, 5, 1)
|
||||
.right().up()
|
||||
.box(fg, 1, 3, 1)
|
||||
.right().up()
|
||||
.box(fg);
|
||||
});
|
Reference in a new issue