ExternalTexture.html 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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"><code>sourceTexture</code></td>
  34. <td class="description last"><p>The external texture.<br/>Default is <code>null</code>.</p></td>
  35. </tr>
  36. </tbody>
  37. </table>
  38. </div>
  39. </div>
  40. <h2 class="subsection-title">Properties</h2>
  41. <div class="member">
  42. <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>
  43. <div class="description">
  44. <p>This flag can be used for type testing.<br/>Default is <code>true</code>.</p>
  45. </div>
  46. </div>
  47. <div class="member">
  48. <h3 class="name" id="sourceTexture" translate="no">.<a href="#sourceTexture">sourceTexture</a><span class="type-signature"> : WebGLTexture | GPUTexture</span> </h3>
  49. <div class="description">
  50. <p>The external source texture.<br/>Default is <code>null</code>.</p>
  51. </div>
  52. </div>
  53. <h2 class="subsection-title">Source</h2>
  54. <p>
  55. <a href="https://github.com/mrdoob/three.js/blob/master/src/textures/ExternalTexture.js" target="_blank" rel="noopener" translate="no">src/textures/ExternalTexture.js</a>
  56. </p>
  57. </article>
  58. </section>
  59. <script src="../scripts/linenumber.js"></script>
  60. <script src="../scripts/page.js"></script>
  61. </body>
  62. </html>
粤ICP备19079148号