Set different materials on cube's different side?
See original GitHub issueIn chrome console it says that material as an array has been deprecated. I want to apply different material to cube’s different side.
//convert from SVG
var imageCanvas = document.createElement("canvas");
canvg(imageCanvas, image.svg);
var texture = new THREE.Texture(imageCanvas);
texture.needsUpdate = true;
var geometry = new THREE.CubeGeometry(200, 10, 200);
var cubeMaterial = new THREE.MeshBasicMaterial({
map : texture
});
var cube = new THREE.Mesh(geometry, cubeMaterial);
Like this, all 6 cube’s sides have that picture as material. I would like to apply that picture material to only 2 sides an on the rest 4 I would like to put a color. How can I do that?
And also, is there any other place between this issues list, API Docs and those examples here on GitHub where I can lear Three.js?
Issue Analytics
- State:
- Created 12 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top Results From Across the Web
how to apply a texture on one side of a cube in Unity - YouTube
Transcript · The Ultimate BEGINNERS GUIDE to Materials in Unity · LIGHTING in Unity · Tutorial: Blender MODELLING For Absolute Beginners | Low...
Read more >Can anyone help? i need a different texture on each side of a ...
If you're using a static mesh cube, you can't apply different textures to it. If you want to do it in UE, go...
Read more >Different Texture on each side of Cube - Unity Forum
You need a cube (created in a 3D app) where each face is a submesh, and has a different material. Or you can...
Read more >Different Material/Texture to each side of a cube?
Solved: Simple question, how do I apply a material to one side of a cube? Thanks.
Read more >Applying a different color/texture/material to each side of a cube
The initial material assignment will affect the whole cube. Make sure when you select the select the second face, make a new material...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hi Dino4674,
This issue / solution might be what you are looking for: #744
This worked for me:
It looks like you were right after all.
I your say
you can see exactly which one is the front.
So the answer is that Three looks on Y as height and Z as depth.