Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var camera, scene, renderer;
- var light;
- var controls;
- function CreateCam_0() {
- // Camera name: lft_cam
- var camera_obj = new THREE.PerspectiveCamera(35, window.innerWidth / window.innerHeight, 15.91092, 134.46671);
- camera_obj.position.x = 49.52760;
- camera_obj.position.y = 0.00000;
- camera_obj.position.z = 0.00000;
- camera_obj.up = new THREE.Vector3(0, 0, 1);
- var target = new THREE.Vector3(0.00000, 0.00000, 0.00000);
- camera_obj.lookAt(target);
- return camera_obj;
- }
- function ChangeCam0(){
- camera = CreateCam_0();
- controls = new THREE.TrackballControls(camera);
- controls.addEventListener('change', render);
- }
- function CreateCam_1() {
- // Camera name: rgt_cam
- var camera_obj = new THREE.PerspectiveCamera(35, window.innerWidth / window.innerHeight, 0.06364, 63.64368);
- camera_obj.position.x = -49.52760;
- camera_obj.position.y = 0.00000;
- camera_obj.position.z = 0.00000;
- camera_obj.up = new THREE.Vector3(0, 0, 1);
- var target = new THREE.Vector3(0.00000, 0.00000, 0.00000);
- camera_obj.lookAt(target);
- return camera_obj;
- }
- function ChangeCam1(){
- camera = CreateCam_1();
- controls = new THREE.TrackballControls(camera);
- controls.addEventListener('change', render);
- }
- function CreateCam_2() {
- // Camera name: frt_cam
- var camera_obj = new THREE.PerspectiveCamera(35, window.innerWidth / window.innerHeight, 26.55863, 142.71144);
- camera_obj.position.x = 0.00000;
- camera_obj.position.y = -62.23650;
- camera_obj.position.z = 0.00000;
- camera_obj.up = new THREE.Vector3(0, 0, 1);
- var target = new THREE.Vector3(0.00000, 0.00000, 0.00000);
- camera_obj.lookAt(target);
- return camera_obj;
- }
- function ChangeCam2(){
- camera = CreateCam_2();
- controls = new THREE.TrackballControls(camera);
- controls.addEventListener('change', render);
- }
- function CreateCam_3() {
- // Camera name: bck_cam
- var camera_obj = new THREE.PerspectiveCamera(35, window.innerWidth / window.innerHeight, 26.55863, 142.71144);
- camera_obj.position.x = 0.00000;
- camera_obj.position.y = 62.23650;
- camera_obj.position.z = 0.00000;
- camera_obj.up = new THREE.Vector3(0, 0, 1);
- var target = new THREE.Vector3(0.00000, 0.00000, 0.00000);
- camera_obj.lookAt(target);
- return camera_obj;
- }
- function ChangeCam3(){
- camera = CreateCam_3();
- controls = new THREE.TrackballControls(camera);
- controls.addEventListener('change', render);
- }
- function CreateCam_4() {
- // Camera name: top_cam
- var camera_obj = new THREE.PerspectiveCamera(35, window.innerWidth / window.innerHeight, 26.55863, 148.66365);
- camera_obj.position.x = 0.00000;
- camera_obj.position.y = 0.00000;
- camera_obj.position.z = 63.72454;
- camera_obj.up = new THREE.Vector3(0, 1, 0);
- var target = new THREE.Vector3(0.00000, 0.00000, 0.00000);
- camera_obj.lookAt(target);
- return camera_obj;
- }
- function ChangeCam4(){
- camera = CreateCam_4();
- controls = new THREE.TrackballControls(camera);
- controls.addEventListener('change', render);
- }
- function CreateCam_5() {
- // Camera name: iso_cam
- var camera_obj = new THREE.PerspectiveCamera(35, window.innerWidth / window.innerHeight, 13.27932, 1859.10425);
- camera_obj.position.x = 44.26439;
- camera_obj.position.y = -35.67786;
- camera_obj.position.z = 37.16591;
- camera_obj.up = new THREE.Vector3(0, 0, 1);
- var target = new THREE.Vector3(0.00000, 0.00000, 0.00000);
- camera_obj.lookAt(target);
- return camera_obj;
- }
- function ChangeCam5(){
- camera = CreateCam_5();
- controls = new THREE.TrackballControls(camera);
- controls.addEventListener('change', render);
- }
- init();
- animate();
- function init() {
- if ( !Detector.webgl ) Detector.addGetWebGLMessage();
- renderer = new THREE.WebGLRenderer();
- renderer.setSize(window.innerWidth, window.innerHeight);
- document.body.appendChild(renderer.domElement);
- renderer.setClearColor(0x3CB371, 1);
- camera = new THREE.PerspectiveCamera(35, window.innerWidth / window.innerHeight, 13.27932, 1859.10425);
- camera.position.x = 44.26439;
- camera.position.y = -35.67786;
- camera.position.z = 37.16591;
- camera.up = new THREE.Vector3(0, 0, 1);
- var target = new THREE.Vector3(0.00000, 0.00000, 0.00000);
- camera.lookAt(target);
- controls = new THREE.TrackballControls(camera);
- controls.addEventListener('change', render);
- scene = new THREE.Scene();
- var light_ambient = new THREE.AmbientLight(0x000000);
- scene.add(light_ambient);
- light = new THREE.PointLight(0x999999);
- light.position.set(26.55863, -35.41151, 53.11727);
- scene.add(light);
- light = new THREE.PointLight(0x4C4C4C);
- light.position.set(-35.41151, -35.41151, 26.55863);
- scene.add(light);
- light = new THREE.PointLight(0x4C4C4C);
- light.position.set(0.00000, 35.41151, 35.41151);
- scene.add(light);
- function create_geometry_0(scene)
- {
- var mesh;
- var material;
- var geometry;
- var vertices = new Float32Array([
- 3.15576, 1.04922, 10.60728,
- -17.70576, 1.04922, 10.60728,
- -17.70576, -9.11923, 10.60728,
- 3.15576, -9.11923, 10.60728,
- 3.15576, 1.04922, 10.60728,
- -17.70576, -9.11923, 10.60728,
- 3.15576, 1.04922, -4.08228,
- -17.70576, 1.04922, -4.08228,
- -17.70576, 1.04922, 10.60728,
- 3.15576, 1.04922, 10.60728,
- 3.15576, 1.04922, -4.08228,
- -17.70576, 1.04922, 10.60728,
- 3.15576, -9.11923, -4.08228,
- -17.70576, -9.11923, -4.08228,
- -17.70576, 1.04922, -4.08228,
- 3.15576, 1.04922, -4.08228,
- 3.15576, -9.11923, -4.08228,
- -17.70576, 1.04922, -4.08228,
- 3.15576, -9.11923, 10.60728,
- -17.70576, -9.11923, 10.60728,
- -17.70576, -9.11923, -4.08228,
- 3.15576, -9.11923, -4.08228,
- 3.15576, -9.11923, 10.60728,
- -17.70576, -9.11923, -4.08228,
- 3.15576, 1.04922, -4.08228,
- 3.15576, 1.04922, 10.60728,
- 3.15576, -9.11923, 10.60728,
- 3.15576, -9.11923, -4.08228,
- 3.15576, 1.04922, -4.08228,
- 3.15576, -9.11923, 10.60728,
- -17.70576, 1.04922, 10.60728,
- -17.70576, 1.04922, -4.08228,
- -17.70576, -9.11923, -4.08228,
- -17.70576, -9.11923, 10.60728,
- -17.70576, 1.04922, 10.60728,
- -17.70576, -9.11923, -4.08228,
- 11.60575, 9.11922, 8.20728,
- -9.25575, 9.11922, 8.20728,
- -9.25575, -1.04928, 8.20728,
- 11.60575, -1.04928, 8.20728,
- 11.60575, 9.11922, 8.20728,
- -9.25575, -1.04928, 8.20728,
- 11.60575, 9.11922, -6.48228,
- -9.25575, 9.11922, -6.48228,
- -9.25575, 9.11922, 8.20728,
- 11.60575, 9.11922, 8.20728,
- 11.60575, 9.11922, -6.48228,
- -9.25575, 9.11922, 8.20728,
- 11.60575, -1.04928, -6.48228,
- -9.25575, -1.04928, -6.48228,
- -9.25575, 9.11922, -6.48228,
- 11.60575, 9.11922, -6.48228,
- 11.60575, -1.04928, -6.48228,
- -9.25575, 9.11922, -6.48228,
- 11.60575, -1.04928, 8.20728,
- -9.25575, -1.04928, 8.20728,
- -9.25575, -1.04928, -6.48228,
- 11.60575, -1.04928, -6.48228,
- 11.60575, -1.04928, 8.20728,
- -9.25575, -1.04928, -6.48228,
- 11.60575, 9.11922, -6.48228,
- 11.60575, 9.11922, 8.20728,
- 11.60575, -1.04928, 8.20728,
- 11.60575, -1.04928, -6.48228,
- 11.60575, 9.11922, -6.48228,
- 11.60575, -1.04928, 8.20728,
- -9.25575, 9.11922, 8.20728,
- -9.25575, 9.11922, -6.48228,
- -9.25575, -1.04928, -6.48228,
- -9.25575, -1.04928, 8.20728,
- -9.25575, 9.11922, 8.20728,
- -9.25575, -1.04928, -6.48228,
- 17.70576, 1.04922, 4.08228,
- -3.15576, 1.04922, 4.08228,
- -3.15576, -9.11923, 4.08228,
- 17.70576, -9.11923, 4.08228,
- 17.70576, 1.04922, 4.08228,
- -3.15576, -9.11923, 4.08228,
- 17.70576, 1.04922, -10.60728,
- -3.15576, 1.04922, -10.60728,
- -3.15576, 1.04922, 4.08228,
- 17.70576, 1.04922, 4.08228,
- 17.70576, 1.04922, -10.60728,
- -3.15576, 1.04922, 4.08228,
- 17.70576, -9.11923, -10.60728,
- -3.15576, -9.11923, -10.60728,
- -3.15576, 1.04922, -10.60728,
- 17.70576, 1.04922, -10.60728,
- 17.70576, -9.11923, -10.60728,
- -3.15576, 1.04922, -10.60728,
- 17.70576, -9.11923, 4.08228,
- -3.15576, -9.11923, 4.08228,
- -3.15576, -9.11923, -10.60728,
- 17.70576, -9.11923, -10.60728,
- 17.70576, -9.11923, 4.08228,
- -3.15576, -9.11923, -10.60728,
- 17.70576, 1.04922, -10.60728,
- 17.70576, 1.04922, 4.08228,
- 17.70576, -9.11923, 4.08228,
- 17.70576, -9.11923, -10.60728,
- 17.70576, 1.04922, -10.60728,
- 17.70576, -9.11923, 4.08228,
- -3.15576, 1.04922, 4.08228,
- -3.15576, 1.04922, -10.60728,
- -3.15576, -9.11923, -10.60728,
- -3.15576, -9.11923, 4.08228,
- -3.15576, 1.04922, 4.08228,
- -3.15576, -9.11923, -10.60728
- ]);
- var normals = new Float32Array([
- 0.00000, 0.00000, 1.00000,
- -0.00000, 0.00000, 1.00000,
- 0.00000, 0.00000, 1.00000,
- 0.00000, -0.00000, 1.00000,
- 0.00000, 0.00000, 1.00000,
- 0.00000, 0.00000, 1.00000,
- 0.00000, 1.00000, 0.00000,
- 0.00000, 1.00000, 0.00000,
- 0.00000, 1.00000, 0.00000,
- 0.00000, 1.00000, 0.00000,
- 0.00000, 1.00000, -0.00000,
- -0.00000, 1.00000, 0.00000,
- 0.00000, 0.00000, -1.00000,
- 0.00000, 0.00000, -1.00000,
- 0.00000, 0.00000, -1.00000,
- -0.00000, -0.00000, -1.00000,
- 0.00000, 0.00000, -1.00000,
- 0.00000, 0.00000, -1.00000,
- -0.00000, -1.00000, 0.00000,
- 0.00000, -1.00000, 0.00000,
- 0.00000, -1.00000, 0.00000,
- 0.00000, -1.00000, 0.00000,
- 0.00000, -1.00000, -0.00000,
- 0.00000, -1.00000, 0.00000,
- 1.00000, 0.00000, -0.00000,
- 1.00000, 0.00000, 0.00000,
- 1.00000, -0.00000, 0.00000,
- 1.00000, 0.00000, 0.00000,
- 1.00000, 0.00000, 0.00000,
- 1.00000, 0.00000, 0.00000,
- -1.00000, 0.00000, -0.00000,
- -1.00000, 0.00000, 0.00000,
- -1.00000, 0.00000, 0.00000,
- -1.00000, 0.00000, 0.00000,
- -1.00000, -0.00000, 0.00000,
- -1.00000, 0.00000, 0.00000,
- 0.00000, 0.00000, 1.00000,
- -0.00000, 0.00000, 1.00000,
- 0.00000, 0.00000, 1.00000,
- 0.00000, -0.00000, 1.00000,
- 0.00000, 0.00000, 1.00000,
- 0.00000, 0.00000, 1.00000,
- 0.00000, 1.00000, 0.00000,
- 0.00000, 1.00000, 0.00000,
- 0.00000, 1.00000, 0.00000,
- 0.00000, 1.00000, 0.00000,
- 0.00000, 1.00000, -0.00000,
- -0.00000, 1.00000, 0.00000,
- 0.00000, 0.00000, -1.00000,
- 0.00000, 0.00000, -1.00000,
- 0.00000, 0.00000, -1.00000,
- -0.00000, -0.00000, -1.00000,
- 0.00000, 0.00000, -1.00000,
- 0.00000, 0.00000, -1.00000,
- -0.00000, -1.00000, 0.00000,
- 0.00000, -1.00000, 0.00000,
- 0.00000, -1.00000, 0.00000,
- 0.00000, -1.00000, 0.00000,
- 0.00000, -1.00000, -0.00000,
- 0.00000, -1.00000, 0.00000,
- 1.00000, 0.00000, -0.00000,
- 1.00000, 0.00000, 0.00000,
- 1.00000, -0.00000, 0.00000,
- 1.00000, 0.00000, 0.00000,
- 1.00000, 0.00000, 0.00000,
- 1.00000, 0.00000, 0.00000,
- -1.00000, 0.00000, -0.00000,
- -1.00000, 0.00000, 0.00000,
- -1.00000, 0.00000, 0.00000,
- -1.00000, 0.00000, 0.00000,
- -1.00000, -0.00000, 0.00000,
- -1.00000, 0.00000, 0.00000,
- 0.00000, 0.00000, 1.00000,
- -0.00000, 0.00000, 1.00000,
- 0.00000, 0.00000, 1.00000,
- 0.00000, -0.00000, 1.00000,
- 0.00000, 0.00000, 1.00000,
- 0.00000, 0.00000, 1.00000,
- 0.00000, 1.00000, 0.00000,
- 0.00000, 1.00000, 0.00000,
- 0.00000, 1.00000, 0.00000,
- 0.00000, 1.00000, 0.00000,
- 0.00000, 1.00000, -0.00000,
- -0.00000, 1.00000, 0.00000,
- 0.00000, 0.00000, -1.00000,
- 0.00000, 0.00000, -1.00000,
- 0.00000, 0.00000, -1.00000,
- -0.00000, -0.00000, -1.00000,
- 0.00000, 0.00000, -1.00000,
- 0.00000, 0.00000, -1.00000,
- -0.00000, -1.00000, 0.00000,
- 0.00000, -1.00000, 0.00000,
- 0.00000, -1.00000, 0.00000,
- 0.00000, -1.00000, 0.00000,
- 0.00000, -1.00000, -0.00000,
- 0.00000, -1.00000, 0.00000,
- 1.00000, 0.00000, -0.00000,
- 1.00000, 0.00000, 0.00000,
- 1.00000, -0.00000, 0.00000,
- 1.00000, 0.00000, 0.00000,
- 1.00000, 0.00000, 0.00000,
- 1.00000, 0.00000, 0.00000,
- -1.00000, 0.00000, -0.00000,
- -1.00000, 0.00000, 0.00000,
- -1.00000, 0.00000, 0.00000,
- -1.00000, 0.00000, 0.00000,
- -1.00000, -0.00000, 0.00000,
- -1.00000, 0.00000, 0.00000
- ]);
- geometry = new THREE.BufferGeometry();
- geometry.addAttribute('position', new THREE.BufferAttribute(vertices, 3));
- geometry.addAttribute('normal', new THREE.BufferAttribute(normals, 3));
- /* Enable to add texture
- var texture = new THREE.TextureLoader().load( "/PATH/TO/YOUR-TEXTURE.jpg");
- texture.wrapS = THREE.RepeatWrapping;
- texture.wrapT = THREE.RepeatWrapping;
- texture.anisotropy = 8;
- */
- material = new THREE.MeshPhongMaterial({
- color: 0x969696,
- shininess: 2.00000,
- side: THREE.DoubleSide,
- specular: 0x000000
- /* map: texture */
- });
- /* Enable to add texture
- material.map.minFilter = THREE.LinearMipMapLinearFilter;
- material.map.magFilter = THREE.LinearFilter;
- */
- mesh = new THREE.Mesh(geometry, material);
- mesh.receiveShadow = true;
- mesh.castShadow = true;
- scene.add(mesh);
- }
- create_geometry_0(scene);
- window.addEventListener('resize', onWindowResize, false);
- }
- function onWindowResize() {
- camera.aspect = window.innerWidth / window.innerHeight;
- camera.updateProjectionMatrix();
- renderer.setSize(window.innerWidth, window.innerHeight);
- controls.handleResize();
- render();
- }
- function animate()
- {
- requestAnimationFrame(animate);
- renderer.render(scene, camera);
- controls.update();
- }
- function render()
- {
- renderer.render(scene, camera);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement