Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Cache

A simple caching system, used internally by FileLoader.

Examples

WebGL / geometry / text | WebGL / interactive / instances / gpu | WebGL / loader / ttf

To enable caching across all loaders that use FileLoader THREE.Cache.enabled = true.

Hierarchy

  • Cache

Index

Properties

enabled

enabled: boolean

Whether caching is enabled. Default is false.

default

false

files

files: any

An object that holds cached files.

default

{}

Methods

add

  • add(key: string, file: any): void
  • Adds a cache entry with a key to reference the file. If this key already holds a file, it is overwritten.

    Parameters

    • key: string

      The key to reference the cached file by.

    • file: any

      The file to be cached.

    Returns void

clear

  • clear(): void

get

  • get(key: string): any

remove

  • remove(key: string): void

Generated using TypeDoc