File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
packages/engine/Source/Scene/Model Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import Frozen from "../../Core/Frozen.js";
55import defined from "../../Core/defined.js" ;
66import Matrix4 from "../../Core/Matrix4.js" ;
77import Transforms from "../../Core/Transforms.js" ;
8+ import RuntimeError from "../../Core/RuntimeError.js" ;
89import SceneMode from "../SceneMode.js" ;
910import SplitDirection from "../SplitDirection.js" ;
1011import TilesetPipelineStage from "./TilesetPipelineStage.js" ;
@@ -494,6 +495,12 @@ ModelSceneGraph.prototype.traverseAndCreateSceneGraph = function (
494495 node ,
495496 transformToRoot ,
496497) {
498+ if ( defined ( node . instances ) & this . hasInstances ) {
499+ throw new RuntimeError (
500+ "Models with the EXT_mesh_gpu_instancing extension cannot use the ModelInstanceCollection class." ,
501+ ) ;
502+ }
503+
497504 // The indices of the children of this node in the runtimeNodes array.
498505 const childrenIndices = [ ] ;
499506 const transform = ModelUtility . getNodeTransform ( node ) ;
You can’t perform that action at this time.
0 commit comments