SVGLoader.d.ts 1.0 KB

123456789101112131415161718192021222324252627282930313233
  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. load( url: string, onLoad: ( data: SVGResult ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ) : void;
  22. parse( text: string ) : SVGResult;
  23. static getStrokeStyle( width: number, color: string, lineJoin: string, lineCap: string, miterLimit: number ): StrokeStyle;
  24. static pointsToStroke( points: Vector3[], style: StrokeStyle, arcDivisions: number, minDistance: number ): BufferGeometry;
  25. static pointsToStrokeWithBuffers( points: Vector3[], style: StrokeStyle, arcDivisions: number, minDistance: number, vertices: number[], normals: number[], uvs: number[], vertexOffset: number ): number;
  26. }