mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Some minor changes in Satie example.
This commit is contained in:
parent
d176acfc53
commit
a678c51555
1 changed files with 3 additions and 4 deletions
|
@ -18,7 +18,6 @@
|
||||||
|
|
||||||
var amount = 8;
|
var amount = 8;
|
||||||
var step = view.size.width / (amount + 1);
|
var step = view.size.width / (amount + 1);
|
||||||
var scale = view.size.height / 1.5;
|
|
||||||
var flip = false;
|
var flip = false;
|
||||||
|
|
||||||
for (var i = 0; i <= amount; i++) {
|
for (var i = 0; i <= amount; i++) {
|
||||||
|
@ -41,15 +40,15 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function onKeyDown(event) {
|
function onKeyDown(event) {
|
||||||
if (event.key === 'space') {
|
if (event.key === 'space')
|
||||||
group.fullySelected = !group.fullySelected;
|
group.fullySelected = !group.fullySelected;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var audio, source, analyserL, analyserR, freqByteData;
|
var audio, source, analyserL, analyserR, freqByteData;
|
||||||
|
|
||||||
view.onFrame = function() {
|
view.onFrame = function() {
|
||||||
var step = view.size.width / (amount + 1);
|
var step = view.size.width / (amount + 1);
|
||||||
|
var scale = view.size.height / 1.5;
|
||||||
analyserL.getByteFrequencyData(freqByteData);
|
analyserL.getByteFrequencyData(freqByteData);
|
||||||
var leftBands = getEqualizerBands(freqByteData, true);
|
var leftBands = getEqualizerBands(freqByteData, true);
|
||||||
analyserR.getByteFrequencyData(freqByteData);
|
analyserR.getByteFrequencyData(freqByteData);
|
||||||
|
@ -133,7 +132,7 @@
|
||||||
}
|
}
|
||||||
return bands;
|
return bands;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<canvas id="canvas" resize></canvas>
|
<canvas id="canvas" resize></canvas>
|
||||||
|
|
Loading…
Reference in a new issue