@oliversalzburg/js-utils
Advanced tools
Comparing version 0.0.11 to 0.0.12
@@ -63,6 +63,7 @@ /// <reference types="@types/web" /> | ||
* and then reads the result back into the buffer. | ||
* @param amount How much the screen should be faded to black. `0` is | ||
* not at all, `255` makes it instantly black. | ||
* @param color The color to fade the buffer with. The alpha component of | ||
* the color defines how strong the fade is. `0` is not at all, `255` makes | ||
* it instantly black. | ||
*/ | ||
fade(amount?: number): void; | ||
fade(color?: number): void; | ||
/** | ||
@@ -69,0 +70,0 @@ * Reads the front buffer back into the back buffer. |
@@ -88,7 +88,8 @@ import { InvalidOperationError } from "../errors/InvalidOperationError.js"; | ||
* and then reads the result back into the buffer. | ||
* @param amount How much the screen should be faded to black. `0` is | ||
* not at all, `255` makes it instantly black. | ||
* @param color The color to fade the buffer with. The alpha component of | ||
* the color defines how strong the fade is. `0` is not at all, `255` makes | ||
* it instantly black. | ||
*/ | ||
fade(amount = 1) { | ||
this.blendWith(fromRGBA(0, 0, 0, amount)); | ||
fade(color = fromRGBA(0, 0, 0, 1)) { | ||
this.blendWith(color); | ||
} | ||
@@ -95,0 +96,0 @@ /** |
{ | ||
"$schema": "https://json.schemastore.org/package.json", | ||
"name": "@oliversalzburg/js-utils", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "author": "Oliver Salzburg <oliver.salzburg@gmail.com>", |
Sorry, the diff of this file is not supported yet
4122980
6276