Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function preload(){
- obj = loadModel('includes/demos-data/3d/teapot.obj')
- }
- function setup() {
- createCanvas(windowWidth, windowHeight, WEBGL)
- // print(JSON.stringify(obj))
- }
- function draw() {
- clear()
- scale(-4)
- // for(let f of obj.faces){
- // f[1] =1
- // }
- for(let v of obj.vertices){
- v.x += random(20)
- }
- // ?? how to rebuild after each change??
- // obj.buildGeometry(); // doesn't work
- model(obj)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement