Skip to content

Commit acb0101

Browse files
Create an empty group if a loaded glb contains no scene (#1040)
* Create an empty group if a loaded glb contains no scene * remove unnecessary changes * Update TilesRenderer.js
1 parent c4798f8 commit acb0101

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/three/TilesRenderer.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
Euler,
1212
LoadingManager,
1313
EventDispatcher,
14+
Group,
1415
} from 'three';
1516
import { raycastTraverse, raycastTraverseFirstHit } from './raycastTraverse.js';
1617
import { readMagicBytes } from '../utilities/readMagicBytes.js';
@@ -660,6 +661,7 @@ export class TilesRenderer extends TilesRendererBase {
660661
// any transformations applied to it can be assumed to be applied after load
661662
// (such as applying RTC_CENTER) meaning they should happen _after_ the z-up
662663
// rotation fix which is why "multiply" happens here.
664+
result.scene = result.scene || new Group();
663665
const { scene } = result;
664666
scene.updateMatrix();
665667
scene.matrix

0 commit comments

Comments
 (0)