If the levels property is not passed to the texture constructor, then when trying to lock a level via the lock method it always returns undefined. The problem is that the code checks only for null, but the actual issue is the absence of the level entry; instead, it should check for emptiness, i.e., !levels[options.level].
|
if (levels[options.level] === null) { |
If the
levelsproperty is not passed to the texture constructor, then when trying to lock a level via thelockmethod it always returnsundefined. The problem is that the code checks only fornull, but the actual issue is the absence of the level entry; instead, it should check for emptiness, i.e.,!levels[options.level].engine/src/platform/graphics/texture.js
Line 1042 in 950bccc