Skip to content

Commit

Permalink
fix missing MathUtils variable
Browse files Browse the repository at this point in the history
  • Loading branch information
SeregPie committed Oct 15, 2020
1 parent f678ff7 commit 21dfda0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/AbstractDynamicTexture.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ let Class = class extends Texture {
camera.getWorldPosition(cameraPosition);
let distance = objectPosition.distanceTo(cameraPosition);
if (camera.isPerspectiveCamera) {
distance *= Math.tan(THREE.Math.degToRad(camera.fov) / 2) * 2;
distance *= Math.tan(MathUtils.degToRad(camera.fov) / 2) * 2;
}
if (camera.isPerspectiveCamera || camera.isOrthographicCamera) {
distance /= camera.zoom;
Expand Down

0 comments on commit 21dfda0

Please sign in to comment.