angry-pixel 2.0.9 → 2.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.ts CHANGED
@@ -1090,6 +1090,7 @@ type CollisionMatrix = [string, string][];
1090
1090
  * canvasColor: "#000000",
1091
1091
  * physicsFramerate: 180,
1092
1092
  * headless: false,
1093
+ * dependencies: [[Symbol.for("DependencyName"), dependencyInstance]],
1093
1094
  * collisions: {
1094
1095
  * collisionMatrix: [
1095
1096
  * ["layer1", "layer2"],
@@ -1119,6 +1120,8 @@ interface GameConfig {
1119
1120
  physicsFramerate?: number;
1120
1121
  /** Enable Headless mode. The input and rendering functions are turned off. Ideal for game server development */
1121
1122
  headless?: boolean;
1123
+ /** External elements which can be accessed through dependency injection.*/
1124
+ dependencies?: [DependencyName, any][];
1122
1125
  /** Collision configuration options */
1123
1126
  collisions?: {
1124
1127
  /** Collision detection method: CollisionMethods.SAT or CollisionMethods.ABB. Default value is CollisionMethods.SAT */
@@ -1232,16 +1235,18 @@ type SceneType<T extends Scene = Scene> = {
1232
1235
  * @category Core
1233
1236
  * @example
1234
1237
  * ```js
1235
- * class GameScene extends Scene {
1236
- * systems = [
1237
- * SomeSystem,
1238
- * AnotherSystem
1239
- * ];
1240
- *
1238
+ * class MainScene extends Scene {
1241
1239
  * loadAssets() {
1242
1240
  * this.assetManager.loadImage("image.png");
1243
1241
  * }
1244
1242
  *
1243
+ * loadSystems() {
1244
+ * this.systems.push(
1245
+ * SomeSystem,
1246
+ * AnotherSystem
1247
+ * );
1248
+ * }
1249
+ *
1245
1250
  * setup() {
1246
1251
  * this.entityManager.createEntity([
1247
1252
  * SomeComponent,
@@ -2617,6 +2622,8 @@ interface TilemapRendererOptions {
2617
2622
  tileWidth: number;
2618
2623
  tileHeight: number;
2619
2624
  tintColor: string;
2625
+ maskColor: string;
2626
+ maskColorMix: number;
2620
2627
  opacity: number;
2621
2628
  smooth: boolean;
2622
2629
  }
@@ -2646,6 +2653,10 @@ declare class TilemapRenderer {
2646
2653
  tintColor: string;
2647
2654
  /** Change the opacity between 1 and 0 */
2648
2655
  opacity: number;
2656
+ /** Define a mask color for the image */
2657
+ maskColor: string;
2658
+ /** Define the opacity of the mask color between 1 and 0 */
2659
+ maskColorMix: number;
2649
2660
  /** TRUE for smooth pixels (not recommended for pixel art) */
2650
2661
  smooth: boolean;
2651
2662
  /** @internal */