Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Data URL as a supported value type for gltf-model component #5629

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

vincentfretin
Copy link
Contributor

Description:

Discussed in #5619, Data URL is supported for gltf-model component but not currently documented.

Changes proposed:

  • Add Data URL to the table of supported value types in the gltf-model component page.

|----------|---------------------------------------------|
| selector | Selector to an `<a-asset-item>` |
| string | `url()`-enclosed path to a glTF file |
| Data URL | data:application/octet-stream;base64,<data> |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The official model/gltf-binary mime type can be used as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes indeed, let's use that one in the table. The application/octet-stream is a generic mimetype for any binary files. I also added a paragraph how to create a Data URL.

@@ -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> |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is <data> a typo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a typo, it's a placeholder, it means you replace it by the actually content of the base64 data of your model.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's confusing to me it will be confusing to others too. above there is <a-asset-item>, yours doesn't refer to HTML. Can we put it in a wat it's not ambiguous?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I replaced by "..."

@dmarcos
Copy link
Member

dmarcos commented Jan 23, 2025

Thanks!

@dmarcos dmarcos merged commit 247e6b9 into aframevr:master Jan 23, 2025
3 checks passed
@vincentfretin vincentfretin deleted the gltf-model-data-url branch January 24, 2025 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants