mirror of
https://github.com/jiawanlong/Cesium-Examples.git
synced 2025-07-06 16:31:03 +00:00
31 lines
598 B
JavaScript
31 lines
598 B
JavaScript
import UniformNode from '../core/UniformNode.js';
|
|
import { addNodeClass } from '../core/Node.js';
|
|
import { nodeObject } from '../shadernode/ShaderNode.js';
|
|
|
|
class BufferNode extends UniformNode {
|
|
|
|
constructor( value, bufferType, bufferCount = 0 ) {
|
|
|
|
super( value, bufferType );
|
|
|
|
this.isBufferNode = true;
|
|
|
|
this.bufferType = bufferType;
|
|
this.bufferCount = bufferCount;
|
|
|
|
}
|
|
|
|
getInputType( /*builder*/ ) {
|
|
|
|
return 'buffer';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
export default BufferNode;
|
|
|
|
export const buffer = ( value, type, count ) => nodeObject( new BufferNode( value, type, count ) );
|
|
|
|
addNodeClass( BufferNode );
|