var material = new THREE.MeshPhongMaterial({
color: 0x0000ff,
side: THREE.DoubleSide
});
var material=new THREE.MeshPhongMaterial({
color:0x0000ff,
side:THREE.DoubleSide
});
material.wireframe = true;
var mesh=new THREE.Mesh(geometry,material);
scene.add(mesh);
var material = new THREE.MeshPhongMaterial({
color: 0x0000ff,
side: THREE.DoubleSide
});
var mesh = new THREE.Mesh(geometry, material);
var shape = new THREE.Shape();
shape.arc(0, 0, 100, 0, 2 * Math.PI);
var path1 = new THREE.Path();
path1.arc(0, 0, 40, 0, 2 * Math.PI);
var path2 = new THREE.Path();
path2.arc(80, 0, 10, 0, 2 * Math.PI);
var path3 = new THREE.Path();
path3.arc(-80, 0, 10, 0, 2 * Math.PI);
shape.holes.push(path1, path2, path3);
var geometry = new THREE.ShapeGeometry(shape, 30);
var material=new THREE.MeshPhongMaterial({
color:0x0000ff,
side:THREE.DoubleSide
});
material.wireframe = true;
var mesh=new THREE.Mesh(geometry,material);
scene.add(mesh);
var shape=new THREE.Shape();
shape.moveTo(0,0);
shape.lineTo(0,100);
shape.lineTo(100,100);
shape.lineTo(100,0);
shape.lineTo(0,0);
var path=new THREE.Path();
path.moveTo(20,20);
path.lineTo(20,80);
path.lineTo(80,80);
path.lineTo(80,20);
path.lineTo(20,20);
shape.holes.push(path);
var geometry = new THREE.ShapeGeometry(shape, 30);
var material=new THREE.MeshPhongMaterial({
color:0x0000ff,
side:THREE.DoubleSide
});
material.wireframe = true;
var mesh=new THREE.Mesh(geometry,material);
scene.add(mesh);
var shape=new THREE.Shape();
shape.arc(-50,0,30,0,2*Math.PI);
var shape2=new THREE.Shape();
shape2.arc(50,0,30,0,2*Math.PI);
var shape3=new THREE.Shape();
shape3.arc(0,50,30,0,2*Math.PI);
var geometry = new THREE.ShapeGeometry([shape,shape2,shape3], 30);
var geometry = new THREE.ShapeGeometry(shape, 30);
var material=new THREE.MeshPhongMaterial({
color:0x0000ff,
side:THREE.DoubleSide
});
material.wireframe = true;
var mesh=new THREE.Mesh(geometry,material);
scene.add(mesh);
let arr = [
[110.3906, 34.585],
[110.8301, 34.6289],
[110.6543, 34.1455],
[110.6543, 34.2455],
[110.6543, 34.3455],
[110.6543, 34.3555],
[110.6543, 34.3655],
[110.6543, 34.4155],
[110.4785, 34.4334],
[110.4785, 35.4334],
[110.3906, 34.585]
]
var points = [];
arr.forEach(elem => {
points.push(new THREE.Vector2(elem[0],elem[1]))
});
var SplineCurve = new THREE.SplineCurve(points)
var shape = new THREE.Shape(SplineCurve.getPoints(300));
var geometry = new THREE.ShapeGeometry(shape);
geometry.center();
geometry.scale(30,30,30);
var material = new THREE.MeshPhongMaterial({
color: 0x0000ff,
side: THREE.DoubleSide
});
var mesh = new THREE.Mesh(geometry, material);
scene.add(mesh);