Skip to content

Commit 38a92a6

Browse files
committedApr 14, 2020
first commit
0 parents  commit 38a92a6

33 files changed

+267
-0
lines changed
 

‎README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Patatap-Deployable

‎howler.min.js

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎index.html

+211
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,211 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Patatap</title>
5+
<script type="text/javascript" src="paper-full.min.js"></script>
6+
<script type="text/javascript" src="howler.min.js"></script>
7+
<link rel="stylesheet" type="text/css" href="Patatap.css">
8+
<style>
9+
canvas {
10+
width: 100%;
11+
height: 100%;
12+
background: black;
13+
}
14+
15+
body, html {
16+
height: 100%;
17+
margin: 0;
18+
}
19+
</style>
20+
<script type="text/paperscript" canvas="myCanvas">
21+
var keyData = {
22+
q: {
23+
sound: new Howl({
24+
src: ['sounds/bubbles.mp3']
25+
}),
26+
color: '#1abc9c'
27+
},
28+
w: {
29+
sound: new Howl({
30+
src: ['sounds/clay.mp3']
31+
}),
32+
color: '#2ecc71'
33+
},
34+
e: {
35+
sound: new Howl({
36+
src: ['sounds/confetti.mp3']
37+
}),
38+
color: '#3498db'
39+
},
40+
r: {
41+
sound: new Howl({
42+
src: ['sounds/corona.mp3']
43+
}),
44+
color: '#9b59b6'
45+
},
46+
t: {
47+
sound: new Howl({
48+
src: ['sounds/dotted-spiral.mp3']
49+
}),
50+
color: '#34495e'
51+
},
52+
y: {
53+
sound: new Howl({
54+
src: ['sounds/flash-1.mp3']
55+
}),
56+
color: '#16a085'
57+
},
58+
u: {
59+
sound: new Howl({
60+
src: ['sounds/flash-2.mp3']
61+
}),
62+
color: '#27ae60'
63+
},
64+
i: {
65+
sound: new Howl({
66+
src: ['sounds/flash-3.mp3']
67+
}),
68+
color: '#2980b9'
69+
},
70+
o: {
71+
sound: new Howl({
72+
src: ['sounds/glimmer.mp3']
73+
}),
74+
color: '#8e44ad'
75+
},
76+
p: {
77+
sound: new Howl({
78+
src: ['sounds/moon.mp3']
79+
}),
80+
color: '#2c3e50'
81+
},
82+
a: {
83+
sound: new Howl({
84+
src: ['sounds/pinwheel.mp3']
85+
}),
86+
color: '#f1c40f'
87+
},
88+
s: {
89+
sound: new Howl({
90+
src: ['sounds/piston-1.mp3']
91+
}),
92+
color: '#e67e22'
93+
},
94+
d: {
95+
sound: new Howl({
96+
src: ['sounds/piston-2.mp3']
97+
}),
98+
color: '#e74c3c'
99+
},
100+
f: {
101+
sound: new Howl({
102+
src: ['sounds/prism-1.mp3']
103+
}),
104+
color: '#95a5a6'
105+
},
106+
g: {
107+
sound: new Howl({
108+
src: ['sounds/prism-2.mp3']
109+
}),
110+
color: '#f39c12'
111+
},
112+
h: {
113+
sound: new Howl({
114+
src: ['sounds/prism-3.mp3']
115+
}),
116+
color: '#d35400'
117+
},
118+
j: {
119+
sound: new Howl({
120+
src: ['sounds/splits.mp3']
121+
}),
122+
color: '#1abc9c'
123+
},
124+
k: {
125+
sound: new Howl({
126+
src: ['sounds/squiggle.mp3']
127+
}),
128+
color: '#2ecc71'
129+
},
130+
l: {
131+
sound: new Howl({
132+
src: ['sounds/strike.mp3']
133+
}),
134+
color: '#3498db'
135+
},
136+
z: {
137+
sound: new Howl({
138+
src: ['sounds/suspension.mp3']
139+
}),
140+
color: '#9b59b6'
141+
},
142+
x: {
143+
sound: new Howl({
144+
src: ['sounds/timer.mp3']
145+
}),
146+
color: '#34495e'
147+
},
148+
c: {
149+
sound: new Howl({
150+
src: ['sounds/ufo.mp3']
151+
}),
152+
color: '#16a085'
153+
},
154+
v: {
155+
sound: new Howl({
156+
src: ['sounds/veil.mp3']
157+
}),
158+
color: '#27ae60'
159+
},
160+
b: {
161+
sound: new Howl({
162+
src: ['sounds/wipe.mp3']
163+
}),
164+
color: '#2980b9'
165+
},
166+
n: {
167+
sound: new Howl({
168+
src: ['sounds/zig-zag.mp3']
169+
}),
170+
color: '#8e44ad'
171+
},
172+
m: {
173+
sound: new Howl({
174+
src: ['sounds/moon.mp3']
175+
}),
176+
color: '#2c3e50'
177+
}
178+
}
179+
180+
var circles = [];
181+
182+
function onKeyDown(event) {
183+
if(keyData[event.key]){
184+
var maxPoint = new Point(view.size.width, view.size.height);
185+
var randomPoint = Point.random();
186+
var point = maxPoint * randomPoint;
187+
var newCircle = new Path.Circle(point, 500)
188+
newCircle.fillColor = keyData[event.key].color;
189+
keyData[event.key].sound.play();
190+
circles.push(newCircle);
191+
}
192+
}
193+
194+
function onFrame(event){
195+
for(var i = 0; i < circles.length; i++){
196+
circles[i].fillColor.hue += 1;
197+
circles[i].scale(.9);
198+
if(circles[i].area < 1){
199+
console.log(circles[i]);
200+
circles[i].remove();
201+
circles.splice(i,1);
202+
i--;
203+
}
204+
}
205+
}
206+
</script>
207+
</head>
208+
<body>
209+
<canvas id="myCanvas" resize></canvas>
210+
</body>
211+
</html>

‎jquery-3.2.1.min.js

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎paper-full.min.js

+39
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎sounds/.DS_Store

8 KB
Binary file not shown.

‎sounds/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Neuronal Synchrony
2+
==================
3+
4+
A collection of two dimensional animations that are triggered by sound.
5+
6+
(c) 2012 - 2013 [jonobr1](http://jonobr1.com/). Freely distributed under the [MIT License](http://opensource.org/licenses/MIT).
7+
8+
Prototyped with [Processing](http://processing.org/), built with [JavaScript](http://jonobr1.github.com/two.js).

‎sounds/bubbles.mp3

42 KB
Binary file not shown.

‎sounds/clay.mp3

42 KB
Binary file not shown.

‎sounds/confetti.mp3

42 KB
Binary file not shown.

‎sounds/corona.mp3

41 KB
Binary file not shown.

‎sounds/dotted-spiral.mp3

60.4 KB
Binary file not shown.

‎sounds/flash-1.mp3

23.1 KB
Binary file not shown.

‎sounds/flash-2.mp3

6.8 KB
Binary file not shown.

‎sounds/flash-3.mp3

11.4 KB
Binary file not shown.

‎sounds/glimmer.mp3

42 KB
Binary file not shown.

‎sounds/moon.mp3

26.2 KB
Binary file not shown.

‎sounds/pinwheel.mp3

42 KB
Binary file not shown.

‎sounds/piston-1.mp3

11.4 KB
Binary file not shown.

‎sounds/piston-2.mp3

21.1 KB
Binary file not shown.

‎sounds/piston-3.mp3

21.1 KB
Binary file not shown.

‎sounds/prism-1.mp3

41 KB
Binary file not shown.

‎sounds/prism-2.mp3

42 KB
Binary file not shown.

‎sounds/prism-3.mp3

41 KB
Binary file not shown.

‎sounds/splits.mp3

21.1 KB
Binary file not shown.

‎sounds/squiggle.mp3

36.4 KB
Binary file not shown.

‎sounds/strike.mp3

21.1 KB
Binary file not shown.

‎sounds/suspension.mp3

42 KB
Binary file not shown.

‎sounds/timer.mp3

30.8 KB
Binary file not shown.

‎sounds/ufo.mp3

30.8 KB
Binary file not shown.

‎sounds/veil.mp3

21.1 KB
Binary file not shown.

‎sounds/wipe.mp3

41 KB
Binary file not shown.

‎sounds/zig-zag.mp3

30.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)