Skip to content

⬅️ Back to Table of Contents

📄 Cache.js

📊 Analysis Summary

Metric Count
🔧 Functions 24
📊 Variables & Constants 1

📚 Table of Contents

🛠️ File Location:

📂 src/loaders/Cache.js

Variables & Constants

Name Type Kind Value Exported
Cache { enabled: boolean; files: { [x: stri... let/var { /** * Whether caching is enabled or not. * * @static * @type {boolean} * @d...

Functions

add(key: string, file: any): void

Parameters:

  • key string
  • file any

Returns: void

Internal Comments:

// console.log( 'THREE.Cache', 'Adding key:', key ); (x5)

Code
function ( key, file ) {

        if ( this.enabled === false ) return;

        // console.log( 'THREE.Cache', 'Adding key:', key );

        this.files[ key ] = file;

    }

get(key: string): any

Parameters:

  • key string

Returns: any

Internal Comments:

// console.log( 'THREE.Cache', 'Checking key:', key );

Code
function ( key ) {

        if ( this.enabled === false ) return;

        // console.log( 'THREE.Cache', 'Checking key:', key );

        return this.files[ key ];

    }

remove(key: string): void

Parameters:

  • key string

Returns: void

Code
function ( key ) {

        delete this.files[ key ];

    }

clear(): void

Returns: void

Code
function () {

        this.files = {};

    }

add(key: string, file: any): void

Parameters:

  • key string
  • file any

Returns: void

Internal Comments:

// console.log( 'THREE.Cache', 'Adding key:', key ); (x5)

Code
function ( key, file ) {

        if ( this.enabled === false ) return;

        // console.log( 'THREE.Cache', 'Adding key:', key );

        this.files[ key ] = file;

    }

get(key: string): any

Parameters:

  • key string

Returns: any

Internal Comments:

// console.log( 'THREE.Cache', 'Checking key:', key );

Code
function ( key ) {

        if ( this.enabled === false ) return;

        // console.log( 'THREE.Cache', 'Checking key:', key );

        return this.files[ key ];

    }

remove(key: string): void

Parameters:

  • key string

Returns: void

Code
function ( key ) {

        delete this.files[ key ];

    }

clear(): void

Returns: void

Code
function () {

        this.files = {};

    }

add(key: string, file: any): void

Parameters:

  • key string
  • file any

Returns: void

Internal Comments:

// console.log( 'THREE.Cache', 'Adding key:', key ); (x5)

Code
function ( key, file ) {

        if ( this.enabled === false ) return;

        // console.log( 'THREE.Cache', 'Adding key:', key );

        this.files[ key ] = file;

    }

get(key: string): any

Parameters:

  • key string

Returns: any

Internal Comments:

// console.log( 'THREE.Cache', 'Checking key:', key );

Code
function ( key ) {

        if ( this.enabled === false ) return;

        // console.log( 'THREE.Cache', 'Checking key:', key );

        return this.files[ key ];

    }

remove(key: string): void

Parameters:

  • key string

Returns: void

Code
function ( key ) {

        delete this.files[ key ];

    }

clear(): void

Returns: void

Code
function () {

        this.files = {};

    }

add(key: string, file: any): void

Parameters:

  • key string
  • file any

Returns: void

Internal Comments:

// console.log( 'THREE.Cache', 'Adding key:', key ); (x5)

Code
function ( key, file ) {

        if ( this.enabled === false ) return;

        // console.log( 'THREE.Cache', 'Adding key:', key );

        this.files[ key ] = file;

    }

get(key: string): any

Parameters:

  • key string

Returns: any

Internal Comments:

// console.log( 'THREE.Cache', 'Checking key:', key );

Code
function ( key ) {

        if ( this.enabled === false ) return;

        // console.log( 'THREE.Cache', 'Checking key:', key );

        return this.files[ key ];

    }

remove(key: string): void

Parameters:

  • key string

Returns: void

Code
function ( key ) {

        delete this.files[ key ];

    }

clear(): void

Returns: void

Code
function () {

        this.files = {};

    }

add(key: string, file: any): void

Parameters:

  • key string
  • file any

Returns: void

Internal Comments:

// console.log( 'THREE.Cache', 'Adding key:', key ); (x5)

Code
function ( key, file ) {

        if ( this.enabled === false ) return;

        // console.log( 'THREE.Cache', 'Adding key:', key );

        this.files[ key ] = file;

    }

get(key: string): any

Parameters:

  • key string

Returns: any

Internal Comments:

// console.log( 'THREE.Cache', 'Checking key:', key );

Code
function ( key ) {

        if ( this.enabled === false ) return;

        // console.log( 'THREE.Cache', 'Checking key:', key );

        return this.files[ key ];

    }

remove(key: string): void

Parameters:

  • key string

Returns: void

Code
function ( key ) {

        delete this.files[ key ];

    }

clear(): void

Returns: void

Code
function () {

        this.files = {};

    }

add(key: string, file: any): void

Parameters:

  • key string
  • file any

Returns: void

Internal Comments:

// console.log( 'THREE.Cache', 'Adding key:', key ); (x5)

Code
function ( key, file ) {

        if ( this.enabled === false ) return;

        // console.log( 'THREE.Cache', 'Adding key:', key );

        this.files[ key ] = file;

    }

get(key: string): any

Parameters:

  • key string

Returns: any

Internal Comments:

// console.log( 'THREE.Cache', 'Checking key:', key );

Code
function ( key ) {

        if ( this.enabled === false ) return;

        // console.log( 'THREE.Cache', 'Checking key:', key );

        return this.files[ key ];

    }

remove(key: string): void

Parameters:

  • key string

Returns: void

Code
function ( key ) {

        delete this.files[ key ];

    }

clear(): void

Returns: void

Code
function () {

        this.files = {};

    }