hello-regl
A rotating, three-dimensional bunny model is rendered in real time using WebGL. The visualization demonstrates how vertex normals, computed from the bunny's triangular mesh via `angleNormals`, define surface colors, mapping each normal vector to an RGB value. The scene uses a `regl-camera` setup for orbital control and a red background, with the `bunny` package providing the model geometry. The example serves as a minimal introduction to setting up a `regl` rendering pipeline with shaders.
AI-generated descriptionSet up (from http://rickyreusser.com/2016/12/07/from-nothing-to-something-in-webgl/):
yarn init -y
yarn add angle-normals browserify budo bunny indexhtmlify regl regl-camera
Add to package.json
"scripts": {
"start": "budo index.js --open --live --host localhost",
"build": "browserify index.js | indexhtmlify > index.html"
},
Run yarn run start to dev, yarn run build to generate a build index.html.
yarn run hmr-start almost works - not sure how to structure the regl code inside of ud.