Skip to content

Commit

Permalink
feat: add a new method setRotateDeg
Browse files Browse the repository at this point in the history
  • Loading branch information
LIBai11 committed Sep 10, 2022
1 parent 942d6ef commit cd4ec8f
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 cd4ec8f

Please sign in to comment.