Skip to content

Commit

Permalink
Merge branch 'master' into v1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Auburn committed Oct 6, 2023
2 parents 40b803b + e1a694d commit ec72f1a
Show file tree
Hide file tree
Showing 20 changed files with 5,603 additions and 23 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/publish-js.yml
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 }}
28 changes: 28 additions & 0 deletions .github/workflows/publish-rust.yml
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 }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ nupkg/
[Rr]elease/
[Rr]eleases/
[Pp]ublish/
[Tt]arget/
x64/
x86/
build/
Expand Down
2 changes: 1 addition & 1 deletion C/FastNoiseLite.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
// ....',;;clodxkkOOOkkdolc:;,,,,,,,,'..........,;:clodxkO0KKXKK0Okxdolcc::;;,,,;;:codkO0XXNNNNXKK0OOOOOkkkkxxdoollloodxkO0KKKXXXXX
//
// VERSION: 1.0.1
// https://github.com/Auburn/FastNoise
// https://github.com/Auburn/FastNoiseLite

// In *one* C or C++ file, use #define FNL_IMPL to generate implementation

Expand Down
4 changes: 2 additions & 2 deletions CSharp/FastNoiseLite.cs
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
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Cpp/FastNoiseLite.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
// ....',;;clodxkkOOOkkdolc:;,,,,,,,,'..........,;:clodxkO0KKXKK0Okxdolcc::;;,,,;;:codkO0XXNNNNXKK0OOOOOkkkkxxdoollloodxkO0KKKXXXXX
//
// VERSION: 1.0.1
// https://github.com/Auburn/FastNoise
// https://github.com/Auburn/FastNoiseLite

#ifndef FASTNOISELITE_H
#define FASTNOISELITE_H
Expand Down
2 changes: 1 addition & 1 deletion GLSL/FastNoiseLite.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
// ....',;;clodxkkOOOkkdolc:;,,,,,,,,'..........,;:clodxkO0KKXKK0Okxdolcc::;;,,,;;:codkO0XXNNNNXKK0OOOOOkkkkxxdoollloodxkO0KKKXXXXX
//
// VERSION: 1.0.1
// https://github.com/Auburn/FastNoise
// https://github.com/Auburn/FastNoiseLite

// Switch between using floats or doubles for input position
#define FNLfloat float
Expand Down
23 changes: 23 additions & 0 deletions Go/README.md
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)
```
Loading

0 comments on commit ec72f1a

Please sign in to comment.