UNPKG

polygonjs-engine

Version:

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

43 lines (41 loc) 2.35 kB
/** * Copies an attribute from one geometry to another. * * @remarks * This copies an attribute from the right input geometry to the left input geometry. * Note that you can copy attributes that have different sizes. For instance: * - to copy only the y component of the position to a float attribute, set it as such: * - srcOffset = 1 * - destOffset = 0 * - to copy the y component to the z component of another attribute: * - srcOffset = 1 * - destOffset = 2 * - if you copy from a float to a float: * - srcOffset = 0 * - destOffset = 0 * */ import { TypedSopNode } from './_Base'; import { CoreGroup } from '../../../core/geometry/Group'; import { NodeParamsConfig } from '../utils/params/ParamsConfig'; declare class AttribCopySopParamsConfig extends NodeParamsConfig { /** @param name of the attribute to copy */ name: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.STRING>; /** @param toggle if you want to copy to another name */ tnewName: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>; /** @param the new name of the attribute */ newName: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.STRING>; /** @param this defines which component the copy starts from. If you want to copy the whole attribute, leave it at 0. If you want to copy only the y component, set it to 1. If you want to copy the z component, set it to 2. Note that this only makes sense if you copy from an attribute that has enough components to copy from. So setting it to 2 (for z) to copy from a vector2 attribute will raise an error. */ srcOffset: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.INTEGER>; /** @param this defines which component the attribute is copied to */ destOffset: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.INTEGER>; } export declare class AttribCopySopNode extends TypedSopNode<AttribCopySopParamsConfig> { params_config: AttribCopySopParamsConfig; static type(): string; static displayedInputNames(): string[]; initializeNode(): void; private _operation; cook(input_contents: CoreGroup[]): void; } export {};