Merge pull request #254 from paulkaplan/skin-size
Add method for getting the size of a skin by skin id.
This commit is contained in:
commit
4d1aed64a7
@ -478,9 +478,19 @@ class RenderWebGL extends EventEmitter {
|
||||
* @param {int} drawableID The ID of the Drawable to measure.
|
||||
* @return {Array<number>} Skin size, width and height.
|
||||
*/
|
||||
getSkinSize (drawableID) {
|
||||
getCurrentSkinSize (drawableID) {
|
||||
const drawable = this._allDrawables[drawableID];
|
||||
return drawable.skin.size;
|
||||
return this.getSkinSize(drawable.skin.id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the size of a skin by ID.
|
||||
* @param {int} skinID The ID of the Skin to measure.
|
||||
* @return {Array<number>} Skin size, width and height.
|
||||
*/
|
||||
getSkinSize (skinID) {
|
||||
const skin = this._allSkins[skinID];
|
||||
return skin.size;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user