OSDN Git Service

three.jsをThirdPartyに追加
[webglgame/webgl_framework.git] / webglFramework / Thirdparty / three.js-master / docs / api / loaders / Cache.html
1 <!DOCTYPE html>
2 <html lang="en">
3         <head>
4                 <meta charset="utf-8" />
5                 <base href="../../" />
6                 <script src="list.js"></script>
7                 <script src="page.js"></script>
8                 <link type="text/css" rel="stylesheet" href="page.css" />
9         </head>
10         <body>
11                 <h1>[name]</h1>
12
13                 <div class="desc">
14                         A simple caching system, used internally by [page:FileLoader].
15                 </div>
16
17                 <h2>Examples</h2>
18
19                 <div>
20                         [example:webgl_geometry_text_earcut WebGL / geometry / text / earcut]<br />
21                         [example:webgl_interactive_instances_gpu WebGL / interactive / instances / gpu]<br />
22                         [example:webgl_loader_ttf WebGL / loader / ttf]
23                 </div>
24
25                 <h2>Usage</h2>
26
27                 <div>To enable caching across all loaders       that use [page:FileLoader], set</div>
28                 <code>
29 THREE.Cache.enabled = true.
30                 </code>
31
32
33                 <h2>Properties</h2>
34
35                 <h3>[property:Boolean enabled]</h3>
36                 <div>Whether caching is enabled. Default is *false*.</div>
37
38                 <h3>[property:Object files]</h3>
39                 <div>An [page:Object object] that holds cached files.</div>
40
41
42                 <h2>Methods</h2>
43
44                 <h3>[method:null add]( [page:String key], file )</h3>
45                 <div>
46                 [page:String key] — the [page:String key] to reference the cached file by.<br />
47                 [page:Object file] — The file to be cached.<br /><br />
48
49                 Adds a cache entry with a key to reference the file. If this key already holds a file,
50                 it is overwritten.
51                 </div>
52
53                 <h3>[method:null get]( [page:String key] )</h3>
54                 <div>
55                 [page:String key] — A string key <br /><br />
56
57                 Get the value of [page:String key]. If the key does not exist *undefined* is returned.
58                 </div>
59
60                 <h3>[method:null remove]( [page:String key] )</h3>
61                 <div>
62                 [page:String key] — A string key that references a cached file.<br /><br />
63
64                 Remove the cached file associated with the key.
65                 </div>
66
67                 <h3>[method:null clear]()</h3>
68                 <div>Remove all values from the cache.</div>
69
70
71                 <h2>Source</h2>
72
73                 [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
74         </body>
75 </html>