You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 14, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 14, 2023. It is now read-only.
Hi,
I have a CAAT.Foundation.SpriteImage() animation and i would like to pause the animation and position the image paused in a certain frame, i didn't foud nothing like this.
It is possible to do that?
Here is my code.
Thak you very much.
You could define another animation with only the expected frame and then
call spriteImage.playAnimation("one_frame_animation") anytime.
in fact you could define as much animations as needed.
Hi,
I have a CAAT.Foundation.SpriteImage() animation and i would like to pause
the animation and position the image paused in a certain frame, i didn't
foud nothing like this.
It is possible to do that?
Here is my code.
Thak you very much.
I have a 8 animations in one actor. I randomize which animation will go on the actor.
After the animation is finished, i run a reset animation that look like this:
screenManager.sAnimaBottom.addAnimation(
screenManager.RESET_ANIMATION,
[00,00,00,00,00],
100
);
Then i randomize the animation again.
But after some time running this animations, the Frame per seconds rate run very low and i get this error on chrome console:
could you share the code ?
that's unexpected behavior.
On Feb 27, 2014 9:14 AM, "Vitor Cominato" notifications@github.com wrote:
I will detail better for you,
I have a 8 animations in one actor. I randomize which animation will go on
the actor.
After the animation is finished, i run a reset animation that look like
this:
screenManager.sAnimaBottom.addAnimation(
screenManager.RESET_ANIMATION,
[00,00,00,00,00],
100
);
Then i randomize de animation again.
But after some time running this animations, the Frame per seconds rate
run very low and i get this error on chrome console:
Activity
hyperandroid commentedon Feb 27, 2014
You could define another animation with only the expected frame and then
call spriteImage.playAnimation("one_frame_animation") anytime.
in fact you could define as much animations as needed.
2014-02-27 8:24 GMT-08:00 Vitor Cominato notifications@github.com:
vitorcominato commentedon Feb 27, 2014
I will detail better for you,
I have a 8 animations in one actor. I randomize which animation will go on the actor.
After the animation is finished, i run a reset animation that look like this:
screenManager.sAnimaBottom.addAnimation(
screenManager.RESET_ANIMATION,
[00,00,00,00,00],
100
);
Then i randomize the animation again.
But after some time running this animations, the Frame per seconds rate run very low and i get this error on chrome console:
Uncaught TypeError: Cannot read property 'x' of undefined caat.js:17012
paintN caat.js:17012
paint caat.js:18756
paintActor caat.js:19778
paintActor caat.js:20434
paintActor caat.js:20434
render caat.js:22546
renderFrame caat.js:23362
CAAT.renderFrameRAF caat.js:15203
Thakns again.
hyperandroid commentedon Feb 27, 2014
could you share the code ?
that's unexpected behavior.
On Feb 27, 2014 9:14 AM, "Vitor Cominato" notifications@github.com wrote:
vitorcominato commentedon Mar 5, 2014
I fixed the FPS problem, but the error is still ocurring here is the code:
var si = new CAAT.Foundation
.SpriteImage()
.initialize(director.getImage("img"), 6, 7) // size image 3080x2820px 365kb
.addAnimation(
"anima",
[00,01,02,03,04,05,06,07,08,09,
10,11,12,13,14,15,16,17,18,19,
20,21,22,23,24,25,26,27,28,29,
30,31,19,20,21,22,33,34,35,36,
37,38],
35,
function(e) {
e.ownerActor.playAnimation("reset");
}
)
.addAnimation(
"reset",
[38, 38, 38, 38, 38],
100
);
var elem = new CAAT.Foundation
.Actor()
.enableEvents(false)
.setVisible(true)
.setLocation(
50,
60
)
.setBackgroundImage(si);
scene.addChild(elem);
window.setInterval(function() {
elem.playAnimation("anima");
}, 10000);
elem.playAnimation("anima");
and the error:
Uncaught TypeError: Cannot read property 'x' of undefined caat.js:17012
paintN caat.js:17012
paint caat.js:18756
paintActor caat.js:19778
paintActor caat.js:20417
paintActor caat.js:20434
paintActor caat.js:20434
render caat.js:22546
renderFrame caat.js:23362
CAAT.renderFrameRAF caat.js:15203