@dill-pixel/plugin-matter-physics
Version:
Matter Physics
57 lines • 3.32 kB
TypeScript
import { Container as DillPixelContainer, IPlugin, Plugin } from 'dill-pixel';
import { default as Matter, IEngineDefinition, IRunnerOptions } from 'matter-js';
import { Container, Rectangle } from 'pixi.js';
import { System } from './System';
export interface IMatterPhysicPlugin extends IPlugin {
}
export interface IMatterPhysicsPlugin extends IPlugin<MatterPhysicsPluginOptions> {
readonly system: typeof System;
readonly matter: typeof Matter;
pause(): void;
resume(): void;
}
export type MatterPhysicsPluginOptions = {
debug: boolean;
autoInit: boolean;
container?: Container;
worldBounds?: Rectangle;
createWalls?: {
thickness: number;
top?: boolean;
bottom?: boolean;
left?: boolean;
right?: boolean;
};
engine: Partial<IEngineDefinition>;
runner: Partial<IRunnerOptions>;
};
export declare class MatterPhysicsPlugin extends Plugin<MatterPhysicsPluginOptions> implements IMatterPhysicPlugin {
get system(): typeof System;
get matter(): typeof Matter;
pause(): void;
resume(): void;
get add(): {
existing: <TEntity>(entity: TEntity, props?: Partial<import('dill-pixel').ExistingProps>) => TEntity;
container: (props?: Partial<import('dill-pixel').ContainerProps>) => DillPixelContainer;
particleContainer: (props?: Partial<import('dill-pixel').ParticleContainerProps>) => import('dill-pixel').ParticleContainer;
texture: typeof import('dill-pixel').resolveTexture;
sprite: (props?: Partial<import('dill-pixel').SpriteProps>) => import('pixi.js').Sprite;
tilingSprite: (props?: Partial<import('dill-pixel').TilingSpriteProps>) => import('pixi.js').TilingSprite;
animatedSprite: (props?: Partial<import('dill-pixel').AnimatedSpriteProps>) => import('dill-pixel').AnimatedSprite;
graphics: (props?: Partial<import('dill-pixel').GraphicsProps>) => import('pixi.js').Graphics;
svg(props: import('dill-pixel').WithRequiredProps<import('dill-pixel').SvgProps, "ctx">): import('dill-pixel').Svg;
text: (props?: Partial<import('dill-pixel').TextProps>) => import('pixi.js').Text;
htmlText: (props?: Partial<import('dill-pixel').HTMLTextProps>) => import('pixi.js').HTMLText;
bitmapText: (props?: Partial<import('dill-pixel').BitmapTextProps>) => import('pixi.js').BitmapText;
button: (props?: Partial<import('dill-pixel').ButtonProps>) => import('dill-pixel').Button;
flexContainer: (props?: Partial<import('dill-pixel').FlexContainerProps>) => import('dill-pixel').FlexContainer;
uiCanvas: (props?: Partial<import('dill-pixel').UICanvasFactoryProps>) => import('dill-pixel').UICanvas;
spine: (props?: Partial<import('dill-pixel').SpineProps>) => import('dill-pixel').Spine;
spineAnimation: <ANames extends string = string>(props?: Partial<import('dill-pixel').SpineProps>) => import('dill-pixel').SpineAnimation<ANames>;
toaster: (toasterConfig?: Partial<import('dill-pixel').ToasterConfig>, defaultToastConfig?: Partial<import('dill-pixel').ToastConfig>) => import('dill-pixel').Toaster;
};
private hello;
initialize(options?: Partial<MatterPhysicsPluginOptions>): void | Promise<void>;
destroy(): void;
}
//# sourceMappingURL=MatterPhysicsPlugin.d.ts.map