2
0

WebGLRenderTarget.html 3.8 KB

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