bitbybit.dev v1.0.0-rc.1
    Preparing search index...

    Class ExportDocumentToGltfDto<T>

    DTO for exporting an assembly document directly to glTF (GLB) format. Takes the document handle directly.

    Type Parameters

    • T
    Index

    Constructors

    • Type Parameters

      • T

      Parameters

      • Optionaldocument: T
      • OptionalmeshDeflection: number
      • OptionalmeshAngle: number
      • OptionalmergeFaces: boolean
      • OptionalforceUVExport: boolean
      • OptionalfileName: string
      • OptionaltryDownload: boolean

      Returns ExportDocumentToGltfDto<T>

    Properties

    document: T

    Assembly document handle from buildAssemblyDocument or loadStepToDoc

    undefined
    
    meshDeflection: number

    Mesh precision for triangulation. Lower values = finer mesh.

    0.1
    
    meshAngle: number

    Angular deflection for meshing in radians. Lower values = smoother curves.

    0.5
    
    mergeFaces: boolean

    Whether to merge faces with same material for optimization. Set to false to preserve face boundaries.

    false
    
    forceUVExport: boolean

    Whether to texture coordinates (UVs).

    false
    
    fileName: string

    File name for download (optional, should end with .glb)

    assembly.glb
    
    tryDownload: boolean

    Whether to trigger a file download in the browser

    false