polygonjs-engine
Version:
node-based webgl 3D engine https://polygonjs.com
64 lines (63 loc) • 3.49 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 { AttribType } from '../../../core/geometry/Constant';
import { CoreObject } from '../../../core/geometry/Object';
import { CoreGroup } from '../../../core/geometry/Group';
import { NodeParamsConfig } from '../utils/params/ParamsConfig';
declare class AttribCreateSopParamsConfig extends NodeParamsConfig {
/** @param the group this applies to */
group: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.STRING>;
/** @param the attribute class (geometry or object) */
class: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.INTEGER>;
/** @param the attribute type (numeric or string) */
type: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.INTEGER>;
/** @param the attribute name */
name: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").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("../../poly/ParamType").ParamType.INTEGER>;
/** @param the value for a float attribute */
value1: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.FLOAT>;
/** @param the value for a vector2 */
value2: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.VECTOR2>;
/** @param the value for a vector3 */
value3: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.VECTOR3>;
/** @param the value for a vector4 */
value4: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.VECTOR4>;
/** @param the value for a string attribute */
string: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.STRING>;
}
export declare class AttribCreateSopNode extends TypedSopNode<AttribCreateSopParamsConfig> {
params_config: AttribCreateSopParamsConfig;
static type(): string;
private _x_arrays_by_geometry_uuid;
private _y_arrays_by_geometry_uuid;
private _z_arrays_by_geometry_uuid;
private _w_arrays_by_geometry_uuid;
initializeNode(): void;
private _operation;
cook(input_contents: CoreGroup[]): void;
private _add_attribute;
add_point_attribute(attrib_type: AttribType, core_group: CoreGroup): Promise<void>;
add_object_attribute(attrib_type: AttribType, core_group: CoreGroup): Promise<void>;
add_numeric_attribute_to_points(core_object: CoreObject): Promise<void>;
add_numeric_attribute_to_object(core_objects: CoreObject[]): Promise<void>;
add_string_attribute_to_points(core_object: CoreObject): Promise<void>;
add_string_attribute_to_object(core_objects: CoreObject[]): Promise<void>;
private _init_array_if_required;
private _is_using_expression;
}
export {};