create() {
    const { size = 1, x = 0, y = 0, z = 0, color = 0xff0000 } = this.params;
    this.color = color;
    this.scale = 1;

    this.material = new this.THREE.MeshBasicMaterial({ color });
    this.geometry = new this.THREE.BoxGeometry(size, size, size);
    this.mesh = new this.THREE.Mesh(this.geometry, this.material);

    this.mesh.position.z = z;
    this.mesh.position.y = y;
    this.mesh.position.x = x;

    return this.mesh;
  }
/**
   * Create the object and all necesary elements to render it.
   * @returns
   */
Create the object and all necesary elements to render it.
@returns
Create the object and all necesary elements to render it . @returns
create() {
    const { size = 1, x = 0, y = 0, z = 0, color = 0xff0000 } = this.params;
    this.color = color;
    this.scale = 1;
    this.material = new this.THREE.MeshBasicMaterial({ color });
    this.geometry = new this.THREE.BoxGeometry(size, size, size);
    this.mesh = new this.THREE.Mesh(this.geometry, this.material);
    this.mesh.position.z = z;
    this.mesh.position.y = y;
    this.mesh.position.x = x;
    return this.mesh;
  }
create ( ) { const { size = 1 , x = 0 , y = 0 , z = 0 , color = 0xff0000 } = this . params ; this . color = color ; this . scale = 1 ; this . material = new this . THREE . MeshBasicMaterial ( { color } ) ; this . geometry = new this . THREE . BoxGeometry ( size , size , size ) ; this . mesh = new this . THREE . Mesh ( this . geometry , this . material ) ; this . mesh . position . z = z ; this . mesh . position . y = y ; this . mesh . position . x = x ; return this . mesh ; }
Create the object and all necesary elements to render it.
Create the object and all necesary elements to render it .