WebGLRenderTarget.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. <h1>[name]</h1>
  12. <div class="desc">A render target is a buffer where the video card draws pixels for a scene that is being rendered in the background. It is used in different effects. </div>
  13. <h2>Constructor</h2>
  14. <h3>[name]([page:Number width], [page:Number height], [page:Object options])</h3>
  15. <div>
  16. width -- The width of the renderTarget. <br />
  17. height -- The height of the renderTarget.
  18. </div>
  19. <div>options is an optional object that holds texture parameters for an auto-generated target texture and depthBuffer/stencilBuffer booleans. For an explanation of the texture parameters see [page:Texture Texture].</div>
  20. <div>
  21. wrapS — [page:Number] default is *THREE.ClampToEdgeWrapping*. <br />
  22. wrapT — [page:Number] default is *THREE.ClampToEdgeWrapping*. <br />
  23. magFilter — [page:Number], default is *THREE.LinearFilter*. <br />
  24. minFilter — [page:Number], default is *THREE.LinearFilter*. <br />
  25. format — [page:Number], default is *THREE.RGBAFormat*. <br />
  26. type — [page:Number], default is *THREE.UnsignedByteType*. <br />
  27. anisotropy — [page:Number], default is *1*. <br />
  28. encoding — [page:Number], default is *THREE.LinearEncoding*. <br />
  29. depthBuffer — [page:Boolean], default is *true*. Set this to false if you don't need it. <br />
  30. stencilBuffer — [page:Boolean], default is *true*. Set this to false if you don't need it.
  31. </div>
  32. <div>
  33. Creates a new render target with a certain width and height.
  34. </div>
  35. <h2>Properties</h2>
  36. <h3>[property:number uuid]</h3>
  37. <div>
  38. A unique number for this render target instance.
  39. </div>
  40. <h3>[property:number width]</h3>
  41. <div>
  42. The width of the render target.
  43. </div>
  44. <h3>[property:number height]</h3>
  45. <div>
  46. The height of the render target.
  47. </div>
  48. <h3>[property:Vector4 scissor]</h3>
  49. <div>
  50. A rectangular area inside the render target's viewport. Fragments that are outside the area will be discarded.
  51. </div>
  52. <h3>[property:boolean scissorTest]</h3>
  53. <div>
  54. Indicates whether the scissor test is active or not.
  55. </div>
  56. <h3>[property:Vector4 viewport]</h3>
  57. <div>
  58. The viewport of this render target.
  59. </div>
  60. <h3>[property:Texture texture]</h3>
  61. <div>
  62. This texture instance holds the rendered pixels. Use it as input for further processing.
  63. </div>
  64. <h3>[property:boolean depthBuffer]</h3>
  65. <div>
  66. Renders to the depth buffer. Default is true.
  67. </div>
  68. <h3>[property:boolean stencilBuffer]</h3>
  69. <div>
  70. Renders to the stencil buffer. Default is true.
  71. </div>
  72. <h3>[property:DepthTexture depthTexture]</h3>
  73. <div>
  74. If set, the scene depth will be rendered to this texture. Default is null.
  75. </div>
  76. <h2>Methods</h2>
  77. <h3>[method:null setSize]( [page:Number width], [page:Number height] )</h3>
  78. <div>
  79. Sets the size of the render target.
  80. </div>
  81. <h3>[method:WebGLRenderTarget clone]()</h3>
  82. <div>
  83. Creates a copy of this render target.
  84. </div>
  85. <h3>[method:WebGLRenderTarget copy]( [page:WebGLRenderTarget source] )</h3>
  86. <div>
  87. Adopts the settings of the given render target.
  88. </div>
  89. <h3>[method:null dispose]()</h3>
  90. <div>
  91. Dispatches a dispose event.
  92. </div>
  93. <h3>[page:EventDispatcher EventDispatcher] methods are available on this class.</h3>
  94. <h2>Source</h2>
  95. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  96. </body>
  97. </html>