vunhucuongit
commited on
Commit
·
9365b32
1
Parent(s):
fa865ab
Update en/script.js
Browse files- en/script.js +3 -2
en/script.js
CHANGED
@@ -3,6 +3,7 @@ var canvas = document.getElementById("hw-canvas");
|
|
3 |
var ctx = canvas.getContext("2d");
|
4 |
var RNN_SIZE = 512;
|
5 |
var cur_run = 0;
|
|
|
6 |
|
7 |
var randn = function() {
|
8 |
// Standard Normal random variable using Box-Muller transform.
|
@@ -195,8 +196,8 @@ var dojob = function(run_id) {
|
|
195 |
});
|
196 |
|
197 |
[dx,dy,eos_] = input.dataSync();
|
198 |
-
dy = -dy * 3 *
|
199 |
-
dx = dx * 3 *
|
200 |
if (eos == 0.) {
|
201 |
ctx.beginPath();
|
202 |
ctx.moveTo(cur_x, cur_y, 0, 0);
|
|
|
3 |
var ctx = canvas.getContext("2d");
|
4 |
var RNN_SIZE = 512;
|
5 |
var cur_run = 0;
|
6 |
+
var scale_factor = 0.4;
|
7 |
|
8 |
var randn = function() {
|
9 |
// Standard Normal random variable using Box-Muller transform.
|
|
|
196 |
});
|
197 |
|
198 |
[dx,dy,eos_] = input.dataSync();
|
199 |
+
dy = -dy * 3 * scale_factor;
|
200 |
+
dx = dx * 3 * scale_factor;
|
201 |
if (eos == 0.) {
|
202 |
ctx.beginPath();
|
203 |
ctx.moveTo(cur_x, cur_y, 0, 0);
|