caleb531 / jcanvas

A jQuery plugin that makes the HTML5 canvas easy to work with.
https://projects.calebevans.me/jcanvas/
MIT License
626 stars 192 forks source link

Pattern Layer #28

Closed kiki90 closed 12 years ago

kiki90 commented 12 years ago

Hi

I have this code:

function draw(patt){ $('canvas').drawRect({ fillStyle: patt, //x: 0, y: 0, width: 9000, height: 10800, fromCenter: false, layer: true, name: 'first' }); }

var patt = $('canvas').pattern({
    source: "images/image.png",
    repeat: "repeat-y",
    width: 300,
    height: 10800,
    load: draw,
    layer: true,
    name: 'first'
})

but when i try to animate layer named first it doesn't animate...

caleb531 commented 12 years ago

Well, I need to see your animation code to see what you did wrong, because animating a pattern-filled shape certainly works. Here's a demo to prove it. -Caleb

kiki90 commented 12 years ago

Hey thanks for your reply but the sandbox returns this error Object [object Object] has no method 'createPattern'

On Thu, Aug 9, 2012 at 7:31 PM, Caleb Evans notifications@github.comwrote:

Well, I need to see your animation code to see what you did wrong, because animating a pattern-filled shape certainly works. Here's a demohttp://bit.ly/RtO2ufto prove it. -Caleb

— Reply to this email directly or view it on GitHubhttps://github.com/caleb531/jcanvas/issues/28#issuecomment-7620906.

caleb531 commented 12 years ago

Oh, sorry about that.

You just need to check the Use beta version checkbox and refresh the page.