kenindo1-modelmagic / index.html
Lumica's picture
make fullly function website like https://app.sketchup.com/app, the website name Kenindo
5709ec1 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Kenindo1 - Online 3D Modeling</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script>
<style>
.canvas-container {
position: relative;
width: 100%;
height: calc(100vh - 60px);
overflow: hidden;
}
.tooltip {
position: relative;
display: inline-block;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 120px;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px;
position: absolute;
z-index: 1;
bottom: 125%;
left: 50%;
transform: translateX(-50%);
opacity: 0;
transition: opacity 0.3s;
}
.tooltip:hover .tooltiptext {
visibility: visible;
opacity: 1;
}
#renderCanvas {
width: 100%;
height: 100%;
touch-action: none;
}
</style>
</head>
<body class="bg-gray-100 text-gray-800 font-sans">
<!-- Navbar -->
<nav class="bg-white shadow-sm fixed top-0 w-full z-50">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex items-center justify-between h-16">
<div class="flex items-center">
<div class="flex-shrink-0 flex items-center">
<i data-feather="box" class="text-indigo-600"></i>
<span class="ml-2 text-xl font-bold text-gray-800">Kenindo1</span>
</div>
<div class="hidden md:block">
<div class="ml-10 flex items-baseline space-x-4">
<a href="#" class="px-3 py-2 rounded-md text-sm font-medium text-white bg-indigo-600">Home</a>
<a href="#" class="px-3 py-2 rounded-md text-sm font-medium text-gray-600 hover:text-indigo-600">Templates</a>
<a href="#" class="px-3 py-2 rounded-md text-sm font-medium text-gray-600 hover:text-indigo-600">Gallery</a>
<a href="#" class="px-3 py-2 rounded-md text-sm font-medium text-gray-600 hover:text-indigo-600">Learn</a>
</div>
</div>
</div>
<div class="hidden md:block">
<div class="ml-4 flex items-center md:ml-6">
<button class="p-1 rounded-full text-gray-600 hover:text-indigo-600 focus:outline-none">
<i data-feather="bell"></i>
</button>
<div class="ml-3 relative">
<div>
<button class="flex items-center text-sm focus:outline-none" id="user-menu">
<img class="h-8 w-8 rounded-full" src="http://static.photos/people/200x200/42" alt="User">
<span class="ml-2 text-gray-700">John Doe</span>
<i data-feather="chevron-down" class="ml-1"></i>
</button>
</div>
</div>
</div>
</div>
<div class="-mr-2 flex md:hidden">
<button type="button" class="inline-flex items-center justify-center p-2 rounded-md text-gray-600 hover:text-white hover:bg-indigo-600 focus:outline-none">
<i data-feather="menu"></i>
</button>
</div>
</div>
</div>
</nav>
<!-- Main Content -->
<div class="pt-16 flex h-screen">
<!-- Left Sidebar - Tools -->
<div class="w-16 bg-white shadow-md flex flex-col items-center py-4 space-y-6">
<div class="tooltip">
<button class="p-2 rounded-lg hover:bg-gray-100">
<i data-feather="square" class="text-gray-700"></i>
</button>
<span class="tooltiptext">Rectangle</span>
</div>
<div class="tooltip">
<button class="p-2 rounded-lg hover:bg-gray-100">
<i data-feather="circle" class="text-gray-700"></i>
</button>
<span class="tooltiptext">Circle</span>
</div>
<div class="tooltip">
<button class="p-2 rounded-lg hover:bg-gray-100">
<i data-feather="move" class="text-gray-700"></i>
</button>
<span class="tooltiptext">Move</span>
</div>
<div class="tooltip">
<button class="p-2 rounded-lg hover:bg-gray-100">
<i data-feather="rotate-cw" class="text-gray-700"></i>
</button>
<span class="tooltiptext">Rotate</span>
</div>
<div class="tooltip">
<button class="p-2 rounded-lg hover:bg-gray-100">
<i data-feather="type" class="text-gray-700"></i>
</button>
<span class="tooltiptext">Text</span>
</div>
<div class="tooltip">
<button class="p-2 rounded-lg hover:bg-gray-100">
<i data-feather="edit-3" class="text-gray-700"></i>
</button>
<span class="tooltiptext">Pencil</span>
</div>
<div class="tooltip">
<button class="p-2 rounded-lg hover:bg-gray-100">
<i data-feather="ruler" class="text-gray-700"></i>
</button>
<span class="tooltiptext">Measure</span>
</div>
<div class="tooltip">
<button class="p-2 rounded-lg hover:bg-gray-100">
<i data-feather="droplet" class="text-gray-700"></i>
</button>
<span class="tooltiptext">Paint</span>
</div>
</div>
<!-- Main Canvas Area -->
<div class="flex-1 overflow-hidden">
<div class="canvas-container">
<canvas id="renderCanvas"></canvas>
<div class="absolute bottom-4 left-1/2 transform -translate-x-1/2 bg-white px-4 py-2 rounded-full shadow-md flex space-x-4">
<button class="p-2 rounded-full hover:bg-gray-100">
<i data-feather="zoom-in"></i>
</button>
<button class="p-2 rounded-full hover:bg-gray-100">
<i data-feather="zoom-out"></i>
</button>
<button class="p-2 rounded-full hover:bg-gray-100">
<i data-feather="maximize"></i>
</button>
<button class="p-2 rounded-full hover:bg-gray-100">
<i data-feather="compass"></i>
</button>
<button class="p-2 rounded-full hover:bg-gray-100">
<i data-feather="layers"></i>
</button>
</div>
</div>
</div>
<!-- Right Sidebar - Properties -->
<div class="w-64 bg-white shadow-md p-4 overflow-y-auto">
<div class="border-b pb-4 mb-4">
<h3 class="text-lg font-medium text-gray-900">Properties</h3>
</div>
<div class="space-y-4">
<div>
<label class="block text-sm font-medium text-gray-700">Position</label>
<div class="mt-1 grid grid-cols-3 gap-2">
<input type="text" placeholder="X" class="block w-full border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
<input type="text" placeholder="Y" class="block w-full border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
<input type="text" placeholder="Z" class="block w-full border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
</div>
</div>
<div>
<label class="block text-sm font-medium text-gray-700">Rotation</label>
<div class="mt-1 grid grid-cols-3 gap-2">
<input type="text" placeholder="X" class="block w-full border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
<input type="text" placeholder="Y" class="block w-full border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
<input type="text" placeholder="Z" class="block w-full border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
</div>
</div>
<div>
<label class="block text-sm font-medium text-gray-700">Scale</label>
<div class="mt-1 grid grid-cols-3 gap-2">
<input type="text" placeholder="X" class="block w-full border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
<input type="text" placeholder="Y" class="block w-full border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
<input type="text" placeholder="Z" class="block w-full border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
</div>
</div>
<div>
<label class="block text-sm font-medium text-gray-700">Material</label>
<select class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md">
<option>Default</option>
<option>Wood</option>
<option>Metal</option>
<option>Glass</option>
<option>Brick</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700">Color</label>
<div class="mt-1 flex space-x-2">
<div class="w-8 h-8 rounded-full bg-red-500 border-2 border-gray-300 cursor-pointer"></div>
<div class="w-8 h-8 rounded-full bg-blue-500 border-2 border-gray-300 cursor-pointer"></div>
<div class="w-8 h-8 rounded-full bg-green-500 border-2 border-gray-300 cursor-pointer"></div>
<div class="w-8 h-8 rounded-full bg-yellow-500 border-2 border-gray-300 cursor-pointer"></div>
<div class="w-8 h-8 rounded-full bg-indigo-600 border-2 border-gray-300 cursor-pointer"></div>
</div>
</div>
</div>
</div>
</div>
<!-- Status Bar -->
<div class="fixed bottom-0 left-0 right-0 bg-white border-t border-gray-200 px-4 py-2 text-sm text-gray-600 flex justify-between items-center">
<div class="flex items-center space-x-4">
<span><i data-feather="cpu" class="w-4 h-4 mr-1"></i> Ready</span>
<span><i data-feather="mouse-pointer" class="w-4 h-4 mr-1"></i> Select Mode</span>
</div>
<div class="flex items-center space-x-4">
<span><i data-feather="info" class="w-4 h-4 mr-1"></i> Units: Meters</span>
<span><i data-feather="grid" class="w-4 h-4 mr-1"></i> 0,0,0</span>
</div>
</div>
<script>
// Initialize Three.js scene
function init3D() {
const canvas = document.getElementById('renderCanvas');
const renderer = new THREE.WebGLRenderer({ canvas, antialias: true });
renderer.setPixelRatio(window.devicePixelRatio);
renderer.setSize(canvas.clientWidth, canvas.clientHeight);
const scene = new THREE.Scene();
scene.background = new THREE.Color(0xf0f0f0);
const camera = new THREE.PerspectiveCamera(75, canvas.clientWidth / canvas.clientHeight, 0.1, 1000);
camera.position.z = 5;
// Add grid helper
const gridHelper = new THREE.GridHelper(10, 10);
scene.add(gridHelper);
// Add axes helper
const axesHelper = new THREE.AxesHelper(5);
scene.add(axesHelper);
// Add a simple cube
const geometry = new THREE.BoxGeometry();
const material = new THREE.MeshBasicMaterial({ color: 0x00aaff });
const cube = new THREE.Mesh(geometry, material);
scene.add(cube);
// Animation loop
function animate() {
requestAnimationFrame(animate);
cube.rotation.x += 0.01;
cube.rotation.y += 0.01;
renderer.render(scene, camera);
}
// Handle window resize
function onWindowResize() {
camera.aspect = canvas.clientWidth / canvas.clientHeight;
camera.updateProjectionMatrix();
renderer.setSize(canvas.clientWidth, canvas.clientHeight);
}
window.addEventListener('resize', onWindowResize);
animate();
}
// Initialize the app
document.addEventListener('DOMContentLoaded', function() {
feather.replace();
init3D();
// Initialize Vanta.js background for splash screen (commented out as we have 3D canvas)
// VANTA.GLOBE({
// el: "#background",
// mouseControls: true,
// touchControls: true,
// gyroControls: false,
// minHeight: 200.00,
// minWidth: 200.00,
// scale: 1.00,
// scaleMobile: 1.00,
// color: 0x3a86ff,
// backgroundColor: 0xf8fafc
// });
});
</script>
</body>
</html>