Skip to content

Commit 4a0b005

Browse files
committed
adding set invert etc
1 parent 0d00c6e commit 4a0b005

File tree

7 files changed

+32
-4
lines changed

7 files changed

+32
-4
lines changed

public/library/.DS_Store

0 Bytes
Binary file not shown.

public/scripts/library.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,19 @@ var library = {
1010

1111
video: {
1212

13+
island:
14+
[
15+
"cell",
16+
"habClips",
17+
"showcase",
18+
"peluzah",
19+
"island",
20+
"cellar",
21+
"habitus",
22+
"dusty"
23+
24+
],
25+
1326
games:
1427
[
1528
"pong",

public/scripts/sets.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
var sets = [
2+
{name: 'island', type: 'video'},
23
{name: 'games', type: 'video'},
34
{name: 'abstract', type: 'video'},
45
{name: 'cartoons1', type: 'video'},

public/scripts/visualFuncs.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,19 @@ function reqAnim() {
4949

5050
var mixData = adjustFreqData(12);
5151

52+
if ( (d3.quantile(mixData, 0.75)) > 110 ) {
53+
console.log(d3.quantile(mixData, 0.75));
54+
videoEls[0].style.filter = 'invert(100%)';
55+
videoEls[1].style.filter = 'invert(100%)';
56+
svgEls[0].style.backgroundColor = 'white';
57+
svgEls[1].style.backgroundColor = 'white';
58+
} else {
59+
videoEls[0].style.filter = 'invert(0%) contrast(120%) brightness(120%)';
60+
videoEls[1].style.filter = 'invert(0%) contrast(120%) brightness(120%)';
61+
svgEls[0].style.backgroundColor = 'transparent';
62+
svgEls[1].style.backgroundColor = 'transparent';
63+
}
64+
5265
for (var i=0; i<12; i++) {
5366
if (mixData[i] > threshold){
5467
if (i<6) {

public/styles/style.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/style.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ body {
5454
}
5555

5656
.video {display:none;}
57-
.video video {width:100%; height:auto;}
57+
.video video {
58+
width:100%; height:auto;
59+
filter: contrast(120%) brightness(120%);
60+
}
5861

5962
svg, canvas {
6063
width: 100vw;

views/auto.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@
8585

8686
changeVidSrc(videoEls[screenNo], 'library/'+currentSet.name+'/'+library.video[currentSet.name][assetCounter]+'.mp4');
8787

88-
console.log(library.video[currentSet.name][assetCounter]);
89-
9088
showVideo(vidScreens[screenNo], domScreens[screenNo]);
9189

9290

0 commit comments

Comments
 (0)