import { Game } from "../Game" ; import { SceneNode , SceneNodeArgs } from "./SceneNode" ; /**
 * Constructor arguments for [[ImageNode]].
 */ export interface ImageNodeArgs extends SceneNodeArgs { /** The image to be displayed by the image node. */ image : HTMLImageElement ; } param T export class ImageNode < T extends Game = Game > extends SceneNode < T > { /** The image to display. */ private readonly image : HTMLImageElement ; /**
     * Creates a new scene node displaying the given image.
     */ public constructor ( { image , ... args } ) { super ( { width : image . width , height : image . height , ... args } ) ; this . image = image ; } return public getImage ( ) { return this . image ; } inheritDoc public draw ( ctx ) { ctx . drawImage ( this . image , 0 , 0 ) ; } }