|
@@ -590,6 +590,14 @@ class GLTFLightsExtension {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ getDependency( type, index ) {
|
|
|
|
+
|
|
|
|
+ if ( type !== 'light' ) return;
|
|
|
|
+
|
|
|
|
+ return this._loadLight( index );
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
createNodeAttachment( nodeIndex ) {
|
|
createNodeAttachment( nodeIndex ) {
|
|
|
|
|
|
const self = this;
|
|
const self = this;
|
|
@@ -2917,7 +2925,19 @@ class GLTFParser {
|
|
break;
|
|
break;
|
|
|
|
|
|
default:
|
|
default:
|
|
- throw new Error( 'Unknown type: ' + type );
|
|
|
|
|
|
+ dependency = this._invokeOne( function ( ext ) {
|
|
|
|
+
|
|
|
|
+ return ext != this && ext.getDependency && ext.getDependency( type, index );
|
|
|
|
+
|
|
|
|
+ } );
|
|
|
|
+
|
|
|
|
+ if ( ! dependency ) {
|
|
|
|
+
|
|
|
|
+ throw new Error( 'Unknown type: ' + type );
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ break;
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|