Sword Engine

Class: Grid

Grid class

C new Grid( width: number, height: number ) → {void}

Grid class

Parameters:
Name Type Description
width number

width of the grid

height number

height of the grid
the class to create a virtual grid on the canvas with the given width and height for each cell

Methods

S M draw draw the grid on the canvas on the canvas in every frame( )

S M drawPoint( point: Vector )

Parameters:
Name Type Description
point Vector

draw a point on the grid according to the grid's cordinates not the canvas cordinates

S M drawPoints( points: Array.<Vector> )

Parameters:
Name Type Description
points Array.<Vector>

draw a list of points on the grid according to the grid's cordinates not the canvas cordinates

Made By Vedik Dev - Himanshu Jangid
sword-engine Copyright © 2021 Himanshu.
Documentation generated by JSDoc 3.6.7 on Tue Nov 30 2021 23:12:55 GMT+0530 (India Standard Time) using the TSDoc template.