Grid Generator
Creates geometric grid patterns with various styles.
Usage
app.executeGenerator('drawGrid', {
gridType: 'dots',
spacing: 40,
lineColor: '#374151',
bgColor: '#1f2937'
});
Parameters
| Parameter |
Type |
Default |
Description |
gridType |
string |
'lines' |
Grid style |
spacing |
number |
40 |
Grid cell size |
lineColor |
string |
'#374151' |
Line/dot color |
bgColor |
string |
'#1f2937' |
Background color |
lineWidth |
number |
1 |
Line thickness |
Grid Types
| Type |
Description |
'lines' |
Horizontal and vertical lines |
'dots' |
Dot pattern at intersections |
'squares' |
Filled square pattern |
Examples
// Dot grid (notebook style)
app.executeGenerator('drawGrid', {
gridType: 'dots',
spacing: 20,
lineColor: '#6b7280'
});
// Engineering paper
app.executeGenerator('drawGrid', {
gridType: 'lines',
spacing: 25,
lineColor: '#3b82f6',
lineWidth: 0.5
});