mirror of
https://github.com/jiawanlong/Cesium-Examples.git
synced 2025-07-06 16:31:03 +00:00
50 lines
770 B
JavaScript
50 lines
770 B
JavaScript
import NodeMaterial, { addNodeMaterial } from './NodeMaterial.js';
|
|
|
|
import { PointsMaterial } from 'three';
|
|
|
|
const defaultValues = new PointsMaterial();
|
|
|
|
class PointsNodeMaterial extends NodeMaterial {
|
|
|
|
constructor( parameters ) {
|
|
|
|
super();
|
|
|
|
this.isPointsNodeMaterial = true;
|
|
|
|
this.lights = false;
|
|
this.normals = false;
|
|
|
|
this.transparent = true;
|
|
|
|
this.colorNode = null;
|
|
this.opacityNode = null;
|
|
|
|
this.alphaTestNode = null;
|
|
|
|
this.lightNode = null;
|
|
|
|
this.sizeNode = null;
|
|
|
|
this.positionNode = null;
|
|
|
|
this.setDefaultValues( defaultValues );
|
|
|
|
this.setValues( parameters );
|
|
|
|
}
|
|
|
|
copy( source ) {
|
|
|
|
this.sizeNode = source.sizeNode;
|
|
|
|
return super.copy( source );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
export default PointsNodeMaterial;
|
|
|
|
addNodeMaterial( PointsNodeMaterial );
|