a web app to turn web images into .gltf files
by Ryan Guild
- Parcel Bundler for zero config modern js & ts
- parcel-plugin-wasm.rs for rust and wasm-bindgen
- typescript for typechecking included in parcel
- react for dom interaction included in parcel
- ingest
Event<HTMLImageElement>and extractFileListtoReturnType<typeof URL.createURLObject>[] - create
<img/>tags to load dataurl objects - from image extract natural dimensions and draw to
<canvas/>tags ImageDataobjects from canvas are passed to the webassembly module created by rust and wasm-bindgen located in src/pix2gltfrimage_to_gltffunction returns a strinified gltf file constructed of the a cube buffer geometry translated and skined to the pixels of the image. 100% Transparent pixels are skipped.
yarn startrun a dev serveryarn buildbuild the github pages statics