Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ And here's the result:
The best way to animate a THREE.js entity is to participate in the animation loop with `injectBeforeRender`. Let's animate the cube by rotating it on the X and Y axes.

```angular-ts title="src/app/scene-graph.component.ts" {"Import injectBeforeRender": 2-3} {"Use template variable": 9-10} {"Get the reference with viewChild": 18-19} {"Animate the cube": 22-27}
import { Component, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy } from '@angular/core';
import { Component, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, ElementRef, viewChild } from '@angular/core';

import { injectBeforeRender } from 'angular-three';
import { Mesh } from 'three';
Expand Down