I've followed the link; construct.net/en/make-games/manuals/construct-3/plugin-reference/drawing-canvas and read the full page several times, but it doesn't appear to give any examples of how the drawing canvas plugin is used with javascript.
I've tried assigning the first instance of the canvas to a variable, and seeing what methods it has available to it, but autocomplete just has a list of all construct 3 methods.
To try and explain what the difficulty is; in other engines have code examples of how the line is drawn. For example, the gamemaker documentation for drawing a line has an example as follows:
Example:
draw_set_colour(c_lime);
draw_line(50,50,150,50);
When I can see an example of something working in code, such as the above, I can understand it immediately. But the Construct documentation, linked doesn't seem to have any code examples.
I also checked the scripting reference part of the manual, specifically the drawing canvas section:
construct.net/en/make-games/manuals/construct-3/scripting/scripting-reference/plugin-interfaces/drawing-canvas
But again I can't find any examples of how the drawing canvas is used in code.
To give another example, if I want to draw a line with app game kit, and I look in the documentation it has:
Example:
DrawLine( x, y, x2, y2, red, green, blue )
But I've not been able to find in the documentation any code snippets showing an example of how the drawing canvas is supposed to be used via javascript. And when I search on google, all the results for drawing a line in construct are for event sheets.
Sorry to ask a noob question, I'm really new to Construct 3, but if I am looking in the wrong place, where do I look to see example code of a line being drawn via javascript with the Construct 3 canvas plugin?
Thanks in advance