X-Git-Url: http://git.megacz.com/?p=org.ibex.core.git;a=blobdiff_plain;f=tests%2Ftest2.t;fp=tests%2Ftest2.t;h=ce02efb78e9269978bc32b73d59f7d3257dbdb14;hp=3dcc5e343e94b4867a77cdd169dda61530724c33;hb=c93b6c2e62a21de425ceff3ec9e4a5264e73142c;hpb=2c4578ad79d2717dd749b51d682b6f8bff5a4c54 diff --git a/tests/test2.t b/tests/test2.t index 3dcc5e3..ce02efb 100644 --- a/tests/test2.t +++ b/tests/test2.t @@ -1,23 +1,20 @@ ibex.ui.frame = thisbox; - + // this thread makes things spin. var rot = 0; ibex.thread = function(f) { while(true) { - ibex.thread.yield(); -// if (ibex.math.floor(rot / 90) == rot / 90) -// $top.transform = "rotate(" + rot + ")"; -// $bot.transform = "rotate(" + (-2 * rot) + ")"; - $red.fill = "red"; - ibex.thread.yield(); - $red.fill = "green"; - ibex.thread.yield(); - rot += 1; + ibex.thread.sleep(100); + if (ibex.math.floor(rot / 90) == rot / 90) + $top.transform = "rotate(" + rot + ")"; + $bot.transform = "rotate(" + (-2 * rot) + ")"; + rot += 5; } } - +