PointsNodeMaterial.js 792 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import NodeMaterial, { addNodeMaterial } from './NodeMaterial.js';
  2. import { PointsMaterial } from 'three';
  3. const defaultValues = new PointsMaterial();
  4. class PointsNodeMaterial extends NodeMaterial {
  5. constructor( parameters ) {
  6. super();
  7. this.isPointsNodeMaterial = true;
  8. this.lights = false;
  9. this.normals = false;
  10. this.transparent = true;
  11. this.colorNode = null;
  12. this.opacityNode = null;
  13. this.alphaTestNode = null;
  14. this.lightNode = null;
  15. this.sizeNode = null;
  16. this.positionNode = null;
  17. this.setDefaultValues( defaultValues );
  18. this.setValues( parameters );
  19. }
  20. copy( source ) {
  21. this.sizeNode = source.sizeNode;
  22. return super.copy( source );
  23. }
  24. }
  25. export default PointsNodeMaterial;
  26. addNodeMaterial( 'PointsNodeMaterial', PointsNodeMaterial );