google / google/filament

web: createInstancedAsset: "Cannot call gltfio$FilamentAsset._getAssetInstances due to unbound types: 0x19f231"

Open
#8,711 0 comments 0 reactions 2 assignees Claimed by @z3moon View on GitHub
gltf low priority web
Dominant language
C++
Stars
20.5k
Forks
2.3k
Avg merge
2d 14h
Merged PRs (30d)
83

Description

createInstancedAsset doesnt work from js

```js
const instancesArray: any[] = new Array(instanceCount).fill(null);
const asset = loader.createInstancedAsset(modelBuffer, instancesArray);
```

```
Cannot call gltfio$FilamentAsset._getAssetInstances due to unbound types: 0x19f231"
```

this may be a limitation of emscripten not being able to pass an array

however, according to the documentation in https://github.com/google/filament/blob/main/libs/gltfio/include/gltfio/AssetLoader.h#L204C20-L204C40 this is the only method to actually create multiple instances efficiently.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.