UNPKG

@polygonjs/polygonjs

Version:

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

28 lines (27 loc) 955 B
/** * Returns the resolution of a texture of a COP node. * * @remarks * It takes 1 or 2 arguments * * `copRes(input_index_or_node_path, vector_component)` * * - `input_index_or_node_path` is a number or a string * - `vector_component` is a string or number, either 'x', 'y', 0 or 1 * * ## Usage * * - `copRes('/COP/image1')` - returns the size of the texture, as a THREE.Vector2 * - `copRes('/COP/image1', 'x')` - returns the x component of the size of the texture, as a number * */ import { BaseMethodFindDependencyArgs } from './_Base'; import { BaseMethod } from './_Base'; import { MethodDependency } from '../MethodDependency'; import { Vector2 } from 'three'; export declare class CopResExpression extends BaseMethod { static requiredArguments(): string[][]; findDependency(args: BaseMethodFindDependencyArgs): MethodDependency | null; private _resolution; processArguments(args: any[]): Promise<number | Vector2>; }