-
-
Notifications
You must be signed in to change notification settings - Fork 325
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
5,603 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- 'JavaScript/package.json' # The version number must be bumped in order to publish to npm | ||
workflow_dispatch: | ||
|
||
name: Publish to npm | ||
|
||
jobs: | ||
publish: | ||
name: Publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Publish to npm | ||
run: cd JavaScript && npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- 'Rust/Cargo.toml' # The version number must be bumped in order to publish to crates.io | ||
|
||
name: Publish Rust (crates.io) | ||
|
||
jobs: | ||
publish: | ||
name: Publish to crates.io | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Publish to crates.io | ||
run: cd Rust && cargo publish | ||
env: | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ nupkg/ | |
[Rr]elease/ | ||
[Rr]eleases/ | ||
[Pp]ublish/ | ||
[Tt]arget/ | ||
x64/ | ||
x86/ | ||
build/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// MIT License | ||
// MIT License | ||
// | ||
// Copyright(c) 2020 Jordan Peck ([email protected]) | ||
// Copyright(c) 2020 Contributors | ||
|
@@ -45,7 +45,7 @@ | |
// ....',;;clodxkkOOOkkdolc:;,,,,,,,,'..........,;:clodxkO0KKXKK0Okxdolcc::;;,,,;;:codkO0XXNNNNXKK0OOOOOkkkkxxdoollloodxkO0KKKXXXXX | ||
// | ||
// VERSION: 1.0.1 | ||
// https://github.com/Auburn/FastNoise | ||
// https://github.com/Auburn/FastNoiseLite | ||
|
||
using System; | ||
using System.Runtime.CompilerServices; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
## Getting Started | ||
|
||
Here's an example for creating a 128x128 array of Perlin noise | ||
|
||
```go | ||
import "fastnoise" | ||
|
||
// Create and configure noise state (either float32 or float64) | ||
noise := fastnoise.New[float32]() | ||
noise.NoiseType(fastnoise.Perlin) | ||
|
||
// Gather noise data | ||
const size = 128 | ||
data := make([]float32, size * size) | ||
|
||
for i := 0; i < len(data); i++ { | ||
x := i % size | ||
y := i / size | ||
data[i] = noise.Noise2D(x, y) | ||
} | ||
|
||
// Use noise data (all values are in range of -1.0 and 1.0) | ||
``` |
Oops, something went wrong.