Methods
Static assignCacheDataCameraEffect
Parameters
Returns void
Static convertCmds2T3
- convertCmds2T3(context: OwllyRenderContext, cmds2d: (string | number)[][]): (string | number)[][]
Parameters
cmds2d: (string | number)[][]
Returns (string | number)[][]
Static convertCmds3T2
- convertCmds3T2(context: OwllyRenderContext, cmds3d: (string | number)[][]): (string | number)[][]
Parameters
cmds3d: (string | number)[][]
Returns (string | number)[][]
Static convertCoords
- convertCoords(cmds: (string | number)[][]): [number, number][][]
Parameters
cmds: (string | number)[][]
Returns [number, number][][]
Static convertCoordsByPath
- convertCoordsByPath(path: string): [number, number][][]
Parameters
Returns [number, number][][]
Static createPath
- createPath(cmds: (string | number)[][]): string
Parameters
cmds: (string | number)[][]
Returns string
Static get2dPoint
- get2dPoint(context: OwllyRenderContext, x: number, y: number, z?: number): null | { x: number; y: number }
Parameters
x: number
y: number
z: number = 0
Returns null | { x: number; y: number }
Static get3dPoint
- get3dPoint(context: OwllyRenderContext, x: number, y: number): null | { x: number; y: number }
Parameters
Returns null | { x: number; y: number }
Static getCenter
- getCenter(path: [number, number][]): [number, number]
Parameters
Returns [number, number]
Static getCmd2d
Parameters
Static getCmd3d
- getCmd3d(context: OwllyRenderContext, cmds2d: PathCommand[], getCoords?: boolean): { centroid?: [number, number]; cmds3d: (string | number)[][]; coords?: [number, number][][]; path: string }
Parameters
getCoords: boolean = false
Returns { centroid?: [number, number]; cmds3d: (string | number)[][]; coords?: [number, number][][]; path: string }
Optional centroid?: [number, number]
cmds3d: (string | number)[][]
Optional coords?: [number, number][][]
path: string
Static parsePath
- parsePath(path: string): (string | number)[][]
Parameters
Returns (string | number)[][]
Static setSvgCacheDataCameraEffect
Parameters
Returns void
Static toDataJson
- toDataJson(svgStr: string): Promise<Shape[]>
Parameters
Returns Promise<Shape[]>
解析owlly shape路径