Compare commits
2 Commits
f9d4b365e0
...
4e6209678a
| Author | SHA1 | Date | |
|---|---|---|---|
| 4e6209678a | |||
| 9b1a8b4426 |
@ -9,3 +9,22 @@ function forgetMe(){
|
|||||||
document.cookie = "username=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"
|
document.cookie = "username=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"
|
||||||
console.log("Poof!...");
|
console.log("Poof!...");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getCookie(cname) {
|
||||||
|
let name = cname + "=";
|
||||||
|
let decodedCookie = decodeURIComponent(document.cookie);
|
||||||
|
let ca = decodedCookie.split(';');
|
||||||
|
for(let i = 0; i <ca.length; i++) {
|
||||||
|
let c = ca[i];
|
||||||
|
while (c.charAt(0) == ' ') {
|
||||||
|
c = c.substring(1);
|
||||||
|
}
|
||||||
|
if (c.indexOf(name) == 0) {
|
||||||
|
return c.substring(name.length, c.length);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
let decodedCookie = getCookie("username") + " ";
|
||||||
|
document.getElementById("introtitle").textContent = "Welcome " + decodedCookie + "to the Void System"
|
||||||
@ -1,48 +0,0 @@
|
|||||||
var bg = document.getElementById("backgroundSim")
|
|
||||||
var ctx = bg.getContext("2d");
|
|
||||||
ctx.canvas.width = window.screen.availWidth;
|
|
||||||
ctx.canvas.height = window.screen.availHeight;
|
|
||||||
rock = new Image();
|
|
||||||
rock.src = "/media/Art/Rock1.png";
|
|
||||||
|
|
||||||
|
|
||||||
var resolutionTag = document.getElementById("resolutionTag");
|
|
||||||
resolutionTag.textContent = "document: " + window.screen.availWidth + "x" + window.screen.availHeight + ", inner window: " + window.innerWidth + "x" + window.innerHeight;
|
|
||||||
|
|
||||||
function drawCircle(x, y, r){
|
|
||||||
ctx.beginPath();
|
|
||||||
ctx.arc(x, y, r, 0, 2*Math.PI)
|
|
||||||
ctx.stroke();
|
|
||||||
}
|
|
||||||
|
|
||||||
particle = {
|
|
||||||
x: 20,
|
|
||||||
y: 20,
|
|
||||||
r: 10,
|
|
||||||
vx: 0.01,
|
|
||||||
vy: 0.01,
|
|
||||||
update: function(){
|
|
||||||
self.x += self.vx;
|
|
||||||
self.y += self.vy;
|
|
||||||
},
|
|
||||||
draw: function(){
|
|
||||||
ctx.drawImage(rock, self.x, self.y);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
rock.onload = function(){
|
|
||||||
let i = 0;
|
|
||||||
while (i < 25){
|
|
||||||
ctx.drawImage(rock, Math.random(1)*ctx.canvas.height,Math.random(1)*ctx.canvas.height);
|
|
||||||
i += 1;
|
|
||||||
}
|
|
||||||
particle.draw();
|
|
||||||
}
|
|
||||||
|
|
||||||
function Populate(){
|
|
||||||
let particle
|
|
||||||
}
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user