Create a concave half sphere with three.js

前端 未结 2 2051
时光取名叫无心
时光取名叫无心 2021-01-03 15:56

I\'m a web developer with a good js experience, and I\'m currently exploring three.js possibilities. However, I\'m not very familiar with 3D shapes and vocabulary, and I can

2条回答
  •  天涯浪人
    2021-01-03 16:05

    You can use SphereBufferGeometry, to create half sphere (Hemisphere). Last argument does it: 0.5 * Math.PI. Also to be able to see something you need to use THREE.DoubleSide for material.

    var geometry = new THREE.SphereBufferGeometry(5, 8, 6, 0, 2*Math.PI, 0, 0.5 * Math.PI);
    ...
    material.side = THREE.DoubleSide;
    

提交回复
热议问题