Skip to content

My Personal Blog, including 3D renders of Hilbert Space Filling Curves using Web Assembly and WebGL

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE_APACHE
MIT
LICENSE_MIT
Notifications You must be signed in to change notification settings

benjaminwgordon/HilbertRenderer

Repository files navigation

HSFC-Renderer

The source code for my personal blog, including the rendering component for my 3D renders of real-time generated Hilbert Cubes using Rust, WebAssembly, and Three.js.

The website is live at benjaminwgordon.dev

Structure

src contains the rust code, which just serves to pass the input parameters between JavaScript and Web Assembly. The heavy lifting is done by the imported hilbert_curve_renderer::HilbertCurve module, which can be found here: https://github.com/benjaminwgordon/HSFC-generator

www contains the React/Next.js code. The HilbertThreeRenderer.tsx file contains the React Component where each Hilbert Curve is rendered. This component takes in props that allow it to generate a variety of different Hilbert Curves during runtime, none of the visualizations on the blog are pre-rendered.

Build Process

This project relies on an small Rust Crate to build. The crate is bundled into the repository, and has external dependencies on public Rust crates from Crates.io.

Build and serve locally:

cd www
npm run build:wasm
npm run build
npx serve@latest out

Run the development server locally:

# initialize and build the rust dependencies:
# this step only needs to be done once unless you intend to modify the rust dependencies
cd www
npm run build:wasm

# on all subsequent runs after initializing the rust dependencies,
# only this command needs to be run

# start the development server
npm run dev

About

My Personal Blog, including 3D renders of Hilbert Space Filling Curves using Web Assembly and WebGL

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE_APACHE
MIT
LICENSE_MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published