Skip to content
This repository was archived by the owner on Jul 20, 2020. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/lib/descriptors/Material/TextureDescriptor.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,20 @@ class TextureDescriptor extends THREEElementDescriptor {
},
default: THREE.LinearMipMapLinearFilter,
});

this.hasProp('loadingManager', {
type: PropTypes.objectOf(THREE.LoadingManager),
update() {
// do nothing because these props are only used for initial loading callbacks
},
default: undefined,
});
}

construct(props) {
let result;

if (props.hasOwnProperty('url')) {
const textureLoader = new THREE.TextureLoader();
const textureLoader = new THREE.TextureLoader(props.loadingManager);

if (props.hasOwnProperty('crossOrigin')) {
textureLoader.crossOrigin = props.crossOrigin;
Expand Down