Skip to content

Conversation

@ngokevin
Copy link
Member

@ngokevin ngokevin commented Dec 17, 2017

Description:

Allow for mixin composition to build "classes" out of multiple mixins.

<a-mixin id="font" text="font: myfont.json"></a-mixin>
<a-mixin id="red" text="color: red"></a-mixin>

<a-mixin id="redText" mixin="red font"></a-mixin>

<a-entity mixin="redText someMixin">
// This will turn into `<a-entity mixin="red font redFont someMixin">`

Changes proposed:

  • Allow for mixin composition.
  • String split util (used by mixin) which caches string split operations to save memory.

@ngokevin
Copy link
Member Author

#3302 is relevant for making sure defined attributes don't get overridden by mixins.

@dmarcos
Copy link
Member

dmarcos commented Dec 17, 2017

Can we write some tests for this?

@ngokevin
Copy link
Member Author

Yeah, will do

@ngokevin
Copy link
Member Author

Updated.

@dmarcos
Copy link
Member

dmarcos commented Dec 19, 2017

Tests failing on Firefox

@ngokevin
Copy link
Member Author

Updated

@dmarcos dmarcos merged commit c080751 into aframevr:master Dec 20, 2017
ngokevin added a commit to ngokevin/aframe that referenced this pull request Jan 21, 2018
…ramevr#3305)

* mixin composition

* fix mixin composition tests for firefox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants