diff --git a/classes/F2dDownloader.html b/classes/F2dDownloader.html index 79e78e9..553e326 100644 --- a/classes/F2dDownloader.html +++ b/classes/F2dDownloader.html @@ -1 +1 @@ -F2dDownloader | forge-convert-utils
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • F2dDownloader

Index

Constructors

Properties

auth: IAuthOptions
modelDerivativeClient: ModelDerivativeClient

Methods

  • _download(urn: string, context: IDownloadContext): Promise<void>
  • download(urn: string, options?: IDownloadOptions): IDownloadTask

Generated using TypeDoc

\ No newline at end of file +F2dDownloader | forge-convert-utils
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • F2dDownloader

Index

Constructors

Properties

auth: IAuthOptions
modelDerivativeClient: ModelDerivativeClient

Methods

  • _download(urn: string, context: IDownloadContext): Promise<void>
  • download(urn: string, options?: IDownloadOptions): IDownloadTask

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/GltfWriter.html b/classes/GltfWriter.html index c92acb9..241920b 100644 --- a/classes/GltfWriter.html +++ b/classes/GltfWriter.html @@ -1,8 +1,8 @@ GltfWriter | forge-convert-utils
Options
All
  • Public
  • Public/Protected
  • All
Menu

Utility class for serializing parsed 3D content to local file system as glTF (2.0).

-

Hierarchy

  • GltfWriter

Index

Constructors

  • new GltfWriter(options?: IWriterOptions): GltfWriter

Hierarchy

  • GltfWriter

Index

Constructors

  • new GltfWriter(options?: IWriterOptions): GltfWriter

Properties

accessorHashes: Map<string, number> = ...
baseDir: string
bufferSize: number
bufferStream: null | WriteStream
bufferViewCache: Map<string, BufferView> = ...
bufferViewHashes: Map<string, number> = ...
manifest: GlTf
meshHashes: Map<string, number> = ...
options: Required<IWriterOptions>
pendingTasks: Promise<void>[] = []
stats: IWriterStats = ...

Methods

  • addAccessor(accessor: Accessor): number
  • addBufferView(bufferView: BufferView): number
  • addMesh(mesh: Mesh): number
  • computeAccessorHash(accessor: Accessor): string
  • computeBoundsVec3(array: Float32Array): { max: number[]; min: number[] }
  • Parameters

    • array: Float32Array

    Returns { max: number[]; min: number[] }

    • max: number[]
    • min: number[]
  • computeBufferHash(buffer: Buffer): string
  • computeBufferViewHash(bufferView: BufferView): string
  • computeMaterialHash(material: null | IPhysicalMaterial): string
  • computeMeshHash(mesh: Mesh): string
  • createAccessor(bufferViewID: number, componentType: number, count: number, type: string, min?: number[], max?: number[]): Accessor
  • Parameters

    • bufferViewID: number
    • componentType: number
    • count: number
    • type: string
    • Optional min: number[]
    • Optional max: number[]

    Returns Accessor

  • createBufferView(data: Buffer): BufferView
  • createLineGeometry(geometry: ILineGeometry, imf: IScene): Mesh
  • createMaterial(mat: null | IPhysicalMaterial, imf: IScene): MaterialPbrMetallicRoughness
  • Parameters

    • mat: null | IPhysicalMaterial
    • imf: IScene

    Returns MaterialPbrMetallicRoughness

  • createMeshGeometry(geometry: IMeshGeometry, imf: IScene, outputUvs: boolean): Mesh
  • createNode(fragment: IObjectNode, imf: IScene, outputUvs: boolean): Node
  • createPointGeometry(geometry: IPointGeometry, imf: IScene): Mesh
  • createScene(imf: IScene): Scene
  • createTexture(uri: string, imf: IScene): Texture
  • postprocess(imf: IScene, gltfPath: string): Promise<void>
  • reset(outputDir: string): void
  • serializeManifest(manifest: GlTf, outputPath: string): void
  • write(imf: IScene, outputDir: string): Promise<void>

Properties

accessorHashes: Map<string, number> = ...
baseDir: string
bufferSize: number
bufferStream: null | WriteStream
bufferViewCache: Map<string, BufferView> = ...
bufferViewHashes: Map<string, number> = ...
manifest: GlTf
meshHashes: Map<string, number> = ...
options: Required<IWriterOptions>
pendingTasks: Promise<void>[] = []
stats: IWriterStats = ...

Methods

  • addAccessor(accessor: Accessor): number
  • addBufferView(bufferView: BufferView): number
  • addMesh(mesh: Mesh): number
  • computeAccessorHash(accessor: Accessor): string
  • computeBoundsVec3(array: Float32Array): { max: number[]; min: number[] }
  • Parameters

    • array: Float32Array

    Returns { max: number[]; min: number[] }

    • max: number[]
    • min: number[]
  • computeBufferHash(buffer: Buffer): string
  • computeBufferViewHash(bufferView: BufferView): string
  • computeMaterialHash(material: null | IPhysicalMaterial): string
  • computeMeshHash(mesh: Mesh): string
  • createAccessor(bufferViewID: number, componentType: number, count: number, type: string, min?: number[], max?: number[]): Accessor
  • Parameters

    • bufferViewID: number
    • componentType: number
    • count: number
    • type: string
    • Optional min: number[]
    • Optional max: number[]

    Returns Accessor

  • createBufferView(data: Buffer): BufferView
  • createLineGeometry(geometry: ILineGeometry, imf: IScene): Mesh
  • createMaterial(mat: null | IPhysicalMaterial, imf: IScene): MaterialPbrMetallicRoughness
  • Parameters

    • mat: null | IPhysicalMaterial
    • imf: IScene

    Returns MaterialPbrMetallicRoughness

  • createMeshGeometry(geometry: IMeshGeometry, imf: IScene, outputUvs: boolean): Mesh
  • createNode(fragment: IObjectNode, imf: IScene, outputUvs: boolean): Node
  • createPointGeometry(geometry: IPointGeometry, imf: IScene): Mesh
  • createScene(imf: IScene): Scene
  • createTexture(uri: string, imf: IScene): Texture
  • postprocess(imf: IScene, gltfPath: string): Promise<void>
  • reset(outputDir: string): void
  • serializeManifest(manifest: GlTf, outputPath: string): void
  • write(imf: IScene, outputDir: string): Promise<void>

Hierarchy

  • SvfReader

Index

Constructors

  • new SvfReader(svf: Buffer, resolve: (uri: string) => Promise<Buffer>): SvfReader
  • Parameters

    • svf: Buffer
    • resolve: (uri: string) => Promise<Buffer>
        • (uri: string): Promise<Buffer>
        • Parameters

          • uri: string

          Returns Promise<Buffer>

    Returns SvfReader

Properties

resolve: (uri: string) => Promise<Buffer>

Type declaration

    • (uri: string): Promise<Buffer>
    • Parameters

      • uri: string

      Returns Promise<Buffer>

svf: ISvfRoot

Methods

  • enumerateFragments(): AsyncIterable<IFragment>

Hierarchy

  • SvfReader

Index

Constructors

  • new SvfReader(svf: Buffer, resolve: (uri: string) => Promise<Buffer>): SvfReader
  • Parameters

    • svf: Buffer
    • resolve: (uri: string) => Promise<Buffer>
        • (uri: string): Promise<Buffer>
        • Parameters

          • uri: string

          Returns Promise<Buffer>

    Returns SvfReader

Properties

resolve: (uri: string) => Promise<Buffer>

Type declaration

    • (uri: string): Promise<Buffer>
    • Parameters

      • uri: string

      Returns Promise<Buffer>

svf: ISvfRoot

Methods

  • enumerateFragments(): AsyncIterable<IFragment>
  • Retrieves, parses, and iterates over all SVF fragments.

    async
    generator

    Returns AsyncIterable<IFragment>

    Async iterator over parsed fragments.

    -
  • enumerateGeometries(): AsyncIterable<IGeometryMetadata>
  • enumerateGeometries(): AsyncIterable<IGeometryMetadata>
  • Retrieves, parses, and iterates over all SVF geometry metadata.

    async
    generator

    Returns AsyncIterable<IGeometryMetadata>

    Async iterator over parsed geometry metadata.

    -
  • enumerateMaterials(): AsyncIterable<null | IMaterial>
  • enumerateMaterials(): AsyncIterable<null | IMaterial>
  • Retrieves, parses, and iterates over all SVF materials.

    async
    generator

    Returns AsyncIterable<null | IMaterial>

    Async iterator over parsed materials (or null values for unsupported material types).

    -
  • enumerateMeshPack(packNumber: number): AsyncIterable<null | IMesh | ILines | IPoints>
  • enumerateMeshPack(packNumber: number): AsyncIterable<null | IMesh | ILines | IPoints>
  • Retrieves, parses, and iterates over all meshes, lines, or points in a specific SVF meshpack.

    async
    generator

    Parameters

    • packNumber: number

    Returns AsyncIterable<null | IMesh | ILines | IPoints>

    Async iterator over parsed meshes, lines, or points (or null values for unsupported mesh types).

    -
  • findAsset(query: { type?: AssetType; uri?: string }): undefined | ISvfManifestAsset
  • Parameters

    • query: { type?: AssetType; uri?: string }
      • Optional type?: AssetType
      • Optional uri?: string

    Returns undefined | ISvfManifestAsset

  • getAsset(uri: string): Promise<Buffer>
  • findAsset(query: { type?: AssetType; uri?: string }): undefined | ISvfManifestAsset
  • Parameters

    • query: { type?: AssetType; uri?: string }
      • Optional type?: AssetType
      • Optional uri?: string

    Returns undefined | ISvfManifestAsset

  • getAsset(uri: string): Promise<Buffer>
  • Retrieves raw binary data of a specific SVF asset.

    async

    Parameters

    • uri: string

      Asset URI.

    Returns Promise<Buffer>

    Asset content.

    -
  • getManifest(): Promise<ISvfManifest>
  • getManifest(): Promise<ISvfManifest>
  • Retrieves parsed SVF manifest.

    async

    Returns Promise<ISvfManifest>

    SVF manifest.

    -
  • getMeshPackCount(): number
  • getMeshPackCount(): number
  • getMetadata(): Promise<ISvfMetadata>
  • getMetadata(): Promise<ISvfMetadata>
  • Retrieves parsed SVF metadata.

    async

    Returns Promise<ISvfMetadata>

    SVF metadata.

    -
  • getPropertyDb(): Promise<PropDbReader>
  • getPropertyDb(): Promise<PropDbReader>
  • Retrieves and parses the property database.

    async

    Returns Promise<PropDbReader>

    Property database reader.

    -
  • listImages(): string[]
  • listImages(): string[]
  • Finds URIs of all image assets referenced in the SVF. These can then be retrieved using getAsset.

    Returns string[]

    Image asset URIs.

    -
  • read(options?: IReaderOptions): Promise<IScene>
  • read(options?: IReaderOptions): Promise<IScene>
  • Reads the entire scene and all its referenced assets into memory. In cases where a more granular control is needed (for example, when trying to control memory consumption), consider parsing the different SVF elements individually, using methods like readFragments, enumerateGeometries, etc.

    async

    Parameters

    • Optional options: IReaderOptions

    Returns Promise<IScene>

    Intermediate, in-memory representation of the loaded scene.

    -
  • readFragments(): Promise<IFragment[]>
  • readFragments(): Promise<IFragment[]>
  • Retrieves, parses, and collects all SVF fragments.

    async

    Returns Promise<IFragment[]>

    List of parsed fragments.

    -
  • readGeometries(): Promise<IGeometryMetadata[]>
  • readGeometries(): Promise<IGeometryMetadata[]>
  • Retrieves, parses, and collects all SVF geometry metadata.

    async

    Returns Promise<IGeometryMetadata[]>

    List of parsed geometry metadata.

    -
  • readMaterials(): Promise<(null | IMaterial)[]>
  • readMaterials(): Promise<(null | IMaterial)[]>
  • Retrieves, parses, and collects all SVF materials.

    async

    Returns Promise<(null | IMaterial)[]>

    List of parsed materials (or null values for unsupported material types).

    -
  • readMeshPack(packNumber: number): Promise<(null | IMesh | ILines | IPoints)[]>
  • readMeshPack(packNumber: number): Promise<(null | IMesh | ILines | IPoints)[]>
  • Retrieves, parses, and collects all meshes, lines, or points in a specific SVF meshpack.

    async

    Parameters

    • packNumber: number

      Index of mesh pack file.

    Returns Promise<(null | IMesh | ILines | IPoints)[]>

    List of parsed meshes, lines, or points (or null values for unsupported mesh types).

    -
  • FromDerivativeService(urn: string, guid: string, auth: IAuthOptions, host?: string, region?: Region): Promise<SvfReader>
  • FromDerivativeService(urn: string, guid: string, auth: IAuthOptions, host?: string, region?: Region): Promise<SvfReader>
  • Instantiates new reader for an SVF in Forge Model Derivative service.

    async

    Parameters

    • urn: string

      Forge model URN.

      @@ -83,7 +83,7 @@
    • Optional region: Region

      Optional region to be used by all Forge calls.

    Returns Promise<SvfReader>

    Reader for the provided SVF.

    -
  • FromFileSystem(filepath: string): Promise<SvfReader>
  • FromFileSystem(filepath: string): Promise<SvfReader>
  • Instantiates new reader for an SVF on local file system.

    async

    Parameters

    • filepath: string

      Path to the *.svf file.