Lensflare Go through My Car

this is my code: http://www.izhao.top/static/threejs/js/main.js

and Lensflare just cross my object. some help?

	function addLightBehind(c, h, s, l, x, y, z) {
	var light = new THREE.PointLight(c, 0, 50);
	light.color.setHSL(h, s, l);
	light.position.set(x, y, z);
	light.visible = false;

	var lensflare = new THREE.Lensflare();
	c === 0xffffff ?
	lensflare.addElement(new THREE.LensflareElement(textureFlare0, 300, 0, light.color)): 
	lensflare.addElement(new THREE.LensflareElement(textureFlare1, 300, 0, light.color));

Please share a URL to your app.

Same thing happens in my app. Lens flare goes through my terrain. Looks similar to what you posted. This has happened before the lensflare refactoring as well.

@1114 @titansoftime could one of you create a minimal live example that demonstrates the problem?

It’s all very well to say ‘my huge app has x problem’, but nobody can debug that except for you.

Whereas if you say ‘here’s a 100 line codepen that demonstrates x problem’, then we can take a look and help you to find the bug or error.


The website seems unreachable. I can’t open it…


thanks so much.

I’m still unable to open your website since it takes ages to load the content.

I was able to open that website, but I’m not so good with hieroglyphs (okay, I can’t read them at all), so I just randomly clicked the buttons there, then a car was loaded, but there wasn’t the effect of lensflares.

hi, just click the button “开灯” on the right of the screen,and you will see the light.

my web server is in China, may it is very slow.


No “me too’s” here, got it. Sorry for offending.

@titansoftime me toos are cool, just make sure that they are useful :stuck_out_tongue:

I mean, it seems likely that there’s a bug in the lensflare from this post, but until someone demonstrates it in a clear and reproducible manner it probably won’t get fixed.


help is needed!!

headlights. as in everything will accept libraries + textures

while the light does not work well, the light trembles when it covers the 3d prayer.

1114 - Have you solved your problem?