Skip to content

Commit

Permalink
Add Data URL as a supported value type for gltf-model component (#5629)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentfretin authored Jan 23, 2025
1 parent c38416c commit 247e6b9
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 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 247e6b9

Please sign in to comment.