LoaderUtils.html 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>LoaderUtils - Three.js Docs</title>
  6. <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
  7. <script src="../scripts/highlight.min.js"></script>
  8. <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
  9. <link type="text/css" rel="stylesheet" href="../styles/page.css">
  10. </head>
  11. <body>
  12. <h1 translate="no">LoaderUtils</h1>
  13. <section>
  14. <header>
  15. <div class="class-description"><p>A class with loader utility functions.</p></div>
  16. </header>
  17. <article>
  18. <div class="container-overview">
  19. <h2>Constructor</h2>
  20. <h3 class="name name-method" id="LoaderUtils" translate="no">new <a href="#LoaderUtils">LoaderUtils</a><span class="signature">()</span> </h3>
  21. <div class="method">
  22. </div>
  23. </div>
  24. <h2 class="subsection-title">Static Methods</h2>
  25. <h3 class="name name-method" id=".extractUrlBase" translate="no">.<a href="#.extractUrlBase">extractUrlBase</a><span class="signature">( url : <span class="param-type">string</span> )</span><span class="type-signature"> : string</span> </h3>
  26. <div class="method">
  27. <div class="description">
  28. <p>Extracts the base URL from the given URL.</p>
  29. </div>
  30. <table class="params">
  31. <tbody>
  32. <tr>
  33. <td class="name"><code>url</code></td>
  34. <td class="description last"><p>The URL to extract the base URL from.</p></td>
  35. </tr>
  36. </tbody>
  37. </table>
  38. <dl class="details">
  39. <dt class="tag-returns"><strong>Returns:</strong> The extracted base URL.</dt>
  40. </dl>
  41. </div>
  42. <h3 class="name name-method" id=".resolveURL" translate="no">.<a href="#.resolveURL">resolveURL</a><span class="signature">( url : <span class="param-type">string</span>, path : <span class="param-type">string</span> )</span><span class="type-signature"> : string</span> </h3>
  43. <div class="method">
  44. <div class="description">
  45. <p>Resolves relative URLs against the given path. Absolute paths, data urls,
  46. and blob URLs will be returned as is. Invalid URLs will return an empty
  47. string.</p>
  48. </div>
  49. <table class="params">
  50. <tbody>
  51. <tr>
  52. <td class="name"><code>url</code></td>
  53. <td class="description last"><p>The URL to resolve.</p></td>
  54. </tr>
  55. <tr>
  56. <td class="name"><code>path</code></td>
  57. <td class="description last"><p>The base path for relative URLs to be resolved against.</p></td>
  58. </tr>
  59. </tbody>
  60. </table>
  61. <dl class="details">
  62. <dt class="tag-returns"><strong>Returns:</strong> The resolved URL.</dt>
  63. </dl>
  64. </div>
  65. <h2 class="subsection-title">Source</h2>
  66. <p>
  67. <a href="https://github.com/mrdoob/three.js/blob/master/src/loaders/LoaderUtils.js" target="_blank" rel="noopener" translate="no">src/loaders/LoaderUtils.js</a>
  68. </p>
  69. </article>
  70. </section>
  71. <script src="../scripts/linenumber.js"></script>
  72. <script src="../scripts/page.js"></script>
  73. </body>
  74. </html>
粤ICP备19079148号