|
@@ -160,9 +160,9 @@ class Material extends EventDispatcher {
|
|
|
|
|
|
toJSON( meta ) {
|
|
toJSON( meta ) {
|
|
|
|
|
|
- const isRoot = ( meta === undefined || typeof meta === 'string' );
|
|
|
|
|
|
+ const isRootObject = ( meta === undefined || typeof meta === 'string' );
|
|
|
|
|
|
- if ( isRoot ) {
|
|
|
|
|
|
+ if ( isRootObject ) {
|
|
|
|
|
|
meta = {
|
|
meta = {
|
|
textures: {},
|
|
textures: {},
|
|
@@ -370,7 +370,7 @@ class Material extends EventDispatcher {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- if ( isRoot ) {
|
|
|
|
|
|
+ if ( isRootObject ) {
|
|
|
|
|
|
const textures = extractFromCache( meta.textures );
|
|
const textures = extractFromCache( meta.textures );
|
|
const images = extractFromCache( meta.images );
|
|
const images = extractFromCache( meta.images );
|