Powder Toy Javascript