Home Reference Source
import {SDFLoader} from 'rabbit-hole'
public class | source

SDFLoader

Extends:

three~EventDispatcher → SDFLoader

Implements:

  • EventListener

An SDF loader.

Constructor Summary

Public Constructor
public

Method Summary

Public Methods
public

clear()

Clears this loader.

public

handleEvent(event: Event)

Handles events.

public

load(descriptions: Array)

Loads the given serialised SDFs but doesn't fully revive them.

This loader will emit a load event when all SDFs have been inflated. The descriptions can then safely be revived using the SDFReviver.

public

loadImage(description: Object)

Loads an image data url for a given serialised SDF.

public

progress(event: Event)

Finishes a loading task.

Public Constructors

public constructor() source

Public Methods

public clear() source

Clears this loader.

public handleEvent(event: Event) source

Handles events.

Params:

NameTypeAttributeDescription
event Event

An event.

public load(descriptions: Array) source

Loads the given serialised SDFs but doesn't fully revive them.

This loader will emit a load event when all SDFs have been inflated. The descriptions can then safely be revived using the SDFReviver.

Params:

NameTypeAttributeDescription
descriptions Array

A list of serialised SDF. The individual descriptions will be inflated.

public loadImage(description: Object) source

Loads an image data url for a given serialised SDF.

Params:

NameTypeAttributeDescription
description Object

A serialised SDF that contains an image data url.

public progress(event: Event) source

Finishes a loading task.

Params:

NameTypeAttributeDescription
event Event
  • optional
  • default: null

An event.