Skip to content
Snippets Groups Projects
  • Lucio Zambon's avatar
    Update 80 files · 0ee5780d
    Lucio Zambon authored
    - /components/src/beamlineDown.svg
    - /components/src/beamlineUP.js
    - /components/src/bending.svg
    - /components/src/blm.js
    - /components/src/blmplus.js
    - /components/src/bpm.js
    - /components/src/bpm.svg
    - /components/src/bst.js
    - /components/src/bst.svg
    - /components/src/cavity.js
    - /components/src/cavity.svg
    - /components/src/cavity_3hc.js
    - /components/src/cavity_3hc.svg
    - /components/src/cavity_3hcfast.js
    - /components/src/cavitylinac.js
    - /components/src/cavitylinac.svg
    - /components/src/chamber.js
    - /components/src/corrector.js
    - /components/src/corrector.svg
    - /components/src/correctorbooster.js
    - /components/src/correctorboosterfast.js
    - /components/src/correctorfast.js
    - /components/src/correctorfermi.js
    - /components/src/dipole.js
    - /components/src/dipolebooster.js
    - /components/src/dipoleboosterfast.js
    - /components/src/dipoleesrf.js
    - /components/src/dipolefast.js
    - /components/src/dipolefermi.js
    - /components/src/dipoleplus.js
    - /components/src/ellipticaltube.js
    - /components/sr...
    0ee5780d
flscfast.js 2.03 KiB
// jshint esversion: 6
	import * as THREE from 'three';

	// flsc
	export function flscfast(length=700) {
		const flscSR = new THREE.Object3D();
		const flscContiner = new THREE.Object3D();
		const materialGrey = new THREE.MeshLambertMaterial({color: 0xf0f0f0});
		
		
		const d1geometry = new THREE.CylinderGeometry(25, 25, 500, 15);
		const d1mesh = new THREE.Mesh(d1geometry, materialGrey);
		flscContiner.add(d1mesh);				
		flscContiner.rotateX(Math.PI * 1);
		
		// zigrinatura
		const d4geometry = new THREE.CylinderGeometry(70, 70, 160, 20);
		const textureLoader = new THREE.TextureLoader();
		const texture = textureLoader.load('./components/flsc_texture.png');	
		texture.wrapS = texture.wrapT = THREE.RepeatWrapping;
		texture.repeat.set(5, 40);		
		const material = new THREE.MeshBasicMaterial({ map: texture });		
		const d4mesh = new THREE.Mesh(d4geometry, material);
		d4mesh.rotateX(Math.PI * 1);
		d4mesh.rotateY(Math.PI * 1);
		d4mesh.rotateZ(Math.PI * 1);
		d4mesh.position.set(0, 80 , 0);			
		flscContiner.add(d4mesh);		
		
		// cil3
		const dmateria6 = new THREE.MeshLambertMaterial({color: 0x000000});
		const d6geometry = new THREE.CylinderGeometry(50, 50, 60, 15);
		const d6mesh = new THREE.Mesh(d6geometry, dmateria6);
		d6mesh.rotateX(Math.PI * 1);
		d6mesh.rotateY(Math.PI * 1);
		d6mesh.rotateZ(Math.PI * 1);
		d6mesh.position.set(0, -30 , 0);			
		flscContiner.add(d6mesh);		
		
		// box gray
		const d7geometry = new THREE.BoxGeometry(100, 100, 100);
		const dmaterial7= new THREE.MeshLambertMaterial({color: 0x405040});
		const d7mesh = new THREE.Mesh(d7geometry, dmaterial7);
		d7mesh.position.set(0, -110, 0);		
		flscContiner.add(d7mesh);				
				
		// box orange
		const d9geometry = new THREE.BoxGeometry(100, 120, 100);
		const dmaterial9= new THREE.MeshLambertMaterial({color: 0xffA500});
		const d9mesh = new THREE.Mesh(d9geometry, dmaterial9);
		d9mesh.position.set(0, -220, 0);		
		flscContiner.add(d9mesh);	

		flscContiner.position.set(0, 280, 0);
		flscSR.add(flscContiner);
		flscSR.rotateY(Math.PI * -0.5);
		return flscSR;
	}