I try to draw lines of a THREE.mesh whose geometry is done with SphereGeometry
and material with MeshBasicMaterial
.
To achieve this, I have used the following snippet code:
var segments = 32
var geometry = new THREE.SphereGeometry(3, segments, segments, 0, Math.PI * 2, 0, Math.PI * 2);
var material = new THREE.MeshBasicMaterial({color: 0x900000});
var sphere = new THREE.Mesh(geometry, material);
scene.add(sphere);
This snippet doesn't produce the expected lines.
Instead of above code, I tried also to do:
var sphere = new THREE.Object3D();
sphere.add( new THREE.LineSegments(
new THREE.Geometry(),
new THREE.LineBasicMaterial({
color: 0xffffff,
transparent: true,
opacity: 0.5
})
));
sphere.add( new THREE.Mesh(
new THREE.Geometry(),
new THREE.MeshPhongMaterial({
color: 0x156289,
emissive: 0x072534,
side: THREE.DoubleSide,
shading: THREE.FlatShading
})
));
scene.add(sphere);
The lines of mesh aren't displayed too.
I use three.min.js version 74.