开发者

lime.fill.Frame isn't a constructor

开发者 https://www.devze.com 2023-04-10 03:42 出处:网络
I\'m trying to write a JS script using Lime.js to make an animation walk across the screen.The source for the image is a spritesheet.When is gets to this

I'm trying to write a JS script using Lime.js to make an animation walk across the screen. The source for the image is a spritesheet. When is gets to this

var frame = new lime.fill.Frame('image.png', 40, 50, 100, 100);

the debugger says that lime.fill.Frame isn't a constructor. Can any开发者_运维百科one help me out with this? I don't understand how to fix this. Thanks.


It seems that the second parameter isn't the "goog.math.Rect" type.
lime.fill.Frame(img, rect, opt_offset, opt_size, opt_rotated)
Image fill. Parameters:
{string|Image|lime.Sprite} img
Image.
{goog.math.Rect} rect
Crop frame.
opt_offset
opt_size
opt_rotated

0

精彩评论

暂无评论...
验证码 换一张
取 消