cubeforge 0.3.2 → 0.3.3
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/index.js +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3718,6 +3718,7 @@ function Sprite({
|
|
|
3718
3718
|
const viteEnv = import.meta.env;
|
|
3719
3719
|
const base = (viteEnv?.BASE_URL ?? "/").replace(/\/$/, "");
|
|
3720
3720
|
const resolvedSrc = base && src.startsWith("/") ? base + src : src;
|
|
3721
|
+
comp.src = resolvedSrc;
|
|
3721
3722
|
engine.assets.loadImage(resolvedSrc).then((img) => {
|
|
3722
3723
|
const c = engine.ecs.getComponent(entityId, "Sprite");
|
|
3723
3724
|
if (c) c.image = img;
|