various improvements

This commit is contained in:
2023-10-15 00:59:49 +02:00
parent a7a38a4f1e
commit ce7596ae5f
7 changed files with 193 additions and 74 deletions

View File

@ -1255,6 +1255,13 @@ export class UserAPI {
denominator = this.meter;
// =============================================================
// Fill
// =============================================================
public fill = (): boolean => this.app.fill;
// =============================================================
// Time Filters
// =============================================================
@ -1308,6 +1315,14 @@ export class UserAPI {
};
p = this.pulse;
public tick = (tick: number | number[], offset: number = 0): boolean => {
const nArray = Array.isArray(tick) ? tick : [tick];
const results: boolean[] = nArray.map(
(value) => (this.app.clock.time_position.pulse === value + offset)
);
return results.some((value) => value === true)
}
// =============================================================
// Modulo based time filters