Update details 2
This commit is contained in:
parent
b062c6766d
commit
856f78a4c1
5 changed files with 17 additions and 7 deletions
|
|
@ -308,6 +308,11 @@
|
||||||
</div>
|
</div>
|
||||||
<script src="src/scripts/updateFragment.js"></script>
|
<script src="src/scripts/updateFragment.js"></script>
|
||||||
<script src="src/scripts/accessibility.js"></script>
|
<script src="src/scripts/accessibility.js"></script>
|
||||||
|
<script>
|
||||||
|
window.onresize = () => {
|
||||||
|
onresizeAccessibility();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,11 @@ if (window.sessionStorage.getItem('isZoom') == 'true') {
|
||||||
const sound = document.querySelector("#sound")
|
const sound = document.querySelector("#sound")
|
||||||
zoom.style.right = "5px";
|
zoom.style.right = "5px";
|
||||||
sound.style.top = "85px";
|
sound.style.top = "85px";
|
||||||
|
} else {
|
||||||
|
const zoom = document.querySelector("#zoom")
|
||||||
|
const sound = document.querySelector("#sound")
|
||||||
|
zoom.style.right = "";
|
||||||
|
sound.style.top = "";
|
||||||
}
|
}
|
||||||
isZoomed = true;
|
isZoomed = true;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -46,8 +46,8 @@ var render = Render.create({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
var ceiling = Bodies.rectangle(render.canvas.width/2, 0, render.canvas.width, 120, { isStatic: true, friction:0, restitution:10});
|
var ceiling = Bodies.rectangle(render.canvas.width/2, 0, render.canvas.width, 120, { isStatic: true, friction:0, restitution:10});
|
||||||
var leftWall = Bodies.rectangle(0, window.innerHeight/2, 5, window.innerHeight, { isStatic: true, friction:0, restitution:10});
|
var leftWall = Bodies.rectangle(10, window.innerHeight/2, 60, window.innerHeight*5, { isStatic: true, friction:0, restitution:10});
|
||||||
var rightWall = Bodies.rectangle(render.canvas.width, (window.innerHeight/2)-60, 5, window.innerHeight, { isStatic: true, friction:0, restitution:10}); //update
|
var rightWall = Bodies.rectangle(canvasWidth-10, (window.innerHeight/2)-60, 5, window.innerHeight*5, { isStatic: true, friction:0, restitution:10}); //update
|
||||||
var floor = Bodies.rectangle(render.canvas.width/2, window.innerHeight-20, render.canvas.width, 240, { isStatic: true, friction:0, restitution:10});
|
var floor = Bodies.rectangle(render.canvas.width/2, window.innerHeight-20, render.canvas.width, 240, { isStatic: true, friction:0, restitution:10});
|
||||||
|
|
||||||
let maxY = 0;
|
let maxY = 0;
|
||||||
|
|
@ -133,11 +133,11 @@ setInterval(()=>{
|
||||||
maxY = bodies.sort((a, b) => (b.position.y - a.position.y))[0].position.y;
|
maxY = bodies.sort((a, b) => (b.position.y - a.position.y))[0].position.y;
|
||||||
if (maxY < getDocumentHeight()) return;
|
if (maxY < getDocumentHeight()) return;
|
||||||
|
|
||||||
render.canvas.height = Math.max(window.innerHeight, maxY + 600);
|
render.canvas.height = Math.max(window.innerHeight, maxY + 1000);
|
||||||
document.querySelector('#authors').style.height = render.canvas.height;
|
document.querySelector('#authors').style.height = render.canvas.height;
|
||||||
|
|
||||||
if(leftWall.position.y+window.innerHeight/2 <getDocumentHeight()){
|
if(leftWall.position.y+window.innerHeight/2 <getDocumentHeight()){
|
||||||
leftWall = Bodies.rectangle(0, leftWall.position.y + render.canvas.width, 60, window.innerHeight, { isStatic: true });
|
leftWall = Bodies.rectangle(0, leftWall.position.y + render.canvas.width, 100, window.innerHeight, { isStatic: true });
|
||||||
rightWall = Bodies.rectangle(render.canvas.width, rightWall.position.y + window.innerHeight, 60, window.innerHeight, { isStatic: true }); //update
|
rightWall = Bodies.rectangle(render.canvas.width, rightWall.position.y + window.innerHeight, 60, window.innerHeight, { isStatic: true }); //update
|
||||||
World.add(engine.world, [leftWall, rightWall]);
|
World.add(engine.world, [leftWall, rightWall]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -57,8 +57,8 @@ var render = Render.create({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
var ceiling = Bodies.rectangle(render.canvas.width/2, 0, render.canvas.width, 120, { isStatic: true, friction:0, restitution:0.5 });
|
var ceiling = Bodies.rectangle(render.canvas.width/2, 0, render.canvas.width, 120, { isStatic: true, friction:0, restitution:0.5 });
|
||||||
var leftWall = Bodies.rectangle(0, window.innerHeight/2, 60, window.innerHeight, { isStatic: true, friction:0, restitution:0.5 });
|
var leftWall = Bodies.rectangle(10, window.innerHeight/2, 60, window.innerHeight, { isStatic: true, friction:0, restitution:0.5 });
|
||||||
var rightWall = Bodies.rectangle(render.canvas.width, window.innerHeight/2, 60, window.innerHeight, { isStatic: true, friction:0, restitution:0.5 }); //update
|
var rightWall = Bodies.rectangle(render.canvas.width-10, window.innerHeight/2, 60, window.innerHeight, { isStatic: true, friction:0, restitution:0.5 }); //update
|
||||||
var title = Bodies.rectangle(render.canvas.width/2, 0, 300, 200, { isStatic: true, friction:0, restitution:0.5 });
|
var title = Bodies.rectangle(render.canvas.width/2, 0, 300, 200, { isStatic: true, friction:0, restitution:0.5 });
|
||||||
var timeline = Bodies.rectangle(render.canvas.width-60, window.innerHeight-150, 150, 150, { isStatic: true, friction:0, restitution:0.5 });
|
var timeline = Bodies.rectangle(render.canvas.width-60, window.innerHeight-150, 150, 150, { isStatic: true, friction:0, restitution:0.5 });
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -225,7 +225,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** pc *****/
|
/***** pc *****/
|
||||||
@media ( min-width: 780px ) {
|
@media ( min-width: 1080px ) {
|
||||||
|
|
||||||
/* MENU */
|
/* MENU */
|
||||||
#menu {
|
#menu {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue