mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 13:37:44 +00:00
Base: Move all the HTML test content into /res/html/misc
This commit is contained in:
parent
4720635aab
commit
de12cf6821
58 changed files with 1 additions and 1 deletions
24
Base/res/html/misc/raf.html
Normal file
24
Base/res/html/misc/raf.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head><title>rAF test</title></head>
|
||||
<body>
|
||||
<canvas id=c width=300 height=300></canvas>
|
||||
<script>
|
||||
c = document.getElementById('c');
|
||||
x = c.getContext("2d");
|
||||
x.fillStyle = 'black';
|
||||
x.fillRect(0, 0, c.width, c.height);
|
||||
function raf() {
|
||||
x.fillStyle = 'red';
|
||||
x.fillRect(
|
||||
Math.random() * c.width,
|
||||
Math.random() * c.height,
|
||||
Math.random() * 10,
|
||||
Math.random() * 10
|
||||
);
|
||||
requestAnimationFrame(raf);
|
||||
}
|
||||
requestAnimationFrame(raf);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue