1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 02:39:46 +02:00
Oinktube/node_modules/three/examples/jsm/loaders/SVGLoader.d.ts
2023-12-11 11:59:56 -03:00

43 lines
1.3 KiB
TypeScript

import {
Loader,
LoadingManager,
ShapePath,
BufferGeometry,
Vector3
} from '../../../src/Three';
interface SVGResultPaths extends ShapePath {
userData?: {
[key: string]: any
}
}
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: Vector3[], style: StrokeStyle, arcDivisions?: number, minDistance?: number ): BufferGeometry;
static pointsToStrokeWithBuffers( points: Vector3[], style: StrokeStyle, arcDivisions?: number, minDistance?: number, vertices?: number[], normals?: number[], uvs?: number[], vertexOffset?: number ): number;
}