The abstract superclass for procedural noise generators.
- iOS 10.0+
- macOS 10.12+
- Mac Catalyst 13.0+Beta
- tvOS 10.0+
Each noise source class generalizes a specific noise generation algorithm that produces a distinct general style of noise. For example, the
GKPerlin class generates fractal coherent noise similar to clouds, terrain, and other natural phenomena, and the
GKCylinders class generates a field of concentric cylinders useful for creating wood-grain textures.
To make use of procedural noise in your app or game:
GKNoisesubclass that generates the style of noise you’d like, and configure its properties to customize the noise generation algorithm.
GKNoiseobject from that noise source. A noise object represents a specific configuration of noise generated by the noise source. You can create multiple noise objects and apply operations that combine or modify them to further customize the style of output. Noise objects are lightweight—creating them and applying operations doesn’t perform expensive noise computation.
GKNoiseobject from the noise object. Creating a noise map performs the computation to generate noise and apply any operations you specified with
GKNoiseobjects, resulting in a concrete output: a field of values that you can either sample directly, use with the
SKTextureclass to generate texture images, or use with the
SKTileclass to generate tile maps.