three.js: Setting lights: true on THREE.PointsMaterial breaks

(*** This section is for bug reports and feature requests only. This is NOT a help site. Do not ask help questions here. If you need help, please use stackoverflow. ***)

Description of the problem
var starsMaterialx = new THREE.PointsMaterial( { color: 0xFFFFFF, size: 5, lights: true } );
returns
Uncaught TypeError: Cannot set property 'value' of undefined
    at t (three.min.js:136)
while
var starsMaterialx = new THREE.PointsMaterial( { color: 0xFFFFFF, size: 5 } );
and
var starsMaterialx = new THREE.PointsMaterial( { color: 0xFFFFFF, size: 5, lights: false } );
works fine.
Three.js version
  • Dev
  • r82
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • Linux
  • Android
  • IOS
Hardware Requirements (graphics card, VR Device, …)

iMac (Retina 5K, 27-inch, Late 2014) AMD Radeon R9 M295X 4096 MB

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 7
  • Comments: 19 (3 by maintainers)

Most upvoted comments

particle lighting may be computed just by distance from light source (according to intensity, decay, distance parameters of the light sources), it makes sense.

I don’t think MeshBasicMaterial or MeshDepthMaterial were intended to react to lights.

Right. But they have a lights property that a user should not alter.

@mrdoob usually has a clever design solution to situations such as this. : ) Maybe it should be Material._lights.

Thanks. From the code there, PointsMaterial doesn’t seem to work with light yet (does it?). I’ll open PointsMaterial + light feature request issue because this issue has been closed.

Interesting! We should think how to name it… PointsMaterial would become PointsBasicMaterial and we would need Points???Material?