mirror of
https://github.com/exoticorn/curlywas.git
synced 2026-01-20 11:46:43 +01:00
update microw8 resolution, now 320x240
This commit is contained in:
@@ -12,7 +12,7 @@ export fn tic(time: i32) {
|
|||||||
let lazy t = time as f32 / 5000 as f32;
|
let lazy t = time as f32 / 5000 as f32;
|
||||||
circle(
|
circle(
|
||||||
(sin(fi / 2 as f32 + t * 5 as f32) + 1 as f32) * 160 as f32,
|
(sin(fi / 2 as f32 + t * 5 as f32) + 1 as f32) * 160 as f32,
|
||||||
(sin(fi / 3 as f32 + t * 4 as f32) + 1 as f32) * 128 as f32,
|
(sin(fi / 3 as f32 + t * 4 as f32) + 1 as f32) * 120 as f32,
|
||||||
(sin(t * 17 as f32 + fi * 2 as f32) + 2 as f32) * 16 as f32, i * 2 + 63);
|
(sin(t * 17 as f32 + fi * 2 as f32) + 2 as f32) * 16 as f32, i * 2 + 63);
|
||||||
|
|
||||||
branch_if (i := i + 1) < 63: outer
|
branch_if (i := i + 1) < 63: outer
|
||||||
|
|||||||
@@ -30,6 +30,6 @@ export fn tic(time: i32) {
|
|||||||
loop pixels {
|
loop pixels {
|
||||||
seed(i + (time / 10) * 320);
|
seed(i + (time / 10) * 320);
|
||||||
i?120 = (randomf() * 256 as f32 + time as f32 / 10 as f32) as i32 & 128;
|
i?120 = (randomf() * 256 as f32 + time as f32 / 10 as f32) as i32 & 128;
|
||||||
branch_if (i := i + 1) < 320*256: pixels
|
branch_if (i := i + 1) < 320*240: pixels
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export fn tic(time: i32) {
|
|||||||
let lazy t = time as f32 / 2000 as f32;
|
let lazy t = time as f32 / 2000 as f32;
|
||||||
let lazy o = sin(t) * 0.8;
|
let lazy o = sin(t) * 0.8;
|
||||||
let lazy q = (i % 320) as f32 - 160.1;
|
let lazy q = (i % 320) as f32 - 160.1;
|
||||||
let lazy w = (i / 320 - 128) as f32;
|
let lazy w = (i / 320 - 120) as f32;
|
||||||
let lazy r = sqrt(q*q + w*w);
|
let lazy r = sqrt(q*q + w*w);
|
||||||
let lazy z = q / r;
|
let lazy z = q / r;
|
||||||
let lazy s = z * o + sqrt(z * z * o * o + 1 as f32 - o * o);
|
let lazy s = z * o + sqrt(z * z * o * o + 1 as f32 - o * o);
|
||||||
@@ -19,6 +19,6 @@ export fn tic(time: i32) {
|
|||||||
((q2 as i32 ^ w2 as i32 & ((s2 + t) * 20 as f32) as i32) & 5) as f32 *
|
((q2 as i32 ^ w2 as i32 & ((s2 + t) * 20 as f32) as i32) & 5) as f32 *
|
||||||
(2 as f32 - s2) * 22 as f32
|
(2 as f32 - s2) * 22 as f32
|
||||||
) as i32;
|
) as i32;
|
||||||
branch_if (i := i + 1) < 320*256: screen
|
branch_if (i := i + 1) < 320*240: screen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,7 +5,7 @@ export fn tic(time: i32) {
|
|||||||
let lazy t = time as f32 / 1000 as f32;
|
let lazy t = time as f32 / 1000 as f32;
|
||||||
loop pixels {
|
loop pixels {
|
||||||
let lazy x = (i % 320 - 160) as f32;
|
let lazy x = (i % 320 - 160) as f32;
|
||||||
let lazy y = (i / 320) as f32 - 128.5;
|
let lazy y = (i / 320) as f32 - 120.5;
|
||||||
let lazy z = t + 20 as f32 / sqrt(x*x + y*y);
|
let lazy z = t + 20 as f32 / sqrt(x*x + y*y);
|
||||||
let lazy z_int = z as i32;
|
let lazy z_int = z as i32;
|
||||||
let lazy q = select(z_int % 9 >= 6, z, (z_int - z_int % 9 + 6) as f32);
|
let lazy q = select(z_int % 9 >= 6, z, (z_int - z_int % 9 + 6) as f32);
|
||||||
@@ -20,6 +20,6 @@ export fn tic(time: i32) {
|
|||||||
12 + (y / 23 as f32) as i32
|
12 + (y / 23 as f32) as i32
|
||||||
)
|
)
|
||||||
) * 16;
|
) * 16;
|
||||||
branch_if (i := i + 1) < 320*256: pixels;
|
branch_if (i := i + 1) < 320*240: pixels;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ export fn tic(time: i32) {
|
|||||||
loop screen {
|
loop screen {
|
||||||
let lazy t = time as f32 / 10 as f32;
|
let lazy t = time as f32 / 10 as f32;
|
||||||
let lazy x = (i % 320) as f32 - 160.1;
|
let lazy x = (i % 320) as f32 - 160.1;
|
||||||
let lazy y = (i / 320 - 128) as f32;
|
let lazy y = (i / 320 - 120) as f32;
|
||||||
|
|
||||||
i?120 = ((20000 as f32 / sqrt(x * x + y * y) + t) as i32 ^ (atan2(x, y) * 512 as f32 / 3.141 + t) as i32);
|
i?120 = ((20000 as f32 / sqrt(x * x + y * y) + t) as i32 ^ (atan2(x, y) * 512 as f32 / 3.141 + t) as i32);
|
||||||
branch_if (i := i + 1) < 320*256: screen
|
branch_if (i := i + 1) < 320*240: screen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,12 +4,12 @@ export fn tic(time: i32) {
|
|||||||
let i: i32;
|
let i: i32;
|
||||||
loop pixels {
|
loop pixels {
|
||||||
let lazy x = (i % 320) as f32 - 160.1;
|
let lazy x = (i % 320) as f32 - 160.1;
|
||||||
let lazy y = (i / 320 - 128) as f32;
|
let lazy y = (i / 320 - 120) as f32;
|
||||||
let lazy dist = 10000.0 / (x*x + y*y);
|
let lazy dist = 10000.0 / (x*x + y*y);
|
||||||
let lazy t = time as f32 / 20 as f32;
|
let lazy t = time as f32 / 20 as f32;
|
||||||
|
|
||||||
i?120 = (x * dist + t) as i32 ^ (y * dist + t) as i32;
|
i?120 = (x * dist + t) as i32 ^ (y * dist + t) as i32;
|
||||||
|
|
||||||
branch_if (i := i + 1) < 320*256: pixels
|
branch_if (i := i + 1) < 320*240: pixels
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,6 @@ export fn tic(time: i32) {
|
|||||||
let i: i32;
|
let i: i32;
|
||||||
loop frame {
|
loop frame {
|
||||||
i?120 = (i % 320 + time / 10) ^ (i / 320);
|
i?120 = (i % 320 + time / 10) ^ (i / 320);
|
||||||
branch_if (i := i + 1) < 320*256: frame;
|
branch_if (i := i + 1) < 320*240: frame;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user