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

Handle missing mixins and applying mixin attributes to mappings of primitives #5483

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

mrxz
Copy link
Contributor

@mrxz mrxz commented Feb 29, 2024

Description:
Primitives handled mixins differently compared to a-node. In case a mixin was referenced that didn't exist, the primitive would throw an error while the a-node silently ignored it. Now a warning is logged in both cases. Primitives now also check if attributes on mixins correspond to any of their mappings, allowing things like the following to work:

<a-assets>
    <a-mixin id="red" color="red"></a-mixin>
</a-assets>

<a-box mixin="red"></a-box>

Fixes #4455
Fixes #4717

Changes proposed:

  • Log warning when mixin can't be found (instead of throwing an error or silently continuing).
  • Apply mapping in primitive for any mixin attributes that correspond with defined mappings.

@dmarcos
Copy link
Member

dmarcos commented Mar 14, 2024

Thanks!

@dmarcos dmarcos merged commit aef9537 into aframevr:master Mar 14, 2024
1 check passed
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.

Color property not applying to primitive as expected. Inconsistent behaviour for missing mixin
2 participants