File

projects/atft/src/lib/raycaster/raycaster-camera.directive.ts

Implements

AfterViewInit

Metadata

Index

Methods

Constructor

constructor(host: AbstractCamera<any>, raycasterService: RaycasterService)
Parameters :
Name Type Optional
host AbstractCamera<any> No
raycasterService RaycasterService No

Methods

ngAfterViewInit
ngAfterViewInit()
Returns : void
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: AbstractCamera<any>,
    private raycasterService: RaycasterService
  ) {

  }

  ngAfterViewInit(): void {
    this.raycasterService.setCamera(this.host);
  }

}

results matching ""

    No results matching ""