Why are you implementing this kludge?

PointLight.prototype = Object.assign( Object.create( Light.prototype ), {



= Object.assign( Object.create( Light.prototype ) COMMA BRACKET ?

The code base is starting to drift into tragic javascript over-complexification. There is no valid reason for using it. Shame on you.

You’ll find that JavaScript code contains many commas and brackets. Nonetheless if you have a better suggestion I’m sure the people over on github will be happy to discuss it with you.

This forum is more intended as a place to discuss using three.js rather than how it is implemented.

Yes, return to the two line style of inheritance that still exists in other
classes in the library. eg:

MeshNormalMaterial.prototype = Object.create( Material.prototype );
MeshNormalMaterial.prototype.constructor = MeshNormalMaterial;

The new style is pointlessly convoluted.

This is definitely not a place to be voicing this. Sure, you’re right, now what? Go on github, and raise this issue.

@pailhead https://github.com/mrdoob/three.js/issues/11552

1 Like

@xx-yy-zz It’s very inappropriate to “shame” someone making an incredible piece of open software with no expectation of reward, especially over a matter of opinion and not an objective mistake, especially when you could raise an issue politely, or even change it yourself. It’s open source so other people can contribute, not to provide customer support to angry, entitled people.

PS. Nice job creating a complaint tag just for this post.

1 Like