Skip to content

Commit

Permalink
Add Data URL as a supported value type for gltf-model component
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentfretin committed Jan 14, 2025
1 parent b700ca6 commit dbe5cb6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/components/gltf-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,16 @@ file.
|----------|--------------------------------------|
| selector | Selector to an `<a-asset-item>` |
| string | `url()`-enclosed path to a glTF file |
| Data URL | data:model/gltf-binary;base64,<data> |


Data URL can be used for small glb files if you want to embed the assets in
the html page. You can create a Data URL with those commands:

```sh
echo -n "data:model/gltf-binary;base64," >/tmp/base64.txt
base64 -w 0 model.glb >>/tmp/base64.txt
```

## Events

Expand Down

0 comments on commit dbe5cb6

Please sign in to comment.