@@ -73,6 +73,7 @@ import { WebGLRenderer } from './renderers/WebGLRenderer.js';
7373import { WebGLRenderTarget } from './renderers/WebGLRenderTarget.js' ;
7474import { WebGLShadowMap } from './renderers/webgl/WebGLShadowMap.js' ;
7575import { WebVRManager } from './renderers/webvr/WebVRManager.js' ;
76+ import { ImageUtils } from './extras/ImageUtils.js' ;
7677import { Shape } from './extras/core/Shape.js' ;
7778import { CubeCamera } from './cameras/CubeCamera.js' ;
7879
@@ -1757,51 +1758,47 @@ export var GeometryUtils = {
17571758
17581759} ;
17591760
1760- export var ImageUtils = {
1761+ ImageUtils . crossOrigin = undefined ;
17611762
1762- crossOrigin : undefined ,
1763+ ImageUtils . loadTexture = function ( url , mapping , onLoad , onError ) {
17631764
1764- loadTexture : function ( url , mapping , onLoad , onError ) {
1765+ console . warn ( 'THREE.ImageUtils. loadTexture has been deprecated. Use THREE.TextureLoader() instead.' ) ;
17651766
1766- console . warn ( 'THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.' ) ;
1767+ var loader = new TextureLoader ( ) ;
1768+ loader . setCrossOrigin ( this . crossOrigin ) ;
17671769
1768- var loader = new TextureLoader ( ) ;
1769- loader . setCrossOrigin ( this . crossOrigin ) ;
1770+ var texture = loader . load ( url , onLoad , undefined , onError ) ;
17701771
1771- var texture = loader . load ( url , onLoad , undefined , onError ) ;
1772+ if ( mapping ) texture . mapping = mapping ;
17721773
1773- if ( mapping ) texture . mapping = mapping ;
1774+ return texture ;
17741775
1775- return texture ;
1776-
1777- } ,
1778-
1779- loadTextureCube : function ( urls , mapping , onLoad , onError ) {
1776+ } ;
17801777
1781- console . warn ( 'THREE. ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.' ) ;
1778+ ImageUtils . loadTextureCube = function ( urls , mapping , onLoad , onError ) {
17821779
1783- var loader = new CubeTextureLoader ( ) ;
1784- loader . setCrossOrigin ( this . crossOrigin ) ;
1780+ console . warn ( 'THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.' ) ;
17851781
1786- var texture = loader . load ( urls , onLoad , undefined , onError ) ;
1782+ var loader = new CubeTextureLoader ( ) ;
1783+ loader . setCrossOrigin ( this . crossOrigin ) ;
17871784
1788- if ( mapping ) texture . mapping = mapping ;
1785+ var texture = loader . load ( urls , onLoad , undefined , onError ) ;
17891786
1790- return texture ;
1787+ if ( mapping ) texture . mapping = mapping ;
17911788
1792- } ,
1789+ return texture ;
17931790
1794- loadCompressedTexture : function ( ) {
1791+ } ;
17951792
1796- console . error ( 'THREE. ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.' ) ;
1793+ ImageUtils . loadCompressedTexture = function ( ) {
17971794
1798- } ,
1795+ console . error ( 'THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.' ) ;
17991796
1800- loadCompressedTextureCube : function ( ) {
1797+ } ;
18011798
1802- console . error ( 'THREE. ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.' ) ;
1799+ ImageUtils . loadCompressedTextureCube = function ( ) {
18031800
1804- }
1801+ console . error ( 'THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.' ) ;
18051802
18061803} ;
18071804
0 commit comments