MCPcopy Create free account
hub / github.com/melonjs/melonJS / normalizeRepeat

Function normalizeRepeat

packages/melonjs/src/video/texture/cache.js:12–14  ·  view source on GitHub ↗
(repeat)

Source from the content-addressed store, hash-verified

10// indefinitely and leak texture-unit slots.
11const VALID_REPEATS = new Set(["repeat", "repeat-x", "repeat-y", "no-repeat"]);
12function normalizeRepeat(repeat) {
13 return VALID_REPEATS.has(repeat) ? repeat : "no-repeat";
14}
15
16/**
17 * a basic texture cache object

Callers 3

freeTextureUnitMethod · 0.85
getUnitMethod · 0.85
peekUnitMethod · 0.85

Calls 1

hasMethod · 0.45

Tested by

no test coverage detected