-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3e8374b
commit 5692f2c
Showing
1 changed file
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Browser Challenge</title> | ||
<style> | ||
/* Complex Grid Layout */ | ||
body { | ||
display: grid; | ||
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); | ||
gap: 10px; | ||
margin: 0; | ||
height: 100vh; | ||
overflow: auto; | ||
} | ||
|
||
/* Animations and Transitions */ | ||
div { | ||
transition: all 0.5s ease; | ||
} | ||
|
||
/* 3D Transformations */ | ||
canvas { | ||
transform: perspective(600px) rotateY(45deg) rotateX(45deg); | ||
width: 100%; | ||
height: 300px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="dynamic-content"></div> | ||
<canvas id="graphics-canvas"></canvas> | ||
|
||
<script> | ||
// Heavy DOM Manipulations | ||
function changeDOM() { | ||
const content = document.getElementById('dynamic-content'); | ||
for (let i = 0; i < 100; i++) { | ||
const div = document.createElement('div'); | ||
div.innerText = 'New Element ' + i; | ||
content.appendChild(div); | ||
} | ||
} | ||
setInterval(changeDOM, 1000); | ||
|
||
// Intensive JavaScript Computations | ||
function heavyComputation() { | ||
function fibonacci(num) { | ||
if (num <= 1) return 1; | ||
return fibonacci(num - 1) + fibonacci(num - 2); | ||
} | ||
console.log(fibonacci(30)); | ||
} | ||
setInterval(heavyComputation, 2000); | ||
|
||
// High-Quality Graphics Rendering | ||
function renderGraphics() { | ||
const canvas = document.getElementById('graphics-canvas'); | ||
if (canvas.getContext) { | ||
const ctx = canvas.getContext('2d'); | ||
ctx.clearRect(0, 0, canvas.width, canvas.height); // Clear previous drawing | ||
ctx.beginPath(); | ||
ctx.arc(95, 50, 40, 0, 2 * Math.PI); | ||
ctx.stroke(); | ||
} | ||
} | ||
setInterval(renderGraphics, 100); | ||
|
||
// Network Stress Test | ||
function loadImages() { | ||
for (let i = 0; i < 50; i++) { | ||
const img = new Image(); | ||
img.src = 'https://placekitten.com/200/300?image=' + i; | ||
document.body.appendChild(img); | ||
} | ||
} | ||
loadImages(); | ||
</script> | ||
</body> | ||
</html> |