STLFileLoader

STL file type loader. This is a babylon scene loader plugin.

Hierarchy

  • STLFileLoader

Implements

Index

Properties

extensions

Find examples in Playground

Defines the extensions the stl loader is able to load. force data to come in as an ArrayBuffer we'll convert to string if it looks like it's an ASCII .stl

name

Find examples in Playground
name: string

Defines the name of the plugin.

Methods

importMesh

Find examples in Playground
  • Import meshes into a scene.

    Parameters

    • meshesNames: any

      An array of mesh names, a single mesh name, or empty string for all meshes that filter what meshes are imported

    • scene: Scene

      The scene to import into

    • data: any

      The data to import

    • rootUrl: string

      The root url for scene and resources

    • meshes: Nullable<AbstractMesh[]>

      The meshes array to import into

    • particleSystems: Nullable<IParticleSystem[]>

      The particle systems array to import into

    • skeletons: Nullable<Skeleton[]>

      The skeletons array to import into

    Returns boolean

    True if successful or false otherwise

load

Find examples in Playground
  • load(scene: Scene, data: any, rootUrl: string): boolean
  • Load into a scene.

    Parameters

    • scene: Scene

      The scene to load into

    • data: any

      The data to import

    • rootUrl: string

      The root url for scene and resources

    Returns boolean

    true if successful or false otherwise

loadAssetContainer

Find examples in Playground
  • loadAssetContainer(scene: Scene, data: string, rootUrl: string, onError?: function): AssetContainer
  • Load into an asset container.

    Parameters

    • scene: Scene

      The scene to load into

    • data: string

      The data to import

    • rootUrl: string

      The root url for scene and resources

    • Optional onError: function

      The callback when import fails

        • (message: string, exception?: any): void
        • Parameters

          • message: string
          • Optional exception: any

          Returns void

    Returns AssetContainer

    The loaded asset container

Generated using TypeDoc