Cache.html 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <!DOCTYPE html>
  2. <html lang="it">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="page.css" />
  8. </head>
  9. <body>
  10. <h1>[name]</h1>
  11. <p class="desc">
  12. Un semplice sistema di memorizzazione nella cache, utilizzato internamente dal [page:FileLoader].
  13. </p>
  14. <h2>Codice di Esempio</h2>
  15. <p>Per abilitare la memorizzazione nella cache su tutti i loader che utilizzano il [page:FileLoader], impostare</p>
  16. <code>
  17. THREE.Cache.enabled = true.
  18. </code>
  19. <h2>Esempi</h2>
  20. <p>
  21. [example:webgl_geometry_text WebGL / geometry / text ]<br />
  22. [example:webgl_interactive_instances_gpu WebGL / interactive / instances / gpu]<br />
  23. [example:webgl_loader_ttf WebGL / loader / ttf]
  24. </p>
  25. <h2>Proprietà</h2>
  26. <h3>[property:Boolean enabled]</h3>
  27. <p>Indica se il caching è abilitato. Il valore predefinito è `false`.</p>
  28. <h3>[property:Object files]</h3>
  29. <p>Un [page:Object oggetto] che contiene file memorizzati nella cache.</p>
  30. <h2>Metodi</h2>
  31. <h3>[method:undefined add]( [param:String key], [param:Object file] )</h3>
  32. <p>
  33. [page:String key] — La [page:String chiave] (key) con cui fare riferimento al file memorizzato nella cache.<br />
  34. [page:Object file] — Il file da memorizzare nella cache.<br /><br />
  35. Aggiunge una voce della cache con una chiave che fa riferimento al file. Se questa chiave contiene
  36. già un file, sarà sovrascritta.
  37. </p>
  38. <h3>[method:Any get]( [param:String key] )</h3>
  39. <p>
  40. [page:String key] — Una chiave stringa.<br /><br />
  41. Ottiene il valore di [page:String key]. Se la chiave non esiste restituirà `undefined`.
  42. </p>
  43. <h3>[method:undefined remove]( [param:String key] )</h3>
  44. <p>
  45. [page:String key] — Una chiave stringa che fa riferimento ad un file memorizzato nella cache.<br /><br />
  46. Rimuove il file memorizzato nella cache associato alla chiave.
  47. </p>
  48. <h3>[method:undefined clear]()</h3>
  49. <p>Rimuove tutti i valori dalla cache.</p>
  50. <h2>Source</h2>
  51. <p>
  52. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  53. </p>
  54. </body>
  55. </html>