Browse Source

now relative to window for better embedding

master
Victor Giers 3 years ago
parent
commit
c7cf960b02
1 changed files with 8 additions and 8 deletions
  1. 8
    8
      save-the-earth.js

+ 8
- 8
save-the-earth.js View File

@@ -1,10 +1,3 @@
function preload() {
levelSound = loadSound('sound.ogg');
img = loadImage('Golden-Round-Frame-PNG.png');
imgMask = loadImage('mask.png');

earthVideo = createVideo(['video.webm']);
}
var img, imgMask;
var earthVideo;
var levelSound;
@@ -17,6 +10,13 @@ var nullifyFill = 1;
var rotator = 0;
var clicked = false;

function preload() {
levelSound = loadSound('sound.ogg');
img = loadImage('Golden-Round-Frame-PNG.png');
imgMask = loadImage('mask.png');
earthVideo = createVideo(['video.webm']);
}

function mouseClicked() {
if(!clicked){
clicked = true;
@@ -27,7 +27,7 @@ function mouseClicked() {
}

function setup() {
frameSize = min(parent.innerWidth, parent.innerHeight);
frameSize = min(window.innerWidth, window.innerHeight);
//createCanvas(window.innerWidth,window.innerHeight);
createCanvas(frameSize,frameSize);
frameRate(30);

Loading…
Cancel
Save