DIR : /home/kozerus/public_html/jkwii/js/jsdoit/graphpape/index.js
/home/kozerus/public_html/jkwii/js/jsdoit/graphpape
// generatedy by JSX compiler 0.9.49 (2013-06-30 15:20:50 -0700; 577bcd9d557d259c17fd80210e50c3bfb9b2a3df)
var JSX = {};
(function (JSX) {
/**
* extends the class
*/
function $__jsx_extend(derivations, base) {
var ctor = function () {};
ctor.prototype = base.prototype;
var proto = new ctor();
for (var i in derivations) {
derivations[i].prototype = proto;
}
}
/**
* copies the implementations from source interface to target
*/
function $__jsx_merge_interface(target, source) {
for (var k in source.prototype)
if (source.prototype.hasOwnProperty(k))
target.prototype[k] = source.prototype[k];
}
/**
* defers the initialization of the property
*/
function $__jsx_lazy_init(obj, prop, func) {
function reset(obj, prop, value) {
delete obj[prop];
obj[prop] = value;
return value;
}
Object.defineProperty(obj, prop, {
get: function () {
return reset(obj, prop, func());
},
set: function (v) {
reset(obj, prop, v);
},
enumerable: true,
configurable: true
});
}
/**
* sideeffect().a /= b
*/
function $__jsx_div_assign(obj, prop, divisor) {
return obj[prop] = (obj[prop] / divisor) | 0;
}
/*
* global functions, renamed to avoid conflict with local variable names
*/
var $__jsx_parseInt = parseInt;
var $__jsx_parseFloat = parseFloat;
var $__jsx_isNaN = isNaN;
var $__jsx_isFinite = isFinite;
var $__jsx_encodeURIComponent = encodeURIComponent;
var $__jsx_decodeURIComponent = decodeURIComponent;
var $__jsx_encodeURI = encodeURI;
var $__jsx_decodeURI = decodeURI;
var $__jsx_ObjectToString = Object.prototype.toString;
var $__jsx_ObjectHasOwnProperty = Object.prototype.hasOwnProperty;
/*
* profiler object, initialized afterwards
*/
function $__jsx_profiler() {
}
/*
* public interface to JSX code
*/
JSX.require = function (path) {
var m = $__jsx_classMap[path];
return m !== undefined ? m : null;
};
JSX.profilerIsRunning = function () {
return $__jsx_profiler.getResults != null;
};
JSX.getProfileResults = function () {
return ($__jsx_profiler.getResults || function () { return {}; })();
};
JSX.postProfileResults = function (url, cb) {
if ($__jsx_profiler.postResults == null)
throw new Error("profiler has not been turned on");
return $__jsx_profiler.postResults(url, cb);
};
JSX.resetProfileResults = function () {
if ($__jsx_profiler.resetResults == null)
throw new Error("profiler has not been turned on");
return $__jsx_profiler.resetResults();
};
JSX.DEBUG = true;
function g_StopIteration() {
Error.call(this);
};
$__jsx_extend([g_StopIteration], Error);
function _Main() {
};
$__jsx_extend([_Main], Object);
function _Main$main$AS(args) {
Ctrl$init$();
_Main$mainloop$();
};
_Main.main = _Main$main$AS;
_Main.main$AS = _Main$main$AS;
function _Main$mainloop$() {
Ctrl$calc$();
Ctrl$draw$();
Ctrl.sctx.strokeStyle = "black";
_Main$drawConveyor$NNNNN(20, 100, 120, 20, 5);
Ctrl.sctx.strokeRect(100, 10 + 40 * Ctrl.lPower, 50, 50);
Timer$setTimeout$F$V$N(_Main$mainloop$, 33);
};
_Main.mainloop$ = _Main$mainloop$;
function _Main$drawConveyor$NNNNN(x, y, l, r, d) {
var f;
var i;
var p0;
var p1;
f = (function (t) {
var r2;
var p0;
var p1;
var p2;
var p3;
var p4;
var x0;
var y0;
var s;
var c;
r2 = r * Math.PI;
while (t > 1) {
t -= 1;
}
while (t < 0) {
t += 1;
}
p0 = t * (l + r2) * 2;
p1 = p0 - l;
p2 = p1 - r2;
p3 = p2 - l;
p4 = p3 - r2;
if (p1 < 0) {
x0 = x + r + p0;
y0 = y;
return [ x0, y0, x0, y0 + d ];
} else {
if (p2 < 0) {
x0 = x + r + l;
y0 = y + r;
t = Math.PI * p1 / r2;
s = Math.sin(t);
c = - Math.cos(t);
return [ x0 + r * s, y0 + r * c, x0 + (r - d) * s, y0 + (r - d) * c ];
} else {
if (p3 < 0) {
x0 = x + r + l - p2;
y0 = y + r + r;
return [ x0, y0, x0, y0 - d ];
} else {
if (p4 < 0) {
x0 = x + r;
y0 = y + r;
t = Math.PI * p3 / r2;
s = - Math.sin(t);
c = Math.cos(t);
return [ x0 + r * s, y0 + r * c, x0 + (r - d) * s, y0 + (r - d) * c ];
} else {
x0 = x + r + p4;
y0 = y;
return [ x0, y0, x0, y0 + d ];
}
}
}
}
});
for (i = 0; i < 20; i++) {
Ctrl.sctx.beginPath();
p0 = f((i + 0.0 + 0.3 * Ctrl.hPower) / 20);
p1 = f((i + 0.8 + 0.3 * Ctrl.hPower) / 20);
Ctrl.sctx.beginPath();
Ctrl.sctx.moveTo((function (v) {
if (! (v != null)) {
debugger;
throw new Error("[/tmp/RRjfkQ7FM7.jsx:96:31] null access\n Ctrl.sctx.moveTo(p0[2], p0[3]);\r\n ^\n");
}
return v;
}(p0[2])), (function (v) {
if (! (v != null)) {
debugger;
throw new Error("[/tmp/RRjfkQ7FM7.jsx:96:38] null access\n Ctrl.sctx.moveTo(p0[2], p0[3]);\r\n ^\n");
}
return v;
}(p0[3])));
Ctrl.sctx.lineTo((function (v) {
if (! (v != null)) {
debugger;
throw new Error("[/tmp/RRjfkQ7FM7.jsx:97:31] null access\n Ctrl.sctx.lineTo(p0[0], p0[1]);\r\n ^\n");
}
return v;
}(p0[0])), (function (v) {
if (! (v != null)) {
debugger;
throw new Error("[/tmp/RRjfkQ7FM7.jsx:97:38] null access\n Ctrl.sctx.lineTo(p0[0], p0[1]);\r\n ^\n");
}
return v;
}(p0[1])));
Ctrl.sctx.lineTo((function (v) {
if (! (v != null)) {
debugger;
throw new Error("[/tmp/RRjfkQ7FM7.jsx:98:31] null access\n Ctrl.sctx.lineTo(p1[0], p1[1]);\r\n ^\n");
}
return v;
}(p1[0])), (function (v) {
if (! (v != null)) {
debugger;
throw new Error("[/tmp/RRjfkQ7FM7.jsx:98:38] null access\n Ctrl.sctx.lineTo(p1[0], p1[1]);\r\n ^\n");
}
return v;
}(p1[1])));
Ctrl.sctx.lineTo((function (v) {
if (! (v != null)) {
debugger;
throw new Error("[/tmp/RRjfkQ7FM7.jsx:99:31] null access\n Ctrl.sctx.lineTo(p1[2], p1[3]);\r\n ^\n");
}
return v;
}(p1[2])), (function (v) {
if (! (v != null)) {
debugger;
throw new Error("[/tmp/RRjfkQ7FM7.jsx:99:38] null access\n Ctrl.sctx.lineTo(p1[2], p1[3]);\r\n ^\n");
}
return v;
}(p1[3])));
Ctrl.sctx.closePath();
Ctrl.sctx.stroke();
}
};
_Main.drawConveyor$NNNNN = _Main$drawConveyor$NNNNN;
function Ctrl() {
};
$__jsx_extend([Ctrl], Object);
function Ctrl$init$() {
var div;
div = (function ($v) {
if (! ($v == null || $v instanceof HTMLDivElement)) {
debugger;
throw new Error("[/tmp/RRjfkQ7FM7.jsx:144:54] detected invalid cast, value is not an instance of the designated type or null\n var div = dom.document.getElementById(\"ctrl\") as HTMLDivElement;\r\n ^^\n");
}
return $v;
}(dom.document.getElementById("ctrl")));
Ctrl.scvs = (function ($v) {
if (! ($v == null || $v instanceof HTMLCanvasElement)) {
debugger;
throw new Error("[/tmp/RRjfkQ7FM7.jsx:145:58] detected invalid cast, value is not an instance of the designated type or null\n Ctrl.scvs = dom.document.getElementById(\"screen\") as HTMLCanvasElement;\r\n ^^\n");
}
return $v;
}(dom.document.getElementById("screen")));
Ctrl.ccvs = (function ($v) {
if (! ($v == null || $v instanceof HTMLCanvasElement)) {
debugger;
throw new Error("[/tmp/RRjfkQ7FM7.jsx:146:58] detected invalid cast, value is not an instance of the designated type or null\n Ctrl.ccvs = dom.document.getElementById(\"ctrler\") as HTMLCanvasElement;\r\n ^^\n");
}
return $v;
}(dom.document.getElementById("ctrler")));
Ctrl.sctx = (function ($v) {
if (! ($v == null || $v instanceof CanvasRenderingContext2D)) {
debugger;
throw new Error("[/tmp/RRjfkQ7FM7.jsx:147:47] detected invalid cast, value is not an instance of the designated type or null\n Ctrl.sctx = Ctrl.scvs.getContext(\"2d\") as CanvasRenderingContext2D;\r\n ^^\n");
}
return $v;
}(Ctrl.scvs.getContext("2d")));
Ctrl.cctx = (function ($v) {
if (! ($v == null || $v instanceof CanvasRenderingContext2D)) {
debugger;
throw new Error("[/tmp/RRjfkQ7FM7.jsx:148:47] detected invalid cast, value is not an instance of the designated type or null\n Ctrl.cctx = Ctrl.ccvs.getContext(\"2d\") as CanvasRenderingContext2D;\r\n ^^\n");
}
return $v;
}(Ctrl.ccvs.getContext("2d")));
Ctrl.isTouch = !! eval("'ontouchstart' in window");
if (Ctrl.isTouch) {
div.addEventListener("touchstart", Ctrl$_tdnfn$LEvent$);
div.addEventListener("touchmove", Ctrl$_tmvfn$LEvent$);
div.addEventListener("touchend", Ctrl$_tupfn$LEvent$);
div.addEventListener("touchcancel", Ctrl$_tupfn$LEvent$);
} else {
div.addEventListener("mousedown", Ctrl$_tdnfn$LEvent$);
div.addEventListener("mousemove", Ctrl$_tmvfn$LEvent$);
div.addEventListener("mouseup", Ctrl$_tupfn$LEvent$);
div.addEventListener("mouseout", (function (e) {
var x;
var y;
x = (function ($v) {
if (! ($v == null || $v instanceof MouseEvent)) {
debugger;
throw new Error("[/tmp/RRjfkQ7FM7.jsx:161:27] detected invalid cast, value is not an instance of the designated type or null\n var x = (e as MouseEvent).clientX;\r\n ^^\n");
}
return $v;
}(e)).clientX;
y = (function ($v) {
if (! ($v == null || $v instanceof MouseEvent)) {
debugger;
throw new Error("[/tmp/RRjfkQ7FM7.jsx:162:27] detected invalid cast, value is not an instance of the designated type or null\n var y = (e as MouseEvent).clientY;\r\n ^^\n");
}
return $v;
}(e)).clientY;
if (x <= 0 || Ctrl.wbox.w <= x || y <= 0 || Ctrl.wbox.h <= y) {
Ctrl$_tupfn$LEvent$(e);
}
}));
}
};
Ctrl.init$ = Ctrl$init$;
function Ctrl$calc$() {
var ww;
var wh;
var scvs;
var ccvs;
var wgap;
var hgap;
ww = dom.window.innerWidth;
wh = dom.window.innerHeight;
if (Ctrl.wbox.w !== ww || Ctrl.wbox.h !== wh) {
Ctrl.wbox.w = (ww | 0);
Ctrl.wbox.h = (wh | 0);
scvs = (function ($v) {
if (! ($v == null || $v instanceof HTMLCanvasElement)) {
debugger;
throw new Error("[/tmp/RRjfkQ7FM7.jsx:178:61] detected invalid cast, value is not an instance of the designated type or null\n var scvs = dom.document.getElementById(\"screen\") as HTMLCanvasElement;\r\n ^^\n");
}
return $v;
}(dom.document.getElementById("screen")));
ccvs = (function ($v) {
if (! ($v == null || $v instanceof HTMLCanvasElement)) {
debugger;
throw new Error("[/tmp/RRjfkQ7FM7.jsx:179:61] detected invalid cast, value is not an instance of the designated type or null\n var ccvs = dom.document.getElementById(\"ctrler\") as HTMLCanvasElement;\r\n ^^\n");
}
return $v;
}(dom.document.getElementById("ctrler")));
if (ww > wh) {
wgap = Math.floor((Ctrl.wbox.w - Ctrl.sbox.w - Ctrl.cbox.w) / 3);
Ctrl.sbox.x = (wgap | 0);
Ctrl.cbox.x = (wgap + Ctrl.sbox.w + wgap | 0);
Ctrl.sbox.y = (Math.floor((Ctrl.wbox.h - Ctrl.sbox.h) / 2) | 0);
Ctrl.cbox.y = (Math.floor((Ctrl.wbox.h - Ctrl.cbox.h) / 2) | 0);
} else {
hgap = Math.floor((Ctrl.wbox.h - Ctrl.sbox.h - Ctrl.cbox.h) / 3);
Ctrl.sbox.x = (Math.floor((Ctrl.wbox.w - Ctrl.sbox.w) / 2) | 0);
Ctrl.cbox.x = (Math.floor((Ctrl.wbox.w - Ctrl.cbox.w) / 2) | 0);
Ctrl.sbox.y = (hgap | 0);
Ctrl.cbox.y = (hgap + Ctrl.sbox.h + hgap | 0);
}
scvs.style.left = (Ctrl.sbox.x + "") + "px";
ccvs.style.left = (Ctrl.cbox.x + "") + "px";
scvs.style.top = (Ctrl.sbox.y + "") + "px";
ccvs.style.top = (Ctrl.cbox.y + "") + "px";
}
if (! Ctrl.lGrab) {
Ctrl.lPower += (0.0 - Ctrl.lPower) * 0.1;
}
Ctrl.lHitBox.y = (- 10 + 90 * Ctrl.lPower | 0);
};
Ctrl.calc$ = Ctrl$calc$;
function Ctrl$draw$() {
var i;
var y0;
var y1;
var cos;
var sin;
Ctrl.sctx.fillStyle = "white";
Ctrl.sctx.fillRect(0, 0, Ctrl.scvs.width, Ctrl.scvs.height);
Ctrl.cctx.fillStyle = "white";
Ctrl.cctx.fillRect(0, 0, Ctrl.ccvs.width, Ctrl.ccvs.height);
Ctrl.cctx.strokeStyle = "gray";
for (i = 10; i < 160; i += 10) {
Ctrl.cctx.beginPath();
Ctrl.cctx.moveTo(i, 0);
Ctrl.cctx.lineTo(i, 240);
Ctrl.cctx.stroke();
}
for (i = 10; i < 240; i += 10) {
Ctrl.cctx.beginPath();
Ctrl.cctx.moveTo(0, i);
Ctrl.cctx.lineTo(160, i);
Ctrl.cctx.stroke();
}
y0 = 50 + 30 * Ctrl.lPower;
y1 = 20 + 90 * Ctrl.lPower;
Ctrl.cctx.fillStyle = "red";
Ctrl.cctx.fillRect(30, 30, 40, 70);
Ctrl.cctx.fillStyle = "pink";
Ctrl.cctx.fillRect(40, 40, 20, 50);
Ctrl.cctx.fillStyle = "gray";
Ctrl.cctx.beginPath();
Ctrl.cctx.arc(50, y0, 10, 0, Math.PI * 2, true);
Ctrl.cctx.fill();
Ctrl.cctx.fillRect(40, y0, 20, y1 - y0);
Ctrl.cctx.fillStyle = "black";
Ctrl.cctx.fillRect(10, y1 - 10, 80, 20);
Ctrl.cctx.fillStyle = "white";
Ctrl.cctx.fillRect(10, y1 + 5, 80, 3);
cos = Math.cos(Ctrl.hRot);
sin = Math.sin(Ctrl.hRot);
Ctrl.cctx.fillStyle = "red";
Ctrl.cctx.beginPath();
Ctrl.cctx.arc(80, 180, 50, 0, Math.PI * 2, true);
Ctrl.cctx.fill();
Ctrl.cctx.fillStyle = "pink";
Ctrl.cctx.beginPath();
Ctrl.cctx.arc(80 + 30 * cos, 180 + 30 * sin, 20, 0, Math.PI * 2, true);
Ctrl.cctx.fill();
Ctrl.cctx.fillStyle = "red";
Ctrl.cctx.beginPath();
Ctrl.cctx.arc(120, 40, 10, 0, Math.PI * 2, true);
Ctrl.cctx.fill();
Ctrl.cctx.fillStyle = "green";
Ctrl.cctx.beginPath();
Ctrl.cctx.arc(120, 70, 10, 0, Math.PI * 2, true);
Ctrl.cctx.fill();
Ctrl.cctx.fillStyle = "blue";
Ctrl.cctx.beginPath();
Ctrl.cctx.arc(120, 100, 10, 0, Math.PI * 2, true);
Ctrl.cctx.fill();
};
Ctrl.draw$ = Ctrl$draw$;
function Ctrl$_checkTouchBox$LCtrl$CBox$II(box, tx, ty) {
var x0;
var y0;
var x1;
var y1;
if (box == null) {
return false;
}
x0 = box.x;
y0 = box.y;
if (box == Ctrl.lHitBox || box == Ctrl.hHitBox) {
x0 += Ctrl.cbox.x;
y0 += Ctrl.cbox.y;
} else {
x0 = (box.x >= 0 ? x0 : Ctrl.wbox.w + x0);
y0 = (box.y >= 0 ? y0 : Ctrl.wbox.h + y0);
}
x1 = x0 + box.w;
y1 = y0 + box.h;
return x0 < tx && tx < x1 && y0 < ty && ty < y1;
};
Ctrl._checkTouchBox$LCtrl$CBox$II = Ctrl$_checkTouchBox$LCtrl$CBox$II;
function Ctrl$_calcTouchButton$LCtrl$CBox$IIBB(box, tx, ty, dn, up) {
var x1;
var y1;
var x0;
var y0;
var r0;
var r1;
var cos;
if (box == Ctrl.lHitBox) {
Ctrl.lPower = Math.max(0, Math.min(1, (ty - Ctrl.cbox.y - 10) / 110));
Ctrl.lGrab = ! up;
} else {
if (box == Ctrl.hHitBox) {
x1 = tx - Ctrl.cbox.x - 80;
y1 = ty - Ctrl.cbox.y - 180;
if (! dn) {
x0 = Ctrl.hx;
y0 = Ctrl.hy;
r0 = Math.sqrt(x0 * x0 + y0 * y0);
r1 = Math.sqrt(x1 * x1 + y1 * y1);
if (r0 > 20 && r1 > 20) {
cos = Math.max(- 1, Math.min(1, (x0 * x1 + y0 * y1) / (r0 * r1)));
Ctrl.hPower += Math.acos(cos) * (x0 * y1 - y0 * x1 > 0 ? 1 : - 1);
}
}
Ctrl.hx = x1;
Ctrl.hy = y1;
Ctrl.hRot = Math.atan2(y1, x1);
}
}
};
Ctrl._calcTouchButton$LCtrl$CBox$IIBB = Ctrl$_calcTouchButton$LCtrl$CBox$IIBB;
function Ctrl$_calcEvent$LEvent$F$IIIB$(e, calc) {
var active;
var te;
var i;
var touch;
var me;
active = false;
if (Ctrl.isTouch) {
te = (function ($v) {
if (! ($v == null || $v instanceof TouchEvent)) {
debugger;
throw new Error("[/tmp/RRjfkQ7FM7.jsx:325:23] detected invalid cast, value is not an instance of the designated type or null\n var te = e as TouchEvent;\r\n ^^\n");
}
return $v;
}(e));
for (i = 0; i < te.changedTouches.length; i++) {
touch = te.changedTouches[i];
active = calc((touch.clientX | 0), (touch.clientY | 0), (touch.identifier | 0)) || active;
}
} else {
me = (function ($v) {
if (! ($v == null || $v instanceof MouseEvent)) {
debugger;
throw new Error("[/tmp/RRjfkQ7FM7.jsx:331:23] detected invalid cast, value is not an instance of the designated type or null\n var me = e as MouseEvent;\r\n ^^\n");
}
return $v;
}(e));
active = calc((me.clientX | 0), (me.clientY | 0), 0);
}
if (active) {
}
};
Ctrl._calcEvent$LEvent$F$IIIB$ = Ctrl$_calcEvent$LEvent$F$IIIB$;
function Ctrl$_tdnfn$LEvent$(e) {
Ctrl$_calcEvent$LEvent$F$IIIB$(e, (function (tx, ty, id) {
var box;
var i;
if (Ctrl$_checkTouchBox$LCtrl$CBox$II(Ctrl.sbox, tx, ty)) {
box = Ctrl.sbox;
} else {
if (Ctrl$_checkTouchBox$LCtrl$CBox$II(Ctrl.lHitBox, tx, ty)) {
box = Ctrl.lHitBox;
} else {
if (Ctrl$_checkTouchBox$LCtrl$CBox$II(Ctrl.hHitBox, tx, ty)) {
box = Ctrl.hHitBox;
} else {
return false;
}
}
}
for (i = 0; i < Ctrl._info.length; i++) {
if (box == Ctrl._info[i].box) {
return false;
}
}
Ctrl._info.push(new Ctrl$C_TouchInfo(id, box));
if (box == Ctrl.sbox) {
Ctrl.tx = tx - Ctrl.sbox.x;
Ctrl.ty = ty - Ctrl.sbox.y;
Ctrl.tdn = true;
Ctrl.tmv = false;
Ctrl._temptx = Ctrl.tx;
Ctrl._tempty = Ctrl.ty;
} else {
Ctrl$_calcTouchButton$LCtrl$CBox$IIBB(box, tx, ty, true, false);
}
return true;
}));
e.preventDefault();
e.stopPropagation();
};
Ctrl._tdnfn$LEvent$ = Ctrl$_tdnfn$LEvent$;
function Ctrl$_tmvfn$LEvent$(e) {
Ctrl$_calcEvent$LEvent$F$IIIB$(e, (function (tx, ty, id) {
var box;
var i;
var x;
var y;
box = null;
for (i = 0; i < Ctrl._info.length; i++) {
if (id === Ctrl._info[i].id) {
box = Ctrl._info[i].box;
break;
}
}
if (box == null) {
return false;
}
if (box == Ctrl.sbox) {
Ctrl.tx = tx - Ctrl.sbox.x;
Ctrl.ty = ty - Ctrl.sbox.y;
if (Ctrl.tdn && ! Ctrl.tmv) {
x = Ctrl._temptx - Ctrl.tx;
y = Ctrl._tempty - Ctrl.ty;
Ctrl.tmv = x * x + y * y > 10;
}
} else {
Ctrl$_calcTouchButton$LCtrl$CBox$IIBB(box, tx, ty, false, false);
}
return true;
}));
e.preventDefault();
e.stopPropagation();
};
Ctrl._tmvfn$LEvent$ = Ctrl$_tmvfn$LEvent$;
function Ctrl$_tupfn$LEvent$(e) {
Ctrl$_calcEvent$LEvent$F$IIIB$(e, (function (tx, ty, id) {
var box;
var i;
box = null;
for (i = 0; i < Ctrl._info.length; i++) {
if (id === Ctrl._info[i].id) {
box = Ctrl._info.splice(i--, 1)[0].box;
break;
}
}
if (box == null) {
return false;
}
if (box == Ctrl.sbox) {
Ctrl.tx = tx - Ctrl.sbox.x;
Ctrl.ty = ty - Ctrl.sbox.y;
Ctrl.tdn = false;
} else {
Ctrl$_calcTouchButton$LCtrl$CBox$IIBB(box, tx, ty, false, true);
}
return true;
}));
e.preventDefault();
e.stopPropagation();
};
Ctrl._tupfn$LEvent$ = Ctrl$_tupfn$LEvent$;
function dom() {
};
$__jsx_extend([dom], Object);
function dom$id$S(id) {
return (function ($v) {
if (! ($v == null || $v instanceof HTMLElement)) {
debugger;
throw new Error("[/usr/local/lib/node_modules/jsx/lib/js/js/web.jsx:29:47] detected invalid cast, value is not an instance of the designated type or null\n return dom.document.getElementById(id) as HTMLElement;\n ^^\n");
}
return $v;
}(dom.document.getElementById(id)));
};
dom.id$S = dom$id$S;
function dom$getElementById$S(id) {
return (function ($v) {
if (! ($v == null || $v instanceof HTMLElement)) {
debugger;
throw new Error("[/usr/local/lib/node_modules/jsx/lib/js/js/web.jsx:37:47] detected invalid cast, value is not an instance of the designated type or null\n return dom.document.getElementById(id) as HTMLElement;\n ^^\n");
}
return $v;
}(dom.document.getElementById(id)));
};
dom.getElementById$S = dom$getElementById$S;
function dom$createElement$S(tag) {
return (function ($v) {
if (! ($v == null || $v instanceof HTMLElement)) {
debugger;
throw new Error("[/usr/local/lib/node_modules/jsx/lib/js/js/web.jsx:45:47] detected invalid cast, value is not an instance of the designated type or null\n return dom.document.createElement(tag) as __noconvert__ HTMLElement;\n ^^\n");
}
return $v;
}(dom.document.createElement(tag)));
};
dom.createElement$S = dom$createElement$S;
function EventInit() {
this.bubbles = false;
this.cancelable = false;
};
$__jsx_extend([EventInit], Object);
function CustomEventInit() {
EventInit.call(this);
this.detail = null;
};
$__jsx_extend([CustomEventInit], EventInit);
function MutationObserverInit() {
this.childList = false;
this.attributes = false;
this.characterData = false;
this.subtree = false;
this.attributeOldValue = false;
this.characterDataOldValue = false;
this.attributeFilter = null;
};
$__jsx_extend([MutationObserverInit], Object);
function UIEventInit() {
EventInit.call(this);
this.view = null;
this.detail = 0;
};
$__jsx_extend([UIEventInit], EventInit);
function FocusEventInit() {
this.bubbles = false;
this.cancelable = false;
this.view = null;
this.detail = 0;
this.relatedTarget = null;
};
$__jsx_extend([FocusEventInit], Object);
function MouseEventInit() {
UIEventInit.call(this);
this.screenX = 0;
this.screenY = 0;
this.clientX = 0;
this.clientY = 0;
this.ctrlKey = false;
this.shiftKey = false;
this.altKey = false;
this.metaKey = false;
this.button = 0;
this.buttons = 0;
this.relatedTarget = null;
this.region = null;
};
$__jsx_extend([MouseEventInit], UIEventInit);
function WheelEventInit() {
this.bubbles = false;
this.cancelable = false;
this.view = null;
this.detail = 0;
this.screenX = 0;
this.screenY = 0;
this.clientX = 0;
this.clientY = 0;
this.ctrlKey = false;
this.shiftKey = false;
this.altKey = false;
this.metaKey = false;
this.button = 0;
this.buttons = 0;
this.relatedTarget = null;
this.deltaX = 0;
this.deltaY = 0;
this.deltaZ = 0;
this.deltaMode = 0;
};
$__jsx_extend([WheelEventInit], Object);
function KeyboardEventInit() {
this.bubbles = false;
this.cancelable = false;
this.view = null;
this.detail = 0;
this.char = "";
this.key = "";
this.location = 0;
this.ctrlKey = false;
this.shiftKey = false;
this.altKey = false;
this.metaKey = false;
this.repeat = false;
this.locale = "";
this.charCode = 0;
this.keyCode = 0;
this.which = 0;
};
$__jsx_extend([KeyboardEventInit], Object);
function CompositionEventInit() {
this.bubbles = false;
this.cancelable = false;
this.view = null;
this.detail = 0;
this.data = null;
this.locale = "";
};
$__jsx_extend([CompositionEventInit], Object);
function ProgressEventInit() {
EventInit.call(this);
this.lengthComputable = false;
this.loaded = 0;
this.total = 0;
};
$__jsx_extend([ProgressEventInit], EventInit);
function XMLHttpRequestOptions() {
this.anon = false;
};
$__jsx_extend([XMLHttpRequestOptions], Object);
function TrackEventInit() {
EventInit.call(this);
this.track = null;
};
$__jsx_extend([TrackEventInit], EventInit);
function PopStateEventInit() {
EventInit.call(this);
this.state = null;
};
$__jsx_extend([PopStateEventInit], EventInit);
function HashChangeEventInit() {
EventInit.call(this);
this.oldURL = "";
this.newURL = "";
};
$__jsx_extend([HashChangeEventInit], EventInit);
function PageTransitionEventInit() {
EventInit.call(this);
this.persisted = false;
};
$__jsx_extend([PageTransitionEventInit], EventInit);
function DragEventInit() {
EventInit.call(this);
this.view = null;
this.detail = 0;
this.screenX = 0;
this.screenY = 0;
this.clientX = 0;
this.clientY = 0;
this.ctrlKey = false;
this.shiftKey = false;
this.altKey = false;
this.metaKey = false;
this.button = 0;
this.buttons = 0;
this.relatedTarget = null;
this.dataTransfer = null;
};
$__jsx_extend([DragEventInit], EventInit);
function CloseEventInit() {
EventInit.call(this);
this.wasClean = false;
this.code = 0;
this.reason = "";
};
$__jsx_extend([CloseEventInit], EventInit);
function StorageEventInit() {
EventInit.call(this);
this.key = null;
this.oldValue = null;
this.newValue = null;
this.url = "";
this.storageArea = null;
};
$__jsx_extend([StorageEventInit], EventInit);
function MessageEventInit() {
EventInit.call(this);
this.data = null;
this.origin = "";
this.lastEventId = "";
this.source = null;
this.ports = null;
};
$__jsx_extend([MessageEventInit], EventInit);
function ErrorEventInit() {
EventInit.call(this);
this.message = "";
this.filename = "";
this.lineno = 0;
};
$__jsx_extend([ErrorEventInit], EventInit);
function EventSourceInit() {
this.withCredentials = false;
};
$__jsx_extend([EventSourceInit], Object);
function IDBObjectStoreParameters() {
this.keyPath = null;
this.autoIncrement = false;
};
$__jsx_extend([IDBObjectStoreParameters], Object);
function IDBIndexParameters() {
this.unique = false;
this.multiEntry = false;
};
$__jsx_extend([IDBIndexParameters], Object);
function IDBVersionChangeEventInit() {
EventInit.call(this);
this.oldVersion = 0;
this.newVersion = null;
};
$__jsx_extend([IDBVersionChangeEventInit], EventInit);
function NotificationOptions() {
this.titleDir = "";
this.body = "";
this.bodyDir = "";
this.tag = "";
this.iconUrl = "";
};
$__jsx_extend([NotificationOptions], Object);
function RTCSessionDescriptionInit() {
this.type = "";
this.sdp = "";
};
$__jsx_extend([RTCSessionDescriptionInit], Object);
function RTCIceCandidateInit() {
this.candidate = "";
this.sdpMid = "";
this.sdpMLineIndex = 0;
};
$__jsx_extend([RTCIceCandidateInit], Object);
function RTCIceServer() {
this.url = "";
this.credential = null;
};
$__jsx_extend([RTCIceServer], Object);
function RTCConfiguration() {
this.iceServers = null;
};
$__jsx_extend([RTCConfiguration], Object);
function DataChannelInit() {
this.reliable = false;
};
$__jsx_extend([DataChannelInit], Object);
function RTCPeerConnectionIceEventInit() {
EventInit.call(this);
this.candidate = null;
};
$__jsx_extend([RTCPeerConnectionIceEventInit], EventInit);
function MediaStreamEventInit() {
EventInit.call(this);
this.stream = null;
};
$__jsx_extend([MediaStreamEventInit], EventInit);
function DataChannelEventInit() {
EventInit.call(this);
this.channel = null;
};
$__jsx_extend([DataChannelEventInit], EventInit);
function MediaStreamConstraints() {
this.video = null;
this.audio = null;
};
$__jsx_extend([MediaStreamConstraints], Object);
function MediaTrackConstraints() {
this.mandatory = null;
this.optional = null;
};
$__jsx_extend([MediaTrackConstraints], Object);
function HitRegionOptions() {
this.path = null;
this.id = "";
this.parentID = null;
this.cursor = "";
this.control = null;
this.label = null;
this.role = null;
};
$__jsx_extend([HitRegionOptions], Object);
function WebGLContextAttributes() {
this.alpha = false;
this.depth = false;
this.stencil = false;
this.antialias = false;
this.premultipliedAlpha = false;
this.preserveDrawingBuffer = false;
};
$__jsx_extend([WebGLContextAttributes], Object);
function WebGLContextEventInit() {
EventInit.call(this);
this.statusMessage = "";
};
$__jsx_extend([WebGLContextEventInit], EventInit);
function DeviceOrientationEventInit() {
EventInit.call(this);
this.alpha = null;
this.beta = null;
this.gamma = null;
this.absolute = false;
};
$__jsx_extend([DeviceOrientationEventInit], EventInit);
function DeviceMotionEventInit() {
EventInit.call(this);
this.acceleration = null;
this.accelerationIncludingGravity = null;
this.rotationRate = null;
this.interval = null;
};
$__jsx_extend([DeviceMotionEventInit], EventInit);
function Timer() {
};
$__jsx_extend([Timer], Object);
function Timer$setTimeout$F$V$N(callback, intervalMS) {
return (function ($v) {
if (! ($v == null || typeof $v === "function")) {
debugger;
throw new Error("[/usr/local/lib/node_modules/jsx/lib/js/timer.jsx:34:40] detected invalid cast, value is not a function or null\n return (js.global[\"setTimeout\"] as __noconvert__ function(:function():void,:number) : TimerHandle)(callback, intervalMS);\n ^^\n");
}
return $v;
}(js.global.setTimeout))(callback, intervalMS);
};
Timer.setTimeout$F$V$N = Timer$setTimeout$F$V$N;
function Timer$clearTimeout$LTimerHandle$(timer) {
(function ($v) {
if (! ($v == null || typeof $v === "function")) {
debugger;
throw new Error("[/usr/local/lib/node_modules/jsx/lib/js/timer.jsx:38:35] detected invalid cast, value is not a function or null\n (js.global[\"clearTimeout\"] as __noconvert__ function(:TimerHandle) : void)(timer);\n ^^\n");
}
return $v;
}(js.global.clearTimeout))(timer);
};
Timer.clearTimeout$LTimerHandle$ = Timer$clearTimeout$LTimerHandle$;
function Timer$setInterval$F$V$N(callback, intervalMS) {
return (function ($v) {
if (! ($v == null || typeof $v === "function")) {
debugger;
throw new Error("[/usr/local/lib/node_modules/jsx/lib/js/timer.jsx:42:41] detected invalid cast, value is not a function or null\n return (js.global[\"setInterval\"] as __noconvert__ function(:function():void,:number) : TimerHandle)(callback, intervalMS);\n ^^\n");
}
return $v;
}(js.global.setInterval))(callback, intervalMS);
};
Timer.setInterval$F$V$N = Timer$setInterval$F$V$N;
function Timer$clearInterval$LTimerHandle$(timer) {
(function ($v) {
if (! ($v == null || typeof $v === "function")) {
debugger;
throw new Error("[/usr/local/lib/node_modules/jsx/lib/js/timer.jsx:46:36] detected invalid cast, value is not a function or null\n (js.global[\"clearInterval\"] as __noconvert__ function(:TimerHandle) : void)(timer);\n ^^\n");
}
return $v;
}(js.global.clearInterval))(timer);
};
Timer.clearInterval$LTimerHandle$ = Timer$clearInterval$LTimerHandle$;
function Timer$requestAnimationFrame$F$NV$(callback) {
return Timer._requestAnimationFrame(callback);
};
Timer.requestAnimationFrame$F$NV$ = Timer$requestAnimationFrame$F$NV$;
function Timer$cancelAnimationFrame$LTimerHandle$(timer) {
Timer._cancelAnimationFrame(timer);
};
Timer.cancelAnimationFrame$LTimerHandle$ = Timer$cancelAnimationFrame$LTimerHandle$;
function Timer$useNativeRAF$B(enable) {
Timer._requestAnimationFrame = Timer$_getRequestAnimationFrameImpl$B(enable);
Timer._cancelAnimationFrame = Timer$_getCancelAnimationFrameImpl$B(enable);
};
Timer.useNativeRAF$B = Timer$useNativeRAF$B;
function Timer$_getRequestAnimationFrameImpl$B(useNativeImpl) {
var lastTime;
if (useNativeImpl) {
if (js.global.requestAnimationFrame) {
return (function (callback) {
return (function ($v) {
if (! ($v == null || typeof $v === "function")) {
debugger;
throw new Error("[/usr/local/lib/node_modules/jsx/lib/js/timer.jsx:72:63] detected invalid cast, value is not a function or null\n return (js.global[\"requestAnimationFrame\"] as __noconvert__\n ^^\n");
}
return $v;
}(js.global.requestAnimationFrame))(callback);
});
} else {
if (js.global.webkitRequestAnimationFrame) {
return (function (callback) {
return (function ($v) {
if (! ($v == null || typeof $v === "function")) {
debugger;
throw new Error("[/usr/local/lib/node_modules/jsx/lib/js/timer.jsx:78:69] detected invalid cast, value is not a function or null\n return (js.global[\"webkitRequestAnimationFrame\"] as __noconvert__\n ^^\n");
}
return $v;
}(js.global.webkitRequestAnimationFrame))(callback);
});
} else {
if (js.global.mozRequestAnimationFrame) {
return (function (callback) {
return (function ($v) {
if (! ($v == null || typeof $v === "function")) {
debugger;
throw new Error("[/usr/local/lib/node_modules/jsx/lib/js/timer.jsx:84:66] detected invalid cast, value is not a function or null\n return (js.global[\"mozRequestAnimationFrame\"] as __noconvert__\n ^^\n");
}
return $v;
}(js.global.mozRequestAnimationFrame))(callback);
});
} else {
if (js.global.oRequestAnimationFrame) {
return (function (callback) {
return (function ($v) {
if (! ($v == null || typeof $v === "function")) {
debugger;
throw new Error("[/usr/local/lib/node_modules/jsx/lib/js/timer.jsx:90:64] detected invalid cast, value is not a function or null\n return (js.global[\"oRequestAnimationFrame\"] as __noconvert__\n ^^\n");
}
return $v;
}(js.global.oRequestAnimationFrame))(callback);
});
} else {
if (js.global.msRequestAnimationFrame) {
return (function (callback) {
return (function ($v) {
if (! ($v == null || typeof $v === "function")) {
debugger;
throw new Error("[/usr/local/lib/node_modules/jsx/lib/js/timer.jsx:96:65] detected invalid cast, value is not a function or null\n return (js.global[\"msRequestAnimationFrame\"] as __noconvert__\n ^^\n");
}
return $v;
}(js.global.msRequestAnimationFrame))(callback);
});
}
}
}
}
}
}
lastTime = 0;
return (function (callback) {
var now;
var timeToCall;
now = Date.now();
timeToCall = Math.max(0, 16 - (now - lastTime));
lastTime = now + timeToCall;
return Timer$setTimeout$F$V$N((function () {
callback(now + timeToCall);
}), timeToCall);
});
};
Timer._getRequestAnimationFrameImpl$B = Timer$_getRequestAnimationFrameImpl$B;
function Timer$_getCancelAnimationFrameImpl$B(useNativeImpl) {
if (useNativeImpl) {
if (js.global.cancelAnimationFrame) {
return (function (timer) {
(function ($v) {
if (! ($v == null || typeof $v === "function")) {
debugger;
throw new Error("[/usr/local/lib/node_modules/jsx/lib/js/timer.jsx:119:55] detected invalid cast, value is not a function or null\n (js.global[\"cancelAnimationFrame\"] as __noconvert__\n ^^\n");
}
return $v;
}(js.global.cancelAnimationFrame))(timer);
});
} else {
if (js.global.webkitCancelAnimationFrame) {
return (function (timer) {
(function ($v) {
if (! ($v == null || typeof $v === "function")) {
debugger;
throw new Error("[/usr/local/lib/node_modules/jsx/lib/js/timer.jsx:125:61] detected invalid cast, value is not a function or null\n (js.global[\"webkitCancelAnimationFrame\"] as __noconvert__\n ^^\n");
}
return $v;
}(js.global.webkitCancelAnimationFrame))(timer);
});
} else {
if (js.global.mozCancelAnimationFrame) {
return (function (timer) {
(function ($v) {
if (! ($v == null || typeof $v === "function")) {
debugger;
throw new Error("[/usr/local/lib/node_modules/jsx/lib/js/timer.jsx:131:58] detected invalid cast, value is not a function or null\n (js.global[\"mozCancelAnimationFrame\"] as __noconvert__\n ^^\n");
}
return $v;
}(js.global.mozCancelAnimationFrame))(timer);
});
} else {
if (js.global.oCancelAnimationFrame) {
return (function (timer) {
(function ($v) {
if (! ($v == null || typeof $v === "function")) {
debugger;
throw new Error("[/usr/local/lib/node_modules/jsx/lib/js/timer.jsx:137:56] detected invalid cast, value is not a function or null\n (js.global[\"oCancelAnimationFrame\"] as __noconvert__\n ^^\n");
}
return $v;
}(js.global.oCancelAnimationFrame))(timer);
});
} else {
if (js.global.msCancelAnimationFrame) {
return (function (timer) {
(function ($v) {
if (! ($v == null || typeof $v === "function")) {
debugger;
throw new Error("[/usr/local/lib/node_modules/jsx/lib/js/timer.jsx:143:57] detected invalid cast, value is not a function or null\n (js.global[\"msCancelAnimationFrame\"] as __noconvert__\n ^^\n");
}
return $v;
}(js.global.msCancelAnimationFrame))(timer);
});
}
}
}
}
}
}
return Timer$clearTimeout$LTimerHandle$;
};
Timer._getCancelAnimationFrameImpl$B = Timer$_getCancelAnimationFrameImpl$B;
function TimerHandle() {
};
$__jsx_extend([TimerHandle], Object);
function Ctrl$CBox(x, y, w, h) {
this.x = x;
this.y = y;
this.w = w;
this.h = h;
};
$__jsx_extend([Ctrl$CBox], Object);
function Ctrl$C_TouchInfo(id, box) {
this.id = id;
this.box = box;
};
$__jsx_extend([Ctrl$C_TouchInfo], Object);
$__jsx_lazy_init(Ctrl, "wbox", function () {
return new Ctrl$CBox(0, 0, 0, 0);
});
$__jsx_lazy_init(Ctrl, "sbox", function () {
return new Ctrl$CBox(0, 0, 240, 160);
});
$__jsx_lazy_init(Ctrl, "cbox", function () {
return new Ctrl$CBox(0, 0, 160, 240);
});
Ctrl.scvs = null;
Ctrl.ccvs = null;
Ctrl.sctx = null;
Ctrl.cctx = null;
Ctrl.isTouch = false;
Ctrl.tdn = false;
Ctrl.tmv = false;
Ctrl.tx = 0;
Ctrl.ty = 0;
Ctrl._temptx = 0;
Ctrl._tempty = 0;
$__jsx_lazy_init(Ctrl, "_info", function () {
return [];
});
$__jsx_lazy_init(Ctrl, "lHitBox", function () {
return new Ctrl$CBox(10, (- 10 | 0), 80, 60);
});
$__jsx_lazy_init(Ctrl, "hHitBox", function () {
return new Ctrl$CBox(20, 120, 120, 120);
});
Ctrl.lGrab = false;
Ctrl.lPower = 0.0;
Ctrl.hx = 0;
Ctrl.hy = 0;
Ctrl.hPower = 0.0;
Ctrl.hRot = 0.0;
var js = { global: function () { return this; }() };
$__jsx_lazy_init(dom, "window", function () {
return js.global.window;
});
$__jsx_lazy_init(dom, "document", function () {
return (function ($v) {
if (! ($v == null || $v instanceof HTMLDocument)) {
debugger;
throw new Error("[/usr/local/lib/node_modules/jsx/lib/js/js/web.jsx:23:50] detected invalid cast, value is not an instance of the designated type or null\n static const document = js.global[\"document\"] as __noconvert__ HTMLDocument;\n ^^\n");
}
return $v;
}(js.global.document));
});
$__jsx_lazy_init(Timer, "_requestAnimationFrame", function () {
return Timer$_getRequestAnimationFrameImpl$B(true);
});
$__jsx_lazy_init(Timer, "_cancelAnimationFrame", function () {
return Timer$_getCancelAnimationFrameImpl$B(true);
});
var $__jsx_classMap = {
"system:lib/built-in.jsx": {
g_StopIteration: g_StopIteration,
g_StopIteration$: g_StopIteration
},
"/tmp/RRjfkQ7FM7.jsx": {
_Main: _Main,
_Main$: _Main,
Ctrl: Ctrl,
Ctrl$: Ctrl,
"Ctrl.Box": Ctrl$CBox,
"Ctrl.Box$IIII": Ctrl$CBox,
"Ctrl._TouchInfo": Ctrl$C_TouchInfo,
"Ctrl._TouchInfo$ILCtrl$CBox$": Ctrl$C_TouchInfo
},
"system:lib/js/js/web.jsx": {
dom: dom,
dom$: dom,
EventInit: EventInit,
EventInit$: EventInit,
CustomEventInit: CustomEventInit,
CustomEventInit$: CustomEventInit,
MutationObserverInit: MutationObserverInit,
MutationObserverInit$: MutationObserverInit,
UIEventInit: UIEventInit,
UIEventInit$: UIEventInit,
FocusEventInit: FocusEventInit,
FocusEventInit$: FocusEventInit,
MouseEventInit: MouseEventInit,
MouseEventInit$: MouseEventInit,
WheelEventInit: WheelEventInit,
WheelEventInit$: WheelEventInit,
KeyboardEventInit: KeyboardEventInit,
KeyboardEventInit$: KeyboardEventInit,
CompositionEventInit: CompositionEventInit,
CompositionEventInit$: CompositionEventInit,
ProgressEventInit: ProgressEventInit,
ProgressEventInit$: ProgressEventInit,
XMLHttpRequestOptions: XMLHttpRequestOptions,
XMLHttpRequestOptions$: XMLHttpRequestOptions,
TrackEventInit: TrackEventInit,
TrackEventInit$: TrackEventInit,
PopStateEventInit: PopStateEventInit,
PopStateEventInit$: PopStateEventInit,
HashChangeEventInit: HashChangeEventInit,
HashChangeEventInit$: HashChangeEventInit,
PageTransitionEventInit: PageTransitionEventInit,
PageTransitionEventInit$: PageTransitionEventInit,
DragEventInit: DragEventInit,
DragEventInit$: DragEventInit,
CloseEventInit: CloseEventInit,
CloseEventInit$: CloseEventInit,
StorageEventInit: StorageEventInit,
StorageEventInit$: StorageEventInit,
MessageEventInit: MessageEventInit,
MessageEventInit$: MessageEventInit,
ErrorEventInit: ErrorEventInit,
ErrorEventInit$: ErrorEventInit,
EventSourceInit: EventSourceInit,
EventSourceInit$: EventSourceInit,
IDBObjectStoreParameters: IDBObjectStoreParameters,
IDBObjectStoreParameters$: IDBObjectStoreParameters,
IDBIndexParameters: IDBIndexParameters,
IDBIndexParameters$: IDBIndexParameters,
IDBVersionChangeEventInit: IDBVersionChangeEventInit,
IDBVersionChangeEventInit$: IDBVersionChangeEventInit,
NotificationOptions: NotificationOptions,
NotificationOptions$: NotificationOptions,
RTCSessionDescriptionInit: RTCSessionDescriptionInit,
RTCSessionDescriptionInit$: RTCSessionDescriptionInit,
RTCIceCandidateInit: RTCIceCandidateInit,
RTCIceCandidateInit$: RTCIceCandidateInit,
RTCIceServer: RTCIceServer,
RTCIceServer$: RTCIceServer,
RTCConfiguration: RTCConfiguration,
RTCConfiguration$: RTCConfiguration,
DataChannelInit: DataChannelInit,
DataChannelInit$: DataChannelInit,
RTCPeerConnectionIceEventInit: RTCPeerConnectionIceEventInit,
RTCPeerConnectionIceEventInit$: RTCPeerConnectionIceEventInit,
MediaStreamEventInit: MediaStreamEventInit,
MediaStreamEventInit$: MediaStreamEventInit,
DataChannelEventInit: DataChannelEventInit,
DataChannelEventInit$: DataChannelEventInit,
MediaStreamConstraints: MediaStreamConstraints,
MediaStreamConstraints$: MediaStreamConstraints,
MediaTrackConstraints: MediaTrackConstraints,
MediaTrackConstraints$: MediaTrackConstraints,
HitRegionOptions: HitRegionOptions,
HitRegionOptions$: HitRegionOptions,
WebGLContextAttributes: WebGLContextAttributes,
WebGLContextAttributes$: WebGLContextAttributes,
WebGLContextEventInit: WebGLContextEventInit,
WebGLContextEventInit$: WebGLContextEventInit,
DeviceOrientationEventInit: DeviceOrientationEventInit,
DeviceOrientationEventInit$: DeviceOrientationEventInit,
DeviceMotionEventInit: DeviceMotionEventInit,
DeviceMotionEventInit$: DeviceMotionEventInit
},
"system:lib/js/timer.jsx": {
Timer: Timer,
Timer$: Timer,
TimerHandle: TimerHandle,
TimerHandle$: TimerHandle
}
};
/**
* launches _Main.main(:string[]):void invoked by jsx --run|--executable
*/
JSX.runMain = function (sourceFile, args) {
var module = JSX.require(sourceFile);
if (! module) {
throw new ReferenceError("entry point module not found in " + sourceFile);
}
if (! module._Main) {
throw new ReferenceError("entry point _Main not found in " + sourceFile);
}
if (! module._Main.main) {
throw new ReferenceError("entry point _Main.main(:string[]):void not found in " + sourceFile);
}
module._Main.main(args);
};
/**
* launches _Test#test*():void invoked by jsx --test
*/
JSX.runTests = function (sourceFile, tests) {
var module = JSX.require(sourceFile);
var testClass = module._Test;
if (!testClass) return; // skip if there's no test class
if(tests.length === 0) {
var p = testClass.prototype;
for (var m in p) {
if (p[m] instanceof Function && m.match(/^test\w*$/)) {
tests.push(m);
}
}
}
var testCase = new testClass();
if (testCase.beforeClass != null)
testCase.beforeClass(tests);
for (var i = 0; i < tests.length; ++i) {
(function (method) {
if (method in testCase) {
testCase.run(method, function() { testCase[method](); });
}
else {
throw new ReferenceError("No such test method: " + method);
}
}(tests[i]));
}
if (testCase.afterClass != null)
testCase.afterClass();
};
/**
* call a function on load/DOMContentLoaded
*/
function $__jsx_onload (event) {
window.removeEventListener("load", $__jsx_onload);
document.removeEventListener("DOMContentLoaded", $__jsx_onload);
JSX.runMain("/tmp/RRjfkQ7FM7.jsx", []);
}
window.addEventListener("load", $__jsx_onload);
document.addEventListener("DOMContentLoaded", $__jsx_onload);
})(JSX);
//
koh5_pano
Drag mouse to navigate.
Navigation
- Left/Right Mouse drag: Changes camera heading.
- Up/Sown Mouse drag: Changes camera pitch.
- Scroll wheel: Changes camera field of view.
- I-Key: Displays Info panel with canvas size, image size and FPS.
17.Aug.2010, Martin Wengenmayer