Shaofeng numerical core: fluid, vertex batch and tracer kernels compiled to WASM for the game
moon testfn add_force(wx : Double, wy : Double, fx : Double, fy : Double, amount : Double, radius : Double) -> Unitfn add_heat(wx : Double, wy : Double, amount : Double) -> Unitfn b_arc(cx : Double, cy : Double, radius : Double, a0 : Double, a1 : Double, seg : Int, w : Double, r : Double, g : Double, bl : Double, a : Double) -> Unitfn b_dash_ring(cx : Double, cy : Double, radius : Double, on : Double, off : Double, w : Double, r : Double, g : Double, bl : Double, a : Double) -> Unitfn b_data() -> Intfn b_disc(cx : Double, cy : Double, rx : Double, ry : Double, rot : Double, seg : Int, r : Double, g : Double, bl : Double, a : Double) -> Unitfn b_disc_grad(cx : Double, cy : Double, radius : Double, seg : Int, cr : Double, cg : Double, cb : Double, ca : Double, er : Double, eg : Double, eb : Double, ea : Double) -> Unitfn b_rect(x0 : Double, y0 : Double, x1 : Double, y1 : Double, r : Double, g : Double, bl : Double, a : Double) -> Unitfn b_rect_vgrad(x0 : Double, y0 : Double, x1 : Double, y1 : Double, r0 : Double, g0 : Double, b0 : Double, a0 : Double, r1 : Double, g1 : Double, b1 : Double, a1 : Double) -> Unitfn b_ring(cx : Double, cy : Double, rx : Double, ry : Double, rot : Double, seg : Int, w : Double, r : Double, g : Double, bl : Double, a : Double) -> Unitfn b_stroke(x0 : Double, y0 : Double, x1 : Double, y1 : Double, w : Double, r : Double, g : Double, bl : Double, a : Double, round : Bool) -> Unitfn b_terrain_data() -> Intfn b_terrain_draw(i0 : Int, j0 : Int, i1 : Int, j1 : Int) -> Intfn b_terrain_field(nx : Int, ny : Int, x0 : Double, y0 : Double, cell : Double, sr : Double, sg : Double, sb : Double, dr : Double, dg : Double, db : Double, depth_len : Double) -> Intfn b_terrain_field_buf() -> Intfn b_terrain_field_cap() -> Intfn b_tri(x0 : Double, y0 : Double, x1 : Double, y1 : Double, x2 : Double, y2 : Double, r : Double, g : Double, bl : Double, a : Double) -> Unitfn b_vertex_stride() -> Intfn canary_buf() -> Intfn canary_get(i : Int) -> Intfn canary_set(i : Int, v : Int) -> Unitfn field_fx_u() -> Intfn field_fx_v() -> Intfn field_t() -> Intfn field_u() -> Intfn field_v() -> Intfn fluid_init(nx_ : Int, ny_ : Int, cell_ : Double, buoyancy_ : Double, t_max_ : Double, source_radius_ : Double, vel_damping_ : Double, t_damping_ : Double, iterations_ : Int, margin_cells_ : Int) -> Intfn rebuild_solid() -> Unitfn sample_temp(wx : Double, wy : Double) -> Doublefn sample_velocity(wx : Double, wy : Double) -> Unitfn set_ambient(x : Double, y : Double, temp : Double) -> Unitfn solid_buf() -> Intfn step(dt : Double) -> Unitfn t_life_buf() -> Intfn t_max_life_buf() -> Intfn t_sdf_buf() -> Intfn t_sdf_cap() -> Intfn t_src_buf() -> Intfn t_trail_n_buf() -> Intfn t_trail_t_buf() -> Intfn t_trail_x_buf() -> Intfn t_trail_y_buf() -> Intfn t_x_buf() -> Intfn t_y_buf() -> Intfn tracers_init(count : Int, trail_len : Int, world_w : Double, world_h : Double, margin : Double, snx : Int, sny : Int, scell : Double, sox : Double, soy : Double, seed : UInt) -> Intfn tracers_step(dt : Double, src_count : Int) -> UnitShaofeng numerical core: fluid, vertex batch and tracer kernels compiled to WASM for the game