ExternalTexture.html 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>ExternalTexture - 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. <p class="inheritance" translate="no"><a href="EventDispatcher.html">EventDispatcher</a> → <a href="Texture.html">Texture</a> → </p>
  13. <h1 translate="no">ExternalTexture</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>Represents a texture created externally with the same renderer context.</p>
  17. <p>This may be a texture from a protected media stream, device camera feed,
  18. or other data feeds like a depth sensor.</p>
  19. <p>Note that this class is only supported in <a href="WebGLRenderer.html">WebGLRenderer</a>, and in
  20. the <a href="WebGPURenderer.html">WebGPURenderer</a> WebGPU backend.</p></div>
  21. </header>
  22. <article>
  23. <div class="container-overview">
  24. <h2>Constructor</h2>
  25. <h3 class="name name-method" id="ExternalTexture" translate="no">new <a href="#ExternalTexture">ExternalTexture</a><span class="signature">( sourceTexture : <span class="param-type">WebGLTexture | GPUTexture</span> )</span> </h3>
  26. <div class="method">
  27. <div class="description">
  28. <p>Creates a new raw texture.</p>
  29. </div>
  30. <table class="params">
  31. <tbody>
  32. <tr>
  33. <td class="name">
  34. <strong>sourceTexture</strong>
  35. </td>
  36. <td class="description last">
  37. <p>The external texture.</p>
  38. <p>Default is <code>null</code>.</p>
  39. </td>
  40. </tr>
  41. </tbody>
  42. </table>
  43. </div>
  44. </div>
  45. <h2 class="subsection-title">Properties</h2>
  46. <div class="member">
  47. <h3 class="name" id="isExternalTexture" translate="no">.<a href="#isExternalTexture">isExternalTexture</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  48. <div class="description">
  49. <p>This flag can be used for type testing.</p>
  50. <p>Default is <code>true</code>.</p>
  51. </div>
  52. </div>
  53. <div class="member">
  54. <h3 class="name" id="sourceTexture" translate="no">.<a href="#sourceTexture">sourceTexture</a><span class="type-signature"> : WebGLTexture | GPUTexture</span> </h3>
  55. <div class="description">
  56. <p>The external source texture.</p>
  57. <p>Default is <code>null</code>.</p>
  58. </div>
  59. </div>
  60. <h2 class="subsection-title">Source</h2>
  61. <p>
  62. <a href="https://github.com/mrdoob/three.js/blob/master/src/textures/ExternalTexture.js" translate="no" target="_blank" rel="noopener">src/textures/ExternalTexture.js</a>
  63. </p>
  64. </article>
  65. </section>
  66. <script src="../scripts/linenumber.js"></script>
  67. <script src="../scripts/page.js"></script>
  68. </body>
  69. </html>
粤ICP备19079148号