Skip to main content
bartr35467100
Participant
May 4, 2021
Answered

createjs rotationDir not changing

  • May 4, 2021
  • 1 reply
  • 494 views

Hi,

 

I'm trying to change the rotational direction of a symbol to CCW (-1).

 

Following the docs on: https://createjs.com/docs/tweenjs/classes/RotationPlugin.html

 You can modify this behaviour by specifying a rotationDir tween value. A value of -1 will force CCW rotation, 1 will force CW, and 0 will disable the plugin effects for that portion of the tween.

 

However the rotational direction always stays clockwise (CW) when using parameters 0, 1 and -1.

 

 

new createjs.Tween.get(korte_arm, {loop: true}).to({rotation:90, rotationDir:-1}).to({rotation:180}, 7000);

 

 

Am I missing a global/local setting?

 

Regards,

 

This topic has been closed for replies.
Correct answer JoãoCésar17023019

Hi.

 

Here is a sample:

https://github.com/joao-cesar/adobe/tree/master/animate%20cc/html5_canvas/rotation_plugin

 

Please notice that I'm including the RotationPlugin.js in the publish template and that I added a transition to the first rotation so it's easier to see what's going on.

 

More info about the Rotation Plugin can be found here:

https://createjs.com/demos/tweenjs/RotationPlugin.html

 

I hope it helps.

 

Regards,

JC

1 reply

JoãoCésar17023019
Community Expert
JoãoCésar17023019Community ExpertCorrect answer
Community Expert
May 4, 2021

Hi.

 

Here is a sample:

https://github.com/joao-cesar/adobe/tree/master/animate%20cc/html5_canvas/rotation_plugin

 

Please notice that I'm including the RotationPlugin.js in the publish template and that I added a transition to the first rotation so it's easier to see what's going on.

 

More info about the Rotation Plugin can be found here:

https://createjs.com/demos/tweenjs/RotationPlugin.html

 

I hope it helps.

 

Regards,

JC

bartr35467100
Participant
May 4, 2021

Adding the RotationPlugin.js to the publish template did the trick.

 

Thank you!

JoãoCésar17023019
Community Expert
Community Expert
May 4, 2021

Great!

 

You're welcome!