Merge branch 'develop' into johannes/ts-strict-checkout-pr

This commit is contained in:
Johannes Marbach 2023-02-08 14:26:27 +01:00 committed by GitHub
commit e0d3b43404
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 15 deletions

View File

@ -1,6 +1,7 @@
/*
Copyright 2020 Nurjin Jafar
Copyright 2020 Nordeck IT + Consulting GmbH.
Copyright 2023 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -86,7 +87,7 @@ export default class Confetti implements ICanvasEffect {
private particles: Array<ConfettiParticle> = [];
private waveAngle = 0;
public isRunning: boolean;
public isRunning = false;
public start = async (canvas: HTMLCanvasElement, timeout = 3000): Promise<void> => {
if (!canvas) {

View File

@ -1,6 +1,7 @@
/*
Copyright 2020 Nurjin Jafar
Copyright 2020 Nordeck IT + Consulting GmbH.
Copyright 2023 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -69,7 +70,7 @@ export default class Fireworks implements ICanvasEffect {
private context: CanvasRenderingContext2D | null = null;
private supportsAnimationFrame = window.requestAnimationFrame;
private particles: Array<FireworksParticle> = [];
public isRunning: boolean;
public isRunning = false;
public start = async (canvas: HTMLCanvasElement, timeout = 3000): Promise<void> => {
if (!canvas) {
@ -94,7 +95,7 @@ export default class Fireworks implements ICanvasEffect {
if (this.particles.length < this.options.maxCount && this.isRunning) {
this.createFirework();
}
const alive = [];
const alive: FireworksParticle[] = [];
for (let i = 0; i < this.particles.length; i++) {
if (this.move(this.particles[i])) {
alive.push(this.particles[i]);

View File

@ -1,5 +1,5 @@
/*
Copyright 2021 The Matrix.org Foundation C.I.C.
Copyright 2021 - 2023 The Matrix.org Foundation C.I.C.
Copyright 2022 Arseny Uskov
Licensed under the Apache License, Version 2.0 (the "License");
@ -65,7 +65,7 @@ export default class Hearts implements ICanvasEffect {
private context: CanvasRenderingContext2D | null = null;
private particles: Array<Heart> = [];
private lastAnimationTime: number;
private lastAnimationTime = 0;
private colours = [
"rgba(194,210,224,1)",
@ -82,7 +82,7 @@ export default class Hearts implements ICanvasEffect {
"rgba(252,116,183,1)",
];
public isRunning: boolean;
public isRunning = false;
public start = async (canvas: HTMLCanvasElement, timeout = 3000): Promise<void> => {
if (!canvas) {

View File

@ -1,5 +1,5 @@
/*
Copyright 2020 The Matrix.org Foundation C.I.C.
Copyright 2020 - 2023 The Matrix.org Foundation C.I.C.
Copyright 2021 Josias Allestad
Licensed under the Apache License, Version 2.0 (the "License");
@ -52,9 +52,9 @@ export default class Rainfall implements ICanvasEffect {
private context: CanvasRenderingContext2D | null = null;
private particles: Array<Raindrop> = [];
private lastAnimationTime: number;
private lastAnimationTime = 0;
public isRunning: boolean;
public isRunning = false;
public start = async (canvas: HTMLCanvasElement, timeout = 3000): Promise<void> => {
if (!canvas) {

View File

@ -1,5 +1,5 @@
/*
Copyright 2020 The Matrix.org Foundation C.I.C.
Copyright 2020 - 2023 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -57,9 +57,9 @@ export default class Snowfall implements ICanvasEffect {
private context: CanvasRenderingContext2D | null = null;
private particles: Array<Snowflake> = [];
private lastAnimationTime: number;
private lastAnimationTime = 0;
public isRunning: boolean;
public isRunning = false;
public start = async (canvas: HTMLCanvasElement, timeout = 3000): Promise<void> => {
if (!canvas) {

View File

@ -1,5 +1,5 @@
/*
Copyright 2021 The Matrix.org Foundation C.I.C.
Copyright 2021 - 2023 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -51,9 +51,9 @@ export default class SpaceInvaders implements ICanvasEffect {
private context: CanvasRenderingContext2D | null = null;
private particles: Array<Invader> = [];
private lastAnimationTime: number;
private lastAnimationTime = 0;
public isRunning: boolean;
public isRunning = false;
public start = async (canvas: HTMLCanvasElement, timeout = 3000): Promise<void> => {
if (!canvas) {