Skip to content

Commit

Permalink
Merge pull request #275 from LIBai11/master
Browse files Browse the repository at this point in the history
feat: add a new method setRotateDeg
  • Loading branch information
drawcall authored Sep 17, 2022
2 parents 28d93fd + cd4ec8f commit 8b8c8e1
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/node/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class FFNode extends FFBase {
this.duration = 0;
this.parent = null;
this.preload = preload;
//
//
this.t = 0;
this.removeTime = 999999 * 1000;

Expand Down Expand Up @@ -90,6 +90,15 @@ class FFNode extends FFBase {
this.display.rotation = rotation;
}

/**
* set display object rotation by deg
* @param deg
*/
setRotateDeg(deg = 0) {
deg = deg * (3.1415927 / 180);
this.display.rotation = deg;
}

/**
* Set the duration of node in the scene
* @param {number} duration
Expand Down

0 comments on commit 8b8c8e1

Please sign in to comment.