Three.js cube with different texture on each face

后端 未结 1 1047
小蘑菇
小蘑菇 2020-12-01 00:28

I\'m trying to create a three.js cube with different textures on each face.

Basically a dice. This is in my sandbox environment, so should just product a rotating cu

相关标签:
1条回答
  • 2020-12-01 00:42

    EDIT: THREE.MultiMaterial has been deprecated. You can now pass the materials array directly into the constructor. Like so:

    dice = new THREE.Mesh( new THREE.BoxGeometry( 562, 562, 562, 1, 1, 1 ), materials );
    
    scene.add( dice );
    

    Be careful of copying old examples from the net.

    Always check the Migration Wiki for help upgrading to the current version.

    three.js r.85

    0 讨论(0)
提交回复
热议问题