MCPcopy Create free account
hub / github.com/Code-Bullet/Jump-King / GlyphSet

Function GlyphSet

libraries/p5.js:2135–2145  ·  view source on GitHub ↗
(font, glyphs)

Source from the content-addressed store, hash-verified

2133// a deferred glyph loader, for retrieving glyphs only once they are absolutely
2134// necessary, to keep the memory footprint down.
2135function GlyphSet(font, glyphs) {
2136 this.font = font;
2137 this.glyphs = {};
2138 if (Array.isArray(glyphs)) {
2139 for (var i = 0; i < glyphs.length; i++) {
2140 this.glyphs[i] = glyphs[i];
2141 }
2142 }
2143
2144 this.length = (glyphs && glyphs.length) || 0;
2145}
2146
2147GlyphSet.prototype.get = function(index) {
2148 if (typeof this.glyphs[index] === 'function') {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected