提交 51245d2e 编写于 作者: M Mugen87

Examples: Clean up.

上级 a6dbe0aa
......@@ -1134,7 +1134,7 @@ THREE.GLTFExporter.prototype = {
var meshCacheKeyParts = [ mesh.geometry.uuid ];
if ( Array.isArray( mesh.material ) ) {
for ( var i = 0, l = mesh.material.length; i < l; i++ ) {
for ( var i = 0, l = mesh.material.length; i < l; i ++ ) {
meshCacheKeyParts.push( mesh.material[ i ].uuid );
......
......@@ -1916,7 +1916,6 @@ THREE.GLTFLoader = ( function () {
var geometry = mesh.geometry;
var material = mesh.material;
var extensions = this.extensions;
var useVertexTangents = geometry.attributes.tangent !== undefined;
var useVertexColors = geometry.attributes.color !== undefined;
......
......@@ -95,7 +95,7 @@ export default class CSM {
getBreaks() {
const camera = this.camera;
const far = Math.min(camera.far, this.maxFar);
const far = Math.min( camera.far, this.maxFar );
this.breaks.length = 0;
switch ( this.mode ) {
......@@ -144,8 +144,8 @@ export default class CSM {
_uniformArray.length = 0;
_logArray.length = 0;
const log = logarithmicSplit( amount, near, far, _logArray );
const uni = uniformSplit( amount, near, far, _uniformArray );
logarithmicSplit( amount, near, far, _logArray );
uniformSplit( amount, near, far, _uniformArray );
for ( let i = 1; i < amount; i ++ ) {
......@@ -219,7 +219,7 @@ export default class CSM {
this.getExtendedBreaks( breaksVec2 );
const self = this;
const far = Math.min(this.camera.far, this.maxFar);
const far = Math.min( this.camera.far, this.maxFar );
material.onBeforeCompile = function ( shader ) {
......@@ -235,7 +235,7 @@ export default class CSM {
updateUniforms() {
const far = Math.min(this.camera.far, this.maxFar);
const far = Math.min( this.camera.far, this.maxFar );
for ( let i = 0; i < this.materials.length; i ++ ) {
......
......@@ -50,7 +50,7 @@ export default class Frustum {
this.vertices.near[ 1 ].set( 1, - 1, - 1 );
this.vertices.near[ 2 ].set( - 1, - 1, - 1 );
this.vertices.near[ 3 ].set( - 1, 1, - 1 );
this.vertices.near.forEach( function( v ) {
this.vertices.near.forEach( function ( v ) {
v.applyMatrix4( inverseProjectionMatrix );
......@@ -60,7 +60,7 @@ export default class Frustum {
this.vertices.far[ 1 ].set( 1, - 1, 1 );
this.vertices.far[ 2 ].set( - 1, - 1, 1 );
this.vertices.far[ 3 ].set( - 1, 1, 1 );
this.vertices.far.forEach( function( v ) {
this.vertices.far.forEach( function ( v ) {
v.applyMatrix4( inverseProjectionMatrix );
......
......@@ -1156,7 +1156,7 @@ GLTFExporter.prototype = {
var meshCacheKeyParts = [ mesh.geometry.uuid ];
if ( Array.isArray( mesh.material ) ) {
for ( var i = 0, l = mesh.material.length; i < l; i++ ) {
for ( var i = 0, l = mesh.material.length; i < l; i ++ ) {
meshCacheKeyParts.push( mesh.material[ i ].uuid );
......
......@@ -1979,7 +1979,6 @@ var GLTFLoader = ( function () {
var geometry = mesh.geometry;
var material = mesh.material;
var extensions = this.extensions;
var useVertexTangents = geometry.attributes.tangent !== undefined;
var useVertexColors = geometry.attributes.color !== undefined;
......
......@@ -32,7 +32,6 @@ RenderPass.prototype = Object.assign( Object.create( Pass.prototype ), {
var oldAutoClear = renderer.autoClear;
renderer.autoClear = false;
var oldClearColor, oldClearAlpha, oldOverrideMaterial;
if ( this.overrideMaterial !== undefined ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册