Random custom 3d model / P5js

Hi,

I’ve been following this amazing tutorial and trying to make it work with custom 3d object. So my goal is to get random 3d objects in random locations.

I’m a beginner in p5.js and I’ve spent a long time watching tutorials and trying to make this work but I feel totally clueless at the moment. First of all I’m getting an error message: “p5.js says: loadStrings() was expecting Function for the third parameter, received an empty variable instead. (on line 84410 in p5.js” but I’m pretty sure that’s not the only problem here. Could you please help me out, I’m desperate :blush:

 let bubbles=[];

let kittens=[];



function preload(){

  
 let kitten0=loadModel('CustomModel1.obj');
  let kitten1=loadModel('CustomModel2.obj');
  
  
 kittens=[kitten0, kitten1]; //store variables in an array
  
 
  
}



function setup() {
  createCanvas(500, 500, WEBGL);
  for (let i = 0; i< 10; i ++){
 
    let kitten= random(kittens);
   let b=new Bubble(kitten);
    bubbles.push(b);
}}
  
  
function draw() {
  background(0);
  for (let i = 0; i< bubbles.length; i ++){
  bubbles[i].show();
    
  }
}
  
  class Bubble {
   constructor(model){
 
      this.kitten=model;
  
      
    }
    
    
    
    
    show(){
      
  model(this.kitten);
    }
  }