allow separation of 3d file into individual meshes
This commit is contained in:
@@ -8,6 +8,15 @@ class GenericObject extends EventManager{
|
||||
this.source = await engine.load(data.$go.asset.name);
|
||||
this.object = engine.meshUtils.bottomOrigin(this.source.scene)
|
||||
|
||||
if (data.asIndividuals){
|
||||
this.object.hasIndividualChildren = true;
|
||||
this.source.scene.traverse(o=>{
|
||||
if (o.isMesh){
|
||||
o.isIndividual = true;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if (!data.exclude){
|
||||
engine.clickable.add(this.object, async e=>{
|
||||
this.object.__onhud = !this.object.__onhud;
|
||||
|
||||
Reference in New Issue
Block a user