This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(100); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Robot = function(robot){ | |
robot.turnLeft(robot.angle % 90); | |
robot.turnGunRight(90); | |
robot.clone(); | |
this.direction = 1; | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(1); | |
if (robot.parentId) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/three.js/r57/three.min.js"></script> | |
<script type="text/javascript" src="lib/monad.js"></script> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
var CTX = MONAD(function(monad, value) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var CTX = (function() { | |
'use strict'; | |
function XMONAD(modifier) { | |
var monad = MONAD(modifier); | |
monad.properties = function() { | |
Array.prototype.slice.call(arguments,0).forEach(function(name) { | |
var upName = name.charAt(0).toUpperCase() + name.slice(1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var main = MOGUI() | |
.setSize(110, 500); | |
main.load(function() { | |
main | |
.circleButton(0, 50, "body") | |
.click(function() { | |
alert("works") | |
}).up() | |
.circleButton(1, 50, "support") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*global exports, require*/ | |
(function() { | |
"use strict"; | |
var casper = require("casper"), | |
id = 0, | |
instances = []; | |
exports.create = function(options) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(function (require, exports, module) { | |
"use strict"; | |
var DocumentManager = brackets.getModule("document/DocumentManager"); | |
brackets.getModule("utils/AppInit").appReady(function () { | |
var p4 = require("p4"); | |
$(DocumentManager) | |
.on("dirtyFlagChange", function (e, doc) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<three-scene> | |
<three-object id="someCube"> | |
<geometry-cube width="20" height="20 x="1" y="2" z="3"/> | |
<material> | |
<texture src="woo.png"/> | |
</material> | |
</three-object> | |
</three-scene> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<polymer-element name="three-object3d" attributes="x y z"> | |
<script> | |
(function() { | |
function bindAttrib(from, target, name) { | |
from[name] && (target[name] = from[name]); | |
Object.defineProperty(from, name, { | |
enumerable: true, | |
set: function(value) { |