mirror of
https://github.com/dyne/FreeJ.git
synced 2026-06-16 12:59:33 +02:00
screated screen_js
now screens are also present in JS still tasks pending: backwards compatibility with scripts resolution of multiple screens in startup/reset logic testing
This commit is contained in:
@@ -12,6 +12,10 @@ PI = 3.141592654;
|
||||
c = PI * 2;
|
||||
o = -PI / 2;
|
||||
|
||||
scr = new Screen("sdl");
|
||||
scr.init(500,500);
|
||||
add_screen(scr);
|
||||
|
||||
function drawStar(lay, s_mul, s2_mul) {
|
||||
s = s_mul / 0.383;
|
||||
s2 = s / s2_mul;
|
||||
@@ -51,14 +55,14 @@ star_kbd.released_r = function() {
|
||||
register_controller( star_kbd );
|
||||
|
||||
var star;
|
||||
star = new GeometryLayer();
|
||||
star = new GeometryLayer(300,300);
|
||||
star.color(255,255,255,255);
|
||||
//star.set_blit("alpha");
|
||||
//star.set_name("star.js");
|
||||
//star.set_blit_value(0.1);
|
||||
//star.start();
|
||||
star.activate(true);
|
||||
add_layer(star);
|
||||
scr.add_layer(star);
|
||||
|
||||
drawStar(star,30,1);
|
||||
|
||||
|
||||
@@ -3,8 +3,14 @@
|
||||
// and smart use of function pointers
|
||||
// (C)2005 Denis Jaromil Rojo - GNU GPL
|
||||
|
||||
W = get_width();
|
||||
H = get_height();
|
||||
// W = get_width();
|
||||
// H = get_height();
|
||||
W = 400;
|
||||
H = 300;
|
||||
|
||||
scr = new Screen("sdl");
|
||||
scr.init(W,H);
|
||||
add_screen(scr);
|
||||
|
||||
function draw_pixels(rand_geo) {
|
||||
var x, y;
|
||||
@@ -78,7 +84,7 @@ rand_geo = new GeometryLayer(400,300);
|
||||
rand_geo.activate(true);
|
||||
//geo.start();
|
||||
//geo.set_fps(24);
|
||||
add_layer(rand_geo);
|
||||
scr.add_layer(rand_geo);
|
||||
|
||||
running = true;
|
||||
rand_kbd = new KeyboardController();
|
||||
@@ -94,6 +100,7 @@ rand_bang = new TriggerController();
|
||||
rand_bang.frame = function() {
|
||||
randomize_color(rand_geo);
|
||||
drawer(rand_geo);
|
||||
echo("tick");
|
||||
}
|
||||
register_controller(rand_bang);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user