zimporter-html - v1.0.0
    Preparing search index...

    Class ZScene

    HTML div–based ZScene.

    Loads placements.json from an asset base path, constructs the scene hierarchy as nested ZContainer divs, scales and centres the stage to fit the viewport, and exposes the same public API as the PIXI / Phaser versions of zImporter.

    Spine and particle assets are silently skipped (not supported in HTML).

    Index

    Constructors

    Properties

    assetTypes: Map<AssetType, any> = ...

    Accessors

    • get sceneHeight(): number

      Returns number

    • get sceneWidth(): number

      Returns number

    Methods

    • Parameters

      • degrees: number

      Returns number

    • Removes the scene's stage element from the DOM and clears the scene map.

      Returns void

    • Parameters

      • templateName: string

      Returns Record<string, AnimTrackData[]>

    • Returns { height: number; width: number }

    • Parameters

      • data: SceneData

      Returns void

    • Fetches placements.json (and ta.json when atlas:true) from assetBasePath and builds the scene.

      Parameters

      • assetBasePath: string
      • onComplete: () => void

      Returns Promise<void>

    • Builds the scene's div hierarchy and appends it to hostElement.

      Parameters

      • hostElement: HTMLElement = document.body

        The DOM node that will contain the stage (default: document.body).

      • loadChildren: boolean = true

      Returns void

    • Scales and centres the stage div to fill the viewport while preserving the scene's internal aspect ratio. Mirrors ZScene.resize in PIXI.

      Parameters

      • width: number
      • height: number

      Returns void

    • Parameters

      • sceneId: string

      Returns ZScene | undefined

    • Parameters

      • value: string

      Returns value is AssetType