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

Add new file

parent 7f5e84f1
No related branches found
No related tags found
No related merge requests found
// jshint esversion: 6
import * as THREE from 'three';
export function sip(param) {
const sipContiner = new THREE.Object3D();
const sipObject = new THREE.Object3D();
//cylinder
const cylgeometry = new THREE.CylinderGeometry(25, 25, 50, 15);
const cylmaterial = new THREE.MeshLambertMaterial({color: 0xc7c7c7});
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);
sipObject.add(cylmesh);
// connect
const vlvgeometry = new THREE.BoxGeometry(30, 50, 30 );
const vlv1mesh = new THREE.Mesh(vlvgeometry, cylmaterial);
vlv1mesh.position.set(0, -30, 0);
sipObject.add(vlv1mesh);
// box
const boxmaterial = new THREE.MeshLambertMaterial({color: 0xb6b6b6});
const boxgeometry = new THREE.BoxGeometry(60, 80, 120 );
const boxmesh = new THREE.Mesh(boxgeometry, boxmaterial);
boxmesh.position.set(0, -90, 0);
sipObject.add(boxmesh);
// blackbox1
const bb1material = new THREE.MeshLambertMaterial({color: 0x000000});
const bb1geometry = new THREE.BoxGeometry(60, 80, 10 );
const bb1mesh = new THREE.Mesh(bb1geometry, bb1material);
bb1mesh.position.set(0, -90, -65);
sipObject.add(bb1mesh);
// blackbox2
const bb2geometry = new THREE.BoxGeometry(60, 80, 10 );
const bb2mesh = new THREE.Mesh(bb2geometry, bb1material);
bb2mesh.position.set(0, -90, 65);
sipObject.add(bb2mesh);
// border
const bordergeometry = new THREE.BoxGeometry(61, 81, 1 );
const bordermesh = new THREE.Mesh(bordergeometry, bb1material);
bordermesh.position.set(0, -90, 0);
sipObject.add(bordermesh);
sipObject.scale.setX(1);
sipObject.scale.setY(1);
sipObject.scale.setZ(1);
sipObject.position.set(0, 0, 0);
sipContiner.add(sipObject);
sipContiner.rotateY(Math.PI * -1);
return sipContiner;
}
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