@types/obj-file-parser
TypeScript icon, indicating that this package has built-in type declarations

0.5.2 • Public • Published

Installation

npm install --save @types/obj-file-parser

Summary

This package contains type definitions for obj-file-parser (https://github.com/wesunwin/obj-file-parser).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/obj-file-parser.

index.d.ts

export as namespace ObjFileParser;

/* Class module */
declare class ObjFileParser {
    constructor(fileContents: any, defaultModelName?: any);
    parse(): ObjFileParser.ObjFile;
}

/* Additional exported interfaces */
declare namespace ObjFileParser {
    interface ObjFile {
        models: ObjModel[];
        materialLibraries: any[];
    }

    interface ObjModel {
        name: string;
        vertices: Vertex[];
        textureCoords: VertexTexture[];
        vertexNormals: Vertex[];
        faces: Face[];
    }

    interface Face {
        material: any;
        group: string;
        smoothingGroup: number;
        vertices: FaceVertex[];
    }

    interface FaceVertex {
        vertexIndex: number;
        textureCoordsIndex: number;
        vertexNormalIndex: number;
    }

    interface Vertex {
        x: number;
        y: number;
        z: number;
    }

    interface VertexTexture {
        u: number;
        v: number;
        w: number;
    }
}

export = ObjFileParser;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: none

Credits

These definitions were written by Ben Coleman.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/obj-file-parser

Weekly Downloads

515

Version

0.5.2

License

MIT

Unpacked Size

4.59 kB

Total Files

5

Last publish

Collaborators

  • types