UNPKG

polygonjs-engine

Version:

node-based webgl 3D engine https://polygonjs.com

61 lines (60 loc) 4.29 kB
import { TypedSopNode } from './_Base'; import { CoreGroup } from '../../../core/geometry/Group'; import { NodeParamsConfig } from '../utils/params/ParamsConfig'; declare class NoiseSopParamsConfig extends NodeParamsConfig { /** @param noise amplitude */ amplitude: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.FLOAT>; /** @param toggle on to multiply the amplitude by a vertex attribute */ tamplitudeAttrib: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>; /** @param which vertex attribute to use */ amplitudeAttrib: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.STRING>; /** @param noise frequency */ freq: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.VECTOR3>; /** @param noise offset */ offset: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.VECTOR3>; /** @param noise octaves */ octaves: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.INTEGER>; /** @param amplitude attenuation for higher octaves */ ampAttenuation: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.FLOAT>; /** @param frequency increase for higher octaves */ freqIncrease: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.FLOAT>; /** @param noise seed */ seed: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.INTEGER>; separator: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.SEPARATOR>; /** @param toggle on to have the noise be multiplied by the normal */ useNormals: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>; /** @param set which attribute will be affected by the noise */ attribName: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.STRING>; /** @param toggle on to use rest attributes. This can be useful when the noise is animated and this node does not clone the input geometry. Without using rest attributes, the noise would be based on an already modified position, and would therefore accumulate on itself after each cook. This may be what you are after, but for a more conventional result, using a rest attribute will ensure that the noise remains stable. Note that the rest attribute can be created by a RestAttributes node */ useRestAttributes: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>; /** @param name of rest position */ restP: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.STRING>; /** @param name of rest normal */ restN: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.STRING>; /** @param operation done when applying the noise (add, set, mult, substract, divide) */ operation: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.INTEGER>; /** @param toggle on to recompute normals if the position has been updated */ computeNormals: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>; } export declare class NoiseSopNode extends TypedSopNode<NoiseSopParamsConfig> { params_config: NoiseSopParamsConfig; static type(): string; private _simplex_by_seed; private _rest_pos; private _rest_value2; private _noise_value_v; static displayedInputNames(): string[]; initializeNode(): void; cook(input_contents: CoreGroup[]): Promise<void>; private _noise_value; private _make_noise_value_correct_size; private _new_attrib_value_from_float; private _new_attrib_value_from_vector2; private _new_attrib_value_from_vector3; private _new_attrib_value_from_vector4; private _amplitude_from_attrib; private _fbm; private _get_simplex; private _create_simplex; } export {};