* set the renderable alpha channel value * @param {number} alpha - opacity value between 0.0 and 1.0
(alpha)
| 586 | * @param {number} alpha - opacity value between 0.0 and 1.0 |
| 587 | */ |
| 588 | setOpacity(alpha) { |
| 589 | if (typeof alpha === "number") { |
| 590 | this.alpha = clamp(alpha, 0.0, 1.0); |
| 591 | // Set to 1 if alpha is NaN |
| 592 | if (isNaN(this.alpha)) { |
| 593 | this.alpha = 1.0; |
| 594 | } |
| 595 | this.isDirty = true; |
| 596 | } |
| 597 | } |
| 598 | |
| 599 | /** |
| 600 | * flip the renderable on the horizontal axis (around the center of the renderable) |
no test coverage detected