RenderPass.js 827 B

123456789101112131415161718192021222324
  1. THREE.RenderPass = function(e, t, i, r, o) {
  2. this.scene = e,
  3. this.camera = t,
  4. this.overrideMaterial = i,
  5. this.clearColor = r,
  6. this.clearAlpha = void 0 !== o ? o : 1,
  7. this.oldClearColor = new THREE.Color,
  8. this.oldClearAlpha = 1,
  9. this.enabled = !0,
  10. this.clear = !0,
  11. this.needsSwap = !1
  12. }
  13. ,
  14. THREE.RenderPass.prototype = {
  15. render: function(e, t, i, n) {
  16. this.scene.overrideMaterial = this.overrideMaterial,
  17. this.clearColor && (this.oldClearColor.copy(e.getClearColor()),
  18. this.oldClearAlpha = e.getClearAlpha(),
  19. e.setClearColor(this.clearColor, this.clearAlpha)),
  20. e.render(this.scene, this.camera, i, this.clear),
  21. this.clearColor && e.setClearColor(this.oldClearColor, this.oldClearAlpha),
  22. this.scene.overrideMaterial = null
  23. }
  24. }