This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Sound, utils, sound } from '@pixi/sound'; | |
| import { Loader, ExtensionType, LoaderParserPriority } from 'pixi.js'; | |
| /** JSON file 'jukebox' format (the default format emitted by audiosprite) */ | |
| export interface AudiospriteJson { | |
| resources: string[]; | |
| spritemap: Record<string, { start: number, end: number, loop?: boolean }>; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { AnimatedSprite, Assets, IPointData } from 'pixi.js'; | |
| /** | |
| * A simple way to load animations. | |
| */ | |
| export class SpritesheetAnimation extends AnimatedSprite { | |
| public constructor(name: string, { | |
| autoPlay = false, | |
| autoUpdate = true, | |
| updateAnchor = false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // JavaScript versions at the bottom | |
| // ----- TypeScript: ----- | |
| type ObjectCompareFn = (a: string, b: string) => number; | |
| /** Sorts an object in place */ | |
| export function sortObject<T extends object>(obj: T, compareFn?: ObjectCompareFn): T { | |
| Object.keys(obj).sort(compareFn).forEach(key => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type Buffer = Uint8Array; // `Buffer` needs to be polyfilled in non-Node environments. | |
| declare module "js-binary" { | |
| export class Data { | |
| constructor(capacity: number); | |
| appendBuffer(data: Buffer): void; | |
| writeUInt8(value: number): void; | |
| writeUInt16(value: number): void; | |
| writeUInt32(value: number): void; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| /** | |
| Simple fixed-size ring buffer / circular queue data structure. | |
| This basic implementation uses an array under the hood. | |
| Maintains a Write Queue and a Read Queue. Does not prevent "lapping" of the read/write queues. | |
| */ | |
| class RingBuffer<Element> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## | |
| # Print JUnit Test Results. | |
| # | |
| # - Description: Only prints iOS-formatted results (AllTests > Suites > Subsuites > Cases). | |
| # | |
| # - Usage: | |
| # - `python3 PrintBluepillJUnitResults.py <XML file>` | |
| # | |
| # - Arguments: | |
| # - JUnit results XML file |
NewerOlder