Add another editor type which changes the AST without a code editor
Opened this issue · 0 comments
Jegp commented
Instead of changing a drawing with a code editor, we should allow drawings to be parameterised and manipulated with graphical tools such as sliders, drag-n-drop or similar. This would be implemented as a different 'editor' - similar to the code editor - but with some customisations options.
For now the drawing can be hardcoded.
My idea would be for the user to embed everything in the JavaScript with a syntax like this:
var editorElement = document.getElementById("placeToInsertEditor");
var canvasElement = document.getElementById("canvasToDisplayDrawing");
var editor = new EditorApp("drawing", editorElement)
editor.addSlider("variableName");
var view = new CanvasView(canvasElement, editor);
var repoCad = RepoCad(view, editor)