Notice
Recent Posts
Recent Comments
Link
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Archives
Today
Total
관리 메뉴

Yongs

[HTML] Threejs With Angular 본문

HTML5

[HTML] Threejs With Angular

Yongs- 2019. 8. 21. 09:43

해당 디렉토리에서

 

 

 

 

 

 

 

 

 

 

 

  1. npm install three --save
  2. npm install @types/three
  3. Add a div element in AppComponent.html: <div #rendererContainer></div>
  4. Import three.js in AppComponent.ts: import * as THREE from 'three';
  5. Get a handle to your div element with @ViewChild('rendererContainer') rendererContainer: ElementRef;
  6. Do the necessary setup in your constructor / lifecycle methods. Note: the ViewChild is not available until ngAfterViewInit.

Full AppComponent:import {Component, ViewChild, ElementRef} from '@angular/core';

import * as THREE from 'three';

 

 

'HTML5' 카테고리의 다른 글

[HTML] 해당 위치에서 터미널 열기  (0) 2019.08.21
[HTML] 관련 에러  (0) 2019.08.20
[HTML] Angular-cli 설치  (0) 2019.08.20
[HTML] HTML5 개념  (0) 2019.08.07
Comments