import { extendedUpgrade , extendedDegrade } from "./extended" ; import { SceneManager } from "../../managers/sceneManager" ; const cache = { } ; param name param upgrade export function getCustomOptimizerByName ( name , upgrade ? ) { if ( ! cache [ name ] ) { switch ( name ) { case 'extended' : if ( upgrade ) { return extendedUpgrade ; } else { return extendedDegrade ; } } } return cache [ name ] ; } export function registerCustomOptimizer ( name , optimizer ) { cache [ name ] = optimizer ; }