提交 421eb682 编写于 作者: G Garrett Johnson

Remove redundant function

上级 421e6105
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
......
export function toRad( degrees ) {
return degrees * Math.PI / 180;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册