提交 2e26575e 编写于 作者: M Mugen87

Examples: Clean up.

上级 49e2abfa
......@@ -177,7 +177,7 @@ THREE.OrbitControls = function ( object, domElement ) {
var min = scope.minAzimuthAngle;
var max = scope.maxAzimuthAngle;
if ( isFinite ( min ) && isFinite( max ) ) {
if ( isFinite( min ) && isFinite( max ) ) {
if ( min < - Math.PI ) min += twoPI; else if ( min > Math.PI ) min -= twoPI;
......
......@@ -581,7 +581,7 @@ THREE.GLTFLoader = ( function () {
var source = json.images[ extension.source ];
var loader = parser.options.ktx2Loader;
if ( !loader ) {
if ( ! loader ) {
throw new Error( 'THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures' );
......@@ -1525,9 +1525,9 @@ THREE.GLTFLoader = ( function () {
this.primitiveCache = {};
// Object3D instance caches
this.meshCache = {refs: {}, uses: {}};
this.cameraCache = {refs: {}, uses: {}};
this.lightCache = {refs: {}, uses: {}};
this.meshCache = { refs: {}, uses: {} };
this.cameraCache = { refs: {}, uses: {} };
this.lightCache = { refs: {}, uses: {} };
// Use an ImageBitmapLoader if imageBitmaps are supported. Moves much of the
// expensive work of uploading a texture to the GPU off the main thread.
......@@ -1687,7 +1687,7 @@ THREE.GLTFLoader = ( function () {
}
cache.refs[ index ] ++ ;
cache.refs[ index ] ++;
};
......@@ -1702,7 +1702,7 @@ THREE.GLTFLoader = ( function () {
return ref;
}
};
GLTFParser.prototype._invokeOne = function ( func ) {
......@@ -2082,12 +2082,13 @@ THREE.GLTFLoader = ( function () {
if ( ! loader ) {
loader = textureExtensions[ EXTENSIONS.MSFT_TEXTURE_DDS ]
? parser.extensions[ EXTENSIONS.MSFT_TEXTURE_DDS ].ddsLoader
: this.textureLoader;
? parser.extensions[ EXTENSIONS.MSFT_TEXTURE_DDS ].ddsLoader
: this.textureLoader;
}
return this.loadTextureImage( textureIndex, source, loader );
};
GLTFParser.prototype.loadTextureImage = function ( textureIndex, source, loader ) {
......@@ -2097,7 +2098,6 @@ THREE.GLTFLoader = ( function () {
var options = this.options;
var textureDef = json.textures[ textureIndex ];
var textureExtensions = textureDef.extensions || {};
var URL = self.URL || self.webkitURL;
......
......@@ -186,7 +186,7 @@ var OrbitControls = function ( object, domElement ) {
var min = scope.minAzimuthAngle;
var max = scope.maxAzimuthAngle;
if ( isFinite ( min ) && isFinite( max ) ) {
if ( isFinite( min ) && isFinite( max ) ) {
if ( min < - Math.PI ) min += twoPI; else if ( min > Math.PI ) min -= twoPI;
......
......@@ -646,7 +646,7 @@ var GLTFLoader = ( function () {
var source = json.images[ extension.source ];
var loader = parser.options.ktx2Loader;
if ( !loader ) {
if ( ! loader ) {
throw new Error( 'THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures' );
......@@ -1590,9 +1590,9 @@ var GLTFLoader = ( function () {
this.primitiveCache = {};
// Object3D instance caches
this.meshCache = {refs: {}, uses: {}};
this.cameraCache = {refs: {}, uses: {}};
this.lightCache = {refs: {}, uses: {}};
this.meshCache = { refs: {}, uses: {} };
this.cameraCache = { refs: {}, uses: {} };
this.lightCache = { refs: {}, uses: {} };
// Use an ImageBitmapLoader if imageBitmaps are supported. Moves much of the
// expensive work of uploading a texture to the GPU off the main thread.
......@@ -1752,7 +1752,7 @@ var GLTFLoader = ( function () {
}
cache.refs[ index ] ++ ;
cache.refs[ index ] ++;
};
......@@ -1767,7 +1767,7 @@ var GLTFLoader = ( function () {
return ref;
}
};
GLTFParser.prototype._invokeOne = function ( func ) {
......@@ -2147,12 +2147,13 @@ var GLTFLoader = ( function () {
if ( ! loader ) {
loader = textureExtensions[ EXTENSIONS.MSFT_TEXTURE_DDS ]
? parser.extensions[ EXTENSIONS.MSFT_TEXTURE_DDS ].ddsLoader
: this.textureLoader;
? parser.extensions[ EXTENSIONS.MSFT_TEXTURE_DDS ].ddsLoader
: this.textureLoader;
}
return this.loadTextureImage( textureIndex, source, loader );
};
GLTFParser.prototype.loadTextureImage = function ( textureIndex, source, loader ) {
......@@ -2162,7 +2163,6 @@ var GLTFLoader = ( function () {
var options = this.options;
var textureDef = json.textures[ textureIndex ];
var textureExtensions = textureDef.extensions || {};
var URL = self.URL || self.webkitURL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册