Browse Source

Remove redundant function

Garrett Johnson 5 years ago
parent
commit
421eb682b9
2 changed files with 2 additions and 8 deletions
  1. 2 3
      examples/jsm/csm/Frustum.js
  2. 0 5
      examples/jsm/csm/Utils.js

+ 2 - 3
examples/jsm/csm/Frustum.js

@@ -1,6 +1,5 @@
 import * as THREE from '../../../build/three.module.js';
 import FrustumVertex from './FrustumVertex.js';
-import { toRad } from './Utils.js';
 
 export default class Frustum {
 
@@ -22,10 +21,10 @@ export default class Frustum {
 
 	getViewSpaceVertices() {
 
-		this.nearPlaneY = this.near * Math.tan( toRad( this.fov / 2 ) );
+		this.nearPlaneY = this.near * Math.tan( THREE.MathUtils.degToRad( this.fov / 2 ) );
 		this.nearPlaneX = this.aspect * this.nearPlaneY;
 
-		this.farPlaneY = this.far * Math.tan( toRad( this.fov / 2 ) );
+		this.farPlaneY = this.far * Math.tan( THREE.MathUtils.degToRad( this.fov / 2 ) );
 		this.farPlaneX = this.aspect * this.farPlaneY;
 
 		// 3 --- 0  vertices.near/far order

+ 0 - 5
examples/jsm/csm/Utils.js

@@ -1,5 +0,0 @@
-export function toRad( degrees ) {
-
-	return degrees * Math.PI / 180;
-
-}