title: How do I / Is it posssible to keep different picture in each side of box() in p5.js?
body: <p>As beginner in P5.js I am trying to make a interactive dice, where the only trouble now is keeping different faces in each side in the cube.</p>
  
  <p>Here is my code: </p>
  
  <pre><code>let sizeOfCube = 400, img;
  
  function preload() {
      img = loadImage("olo/fgfg.jpg");
  }
  
  function setup() {
      createCanvas(windowWidth, windowHeight, WEBGL);
  }
  
  function draw() {
      background(250);
      translate(0, 0, sizeOfCube);
      if (sizeOfCube &gt; 100) {
          sizeOfCube -= 10;
      }
      rotateX(frameCount * 0.1);
      rotateY(frameCount * (0.1));
      rotateZ(frameCount * 0.1);
      texture(img);
      box(70, 70, 70);
  }
  </code></pre>
  
  <p>This code adds the image but is applied to all the sides. Is there a way to add 6 images to all 6 sides? </p>
  
  <p>For a demo(texture and others) please visit <a href="https://www.openprocessing.org/sketch/425446" rel="nofollow noreferrer">here</a> <code>Might take some time to load. Please wait!</code> </p>
  
  <blockquote>
    <p>Any suggestion or alternative approach? Please do tell.</p>
  </blockquote>