ktongue's picture
download
raw
1.46 kB
import { Loader, LoadingManager, ShapePath, BufferGeometry, Vector2, Shape } from 'three'
export interface SVGResultPaths extends ShapePath {
userData?:
| {
[key: string]: any
}
| undefined
}
export interface SVGResult {
paths: SVGResultPaths[]
xml: XMLDocument
}
export interface StrokeStyle {
strokeColor: string
strokeWidth: number
strokeLineJoin: string
strokeLineCap: string
strokeMiterLimit: number
}
export class SVGLoader extends Loader {
constructor(manager?: LoadingManager)
defaultDPI: number
defaultUnit: string
load(
url: string,
onLoad: (data: SVGResult) => void,
onProgress?: (event: ProgressEvent) => void,
onError?: (event: ErrorEvent) => void,
): void
loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<SVGResult>
parse(text: string): SVGResult
static getStrokeStyle(
width?: number,
color?: string,
lineJoin?: string,
lineCap?: string,
miterLimit?: number,
): StrokeStyle
static pointsToStroke(
points: Vector2[],
style: StrokeStyle,
arcDivisions?: number,
minDistance?: number,
): BufferGeometry
static pointsToStrokeWithBuffers(
points: Vector2[],
style: StrokeStyle,
arcDivisions?: number,
minDistance?: number,
vertices?: number[],
normals?: number[],
uvs?: number[],
vertexOffset?: number,
): number
static createShapes(shapePath: ShapePath): Shape[]
}

Xet Storage Details

Size:
1.46 kB
·
Xet hash:
761b078e279ec027c84462d9b244eb69561b795c11912725a67ee048ffa8715b

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.