src/textures.js
function createSamplers(gl, samplerOptions) {
  const samplers = {};
  Object.keys(samplerOptions).forEach(function(name) {
    samplers[name] = createSampler(gl, samplerOptions[name]);
  });
  return samplers;
}
function createSamplers(gl, samplerOptions) {
  const samplers = {};
  Object.keys(samplerOptions).forEach(function(name) {
    samplers[name] = createSampler(gl, samplerOptions[name]);
  });
  return samplers;
}
function createSamplers ( gl , samplerOptions ) { const samplers = { } ; Object . keys ( samplerOptions ) . forEach ( function ( name ) { samplers [ name ] = createSampler ( gl , samplerOptions [ name ] ) ; } ) ; return samplers ; }
Creates a multiple sampler objects and sets parameters on each.

Example:

const samplers = twgl.createSamplers(gl, {
nearest: {
minMag: gl.NEAREST,
},
nearestClampS: {
minMag: gl.NEAREST,
wrapS: gl.CLAMP_TO_NEAREST,
},
linear: {
minMag: gl.LINEAR,
},
nearestClamp: {
minMag: gl.NEAREST,
wrap: gl.CLAMP_TO_EDGE,
},
linearClamp: {
minMag: gl.LINEAR,
wrap: gl.CLAMP_TO_EDGE,
},
linearClampT: {
minMag: gl.LINEAR,
wrapT: gl.CLAMP_TO_EDGE,
},
});

@param {WebGLRenderingContext} gl the WebGLRenderingContext
@param {module:twgl.TextureOptions} [options] A TextureOptions object with whatever parameters you want set on the sampler
@private
Creates a multiple sampler objects and sets parameters on each .