Added posts & fixed pages

This commit is contained in:
gltron
2022-04-19 19:35:33 +02:00
parent 3d6e616d1a
commit 5df89aad65
8 changed files with 51 additions and 21 deletions

View File

@@ -0,0 +1,15 @@
---
title: Out Of Quiz
tags: rust vanillaJS jeu
date: 2022-01-01
yearonly: true
url: quiz.html
---
![Logo of Out Of Quiz](/img/projets/quiz_logo.webp)
git: [git.gltronic.ovh/gltron/OutOfQuiz](https://git.gltronic.ovh/gltron/OutOfQuiz)
app: [quiz.gltronic.ovh](https://quiz.gltronic.ovh/)
Out Of Quiz est un jeu multijoueur de type quiz de vitesse, basé sur le Out Of Context d'un serveur Discord

View File

@@ -0,0 +1,15 @@
---
title: Deep Impact
tags: vanillaJS jeu
date: 2022-02-01
yearonly: true
url: impact.html
---
![Logo of Deep Impact](/img/projets/impact_logo.webp)
git: [git.gltronic.ovh/gltron/DeepImpact](https://git.gltronic.ovh/gltron/DeepImpact)
app: [impact.gltronic.ovh](https://impact.gltronic.ovh/)
Deep Impact est un missile command musical

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -15,6 +15,7 @@ let incrementer = 0.01;
let reverse = false; let reverse = false;
const rotationSpeed = 0.001; const rotationSpeed = 0.001;
const orbitRadius = 1; const orbitRadius = 1;
let lastRender = 0
// Helper // Helper
function setupContainer (container) { function setupContainer (container) {
@@ -84,8 +85,6 @@ async function initModels() {
modelMoon.castShadow = true; modelMoon.castShadow = true;
modelMoon.receiveShadow = true; modelMoon.receiveShadow = true;
scene.add(modelMoon); scene.add(modelMoon);
animateScene();
} }
// Animation // Animation
@@ -106,17 +105,21 @@ function easeInOut() {
}; };
function animateScene() { function animateScene() {
if ((performance.now() - lastRender) > (1000 / 60)) {
modelPlanet.position.set(1, easeInOut() / 4 + 0.5, 0);
modelPlanet.rotation.y += rotationSpeed;
// const x = Math.cos(incrementer) * orbitRadius;
// const z = Math.sin(incrementer) * orbitRadius;
modelMoon.position.set(0, 1 - easeInOut() - 2, 0);
modelMoon.rotation.y -= rotationSpeed + 0.01;
renderer.render(scene, camera);
}
requestAnimationFrame(animateScene); requestAnimationFrame(animateScene);
modelPlanet.position.set(1, easeInOut() / 4 + 0.5, 0);
modelPlanet.rotation.y += rotationSpeed;
// const x = Math.cos(incrementer) * orbitRadius;
// const z = Math.sin(incrementer) * orbitRadius;
modelMoon.position.set(0, 1 - easeInOut() - 2, 0);
modelMoon.rotation.y -= rotationSpeed + 0.01;
renderer.render(scene, camera);
} }
// Main // Main
@@ -124,6 +127,7 @@ export function init() {
initScene(); initScene();
initLights(); initLights();
initModels(); initModels();
animateScene();
} }
init(); init();

View File

@@ -7,7 +7,5 @@
{{> submenu}} {{> submenu}}
{{> article}} {{> article}}
</div> </div>
<div id="background" class="background"></div>
</body> </body>
<script src="/js/main.js" type="module"></script>
</html> </html>

View File

@@ -7,11 +7,10 @@
<a href="/"> <a href="/">
<video class="avatar" src="/img/avatar_animated2.webm" loop="loop" autoplay="autoplay"></video> <video class="avatar" src="/img/avatar_animated2.webm" loop="loop" autoplay="autoplay"></video>
<ul> <ul>
<li><a href="https://gltronic.ovh/blog/index.html">Blog</a></li>
<li><a href="https://gltronic.ovh/projets/index.html">Projets</a></li> <li><a href="https://gltronic.ovh/projets/index.html">Projets</a></li>
<li><a href="https://gltronic.ovh/artworks/index.html">Artworks</a></li> <li><a href="https://gltronic.ovh/artworks/index.html">Artworks</a></li>
<li><a href="https://git.gltronic.ovh/">git</a></li> <li><a href="https://gltronic.ovh/blog/index.html">Blog</a></li>
<li><a href="https://drop.gltronic.ovh/">drop</a></li> <li><a href="https://git.gltronic.ovh/">Git</a></li>
<li><a href="https://gltronic.ovh/about.html">?</a></li> <li><a href="https://gltronic.ovh/about.html">?</a></li>
</ul> </ul>
</a> </a>
@@ -22,5 +21,5 @@
<footer style="position:fixed"> <footer style="position:fixed">
<a class="footer" href="/">gltronic - 2021</a> <a class="footer" href="/">gltronic - 2021</a>
</footer> </footer>
<script src="/js/main.js" type="module"></script> <script src="js/main.js" type="module"></script>
</html> </html>

View File

@@ -2,11 +2,10 @@
<a href="/"> <a href="/">
<video class="avatar" src="/img/avatar_animated2.webm" loop="loop" autoplay="autoplay"></video> <video class="avatar" src="/img/avatar_animated2.webm" loop="loop" autoplay="autoplay"></video>
<ul> <ul>
<li><a href="https://gltronic.ovh/blog/index.html">Blog</a></li>
<li><a href="https://gltronic.ovh/projets/index.html">Projets</a></li> <li><a href="https://gltronic.ovh/projets/index.html">Projets</a></li>
<li><a href="https://gltronic.ovh/artworks/index.html">Artworks</a></li> <li><a href="https://gltronic.ovh/artworks/index.html">Artworks</a></li>
<li><a href="https://git.gltronic.ovh/">git</a></li> <li><a href="https://gltronic.ovh/blog/index.html">Blog</a></li>
<li><a href="https://drop.gltronic.ovh/">drop</a></li> <li><a href="https://git.gltronic.ovh/">Git</a></li>
<li><a href="https://gltronic.ovh/about.html">?</a></li> <li><a href="https://gltronic.ovh/about.html">?</a></li>
</ul> </ul>
</a> </a>