Skip to content

Add assetStringify for asset based properties#5544

Merged
dmarcos merged 1 commit intoaframevr:masterfrom
mrxz:fix-asset-stringify
Jun 18, 2024
Merged

Add assetStringify for asset based properties#5544
dmarcos merged 1 commit intoaframevr:masterfrom
mrxz:fix-asset-stringify

Conversation

@mrxz
Copy link
Contributor

@mrxz mrxz commented Jun 16, 2024

Description:
Asset based property types could either be a string, or directly refer to an HTMLElement (using an id selector, or passing instance to it). The stringification used for these property types was just the default one, which works for strings, but fails for HTMLElement instances.

This PR introduces an assetStringify that attempts to construct a suitable id selector. In case that isn't possible it will resort to using the src attribute instead.

See aframevr/aframe-inspector#722 for some context where this caused issues when using flushToDOM.

Changes proposed:

  • Introduce an assetStringify for asset based property types

@dmarcos
Copy link
Member

dmarcos commented Jun 18, 2024

Thank you!

@dmarcos
Copy link
Member

dmarcos commented Jun 18, 2024

Thanks so much!

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.

2 participants