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

Enable composability while using components. #1

Closed
ngokevin opened this issue Dec 17, 2015 · 1 comment
Closed

Enable composability while using components. #1

ngokevin opened this issue Dec 17, 2015 · 1 comment

Comments

@ngokevin
Copy link
Collaborator

Would like to be able to create something like:

<Light type="directional"/>

while still being able to mix in arbitrary components:

<Light type="directional" geometry="primitive: sphere" material={sphereColor}/>

Can do this by having a React component that detects a main schema and expanding the properties of the schema onto the main component, and then applying the rest of the components as attributes.

<a-entity light="{lightSchemaProperties}" {...otherComponents}>
@ngokevin
Copy link
Collaborator Author

Not going to recommend creating React components to alias one entity.

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

No branches or pull requests

1 participant