SVGLoader.d.ts 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. import {
  2. Loader,
  3. LoadingManager,
  4. ShapePath,
  5. BufferGeometry,
  6. Vector3
  7. } from '../../../src/Three';
  8. export interface SVGResult {
  9. paths: ShapePath[];
  10. xml: XMLDocument;
  11. }
  12. export interface StrokeStyle {
  13. strokeColor: string;
  14. strokeWidth: number;
  15. strokeLineJoin: string;
  16. strokeLineCap: string;
  17. strokeMiterLimit: number;
  18. }
  19. export class SVGLoader extends Loader {
  20. constructor( manager?: LoadingManager );
  21. defaultDPI: number;
  22. defaultUnit: string;
  23. load( url: string, onLoad: ( data: SVGResult ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ) : void;
  24. parse( text: string ) : SVGResult;
  25. static getStrokeStyle( width?: number, color?: string, lineJoin?: string, lineCap?: string, miterLimit?: number ): StrokeStyle;
  26. static pointsToStroke( points: Vector3[], style: StrokeStyle, arcDivisions?: number, minDistance?: number ): BufferGeometry;
  27. static pointsToStrokeWithBuffers( points: Vector3[], style: StrokeStyle, arcDivisions?: number, minDistance?: number, vertices?: number[], normals?: number[], uvs?: number[], vertexOffset?: number ): number;
  28. }