Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
OGDemonZ committed Jan 4, 2025
1 parent e0da06c commit 693e987
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions extensions/Corbnorb/noise.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"use strict";

const noises = Object.create(null);
const noiseMenu = [{text: "myNoise", value: "myNoise"}]
const noiseMenu = [{ text: "myNoise", value: "myNoise" }];

const BlockType = Scratch.BlockType;
const ArgumentType = Scratch.ArgumentType;
Expand Down Expand Up @@ -99,7 +99,7 @@
menus: {
NOISES: {
acceptReporters: true,
items: "getNoises"
items: "getNoises",
},
NOISE_TYPE: {
acceptReporters: true,
Expand Down Expand Up @@ -131,8 +131,7 @@
};
}

getNoises()
{
getNoises() {
return noiseMenu;
}

Expand All @@ -143,7 +142,9 @@
const frequency = Cast.toNumber(args.FREQUENCY);
const octaves = Cast.toNumber(args.OCTAVES);
noises[id] = new FastNoiseLite(seed);
if(!noiseMenu.some(e => e.value === id)) {noiseMenu.push({text:id, value:id})}
if (!noiseMenu.some((e) => e.value === id)) {
noiseMenu.push({ text: id, value: id });
}
switch (args.TYPE) {
case "openSimplex2":
noises[id].SetNoiseType(FastNoiseLite.NoiseType.OpenSimplex2);
Expand Down

0 comments on commit 693e987

Please sign in to comment.