Skip to content

Commit

Permalink
Merge pull request #9 from flononymus/main
Browse files Browse the repository at this point in the history
updates monday morning
  • Loading branch information
flokleiser authored Feb 12, 2024
2 parents 1a25af2 + bcd11da commit f4efa29
Show file tree
Hide file tree
Showing 23 changed files with 341 additions and 186 deletions.
93 changes: 49 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,80 +13,85 @@ ___

### General to do:

- [ ] Better title image
- [ ] description of "click a button"
- [ ] Maybe short overview?

#### Audio

- [ ] Global button to enable/disable all sound
- [ ] "reset sound" button?

- [ ] Title screen --> maybe wind?

- [ ] soundscapes collection
- [x] Rain:
- [x] Cars Rain
- [x] Rain
- [x] Ambulance

- [x] ambient sound that loops: rain

- [ ] Day:
- [x] Birds
- [ ] Cars
- [ ] Footsteps
- [x] Cars
- [x] People chatter

- [x] ambient sound that loops: birds & chatter

- [ ] Evening:
- [x] Church bells
- [x] Remove fade out bells
- [ ] People chatter

- [ ] one ambient sound that loops: bells?
- [x] one ambient sound that loops: bells?

- [ ] Night:
- [ ] Cricket(?)
- [ ] Maybe some ambient music to underlay?

- [ ] one ambient sound that loops: night

- [ ] Global button to enable/disable all sound
- [ ] "reset sound" button?
- [ ] **Cricket(?)**
- [ ] **Maybe some ambient music to underlay?**
- [ ] **one ambient sound that loops: night**

#### Visual:

- [ ] Title
- [ ] Better title image
- [ ] description of "click a button"
- [ ] Maybe short overview?
- [ ] Hover tool tips?

- [ ] Finish all the details
- [x] maybe smaller birds
- [x] **Maybe shooting stars**
- [x] Maybe shooting stars
- [x] Fix plane trails?
- [x] toggle borealis automatically
- [x] Change chimney smoke color

- [ ] Fade outs:
- [ ] Plane trails
- [x] Fade out smoke
- [ ] Fade outs:
- [ ] Plane trails
- [x] Fade out smoke

- [ ] **Repeats**
- [ ] **Bird idle**
- [ ] Repeats
- [ ] Bird idle
- [ ] Windows

#### End product
- [ ] Tie everything together
- [ ] Figure out timings on automatic switching
- [x] Figure out when title
- [ ] Center canvas

- [x] Rain 
- [x] Loop rain
- [x] Loop clouds

- [ ] Day
- [ ] Loop birds
- [ ] Loop airplanes

- [ ] Evening
- [x] Loop Smoke chimneys
- [ ]

- [ ] Night
- [x] Occasionally turn on borealis
- [ ] Better night airplanes
- [x] Loop night airplanes

- [ ] Not done yet:

- [ ] Figure out constant animation speed?
- [ ] Figure out looping of functions
- [ ] Center canvas

- [ ] Loop birds day
- [ ] loop windows evening
- [ ] Maybe loop borealis
- [ ] Better night airplanes
- [ ] Loop night airplanes

- [ ] Done:
- [x] Figure out timings on automatic switching
- [x] Figure out when title
- [x] Rain 
- [x] Loop rain
- [x] Loop clouds
- [x] Day
- [x] Loop airplanes
- [x] Loop Smoke chimneys
- [x] Occasionally turn on borealis


### Ideas/Brainstorming

Expand Down
Binary file added audio/car test2.wav
Binary file not shown.
Binary file added audio/cricket test.wav
Binary file not shown.
Binary file removed audio/rest/birds test.wav
Binary file not shown.
Binary file removed audio/rest/rain + ambulance.m4a
Binary file not shown.
Binary file removed audio/rest/rain test 3.m4a
Binary file not shown.
Binary file removed audio/rest/rain test 4.m4a
Binary file not shown.
Binary file removed audio/rest/rain test cut .wav
Binary file not shown.
Binary file removed audio/rest/rain test.m4a
Binary file not shown.
Binary file removed audio/rest/rain test2.m4a
Binary file not shown.
Binary file removed audio/rest/rain test5.m4a
Binary file not shown.
Binary file removed audio/rest/windy.m4a
Binary file not shown.
4 changes: 3 additions & 1 deletion canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ imageDay.src = "images/test_day.png"

var imageClouds= new Image();
imageClouds.onload = function() {
drawImages(); toggleTitle();//drawTitle();
drawImages(); toggleTitle();
}
imageClouds.src = "images/test_clouds2.png"

Expand Down Expand Up @@ -192,6 +192,7 @@ function dayImage() {
drawImages();
loadBirdSound();
loadChatterSound();
loadCarSound();
// resetButton();
// setTimeout(function() {
// togglePlane();
Expand All @@ -211,6 +212,7 @@ function fullNight() {
resetToggles();
drawImages();
loadNightAmbienceSound();
loadCricketSound();
if (moonShown) {
return;
}
Expand Down
38 changes: 28 additions & 10 deletions effects/bird.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ var idleLanding = false;


var birdActive = false;
var birdCycleComplete = false;



var cols = 10;
var rows = 1;

Expand Down Expand Up @@ -109,6 +113,7 @@ yBirdIdle = (canvasBird.height/7) * 5.15 ;
yBirdLanding = (canvasBird.height/3) * 2
xBirdLanding = -10


// let targetXIdle = (canvasBird2.height/7) * 5.15;
// let targetYIdle = (canvasBird2.width/5)*2;

Expand All @@ -129,6 +134,10 @@ function toggleBird() {
landBird();
},9000)

// setTimeout(function() {
// repeatBirdCycle();
// },12000)

}
else {
ctxBird.clearRect(0,0,canvasBird.width,canvasBird.height);
Expand Down Expand Up @@ -180,10 +189,18 @@ function animateBird() {
xBird += birdSpeed;
yBird += birdHeight;

if (xBird < -30) {
setTimeout(() => {
xBird = canvasBird.width + 30;
yBird = canvasBird.height/2;
},5000)
}

framesDrawn++;
if (framesDrawn > 3) {
currentFrame++;
framesDrawn = 0;
// console.log(xBird)
}
}

Expand Down Expand Up @@ -241,8 +258,16 @@ function landBird() {
birdSpeedLanding = -1.5;
birdHeightLanding = -1;
birdFlyingRight.src = "images/birdPixelLeft.png"
},9000)

// },9000)
},6000)
}
// setTimeout(function() {
// birdCycleComplete = true;
// console.log
// repeatBirdCycle();
// // },10000)
// },7000)
}

function idleBird() {
Expand Down Expand Up @@ -272,14 +297,7 @@ function idleBird() {
if (xBirdIdle > canvasBird2.width + 30) {
birdIdleSpeed = 0;
birdIdleHeight = 0;
birdBackToIdle();
// birdBackToIdle();
}
}
}

function birdBackToIdle() {
ctxBird4.clearRect(0,0,canvasBird4.width,canvasBird4.height)

ctxBird3.drawImage(birdFlyingRight, srcXLanding, srcYLanding, spriteWidthLanding, spriteHeightLanding, xBirdLanding, yBirdLanding, spriteWidthLanding, spriteHeightLanding)
}

}
Loading

0 comments on commit f4efa29

Please sign in to comment.