From 206f3e23f5c1967b536b52d414baf231f4ab269d Mon Sep 17 00:00:00 2001 From: Sokhibjon Orzikulov Date: Mon, 24 Jun 2024 14:41:58 +0500 Subject: [PATCH] auto load --- index.html | 4 ++-- libs/personal/animation.js | 25 ++++++++++--------------- styles/priority.css | 6 ++++-- 3 files changed, 16 insertions(+), 19 deletions(-) diff --git a/index.html b/index.html index 756a4db..02fc3db 100644 --- a/index.html +++ b/index.html @@ -13,12 +13,12 @@
- +
You trying to access restricted area!
This is global point for - orzklv's + orzklv's personal internet space.
However, you may enjoy Hatsune Miku dance while being here. diff --git a/libs/personal/animation.js b/libs/personal/animation.js index 6d1271f..07e804f 100644 --- a/libs/personal/animation.js +++ b/libs/personal/animation.js @@ -3,21 +3,11 @@ import { OutlineEffect } from "three/addons/effects/OutlineEffect.js"; import { MMDLoader } from "three/addons/loaders/MMDLoader.js"; import { MMDAnimationHelper } from "three/addons/animation/MMDAnimationHelper.js"; -let mesh, camera, scene, renderer, effect; -let helper; - +let mesh, camera, scene, renderer, effect, helper; let ready = false; const clock = new THREE.Clock(); -// const loadingButton = document.getElementById("loadingButton"); -// loadingButton.addEventListener("click", function () { -// Ammo().then(function () { -// init(); -// animate(); -// }); -// }); - function init() { const overlay = document.getElementById("overlay"); // overlay.remove(); @@ -126,10 +116,17 @@ function init() { // Remove the overlay overlay.remove(); + expose(); window.addEventListener("resize", onWindowResize); } +function expose() { + document.body.style.color = "#d5d5d5"; + const anchor = document.getElementById("anchor"); + anchor.style.color = "#08f"; +} + function onWindowResize() { camera.aspect = window.innerWidth / window.innerHeight; camera.updateProjectionMatrix(); @@ -137,7 +134,7 @@ function onWindowResize() { effect.setSize(window.innerWidth, window.innerHeight); } -// +// Animation loop function animate() { requestAnimationFrame(animate); @@ -152,10 +149,8 @@ function render() { effect.render(scene, camera); } -console.log("Animation loaded!"); - // Automatically start the animation Ammo().then(function () { init(); animate(); -}); \ No newline at end of file +}); diff --git a/styles/priority.css b/styles/priority.css index be68ee7..24562f0 100644 --- a/styles/priority.css +++ b/styles/priority.css @@ -1,8 +1,10 @@ body { - color: #d5d5d5; + /* #d5d5d5 */ + color: #000; background: #000; } a { - color: #08f; + /* #08f */ + color: #000; }