Adds multiple shader chunks to the Map. This method accepts an object where the keys are the names of the shader chunks and the values are the shader source code. If an element with the same name already exists, the element will be updated.
Object containing shader chunks.
The ShaderChunkMap instance.
Removes all shader chunks from the Map.
Removes a shader chunk by name from the Map. If the element does not exist, no action is taken.
The name of the shader chunk to remove.
True if an element in the Map existed and has been removed, or false if the element does not exist.
Adds a new shader chunk with a specified name and shader source code to the Map. If an element with the same name already exists, the element will be updated.
The name of the shader chunk.
The shader source code.
The ShaderChunkMap instance.
A collection of shader chunks, used by ShaderChunks. This is a map of shader chunk names to their code. As this class extends
Map
, it can be used as aMap
as well in addition to custom functionality it provides.