浏览代码

LensFlare: Fix problems with transparent objects

Mugen87 7 年之前
父节点
当前提交
846d03adc9
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      examples/js/objects/LensFlare.js

+ 2 - 0
examples/js/objects/LensFlare.js

@@ -10,6 +10,7 @@ THREE.LensFlare = function () {
 	this.type = 'LensFlare';
 	this.type = 'LensFlare';
 
 
 	this.renderOrder = Infinity; // see #12883
 	this.renderOrder = Infinity; // see #12883
+	this.material.transparent = true;
 	this.frustumCulled = false;
 	this.frustumCulled = false;
 
 
 	//
 	//
@@ -239,6 +240,7 @@ THREE.LensFlareElement = function ( texture, size, distance, color, blending ) {
 
 
 	this.type = 'LensFlareElement';
 	this.type = 'LensFlareElement';
 	this.frustumCulled = false;
 	this.frustumCulled = false;
+	this.renderOrder = Infinity;
 
 
 	this.flareSize = size || 1;
 	this.flareSize = size || 1;
 	this.flareDistance = distance || 0;
 	this.flareDistance = distance || 0;