I recently started playing with A-Frame. Awesome tool! My favourite feature the inspector. Also the entity component system is so powerful.
As someone coming from React I had a hard time re-using existing structures e.g. a tree build out of a tree trunk and tree crown object. I found a repository with various examples, but I was wondering if this concept makes sense in the core.
Here my outcome so far: https://github.com/nikgraf/webvr-experiments/blob/master/a-frame/v3-forest/index.html#L11-L16
I was thinking about this:
<a-define-template id="tree">
<a-obj-model src="assets/tree-crown.obj" mtl="assets/tree-crown.mtl" position="0 2.5 0"></a-obj-model>
<a-obj-model src="assets/tree-trunk.obj" mtl="assets/tree-trunk.mtl" position="0 0 0"></a-obj-model>
</a-define-template>
<a-entity template="tree"></a-entity>
Does that make sense for A-Frame?
I recently started playing with A-Frame. Awesome tool! My favourite feature the inspector. Also the entity component system is so powerful.
As someone coming from React I had a hard time re-using existing structures e.g. a tree build out of a tree trunk and tree crown object. I found a repository with various examples, but I was wondering if this concept makes sense in the core.
Here my outcome so far: https://github.com/nikgraf/webvr-experiments/blob/master/a-frame/v3-forest/index.html#L11-L16
I was thinking about this:
Does that make sense for A-Frame?