Class SceneLoader

A loader for loading a complete scene out of a JSON file.

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(): SceneLoader

Returns

SceneLoader

Properties

public callbackProgress: (progress: THREE.SceneLoaderProgress, result: THREE.SceneLoaderResult) => void

Will be called as load progresses. The default is a function with empty body.

public callbackSync: (result: THREE.SceneLoaderResult) => void

Will be called when load completes. The default is a function with empty body.

public geometryHandlers: any

public hierarchyHandlers: any

public onLoadComplete: () => void

Will be called when each element in the scene completes loading. The default is a function with empty body.

public onLoadProgress: () => void

Will be called while load progresses. The default is a function with empty body.

public onLoadStart: () => void

Will be called when load starts. The default is a function with empty body.

Methods

public addGeometryHandler(typeID: string, loaderClass: any)

Parameters

  • typeID: string
  • loaderClass: any

public addHierarchyHandler(typeID: string, loaderClass: any)

Parameters

  • typeID: string
  • loaderClass: any

public load(url: string, onLoad: (result: THREE.SceneLoaderResult) => void)

Parameters

  • url: string
  • onLoad: (result: THREE.SceneLoaderResult) => void

public parse(json: any, callbackFinished: (result: THREE.SceneLoaderResult) => void, url: string)

Parameters

  • json: any
  • callbackFinished: (result: THREE.SceneLoaderResult) => void
  • url: string

public setCrossOrigin(crossOrigin: string)

Parameters

  • crossOrigin: string