Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to assign different textures to sides of a box in A-Frame

Tags:

aframe

webvr

Is there a way to assign different textures for each side of a box geometry in A-Frame, without building the box from 6 unique planes?

<a-box></a-box>  <!-- How to apply a cubemap? -->

More specifically, how can I do a cubemap in A-Frame? Here is an example of cubemapping in three.js: http://threejs.org/examples/#webgl_materials_cubemap

Thanks!

like image 649
Nathan Diesel Avatar asked Oct 19 '22 03:10

Nathan Diesel


1 Answers

You might want to try this component that allows you to add different textures to different sides of a-frame shapes (including boxes)

https://github.com/elbobo/aframe-multisrc-component

I think it could be more what you are looking for. Have a go, it would be great to hear how you get on with it.

like image 158
Nick Avatar answered Oct 21 '22 22:10

Nick