Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaroslav Ivanov committed Dec 18, 2024
1 parent d5ce619 commit 232d907
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "elpy",
"version": "1.1.15",
"version": "1.1.16",
"description": "2D JavaScript game engine.",
"author": "space2pacman",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/EngineObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class EngineObject {
custom: options.custom || null,
color: options.color || 'black',
image: {
src: (typeof options.image === 'object' && options.image !== null ? options.image.path : options.image) || null,
path: (typeof options.image === 'object' && options.image !== null ? options.image.path : options.image) || null,
repeat: (typeof options.image === 'object' && options.image !== null ? options.image.repeat : false) || false,
rendering: false,
cached: null
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ class Engine {
return new Promise(resolve => {
const image = new Image();

image.path = url;
image.src = url;

image.addEventListener('load', () => {
if (state) {
Expand Down

0 comments on commit 232d907

Please sign in to comment.