Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FastNoiseLite extension #1815

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
8f0beb8
FastNoiseLite extension
OGDemonZ Dec 25, 2024
76b90c1
ready to pull i think
OGDemonZ Dec 25, 2024
6e91d02
prettier
OGDemonZ Dec 25, 2024
225741c
eslint fix hopefully
OGDemonZ Dec 25, 2024
bda1710
i hate precision loss
OGDemonZ Dec 25, 2024
63448a5
changes
OGDemonZ Dec 25, 2024
d0c9e7a
Fix this
CubesterYT Dec 25, 2024
169b1cf
More fixes
CubesterYT Dec 25, 2024
835a7da
Format again
CubesterYT Dec 25, 2024
6a695cd
casted
OGDemonZ Dec 25, 2024
e2ba8e7
Cast
CubesterYT Dec 25, 2024
befd463
license
OGDemonZ Dec 26, 2024
fac8be6
Merge branch 'noise' of https://github.com/Vxerz/extensions into noise
OGDemonZ Dec 26, 2024
4068e2f
final fixes
OGDemonZ Dec 26, 2024
f742fda
prettier
OGDemonZ Dec 26, 2024
4eb987d
punctuation
OGDemonZ Dec 26, 2024
85bfbd6
format
OGDemonZ Dec 26, 2024
cbadec7
fixes
OGDemonZ Dec 26, 2024
ddaa652
final prettier
OGDemonZ Dec 26, 2024
aeab863
boom
OGDemonZ Dec 26, 2024
a922522
broken block
OGDemonZ Dec 26, 2024
495db96
Redo this
CubesterYT Dec 26, 2024
bfdaa10
fixed crashing
OGDemonZ Dec 26, 2024
8fee16f
Update noise.js
OGDemonZ Dec 26, 2024
96fc087
fixed everything
OGDemonZ Dec 26, 2024
402e4c3
stupid formatting
OGDemonZ Dec 26, 2024
106d2f6
We don't need this, man
CubesterYT Dec 26, 2024
95e6823
minified
OGDemonZ Dec 26, 2024
69b8a49
correct minified
OGDemonZ Dec 26, 2024
96bdecc
Fix these AGAIN
CubesterYT Dec 26, 2024
91ba77f
Skip the library
CubesterYT Dec 26, 2024
4a5e362
maybe?
OGDemonZ Dec 26, 2024
6c90619
unminified
OGDemonZ Dec 26, 2024
99c20d0
unminified
OGDemonZ Dec 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions docs/Corbnorb/noise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# FastNoiseLite

## Creator
I did not create the noise, I only turned it into an extension.
For the original project go here:
https://github.com/Auburn/FastNoiseLite
https://auburn.github.io/FastNoiseLite/

## How to use

All features you can test on this website: https://auburn.github.io/FastNoiseLite/
*except for easing and inverted*

There are 2 blocks:

1. [create noise](#createNoise)
2. [get noise](#getNoise)

Although the [get noise](#getNoise) block has 3D coordinates, you can use just X and Y if you want 2D noise

### Create Noise <a name="createNoise"></a>
GarboMuffin marked this conversation as resolved.
Show resolved Hide resolved

```scratch
create noise id: [myNoise] seed: (0) type: [Perlin v] octaves: (1) frequency: (0.01) fractal: [FBm v] inverted? (false v) easing: [Linear v] :: motion
```
The create noise block is where you actually add a new noise function to use.

**ID:**
the ID value is the name of this noise function, your noise must have a name for the [get noise](#getNoise) block to be able to use.

**SEED:**
defaulted to 0, this is the seed for the noise. The same seed will always be the same noise, so if you want to use the same noise every time keep the seed the same.

**TYPE:**
there are many types of noise, to get a better understanding of them go to this website: https://auburn.github.io/FastNoiseLite/

**OCTAVES:**
this describes how many different noises are layered onto eachother, every octave is a lower strength and size than the previous octave; gives more texture to your noise.

**FREQUENCY:**
this is the size of the noise, higher the frequency, smaller the size of the noise. If working with pixels I'd suggest keeping frequency from 0.001 - 0.02, with other things just test values until something works

**FRACTAL:**
None turns off octaves, FBm is normal noise and octaves, Ridged has octaves and changes the noise to give sharp ridges going through the noise instead of smooth hills, Ping Pong is similar to ridged except there are deep valleys between the ridges.

**INVERTED:**
inverts the noise values

**EASING:**

- Linear: does nothing to the values

- Squared: squares the value

- Cubed: cubes the value

- Root: square roots the value

### Get Noise <a name="getNoise"></a>
GarboMuffin marked this conversation as resolved.
Show resolved Hide resolved

```scratch
(get noise id: [myNoise] at x: (0) y: (0) z: (0) :: motion)
```
This block returns the value of your given noise at your given coordinates.

**ID:**
the ID value of your noise (what you set for the id in the [create noise](#createNoise) block)

**X Y Z:**
the coordinates of the noise
Loading
Loading