text: import { CGFobject } from "../lib/CGF.js";
  import { MyQuad } from "./MyQuad.js";
  
  export class MyUnitCubeQuad extends CGFobject {
      constructor(scene) {
          super(scene);
          this.initBuffers();
      }
      initBuffers() {
          this.scene.quad = new MyQuad(this.scene);
      }
      display() {
  
          //TOP
          this.scene.pushMatrix();
          this.scene.translate(0.0, 0.0, 0.5);
          this.scene.quad.display();
          this.scene.popMatrix();
  
          //BOTTOM
          this.scene.pushMatrix();
          this.scene.translate(0.0, 0.0, -0.5);
          this.scene.rotate(Math.PI, 0, 1, 0);
          this.scene.quad.display();
          this.scene.popMatrix();
  
          //FRONT
          this.scene.pushMatrix();
          this.scene.translate(0.5, 0.0, 0.0);
          this.scene.rotate(Math.PI/2, 0, 1, 0);
          this.scene.quad.display();
          this.scene.popMatrix();
  
          //BACK
          this.scene.pushMatrix();
          this.scene.translate(0.5, 0.0, 0.0);
          this.scene.rotate(-Math.PI/2, 0, 1, 0);
          this.scene.quad.display();
          this.scene.popMatrix();
  
          //RIGHT
          this.scene.pushMatrix();
          this.scene.translate(0.0, 0.5, 0.0);
          this.scene.rotate(-Math.PI/2, 0, 0, 1);
          this.scene.rotate(-Math.PI/2, 0, 1, 0);
          this.scene.quad.display();
          this.scene.popMatrix();
  
          //LEFT
          this.scene.pushMatrix();
          this.scene.translate(0.0, -0.5, 0.0);
          this.scene.rotate(-Math.PI/2, 0, 0, 1);
          this.scene.rotate(Math.PI/2, 0, 1, 0);
          this.scene.quad.display();
          this.scene.popMatrix();
          
      }
  }