@rpg-engine/long-bow 0.5.6 → 0.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/long-bow.cjs.development.js +4 -1
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +4 -1
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/shared/SpriteFromAtlas.tsx +6 -1
|
@@ -124,7 +124,10 @@ var SpriteFromAtlas = function SpriteFromAtlas(_ref) {
|
|
|
124
124
|
//! If an item is not showing, remember that you MUST run yarn atlas:copy everytime you add a new item to the atlas (it will sync our public folder atlas with src/atlas).
|
|
125
125
|
//!Due to React's limitations, we cannot import it from the public folder directly!
|
|
126
126
|
var spriteData = (atlasJSON == null ? void 0 : (_atlasJSON$frames = atlasJSON.frames) == null ? void 0 : _atlasJSON$frames[spriteKey]) || (atlasJSON == null ? void 0 : (_atlasJSON$frames2 = atlasJSON.frames) == null ? void 0 : _atlasJSON$frames2['others/no-image.png']);
|
|
127
|
-
if (!spriteData)
|
|
127
|
+
if (!spriteData) {
|
|
128
|
+
console.error("SpriteFromAtlas: Could not find sprite with key " + spriteKey + " in atlasJSON.");
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
128
131
|
return React__default.createElement(Container, {
|
|
129
132
|
width: width,
|
|
130
133
|
height: height,
|