Skip to content

Commit

Permalink
[HTML] Prevent HTML examples from refreshing webpage on scrolling.
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasBanana committed Oct 19, 2024
1 parent 161f89f commit beaa19d
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 16 deletions.
6 changes: 4 additions & 2 deletions docu/WebPage/Example_Animation/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>LLGL - Animation</title>
<style>
canvas {
Expand All @@ -14,6 +13,9 @@
width: min(100%, 98vh * 4 / 3);
aspect-ratio: 4 / 3;
}
body {
overscroll-behavior: none
}
</style>
</head>
<body>
Expand All @@ -23,7 +25,7 @@
</div>

<!-- Define module to allow C++ code to access the canvas element -->
<script type="text/javascript">
<script>
var Module = {
print: function() {
var e = document.getElementById("output");
Expand Down
6 changes: 4 additions & 2 deletions docu/WebPage/Example_Fonts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>LLGL - Fonts</title>
<style>
canvas {
Expand All @@ -14,6 +13,9 @@
width: min(100%, 98vh * 4 / 3);
aspect-ratio: 4 / 3;
}
body {
overscroll-behavior: none
}
</style>
</head>
<body>
Expand All @@ -23,7 +25,7 @@
</div>

<!-- Define module to allow C++ code to access the canvas element -->
<script type="text/javascript">
<script>
var Module = {
print: function() {
var e = document.getElementById("output");
Expand Down
6 changes: 4 additions & 2 deletions docu/WebPage/Example_HelloGame/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>LLGL - HelloGame</title>
<style>
canvas {
Expand All @@ -14,6 +13,9 @@
width: min(100%, 98vh * 4 / 3);
aspect-ratio: 4 / 3;
}
body {
overscroll-behavior: none
}
</style>
</head>
<body>
Expand All @@ -23,7 +25,7 @@
</div>

<!-- Define module to allow C++ code to access the canvas element -->
<script type="text/javascript">
<script>
var Module = {
print: function() {
var e = document.getElementById("output");
Expand Down
6 changes: 4 additions & 2 deletions docu/WebPage/Example_PostProcessing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>LLGL - PostProcessing</title>
<style>
canvas {
Expand All @@ -14,6 +13,9 @@
width: min(100%, 98vh * 4 / 3);
aspect-ratio: 4 / 3;
}
body {
overscroll-behavior: none
}
</style>
</head>
<body>
Expand All @@ -23,7 +25,7 @@
</div>

<!-- Define module to allow C++ code to access the canvas element -->
<script type="text/javascript">
<script>
var Module = {
print: function() {
var e = document.getElementById("output");
Expand Down
6 changes: 4 additions & 2 deletions docu/WebPage/Example_RenderTarget/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>LLGL - RenderTarget</title>
<style>
canvas {
Expand All @@ -14,6 +13,9 @@
width: min(100%, 98vh * 4 / 3);
aspect-ratio: 4 / 3;
}
body {
overscroll-behavior: none
}
</style>
</head>
<body>
Expand All @@ -23,7 +25,7 @@
</div>

<!-- Define module to allow C++ code to access the canvas element -->
<script type="text/javascript">
<script>
var Module = {
print: function() {
var e = document.getElementById("output");
Expand Down
6 changes: 4 additions & 2 deletions docu/WebPage/Example_ShadowMapping/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>LLGL - ShadowMapping</title>
<style>
canvas {
Expand All @@ -14,6 +13,9 @@
width: min(100%, 98vh * 4 / 3);
aspect-ratio: 4 / 3;
}
body {
overscroll-behavior: none
}
</style>
</head>
<body>
Expand All @@ -23,7 +25,7 @@
</div>

<!-- Define module to allow C++ code to access the canvas element -->
<script type="text/javascript">
<script>
var Module = {
print: function() {
var e = document.getElementById("output");
Expand Down
6 changes: 4 additions & 2 deletions docu/WebPage/Example_StencilBuffer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>LLGL - StencilBuffer</title>
<style>
canvas {
Expand All @@ -14,6 +13,9 @@
width: min(100%, 98vh * 4 / 3);
aspect-ratio: 4 / 3;
}
body {
overscroll-behavior: none
}
</style>
</head>
<body>
Expand All @@ -23,7 +25,7 @@
</div>

<!-- Define module to allow C++ code to access the canvas element -->
<script type="text/javascript">
<script>
var Module = {
print: function() {
var e = document.getElementById("output");
Expand Down
6 changes: 4 additions & 2 deletions docu/WebPage/Example_Texturing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>LLGL - Texturing</title>
<style>
canvas {
Expand All @@ -14,6 +13,9 @@
width: min(100%, 98vh * 4 / 3);
aspect-ratio: 4 / 3;
}
body {
overscroll-behavior: none
}
</style>
</head>
<body>
Expand All @@ -23,7 +25,7 @@
</div>

<!-- Define module to allow C++ code to access the canvas element -->
<script type="text/javascript">
<script>
var Module = {
print: function() {
var e = document.getElementById("output");
Expand Down

0 comments on commit beaa19d

Please sign in to comment.