@moxijs/core - v0.3.4
    Preparing search index...

    Variable defaultConst

    default: {
        ActionManager: typeof ActionManager;
        applyMaterial: (
            options: PhysicsBodyOptions,
            material:
                | "terrain"
                | "bouncy"
                | "wood"
                | "metal"
                | "ice"
                | "rubber"
                | "character",
        ) => PhysicsBodyOptions;
        asBitmapText: (
            constructorArgs: BitmapTextOptions,
            props?: PixiProps,
        ) => BitmapText;
        asContainer: (props?: PixiProps) => Container;
        asEntity: <T extends Container<ContainerChild>>(
            entity: T,
            logic?: MoxiLogic<T>,
        ) => AsEntity<T>;
        asEntityContainer: (
            props?: PixiProps,
        ) => AsEntity<Container<ContainerChild>>;
        asEntityGraphics: (props?: GraphicsDrawOptions) => AsEntity<Graphics>;
        asEntitySprite: (
            constructorArgs: SpriteOptions,
            props?: PixiProps,
        ) => AsEntity<Sprite>;
        asEntityText: (
            constructorArgs: TextOptions,
            props?: PixiProps,
        ) => AsEntity<Text>;
        asGraphics: (props?: PixiProps) => Graphics;
        asMSDFText: (
            constructorArgs: MSDFTextOptions,
            props?: PixiProps,
        ) => BitmapText;
        asPhysicsEntity: <T extends Container<ContainerChild>>(
            pixiObject: T,
            world: PhysicsWorld,
            options?: PhysicsBodyOptions,
        ) => AsEntity<T>;
        AssetLoader: typeof AssetLoader;
        asSprite: (constructorArgs: SpriteOptions, props?: PixiProps) => Sprite;
        asText: (constructorArgs: TextOptions, props?: PixiProps) => Text;
        asTextDPR: (constructorArgs: TextDPROptions, props?: PixiProps) => Text;
        asTextureFrames: (
            PIXI: any,
            textureSource: TextureSource,
            options?: AsTextureFramesOptions,
        ) => Texture<TextureSource<any>>[];
        BORDER: { inner: 1; middle: 1; outer: 1; total: 3 };
        Camera: typeof Camera;
        CameraLogic: typeof CameraLogic;
        ClientEvents: typeof ClientEvents;
        CollisionManager: typeof CollisionManager;
        CollisionRegistry: typeof CollisionRegistry;
        createBorderConfig: (config?: BorderConfig) => Required<BorderConfig>;
        createResizeHandler: (options: ResizeHandlerOptions) => () => void;
        createShapeFromSprite: (
            sprite: Sprite,
            type?: "auto" | "circle" | "rectangle",
        ) => ShapeConfig;
        createTileGrid: (
            options: GridOptions,
            textures: Texture<TextureSource<any>>[],
            selector?: (position: CellPosition) => number,
        ) => Container;
        defaultRenderOptions: Partial<AutoDetectOptions>;
        Engine: typeof Engine;
        EventEmitter: typeof EventEmitter;
        FallingSquaresAnimation: typeof FallingSquaresAnimation;
        getPhysicsBody: (entity: any) => PhysicsBodyLogic;
        getTextureRange: (
            textures: Texture<TextureSource<any>>[],
            startIndex: number,
            count: number,
        ) => Texture<TextureSource<any>>[];
        GRID: {
            border: number;
            fontScale: number;
            gap: number;
            margin: number;
            padding: number;
            scale: number;
            unit: number;
        };
        hasPhysics: (entity: any) => boolean;
        loadFonts: () => Promise<unknown>;
        LoadingScene: typeof LoadingScene;
        Logic: typeof Logic;
        MoxiEntity: typeof MoxiEntity;
        ParallaxBackground: typeof ParallaxBackground;
        ParallaxBackgroundLogic: typeof ParallaxBackgroundLogic;
        ParallaxLayer: typeof ParallaxLayer;
        PhysicsBodyLogic: typeof PhysicsBodyLogic;
        PhysicsDebugRenderer: typeof PhysicsDebugRenderer;
        PhysicsMaterials: {
            bouncy: { density: 0.5; friction: 0.1; restitution: 0.9 };
            character: {
                density: 1;
                fixedRotation: true;
                friction: 0.5;
                restitution: 0;
            };
            ice: { density: 0.9; friction: 0.02; restitution: 0.05 };
            metal: { density: 1.5; friction: 0.3; restitution: 0.1 };
            rubber: { density: 1; friction: 0.9; restitution: 0.7 };
            terrain: { density: 0; friction: 0.6; restitution: 0 };
            wood: { density: 0.7; friction: 0.4; restitution: 0.2 };
        };
        PhysicsWorld: typeof PhysicsWorld;
        PixelGrid: typeof PixelGrid;
        px: (units: number) => number;
        RenderManager: typeof RenderManager;
        Scene: typeof Scene;
        setupMoxi: (
            __namedParameters?: SetupMoxiArgs,
        ) => Promise<
            {
                camera: Camera;
                engine: Engine;
                loadAssets: (assets: Asset[]) => Promise<AssetLoader>;
                loadingScene: LoadingScene;
                physicsWorld: PhysicsWorld;
                PIXIAssets: AssetsClass;
                renderer: Renderer<HTMLCanvasElement>;
                scene: Scene;
            },
        >;
        setupResponsiveCanvas: (options: ResizeHandlerOptions) => () => void;
        StateLogic: typeof StateLogic;
        StateMachine: typeof StateMachine;
        svgToTexture: (
            options: SVGToTextureOptions,
        ) => Promise<Texture<TextureSource<any>>>;
        TextureFrameSequences: typeof TextureFrameSequences;
        TilingParallaxLayer: typeof TilingParallaxLayer;
        units: (pixels: number) => number;
        utils: utils;
    } = ...

    Type Declaration

    • ActionManager: typeof ActionManager
    • applyMaterial: (
          options: PhysicsBodyOptions,
          material:
              | "terrain"
              | "bouncy"
              | "wood"
              | "metal"
              | "ice"
              | "rubber"
              | "character",
      ) => PhysicsBodyOptions
    • asBitmapText: (constructorArgs: BitmapTextOptions, props?: PixiProps) => BitmapText
    • asContainer: (props?: PixiProps) => Container
    • asEntity: <T extends Container<ContainerChild>>(
          entity: T,
          logic?: MoxiLogic<T>,
      ) => AsEntity<T>
    • asEntityContainer: (props?: PixiProps) => AsEntity<Container<ContainerChild>>
    • asEntityGraphics: (props?: GraphicsDrawOptions) => AsEntity<Graphics>
    • asEntitySprite: (constructorArgs: SpriteOptions, props?: PixiProps) => AsEntity<Sprite>
    • asEntityText: (constructorArgs: TextOptions, props?: PixiProps) => AsEntity<Text>
    • asGraphics: (props?: PixiProps) => Graphics
    • asMSDFText: (constructorArgs: MSDFTextOptions, props?: PixiProps) => BitmapText
    • asPhysicsEntity: <T extends Container<ContainerChild>>(
          pixiObject: T,
          world: PhysicsWorld,
          options?: PhysicsBodyOptions,
      ) => AsEntity<T>
    • AssetLoader: typeof AssetLoader
    • asSprite: (constructorArgs: SpriteOptions, props?: PixiProps) => Sprite
    • asText: (constructorArgs: TextOptions, props?: PixiProps) => Text
    • asTextDPR: (constructorArgs: TextDPROptions, props?: PixiProps) => Text
    • asTextureFrames: (
          PIXI: any,
          textureSource: TextureSource,
          options?: AsTextureFramesOptions,
      ) => Texture<TextureSource<any>>[]
    • BORDER: { inner: 1; middle: 1; outer: 1; total: 3 }

      Default triple border (outer/middle/inner).

    • Camera: typeof Camera
    • CameraLogic: typeof CameraLogic
    • ClientEvents: typeof ClientEvents
    • CollisionManager: typeof CollisionManager
    • CollisionRegistry: typeof CollisionRegistry
    • createBorderConfig: (config?: BorderConfig) => Required<BorderConfig>
    • createResizeHandler: (options: ResizeHandlerOptions) => () => void
    • createShapeFromSprite: (sprite: Sprite, type?: "auto" | "circle" | "rectangle") => ShapeConfig
    • createTileGrid: (
          options: GridOptions,
          textures: Texture<TextureSource<any>>[],
          selector?: (position: CellPosition) => number,
      ) => Container
    • defaultRenderOptions: Partial<AutoDetectOptions>

      Default PIXI render options.

    • Engine: typeof Engine
    • EventEmitter: typeof EventEmitter
    • FallingSquaresAnimation: typeof FallingSquaresAnimation
    • getPhysicsBody: (entity: any) => PhysicsBodyLogic
    • getTextureRange: (
          textures: Texture<TextureSource<any>>[],
          startIndex: number,
          count: number,
      ) => Texture<TextureSource<any>>[]
    • GRID: {
          border: number;
          fontScale: number;
          gap: number;
          margin: number;
          padding: number;
          scale: number;
          unit: number;
      }

      Default grid constants.

    • hasPhysics: (entity: any) => boolean
    • loadFonts: () => Promise<unknown>
    • LoadingScene: typeof LoadingScene
    • Logic: typeof Logic
    • MoxiEntity: typeof MoxiEntity
    • ParallaxBackground: typeof ParallaxBackground
    • ParallaxBackgroundLogic: typeof ParallaxBackgroundLogic
    • ParallaxLayer: typeof ParallaxLayer
    • PhysicsBodyLogic: typeof PhysicsBodyLogic
    • PhysicsDebugRenderer: typeof PhysicsDebugRenderer
    • PhysicsMaterials: {
          bouncy: { density: 0.5; friction: 0.1; restitution: 0.9 };
          character: {
              density: 1;
              fixedRotation: true;
              friction: 0.5;
              restitution: 0;
          };
          ice: { density: 0.9; friction: 0.02; restitution: 0.05 };
          metal: { density: 1.5; friction: 0.3; restitution: 0.1 };
          rubber: { density: 1; friction: 0.9; restitution: 0.7 };
          terrain: { density: 0; friction: 0.6; restitution: 0 };
          wood: { density: 0.7; friction: 0.4; restitution: 0.2 };
      }

      Predefined material presets for common physics behaviors

      const ball = asPhysicsEntity(sprite, world, {
      type: 'dynamic',
      ...PhysicsMaterials.bouncy
      });
      • Readonlybouncy: { density: 0.5; friction: 0.1; restitution: 0.9 }

        Bouncy ball - high restitution, low friction

      • Readonlycharacter: { density: 1; fixedRotation: true; friction: 0.5; restitution: 0 }

        Character - no rotation, medium friction

      • Readonlyice: { density: 0.9; friction: 0.02; restitution: 0.05 }

        Ice - very low friction, low restitution

      • Readonlymetal: { density: 1.5; friction: 0.3; restitution: 0.1 }

        Metal object - high density, low restitution

      • Readonlyrubber: { density: 1; friction: 0.9; restitution: 0.7 }

        Rubber - high friction, high restitution

      • Readonlyterrain: { density: 0; friction: 0.6; restitution: 0 }

        Static terrain - no density (immovable), high friction

      • Readonlywood: { density: 0.7; friction: 0.4; restitution: 0.2 }

        Wooden box - medium density, medium friction

    • PhysicsWorld: typeof PhysicsWorld
    • PixelGrid: typeof PixelGrid
    • px: (units: number) => number

      Convert grid units → pixels (default grid).

    • RenderManager: typeof RenderManager
    • Scene: typeof Scene
    • setupMoxi: (
          __namedParameters?: SetupMoxiArgs,
      ) => Promise<
          {
              camera: Camera;
              engine: Engine;
              loadAssets: (assets: Asset[]) => Promise<AssetLoader>;
              loadingScene: LoadingScene;
              physicsWorld: PhysicsWorld;
              PIXIAssets: AssetsClass;
              renderer: Renderer<HTMLCanvasElement>;
              scene: Scene;
          },
      >
    • setupResponsiveCanvas: (options: ResizeHandlerOptions) => () => void
    • StateLogic: typeof StateLogic
    • StateMachine: typeof StateMachine
    • svgToTexture: (options: SVGToTextureOptions) => Promise<Texture<TextureSource<any>>>
    • TextureFrameSequences: typeof TextureFrameSequences
    • TilingParallaxLayer: typeof TilingParallaxLayer
    • units: (pixels: number) => number

      Convert pixels → grid units (default grid).

    • utils: utils