summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2014-11-22 23:18:33 -0500
committerJules Laplace <jules@okfoc.us>2014-11-22 23:18:33 -0500
commit42323b8eb65c8a56239467bb2580e8c96da36229 (patch)
tree96b33d147e494076ebfebd99d539be7aba0bda41
parentbfdb50e058abf94577ddd1b9e2cf1a9e6653828b (diff)
fix atan2
-rw-r--r--index.html2
-rw-r--r--js/shader.js2
-rw-r--r--js/util.js2
3 files changed, 3 insertions, 3 deletions
diff --git a/index.html b/index.html
index d65e350..908b3c0 100644
--- a/index.html
+++ b/index.html
@@ -12,7 +12,7 @@ body.loading { opacity: 0; }
body { transition: 0.1s linear; }
.focused { box-shadow: inset 1px 0 2px white, inset -1px 0 2px white, inset 0 1px 2px white, inset 0 -1px 2px white; }
#shader_textarea { display: none; float: right; font-size:12pt; width: 45%; height: 400px; background: #333; color: #0f0; border: 0; font-family: 'FixedsysExcelsior301Regular'; outline: 0; border: 1px solid #333; background:#010;}
-#cursor_input { position: absolute; top: 0; right: 0; width:30px; }
+#cursor_input { position: absolute; top: 0; right: 0; width:30px; opacity: 0; }
</style>
<body class="loading">
diff --git a/js/shader.js b/js/shader.js
index d203abe..55bb2c7 100644
--- a/js/shader.js
+++ b/js/shader.js
@@ -8,8 +8,8 @@ var shader = (function(){
exports.build(demo_shader.innerHTML)
}
exports.build = function (fn_str){
- new_fn = new Function('lex', 'x', 'y', 'w', 'h', 't', fn_str)
try {
+ new_fn = new Function('lex', 'x', 'y', 'w', 'h', 't', fn_str)
new_fn(lex, 0, 0, 1, 1, 0)
}
catch (e) {
diff --git a/js/util.js b/js/util.js
index fac0faf..27c5427 100644
--- a/js/util.js
+++ b/js/util.js
@@ -36,7 +36,7 @@ function tan(n){ return Math.tan(n) }
function acos(n){ return Math.cos(n) }
function asin(n){ return Math.sin(n) }
function atan(n){ return Math.atan(n) }
-function atan2(n){ return Math.atan2(n) }
+function atan2(a,b){ return Math.atan2(a,b) }
function sec(n){ return 1/cos(n) }
function csc(n){ return 1/sin(n) }
function cot(n){ return 1/tan(n) }