Skip to content

Commit

Permalink
Showcase Themes Configured
Browse files Browse the repository at this point in the history
  • Loading branch information
Taiizor committed Nov 5, 2024
1 parent 916deb6 commit fc4710b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"AppVersion": "24.7.1.0",
"Version": "1.0.0.4",
"Version": "1.0.0.5",
"Title": "Fluid Simulation",
"Thumbnail": "thumbnail.jpg",
"Preview": "preview.gif",
Expand Down
27 changes: 7 additions & 20 deletions src/Bundle/Sucrose.Bundle/Showcase/Fluid Simulation-1/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,24 +102,10 @@ function SucroseAudioData(obj) {
for (let i = 0; i <= config.FREQ_RANGE; i++)
bass += audioArray[i] * 2;

bass /= config.FREQ_RANGE * 2 * config.FREQ_MULTI;
bass /= (config.FREQ_RANGE * 2) * config.FREQ_MULTI;

multipleSplats(Math.floor(bass * config.SOUND_SENSITIVITY * 10) - lastBass);
lastBass = (bass, Math.floor(bass * config.SOUND_SENSITIVITY * 10));
}

function multipleSplats(amount) {
for (let i = 0; i < amount; i++) {
const color = config.COLORFUL ? generateColor() : Object.assign({}, config.POINTER_COLOR.getRandom());
color.r *= 10.0;
color.g *= 10.0;
color.b *= 10.0;
const x = canvas.width * Math.random();
const y = canvas.height * Math.random();
const dx = 1000 * (Math.random() - 0.5);
const dy = 1000 * (Math.random() - 0.5);
splat(x, y, dx, dy, color);
}
multipleSplats(Math.floor((bass * config.SOUND_SENSITIVITY) * 10) - lastBass);
lastBass = (bass, Math.floor((bass * config.SOUND_SENSITIVITY) * 10));
}

let _randomSplats = false;
Expand Down Expand Up @@ -1627,12 +1613,12 @@ function splatPointer(pointer) {

function multipleSplats(amount) {
for (let i = 0; i < amount; i++) {
const color = config.COLORFUL ? generateColor() : Object.assign({}, config.POINTER_COLOR.getRandom());
const color = generateColor();
color.r *= 10.0;
color.g *= 10.0;
color.b *= 10.0;
const x = canvas.width * Math.random();
const y = canvas.height * Math.random();
const x = Math.random();
const y = Math.random();
const dx = 1000 * (Math.random() - 0.5);
const dy = 1000 * (Math.random() - 0.5);
splat(x, y, dx, dy, color);
Expand Down Expand Up @@ -1672,6 +1658,7 @@ function correctRadius(radius) {
// pointer = new pointerPrototype();
// updatePointerDownData(pointer, -1, posX, posY);
// });

let lastMove = -1;

function checkLastMove() {
Expand Down

0 comments on commit fc4710b

Please sign in to comment.