Skip to content
Snippets Groups Projects
Commit 26d7a31f authored by Lucio Zambon's avatar Lucio Zambon
Browse files

Add new file

parent c61a9c4b
No related branches found
No related tags found
No related merge requests found
import * as THREE from 'three';
// current monitor
export function cm(param) {
const cmContiner = new THREE.Object3D();
const cmObject = new THREE.Object3D();
//cylinder mid
const cylgeometry = new THREE.CylinderGeometry(65, 65, 30, 20);
const cylmaterial = new THREE.MeshLambertMaterial({color: 0x7dbab2});
const cylmesh = new THREE.Mesh(cylgeometry, cylmaterial);
cylmesh.rotateX(Math.PI * 1);
cylmesh.rotateY(Math.PI * 1.0);
cylmesh.rotateZ(Math.PI * 1.5);
cylmesh.position.set(0, 0 , 0);
cmObject.add(cylmesh);
//cylinder center
const cyl2geometry = new THREE.CylinderGeometry(35, 35, 31, 20);
const cyl2material = new THREE.MeshLambertMaterial({color: 0x348c81});
const cyl2mesh = new THREE.Mesh(cyl2geometry, cyl2material);
cyl2mesh.rotateX(Math.PI * 1);
cyl2mesh.rotateY(Math.PI * 1.0);
cyl2mesh.rotateZ(Math.PI * 1.5);
cyl2mesh.position.set(0, 0 , 0);
cmObject.add(cyl2mesh);
cmObject.scale.setX(1);
cmObject.scale.setY(1);
cmObject.scale.setZ(1);
cmObject.position.set(0, 0, 0);
cmContiner.add(cmObject);
cmContiner.rotateY(Math.PI * -1);
return cmContiner;
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment