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

Method _updateCharacterAtlas

src/tools/texture-lab/renderer.js:299–309  ·  view source on GitHub ↗
(charset)

Source from the content-addressed store, hash-verified

297 }
298
299 _updateCharacterAtlas(charset) {
300 if (this.currentCharset === charset) return;
301
302 this.currentCharset = charset;
303 const atlasCanvas = generateCharacterAtlas(charset, 32);
304
305 if (this.textures.charAtlas) {
306 this.gl.deleteTexture(this.textures.charAtlas);
307 }
308 this.textures.charAtlas = this._createTexture(atlasCanvas);
309 }
310
311 render(effects, seed, targetWidth, targetHeight) {
312 const gl = this.gl;

Callers 1

_renderAsciiMethod · 0.95

Calls 2

_createTextureMethod · 0.95
generateCharacterAtlasFunction · 0.85

Tested by

no test coverage detected