@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
57 lines (56 loc) • 2.94 kB
TypeScript
/**
* Creates an attribute on the geometry or object.
*
* @remarks
* This allows you to create an attribute and define the following:
* - the group this applies to
* - the name
* - the type (numeric or string)
* - the size (float, vector2, vector3 or vector4)
* - the class (geometry or object attribute)
* - the value
*
* Note that you can also given an expression to set the value of the attribute, such as `sin(2*@P.z)`
*
*/
import { TypedSopNode } from './_Base';
import { AttribClass, AttribType } from '../../../core/geometry/Constant';
import { CoreGroup } from '../../../core/geometry/Group';
import { NodeParamsConfig } from '../utils/params/ParamsConfig';
import { SopType } from '../../poly/registers/nodes/types/Sop';
declare class AttribCreateSopParamsConfig extends NodeParamsConfig {
/** @param the group this applies to */
group: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
/** @param the attribute class (geometry or object) */
class: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
/** @param the attribute type (numeric or string) */
type: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
/** @param the attribute name */
name: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
/** @param the attribute size (1 for float, 2 for vector2, 3 for vector3, 4 for vector4) */
size: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
/** @param the value for a float attribute */
value1: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FLOAT>;
/** @param the value for a vector2 */
value2: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.VECTOR2>;
/** @param the value for a vector3 */
value3: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.VECTOR3>;
/** @param the value for a vector4 */
value4: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.VECTOR4>;
/** @param the value for a string attribute */
string: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
}
export declare class AttribCreateSopNode extends TypedSopNode<AttribCreateSopParamsConfig> {
paramsConfig: AttribCreateSopParamsConfig;
static type(): SopType;
initializeNode(): void;
private _operation;
cook(inputCoreGroups: CoreGroup[]): Promise<void>;
private _addAttribute;
private _isUsingExpression;
setAttribClass(attribClass: AttribClass): void;
attribClass(): AttribClass;
setAttribType(type: AttribType): void;
attribType(): AttribType;
}
export {};