krot-phaser
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "krot-phaser", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,2 +0,2 @@ | ||
const {getKeyAndFrameName, isDefaultFrame} = require("./utils"); | ||
const {getKeyAndFrameName, getImageByTextureName} = require("./utils"); | ||
@@ -33,3 +33,4 @@ const Sprite = Phaser.Sprite; | ||
get() { | ||
return isDefaultFrame(this.key, this.animations.frameName) ? this.key : this.frameName; | ||
const image = getImageByTextureName(this.key); | ||
return image.frameData.getFrames().length === 1 ? this.key : this.frameName; | ||
}, | ||
@@ -36,0 +37,0 @@ }); |
@@ -59,7 +59,2 @@ let frameNameKeyMap = {}; | ||
const isDefaultFrame = (key, frameName) => { | ||
const image = game.cache.getImage(key, Phaser.Cache.IMAGE); | ||
return image.frameData.getFrame(0).name === frameName; | ||
}; | ||
module.exports = {getKeyAndFrameName, getImageByTextureName, isDefaultFrame}; | ||
module.exports = {getKeyAndFrameName, getImageByTextureName}; |
Sorry, the diff of this file is not supported yet
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
26664
0
560