LoaderUtils.html 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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">
  34. <strong>url</strong>
  35. </td>
  36. <td class="description last">
  37. <p>The URL to extract the base URL from.</p>
  38. </td>
  39. </tr>
  40. </tbody>
  41. </table>
  42. <dl class="details">
  43. <dt class="tag-returns"><strong>Returns:</strong> The extracted base URL.</dt>
  44. </dl>
  45. </div>
  46. <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>
  47. <div class="method">
  48. <div class="description">
  49. <p>Resolves relative URLs against the given path. Absolute paths, data urls,
  50. and blob URLs will be returned as is. Invalid URLs will return an empty
  51. string.</p>
  52. </div>
  53. <table class="params">
  54. <tbody>
  55. <tr>
  56. <td class="name">
  57. <strong>url</strong>
  58. </td>
  59. <td class="description last">
  60. <p>The URL to resolve.</p>
  61. </td>
  62. </tr>
  63. <tr>
  64. <td class="name">
  65. <strong>path</strong>
  66. </td>
  67. <td class="description last">
  68. <p>The base path for relative URLs to be resolved against.</p>
  69. </td>
  70. </tr>
  71. </tbody>
  72. </table>
  73. <dl class="details">
  74. <dt class="tag-returns"><strong>Returns:</strong> The resolved URL.</dt>
  75. </dl>
  76. </div>
  77. <h2 class="subsection-title">Source</h2>
  78. <p>
  79. <a href="https://github.com/mrdoob/three.js/blob/master/src/loaders/LoaderUtils.js" translate="no" target="_blank" rel="noopener">src/loaders/LoaderUtils.js</a>
  80. </p>
  81. </article>
  82. </section>
  83. <script src="../scripts/linenumber.js"></script>
  84. <script src="../scripts/page.js"></script>
  85. </body>
  86. </html>
粤ICP备19079148号