@playcanvas/web-components
Version:
Web Components for the PlayCanvas Engine
38 lines (37 loc) • 1.32 kB
TypeScript
import { Color, Quat, Vec2, Vec3, Vec4 } from 'playcanvas';
/**
* Parse a color string into a Color object. String can be in the format of '#rgb', '#rgba',
* '#rrggbb', '#rrggbbaa', or a string of 3 or 4 comma-delimited numbers.
*
* @param value - The color string to parse.
* @returns The parsed Color object.
*/
export declare const parseColor: (value: string) => Color;
/**
* Parse an Euler angles string into a Quat object. String can be in the format of 'x,y,z'.
*
* @param value - The Euler angles string to parse.
* @returns The parsed Quat object.
*/
export declare const parseQuat: (value: string) => Quat;
/**
* Parse a Vec2 string into a Vec2 object. String can be in the format of 'x,y'.
*
* @param value - The Vec2 string to parse.
* @returns The parsed Vec2 object.
*/
export declare const parseVec2: (value: string) => Vec2;
/**
* Parse a Vec3 string into a Vec3 object. String can be in the format of 'x,y,z'.
*
* @param value - The Vec3 string to parse.
* @returns The parsed Vec3 object.
*/
export declare const parseVec3: (value: string) => Vec3;
/**
* Parse a Vec4 string into a Vec4 object. String can be in the format of 'x,y,z,w'.
*
* @param value - The Vec4 string to parse.
* @returns The parsed Vec4 object.
*/
export declare const parseVec4: (value: string) => Vec4;