Skip to content

Commit dbe5cb6

Browse files
committed
Add Data URL as a supported value type for gltf-model component
1 parent b700ca6 commit dbe5cb6

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

docs/components/gltf-model.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,16 @@ file.
7878
|----------|--------------------------------------|
7979
| selector | Selector to an `<a-asset-item>` |
8080
| string | `url()`-enclosed path to a glTF file |
81+
| Data URL | data:model/gltf-binary;base64,<data> |
82+
83+
84+
Data URL can be used for small glb files if you want to embed the assets in
85+
the html page. You can create a Data URL with those commands:
86+
87+
```sh
88+
echo -n "data:model/gltf-binary;base64," >/tmp/base64.txt
89+
base64 -w 0 model.glb >>/tmp/base64.txt
90+
```
8191

8292
## Events
8393

0 commit comments

Comments
 (0)