Newton's fractal
Runtime Newton's fractal renderer.
>>Click<< to open in your browser
Inspired by 3blue1brown's video about Newton's fractal.
Runtime Newton's fractal renderer.
Inspired by 3blue1brown's video about Newton's fractal.
Force Directed Graph GPU supercharged attraction-graph visualizations for the web built on top of Three.js. Importable as an ES6 module. Simulation co
sh-syntax A WASM shell parser and formatter with bash support, based on mvdan/sh TOC Usage Install API Changelog License Usage Install # yarn yarn add
Terra Draw Frictionless map drawing across mapping providers. TerraDraw centralises map drawing logic and provides a host of out the box drawing modes
JustGage JustGage is a handy JavaScript plugin for generating and animating nice & clean dashboard gauges. It is based on Raphaël library for vector d
vivus.js Demo available on http://maxwellito.github.io/vivus Play with it on Vivus Instant Vivus is a lightweight JavaScript class (with no dependenci
Simple Jai to WASM Proof-of-Concept Jai does not officially support WebAssembly compilation target. BUT! It allows you to dump LLVM IR via the llvm_op
Fourier Series Animation An interactive React web app that demonstrates how an arbitrary user-inputted line drawing can be approximated using the Four
HVM on JavaScript HVM is now available as a JavaScript library! Installing npm i --save hvm-js Examples Evaluating a term to normal form import hvm fr
Gnet.js Gnet is a JavaScript library for network graph visualization, developed by Goutham. First I want to thank D3.js developers for creating such a
This isn't all JS-specific (in fact, most of it isn't), though I used JS for familiarity. I haven't tested or benchmarked this (part of why it's a draft PR), but I created the PR anyways just to help explain.
The long 104-line comment explains most of it, but there's a few key insights into this:
a * sqrt(1 + (a/b)^2)
for computing the two-dimensional Euclidean norm, as it's more numerically stable. (JS has a Math.hypot(...components)
for this reason.) This happens to require an extra floating point division, but you can reclaim with a floating-point fma
where available. (This applies across the board, though I see you're already using the WebGL distance
function, so that's not an issue in the GPU code.)Also, separately, I have a couple larger nits:
type Root = [number, number]
and root: Root[]
would be more idiomatic of a type for your roots
. (You can also label them as [x: number, y: number]
for added clarity.) Likewise, type Color = [number, number, number, number]
+ colors: Color[]
would be clearer and more idiomatic. This would also cause the array's length to get checked for, so you wouldn't be as likely to accidentally forget an entry or add one too many entries.{i,u}8x16_swizzle(a)
may yield slightly faster code for the lane shifting than *_shuffle(a, a)
due to better instruction selection, though that will need benchmarked.let real = f32x4_shuffle::<0, 2, 4, 6>(a, b); let imag = f32x4_shuffle::<0, 2, 4, 6>(a, b);
so you can do it in full batches of 4 using a similar algorithm to the scalar variant. This would require slightly more registers of course and it'd also complicate finding the matching lane (TL;DR: let lane_idx = i32x4_bitmask(f32x4_lt(square_norm, f32x4_splat(0.000002))).trailing_zeros()
, lane found if lane_idx < 4
), but you might derive a full 1.5x speedup from that if not more as you're doing even the expensive operations like sqrt
fully parallel.Rust <-> Remix Sandbox Now with both native Rust and WASM versions! If you want to combine the Web Fundamentals & Modern UX of Remix together with the
Remix + Deno + Rust -> Webassembly - The Air Metal Stack Welcome to the Air Metal Stack for Remix! ?? + ?? This stack is a good choice if you want to
parallel-park Parallel/concurrent async work, optionally using multiple processes Usage parallel-park exports two functions: runJobs and inChildProces
MusicThread Web Feeds A light microservice to serve Atom 1.0 Feeds for MusicThread. People use web feeds for following updates to specific threads via
Ticket Bot Um bot de suporte feito usando threads para o Discord, 100% customizável, feito em JavaScript e inspirado no Rio Helper do servidor Elixir
Twotion | The Easiest Way To Write Twitter Threads Write Twitter threads and post them in one click without leaving Notion. Completely Free No Need To
Cogflare (Working title) Cogflare is a Cloudflare Workers application that aims to simplify running distributed ML inference jobs through a central AP
MARTINS.js WebAR engine Create amazing Augmented Reality experiences with MARTINS.js, a GPU-accelerated Augmented Reality engine for the web. Get star
Ants simulation A simple ant colony GPU-accelerated simulation made with Three.js. Live demo Rules Ants can emit two types of pheromones: to-home pher
Noptcha, without affiliate link injection Noptcha is a reCaptcha and hCaptcha solving extension created by GPU Drops. This fork was made because I hat