voxli
v0.1.3
Published
A minimalistic, zero dependency 3d engine for simple voxel visualizations based on WebGL
Downloads
7
Readme
voxli
A minimalistic, zero dependency 3d engine for simple voxel visualizations based on WebGL.
Usage (Typescript, vite and yarn)
yarn create vite sample-voxli --template vanilla-ts
cd sample-voxli
yarn
yarn add voxli
yarn dev
# press o + Enter
You will see the Vite default app page. From there first
change index.html
to remove any margins from the body:
- <body>
+ <body style="margin: 0; height: 100vh; overflow: hidden;">
Then go and overwrite src/main.ts
with this:
import { Viewer } from 'voxli'
new Viewer([[[1, 0, 1]]])
In the browser you should now see a 3D rendering showing two cubes.
Open the Sample Application to see more examples