Expand description
§fastnoise2-sys
fastnoise2-sys provides unsafe Rust bindings for FastNoise2, a C++ library for modular node graph-based noise generation with SIMD. For a higher-level, mostly safe API, consider using fastnoise2.
These bindings are automatically generated using bindgen.
§Setup
fastnoise2-sys, the underlying bindings for fastnoise2, uses a build script that follows a specific order of preference for compiling and/or linking the FastNoise2 library:
- Building from source, if the
build-from-source
feature is enabled. - If the
FASTNOISE2_LIB_DIR
environment variable is set to/path/to/lib/
, that path will be searched for staticFastNoise
library. - If not set, it falls back to building from source.
§Building from Source
To build FastNoise2 from source using fastnoise2-sys, ensure you have:
- CMake
- a C++17 compiler
§Notes
- If you prefer not to build from source, precompiled binaries are available for download from the FastNoise2 Releases.
- The
FASTNOISE2_SOURCE_DIR
environment variable is generally not needed as fastnoise2-sys includes the FastNoise2 source code as a Git submodule. If you need to use a different source directory, setFASTNOISE2_SOURCE_DIR
to point to the root of the FastNoise2 source code.
Functions§
- fnDelete
Node ⚠Ref - fnGen
Position ⚠Array2D - fnGen
Position ⚠Array3D - fnGen
Position ⚠Array4D - fnGen
Single2D ⚠ - fnGen
Single3D ⚠ - fnGen
Single4D ⚠ - fnGen
Tileable2D ⚠ - fnGen
Uniform ⚠Grid2D - fnGen
Uniform ⚠Grid3D - fnGen
Uniform ⚠Grid4D - fnGet
Metadata ⚠Count - fnGet
Metadata ⚠Enum Count - fnGet
Metadata ⚠Enum Name - fnGet
Metadata ⚠Hybrid Count - fnGet
Metadata ⚠Hybrid Dimension Idx - fnGet
Metadata ⚠Hybrid Name - fnGet
MetadataID ⚠ - fnGet
Metadata ⚠Name - fnGet
Metadata ⚠Node Lookup Count - fnGet
Metadata ⚠Node Lookup Dimension Idx - fnGet
Metadata ⚠Node Lookup Name - fnGet
Metadata ⚠Variable Count - fnGet
Metadata ⚠Variable Dimension Idx - fnGet
Metadata ⚠Variable Name - fnGet
Metadata ⚠Variable Type - fnGetSIMD
Level ⚠ - fnNew
From ⚠Encoded Node Tree - fnNew
From ⚠Metadata - fnSet
Hybrid ⚠Float - fnSet
Hybrid ⚠Node Lookup - fnSet
Node ⚠Lookup - fnSet
Variable ⚠Float - fnSet
Variable ⚠IntEnum