MCPcopy Create free account
hub / github.com/AI-FanGe/OpenAIglasses_for_Navigation / drawGrid

Method drawGrid

static/visualizer.js:100–118  ·  view source on GitHub ↗
(width, height)

Source from the content-addressed store, hash-verified

98 }
99
100 drawGrid(width, height) {
101 const ctx = this.ctx;
102 ctx.strokeStyle = this.colors.grid;
103 ctx.lineWidth = 0.5;
104
105 const gridSize = 50;
106 for (let x = 0; x < width; x += gridSize) {
107 ctx.beginPath();
108 ctx.moveTo(x, 0);
109 ctx.lineTo(x, height);
110 ctx.stroke();
111 }
112 for (let y = 0; y < height; y += gridSize) {
113 ctx.beginPath();
114 ctx.moveTo(0, y);
115 ctx.lineTo(width, y);
116 ctx.stroke();
117 }
118 }
119
120 drawHUD(width, height) {
121 const ctx = this.ctx;

Callers 1

renderMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected