import * as THREE from 'three'; import {FontLoader} from 'three/addons/loaders/FontLoader.js'; import {TextGeometry} from 'three/addons/geometries/TextGeometry.js'; // fug rack export function fugpremium(width=800, height=1700, depth=600) { const fugObject = new THREE.Object3D(); const materialGreyDark= new THREE.MeshLambertMaterial({color: 0x9d9d9d}); const materialVeryGreyDark= new THREE.MeshLambertMaterial({color: 0x242424}); const silvermaterial = new THREE.MeshLambertMaterial({color: 0xf0f0f0}); const basematerial = new THREE.MeshLambertMaterial({color: 0xc4b2a8}); //right rack const lrgeometry = new THREE.BoxGeometry(width, height, depth); const lrmesh = new THREE.Mesh(lrgeometry, silvermaterial); lrmesh.position.set(0 , 0 , -100); fugObject.add(lrmesh); //left rack const rrgeometry = new THREE.BoxGeometry(width, height, depth); const rrmesh = new THREE.Mesh(rrgeometry, silvermaterial); rrmesh.position.set( 0, 0 , -710); fugObject.add(rrmesh); //basefug const basegeometry = new THREE.BoxGeometry(width+250, height-800, depth+600); const basemesh = new THREE.Mesh(basegeometry, silvermaterial); basemesh.position.set( -130, -1320 , -400); fugObject.add(basemesh); //edge lle const llegeometry = new THREE.BoxGeometry(50, 1700, 50); const llemesh = new THREE.Mesh(llegeometry, materialGreyDark); llemesh.position.set( -425, 0 , -985); fugObject.add(llemesh); //edge lre const lregeometry = new THREE.BoxGeometry(50, 1700, 50); const lremesh = new THREE.Mesh(lregeometry, materialGreyDark); lremesh.position.set( -425, 0 , -430); fugObject.add(lremesh); //edge rle const rlegeometry = new THREE.BoxGeometry(50, 1700, 50); const rlemesh = new THREE.Mesh(rlegeometry, materialGreyDark); rlemesh.position.set( -425, 0 , -370); fugObject.add(rlemesh); //edge rre const rregeometry = new THREE.BoxGeometry(50, 1700, 50); const rremesh = new THREE.Mesh(rregeometry, materialGreyDark); rremesh.position.set( -425, 0 , 175); fugObject.add(rremesh); //edge lue const luegeometry = new THREE.BoxGeometry(50, 50, 505); const luemesh = new THREE.Mesh(luegeometry, materialGreyDark); luemesh.position.set( -425, 825 , -707); fugObject.add(luemesh); //edge lde const ldegeometry = new THREE.BoxGeometry(50, 50, 505); const ldemesh = new THREE.Mesh(ldegeometry, materialGreyDark); ldemesh.position.set( -425, -830 , -707); fugObject.add(ldemesh); //edge rue const ruegeometry = new THREE.BoxGeometry(50, 50, 505); const ruemesh = new THREE.Mesh(ruegeometry, materialGreyDark); ruemesh.position.set( -425, 825 , -100); fugObject.add(ruemesh); //edge rde const rdegeometry = new THREE.BoxGeometry(50, 50, 505); const rdemesh = new THREE.Mesh(rdegeometry, materialGreyDark); rdemesh.position.set( -425, -825 , -100); fugObject.add(rdemesh); //base1 left and texture const drawer1geometry = new THREE.BoxGeometry(10, 1600, 500); const textureLoader = new THREE.TextureLoader(); const texture = textureLoader.load('./components/fug1screenfoto.jpg'); texture.wrapS = texture.wrapT = THREE.RepeatWrapping; texture.repeat.set(1, 1); const material = new THREE.MeshBasicMaterial({ map: texture }); const gridgeometrymesh = new THREE.Mesh(drawer1geometry, material); gridgeometrymesh.rotateX(Math.PI * 1); gridgeometrymesh.rotateY(Math.PI * 1); gridgeometrymesh.rotateZ(Math.PI * 1); gridgeometrymesh.position.set( -400, 0 , -707); fugObject.add(gridgeometrymesh); //base2 right and texture const drawer2geometry = new THREE.BoxGeometry(10, 1600, 500); const textureLoader2 = new THREE.TextureLoader(); const texture2 = textureLoader2.load('./components/fug2screenfoto.jpg'); texture2.wrapS = texture2.wrapT = THREE.RepeatWrapping; texture2.repeat.set(1, 1); const material2 = new THREE.MeshBasicMaterial({ map: texture2 }); const gridgeometry2mesh = new THREE.Mesh(drawer2geometry, material2); gridgeometry2mesh.rotateX(Math.PI * 1); gridgeometry2mesh.rotateY(Math.PI * 1); gridgeometry2mesh.rotateZ(Math.PI * 1); gridgeometry2mesh.position.set( -400, 0 , -100); fugObject.add(gridgeometry2mesh); //base3 FUG write and texture const drawer0geometry = new THREE.BoxGeometry(1, 900, 1200); const textureLoader0 = new THREE.TextureLoader(); const texture0 = textureLoader0.load('./components/fug0screenfoto.jpg'); texture0.wrapS = texture0.wrapT = THREE.RepeatWrapping; texture0.repeat.set(1, 1); const material0 = new THREE.MeshBasicMaterial({ map: texture0 }); const gridgeometry0mesh = new THREE.Mesh(drawer0geometry, material0); gridgeometry0mesh.rotateX(Math.PI * 1); gridgeometry0mesh.rotateY(Math.PI * 1); gridgeometry0mesh.rotateZ(Math.PI * 1); gridgeometry0mesh.position.set( -655, -1320 , -400); fugObject.add(gridgeometry0mesh); return fugObject; }