This feature adds four new options, which can be set by adding attributes to the game's div tag in the html.
sm-width-max
Sets the maximum width of the drawing area, in pixels. Overrides the "renderWidthMax" option. Defaults to 480.
sm-width-max="480"
sm-width-min
Sets the minimum width of the drawing area, in pixels. Overrides the "renderWidthMin" option. Defaults to 240.
sm-width-min="240"
sm-pixel-perfect
Changes the behavior of how the rendering area is allowed to resize. Overrides the "pixelPerfect" option. If true, the tiles are forced to render at an integer multiple of their base size (8px). If false, the tiles can be any integer size. Defaults to true.
sm-pixel-perfect="true"
sm-resize-canvas
If set to true, the canvas is allowed to dynamically resize. Otherwise, it is set to the renderWidthMax initially, and does not change. Overrides the "resizeCanvas" option. Defaults to true.
This feature adds four new options, which can be set by adding attributes to the game's div tag in the html.
sm-width-max
Sets the maximum width of the drawing area, in pixels. Overrides the "renderWidthMax" option. Defaults to 480.
sm-width-min
Sets the minimum width of the drawing area, in pixels. Overrides the "renderWidthMin" option. Defaults to 240.
sm-pixel-perfect
Changes the behavior of how the rendering area is allowed to resize. Overrides the "pixelPerfect" option. If true, the tiles are forced to render at an integer multiple of their base size (8px). If false, the tiles can be any integer size. Defaults to true.
sm-resize-canvas
If set to true, the canvas is allowed to dynamically resize. Otherwise, it is set to the renderWidthMax initially, and does not change. Overrides the "resizeCanvas" option. Defaults to true.
Complete div example