import { Object3D } from 'three' ; import { WorldObject } from './world-object' ; export abstract class AbstractObject < T extends Object3D > { protected abstract readonly group : T ; protected constructor ( protected readonly name ) { } getGroup ( ) { return this . group ; } add ( object ) { this . group . add ( object ) ; } addObject ( object ) { this . group . add ( object . getGroup ( ) ) ; } remove ( object ) { this . group . remove ( object ) ; } step ( delta ) { } getName ( ) { return this . name ; } }