src/scripts/Objects/OldCar.js
/**
   * Add wheel to group in specific position.
   *
   * @param {double} x
   * @param {double} y
   * @param {double} z
   */
Add wheel to group in specific position.
Add wheel to group in specific position .
addWheel(x, y, z) {
    const wheel = new Group();
    const tireGeometry = new TorusGeometry(.75, .30, 5, 10);
    const rimGeometry = new RingGeometry(.1, .5);
    const tire = new Mesh(tireGeometry, new MeshLambertMaterial({
      color: 0x666666,
      wireframe: true,
    }));
    const rim = new Mesh(rimGeometry, new MeshLambertMaterial({
      color: 0x999999,
      wireframe: true,
      side: DoubleSide,
    }));
    rim.name = 'rim';
    wheel.add(tire, rim);
    wheel.name = 'wheel';
    wheel.position.set(x, y, z);
    return wheel;
  }
addWheel ( x , y , z ) { const wheel = new Group ( ) ; const tireGeometry = new TorusGeometry ( .75 , .30 , 5 , 10 ) ; const rimGeometry = new RingGeometry ( .1 , .5 ) ; const tire = new Mesh ( tireGeometry , new MeshLambertMaterial ( { color : 0x666666 , wireframe : true , } ) ) ; const rim = new Mesh ( rimGeometry , new MeshLambertMaterial ( { color : 0x999999 , wireframe : true , side : DoubleSide , } ) ) ; rim . name = 'rim' ; wheel . add ( tire , rim ) ; wheel . name = 'wheel' ; wheel . position . set ( x , y , z ) ; return wheel ; }
Add wheel to group in specific position.
Add wheel to group in specific position .