@babylonjs/core
Version:
Getting started? Play directly with the Babylon.js API using our [playground](https://playground.babylonjs.com/). It also contains a lot of samples to learn how to use it.
60 lines (59 loc) • 1.79 kB
TypeScript
import { NodeGeometryBlock } from "../nodeGeometryBlock.js";
import type { NodeGeometryConnectionPoint } from "../nodeGeometryBlockConnectionPoint.js";
import { Vector3 } from "../../../Maths/math.vector.js";
/**
* Block used to get a noise value
*/
export declare class NoiseBlock extends NodeGeometryBlock {
/**
* Create a new NoiseBlock
* @param name defines the block name
*/
constructor(name: string);
/**
* Gets the current class name
* @returns the class name
*/
getClassName(): string;
/**
* Gets the offset input component
*/
get offset(): NodeGeometryConnectionPoint;
/**
* Gets the scale input component
*/
get scale(): NodeGeometryConnectionPoint;
/**
* Gets the octaves input component
*/
get octaves(): NodeGeometryConnectionPoint;
/**
* Gets the roughtness input component
*/
get roughness(): NodeGeometryConnectionPoint;
/**
* Gets the geometry output component
*/
get output(): NodeGeometryConnectionPoint;
private _negateIf;
private _noiseGrad;
private _fade;
private _hashBitRotate;
private _hash;
private _mix;
private _perlinNoise;
private _perlinSigned;
private _perlin;
/**
* Gets a perlin noise value
* @param octaves number of octaves
* @param roughness roughness
* @param _position position vector
* @param offset offset vector
* @param scale scale value
* @returns a value between 0 and 1
* @see Based on https://github.com/blender/blender/blob/main/source/blender/blenlib/intern/noise.cc#L533
*/
noise(octaves: number, roughness: number, _position: Vector3, offset: Vector3, scale: number): number;
protected _buildBlock(): void;
}