Skip to content

Commit

Permalink
fix: scene root mark as template (#2251)
Browse files Browse the repository at this point in the history
  • Loading branch information
luzhuang authored Jul 22, 2024
1 parent 0e70bff commit 4a498cd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/loader/src/gltf/parser/GLTFSceneParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ export class GLTFSceneParser extends GLTFParser {
sceneRoot = context.get<Entity>(GLTFParserType.Entity, sceneNodes[0]);
} else {
sceneRoot = new Entity(engine, "GLTF_ROOT");
// @ts-ignore
sceneRoot._markAsTemplate(glTFResource);
for (let i = 0; i < sceneNodes.length; i++) {
const childEntity = context.get<Entity>(GLTFParserType.Entity, sceneNodes[i]);
sceneRoot.addChild(childEntity);
Expand Down

0 comments on commit 4a498cd

Please sign in to comment.