Tweak: remove file input and move guests out from stage in the start
This commit is contained in:
parent
34a35a69d7
commit
383ba8baf1
@ -21,20 +21,6 @@
|
||||
<script type="module" src="/src/main.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Hidden Video Element --><video id="video" playsinline muted class="hidden"></video>
|
||||
|
||||
<!-- Controls for loading video --><div id="controls" class="fixed bottom-4 left-1/2 transform -translate-x-1/2 z-20 flex flex-col items-center space-y-2">
|
||||
|
||||
<!-- Hidden File Input that will be triggered by the button --><input type="file" id="fileInput" accept="video/mp4" class="hidden" multiple>
|
||||
|
||||
<div class="flex space-x-4">
|
||||
<!-- Load Tapes Button --><button id="loadTapeButton" class="px-8 py-3 bg-[#cc3333] text-white font-bold text-lg uppercase tracking-wider rounded-lg hover:bg-red-700 transition duration-150 active:translate-y-px">
|
||||
BEHOLD THE SPECTACLE
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 3D Canvas will be injected here by Three.js -->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -47,15 +47,6 @@ export function init() {
|
||||
|
||||
// 9. Event Listeners
|
||||
window.addEventListener('resize', onWindowResize, false);
|
||||
state.fileInput.addEventListener('change', loadVideoFile);
|
||||
|
||||
// Button logic
|
||||
state.loadTapeButton.addEventListener('click', () => {
|
||||
state.fileInput.click();
|
||||
});
|
||||
|
||||
// Auto-advance to the next video when the current one finishes.
|
||||
state.videoElement.addEventListener('ended', playNextVideo);
|
||||
|
||||
// Start the animation loop
|
||||
animate();
|
||||
|
||||
@ -69,7 +69,7 @@ export class PartyGuests extends SceneFeature {
|
||||
const pos = new THREE.Vector3(
|
||||
(Math.random() - 0.5) * 10,
|
||||
guestHeight / 2,
|
||||
(Math.random() * 20) - 12 // Position them in the main hall
|
||||
(Math.random() * 20) - 6 // Position them in the main hall
|
||||
);
|
||||
guest.position.copy(pos);
|
||||
state.scene.add(guest);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user