MCPcopy Create free account
hub / github.com/DavidHDev/react-bits / _ditherMethodToInt

Method _ditherMethodToInt

src/tools/texture-lab/renderer.js:248–259  ·  view source on GitHub ↗
(method)

Source from the content-addressed store, hash-verified

246 }
247
248 _ditherMethodToInt(method) {
249 switch (method) {
250 case DITHER_METHODS.BAYER_2X2:
251 return 0;
252 case DITHER_METHODS.BAYER_4X4:
253 return 1;
254 case DITHER_METHODS.BAYER_8X8:
255 return 2;
256 default:
257 return 1;
258 }
259 }
260
261 setImage(image) {
262 if (this.textures.source) {

Callers 1

_renderDitherMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected