Skip to content

Commit 232d907

Browse files
author
Yaroslav Ivanov
committed
fix bugs
1 parent d5ce619 commit 232d907

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "elpy",
3-
"version": "1.1.15",
3+
"version": "1.1.16",
44
"description": "2D JavaScript game engine.",
55
"author": "space2pacman",
66
"license": "MIT",

src/EngineObject.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class EngineObject {
5050
custom: options.custom || null,
5151
color: options.color || 'black',
5252
image: {
53-
src: (typeof options.image === 'object' && options.image !== null ? options.image.path : options.image) || null,
53+
path: (typeof options.image === 'object' && options.image !== null ? options.image.path : options.image) || null,
5454
repeat: (typeof options.image === 'object' && options.image !== null ? options.image.repeat : false) || false,
5555
rendering: false,
5656
cached: null

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ class Engine {
267267
return new Promise(resolve => {
268268
const image = new Image();
269269

270-
image.path = url;
270+
image.src = url;
271271

272272
image.addEventListener('load', () => {
273273
if (state) {

0 commit comments

Comments
 (0)