123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8" />
- <base href="../../" />
- <script src="list.js"></script>
- <script src="page.js"></script>
- <link type="text/css" rel="stylesheet" href="page.css" />
- </head>
- <body>
- <h1>[name]</h1>
- <div class="desc">
- A simple caching system, used internally by [page:FileLoader].
- </div>
- <h2>Examples</h2>
- <div>
- [example:webgl_geometry_text_earcut WebGL / geometry / text / earcut]<br />
- [example:webgl_interactive_instances_gpu WebGL / interactive / instances / gpu]<br />
- [example:webgl_loader_ttf WebGL / loader / ttf]
- </div>
- <h2>Usage</h2>
- <div>To enable caching across all loaders that use [page:FileLoader], set</div>
- <code>
- THREE.Cache.enabled = true.
- </code>
- <h2>Properties</h2>
- <h3>[property:Boolean enabled]</h3>
- <div>Whether caching is enabled. Default is *false*.</div>
- <h3>[property:Object files]</h3>
- <div>An [page:Object object] that holds cached files.</div>
- <h2>Methods</h2>
- <h3>[method:null add]( [page:String key], file )</h3>
- <div>
- [page:String key] — the [page:String key] to reference the cached file by.<br />
- [page:Object file] — The file to be cached.<br /><br />
- Adds a cache entry with a key to reference the file. If this key already holds a file,
- it is overwritten.
- </div>
- <h3>[method:null get]( [page:String key] )</h3>
- <div>
- [page:String key] — A string key <br /><br />
- Get the value of [page:String key]. If the key does not exist *undefined* is returned.
- </div>
- <h3>[method:null remove]( [page:String key] )</h3>
- <div>
- [page:String key] — A string key that references a cached file.<br /><br />
- Remove the cached file associated with the key.
- </div>
- <h3>[method:null clear]()</h3>
- <div>Remove all values from the cache.</div>
- <h2>Source</h2>
- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
- </body>
- </html>
|