import { WheelInfo } from 'cannon' ; export class Wheel { public wheelObject : THREE . Object3D ; public position : THREE . Vector3 ; public steering : boolean = false ; public drive : string ; public rayCastWheelInfoIndex : number ; constructor ( wheelObject ) { this . wheelObject = wheelObject ; this . position = wheelObject . position ; if ( wheelObject . hasOwnProperty ( 'userData' ) && wheelObject . userData . hasOwnProperty ( 'data' ) ) { if ( wheelObject . userData . hasOwnProperty ( 'steering' ) ) { this . steering = ( wheelObject . userData . steering === 'true' ) ; } if ( wheelObject . userData . hasOwnProperty ( 'drive' ) ) { this . drive = wheelObject . userData . drive ; } } } }