import { AfterViewInit , Directive } from '@angular/core' ; import { AbstractCamera } from '../camera/abstract-camera' ; import { RaycasterService } from './raycaster.service' ; @ Directive ( { selector : '[atft-raycaster-camera]' } ) export class RaycasterCameraDirective implements AfterViewInit { constructor ( private host , private raycasterService ) { } ngAfterViewInit ( ) { this . raycasterService . setCamera ( this . host ) ; } }