Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed deprecated THREE.ImageUtils.loadTexture in all examples and docs #7988

Merged
merged 2 commits into from
Jan 18, 2016

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Jan 18, 2016

Bye-bye THREE.ImageUtils! This PR changes the following in all examples and docs:

THREE.ImageUtils.loadTexture -> THREE.TextureLoader

I've tested each single example with the new code. Three.Legacy.js should now be the only file that contains legacy THREE.ImageUtils code.


textures[ i ] = THREE.ImageUtils.loadTexture( baseUrl + textureUrls[ i ], mapping, checkLoadingComplete );

textures[ i ] = new THREE.TextureLoader().load( baseUrl + textureUrls[ i ], checkLoadingComplete );
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are multiple instances of the loader required for some reason?

@WestLangley
Copy link
Collaborator

Yay! Thanks for this.

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Jan 18, 2016

Are multiple instances of the loader required for some reason?

@WestLangley No, they are not necessary 😉. Good suggestion! The new commit ensures that the concerned functions create one textureLoader and re-use it in their loops.

mrdoob added a commit that referenced this pull request Jan 18, 2016
Removed deprecated THREE.ImageUtils.loadTexture in all examples and docs
@mrdoob mrdoob merged commit 9cf29af into mrdoob:dev Jan 18, 2016
@mrdoob
Copy link
Owner

mrdoob commented Jan 18, 2016

Maaany thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants