I'll help you set up the 3D Model Studio project. Here's the complete setup with the main JavaScript file:
I'll create a beautiful 3D makeup gallery for you. Here's the enhanced version with a makeup theme:
I'll provide the code for the 3D makeup gallery. Here's the complete implementation:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>3D Makeup Gallery</title>
<style>
body {
margin: 0;
overflow: hidden;
font-family: 'Arial', sans-serif;
}
canvas {
display: block;
}
#info {
position: absolute;
bottom: 20px;
width: 100%;
text-align: center;
color: #333;
font-size: 18px;
pointer-events: none;
text-shadow: 0 0 5px white;
}
#controls {
position: absolute;
top: 20px;
right: 20px;
background: rgba(255, 255, 255, 0.8);
padding: 15px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
button {
background: linear-gradient(to bottom, #ffb6c1, #ff69b4);
border: none;
color: white;
padding: 8px 15px;
margin: 5px;
border-radius: 20px;
cursor: pointer;
font-weight: bold;
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
transition: all 0.3s;
}
button:hover {
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
</style>
</head>
<body>
<div id="info">✨ Beautiful Makeup Gallery ✨<br>Drag to rotate | Scroll to zoom</div>
<div id="controls">
<button id="changeColor">Change Colors</button>
<button id="addProduct">Add Product</button>
</div>
<script type="module">
import * as THREE from 'https://cdn.jsdelivr.net/npm/three@0.166/build/three.module.js';
import { OrbitControls } from 'https://cdn.jsdelivr.net/npm/three@0.166/examples/jsm/controls/OrbitControls.js';
// Scene setup with elegant background
const scene = new THREE.Scene();
scene.background = new THREE.Color(0xf0e6ff);
// Camera with better positioning
const camera = new THREE.PerspectiveCamera(50, window.innerWidth / window.innerHeight, 0.1, 1000);
camera.position.set(0, 1.5, 5);
// Enhanced renderer with better antialiasing
const renderer = new THREE.WebGLRenderer({
antialias: true,
powerPreference: "high-performance"
});
renderer.setPixelRatio(window.devicePixelRatio);
renderer.setSize(window.innerWidth, window.innerHeight);
renderer.shadowMap.enabled = true;
renderer.shadowMap.type = THREE.PCFSoftShadowMap;
document.body.appendChild(renderer.domElement);
// Soft controls
const controls = new OrbitControls(camera, renderer.domElement);
controls.enableDamping = true;
controls.dampingFactor = 0.05;
controls.minDistance = 2;
controls.maxDistance = 10;
// Elegant lighting setup
const ambientLight = new THREE.AmbientLight(0xffffff, 0.5);
scene.add(ambientLight);
const directionalLight = new THREE.DirectionalLight(0xffffff, 1);
directionalLight.position.set(3, 10, 5);
directionalLight.castShadow = true;
directionalLight.shadow.mapSize.width = 1024;
directionalLight.shadow.mapSize.height = 1024;
scene.add(directionalLight);
// Soft spotlight for highlighting
const spotLight = new THREE.SpotLight(0xfff0f0, 1, 10, Math.PI/6, 0.5);
spotLight.position.set(0, 3, 3);
spotLight.castShadow = true;
scene.add(spotLight);
// Makeup product display area
const displayPlatform = new THREE.Mesh(
new THREE.CylinderGeometry(3, 3, 0.1, 64),
new THREE.MeshStandardMaterial({
color: 0xffffff,
metalness: 0.1,
roughness: 0.2
})
);
displayPlatform.rotation.x = -Math.PI / 2;
displayPlatform.position.y = -0.5;
displayPlatform.receiveShadow = true;
scene.add(displayPlatform);
// Mirror for makeup visualization
const mirrorGeometry = new THREE.PlaneGeometry(2, 1.5);
const mirror = new THREE.Mesh(
mirrorGeometry,
new THREE.MeshStandardMaterial({
color: 0x333333,
metalness: 0.9,
roughness: 0.1
})
);
mirror.position.set(0, 1.2, -1.5);
mirror.rotation.y = Math.PI;
scene.add(mirror);
// Makeup products array
const makeupProducts = [
{ name: "Lipstick", color: 0xff6b81, position: [-1, 0, 0], scale: 0.5 },
{ name: "Eyeshadow", color: 0x9b59b6, position: [0, 0, 1], scale: 0.4 },
{ name: "Mascara", color: 0x000000, position: [1, 0, 0], scale: 0.3 },
{ name: "Blush", color: 0xffb8b8, position: [0, 0, -1], scale: 0.4 },
{ name: "Foundation", color: 0xf5d0b3, position: [-0.5, 0, 0.5], scale: 0.4 },
{ name: "Highlighter", color: 0xf9e79f, position: [0.5, 0, 0.5], scale: 0.3 }
];
// Create makeup products
makeupProducts.forEach(product => {
const geometry = new THREE.CylinderGeometry(0.3 * product.scale, 0.3 * product.scale, 0.8 * product.scale, 32);
const material = new THREE.MeshStandardMaterial({
color: product.color,
metalness: 0.2,
roughness: 0.3
});
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>3D Makeup Gallery</title>
<style>
body {
margin: 0;
overflow: hidden;
font-family: 'Arial', sans-serif;
}
canvas {
display: block;
}
#info {
position: absolute;
bottom: 20px;
width: 100%;
text-align: center;
color: #333;
font-size: 18px;
pointer-events: none;
text-shadow: 0 0 5px white;
}
#controls {
position: absolute;
top: 20px;
right: 20px;
background: rgba(255, 255, 255, 0.8);
padding: 15px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
button {
background: linear-gradient(to bottom, #ffb6c1, #ff69b4);
border: none;
color: white;
padding: 8px 15px;
margin: 5px;
border-radius: 20px;
cursor: pointer;
font-weight: bold;
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
transition: all 0.3s;
}
button:hover {
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
</style>
</head>
<body>
<div id="info">✨ Beautiful Makeup Gallery ✨<br>Drag to rotate | Scroll to zoom</div>
<div id="controls">
<button id="changeColor">Change Colors</button>
<button id="addProduct">Add Product</button>
</div>
<script type="module">
import * as THREE from 'https://cdn.jsdelivr.net/npm/three@0.166/build/three.module.js';
import { OrbitControls } from 'https://cdn.jsdelivr.net/npm/three@0.166/examples/jsm/controls/OrbitControls.js';
// Scene setup with elegant background
const scene = new THREE.Scene();
scene.background = new THREE.Color(0xf0e6ff);
// Camera with better positioning
const camera = new THREE.PerspectiveCamera(50, window.innerWidth / window.innerHeight, 0.1, 1000);
camera.position.set(0, 1.5, 5);
// Enhanced renderer with better antialiasing
const renderer = new THREE.WebGLRenderer({
antialias: true,
powerPreference: "high-performance"
});
renderer.setPixelRatio(window.devicePixelRatio);
renderer.setSize(window.innerWidth, window.innerHeight);
renderer.shadowMap.enabled = true;
renderer.shadowMap.type = THREE.PCFSoftShadowMap;
document.body.appendChild(renderer.domElement);
// Soft controls
const controls = new OrbitControls(camera, renderer.domElement);
controls.enableDamping = true;
controls.dampingFactor = 0.05;
controls.minDistance = 2;
controls.maxDistance = 10;
// Elegant lighting setup
const ambientLight = new THREE.AmbientLight(0xffffff, 0.5);
scene.add(ambientLight);
const directionalLight = new THREE.DirectionalLight(0xffffff, 1);
directionalLight.position.set(3, 10, 5);
directionalLight.castShadow = true;
directionalLight.shadow.mapSize.width = 1024;
directionalLight.shadow.mapSize.height = 1024;
scene.add(directionalLight);
// Soft spotlight for highlighting
const spotLight = new THREE.SpotLight(0xfff0f0, 1, 10, Math.PI/6, 0.5);
spotLight.position.set(0, 3, 3);
spotLight.castShadow = true;
scene.add(spotLight);
// Makeup product display area
const displayPlatform = new THREE.Mesh(
new THREE.CylinderGeometry(3, 3, 0.1, 64),
new THREE.MeshStandardMaterial({
color: 0xffffff,
metalness: 0.1,
roughness: 0.2
})
);
displayPlatform.rotation.x = -Math.PI / 2;
displayPlatform.position.y = -0.5;
displayPlatform.receiveShadow = true;
scene.add(displayPlatform);
// Mirror for makeup visualization
const mirrorGeometry = new THREE.PlaneGeometry(2, 1.5);
const mirror = new THREE.Mesh(
mirrorGeometry,
new THREE.MeshStandardMaterial({
color: 0x333333,
metalness: 0.9,
roughness: 0.1
})
);
mirror.position.set(0, 1.2, -1.5);
mirror.rotation.y = Math.PI;
scene.add(mirror);
// Makeup products array
const makeupProducts = [
{ name: "Lipstick", color: 0xff6b81, position: [-1, 0, 0], scale: 0.5 },
{ name: "Eyeshadow", color: 0x9b59b6, position: [0, 0, 1], scale: 0.4 },
{ name: "Mascara", color: 0x000000, position: [1, 0, 0], scale: 0.3 },
{ name: "Blush", color: 0xffb8b8, position: [0, 0, -1], scale: 0.4 },
{ name: "Foundation", color: 0xf5d0b3, position: [-0.5, 0, 0.5], scale: 0.4 },
{ name: "Highlighter", color: 0xf9e79f, position: [0.5, 0, 0.5], scale: 0.3 }
];
// Create makeup products
makeupProducts.forEach(product => {
const geometry = new THREE.CylinderGeometry(0.3 * product.scale, 0.3 * product.scale, 0.8 * product.scale, 32);
const material = new THREE.MeshStandardMaterial({
color: product.color,
metalness: 0.2,
roughness: 0.3
});
Here's a comprehensive job portal setup with job posting and display functionality using JSON for data storage:
Here's a complete job portal with job posting functionality and display on the homepage:
This job portal includes:
The jobs are stored in the browser's localStorage, so they'll persist between sessions. The interface allows users to: