Skip to content

Commit

Permalink
improvement(asset): Added an asset ready event emitted after addAllTo…
Browse files Browse the repository at this point in the history
…Scene() call
  • Loading branch information
JustinFincher committed Mar 7, 2020
1 parent c130311 commit 0582067
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/asset/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ The BabylonJS [guide to loading files](https://doc.babylonjs.com/how_to/load_fro
</Scene>
```

#### Events
- `asset` - When the asset object is available

#### Props

- `src` (String) - url path to an asset file of type `gltf`, `obj`, `stl`, or `babylon`
1 change: 1 addition & 0 deletions src/asset/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export default {
this.$replace(assetContainer.meshes[0]);
}
assetContainer.addAllToScene();
this.$emit('asset', this);
},
},

Expand Down

0 comments on commit 0582067

Please sign in to comment.