Commit Graph

58 Commits

Author SHA1 Message Date
2d6ee874af improve A (add space for other fonts to have tail, make the width a little narrower), and create new directory for fonts 2024-08-30 22:01:24 +01:00
42c4b92105 address edge case where Real32.toString 1.0 seems to give the string '1' instead of '1.0', and improve the drawing for upper case A 2024-08-30 11:13:08 +01:00
c16fa58bf6 fix bug caused by the calculation change in the previous commit 2024-08-30 09:15:33 +01:00
f3a0eb3e30 minor change to generated export code (avoid redundant maths operations) 2024-08-30 05:20:56 +01:00
f5b0c8e705 tested export functionality, and fixed it so that it works as intended (previous error was that the drawn object was located on the wrong part of the Y-axis) 2024-08-30 03:46:05 +01:00
acd68a055d code shortcut to trigger export (with <Ctrl-E>); it outputs syntatically valid .sml, but I am not sure if the output is correct as intended so it needs testing 2024-08-30 02:34:24 +01:00
7ab7b8931d code function to export triangle to .sml file (linear interpolation only; untested and also not currently executable by shortcut 2024-08-30 02:22:02 +01:00
24bc45142d slight refactoring (move pure parsing functions to functional core in a separate file) 2024-08-29 09:55:08 +01:00
e69c6b42ef done with loading file into app (loaded triangles are visible, etc.) 2024-08-29 05:38:58 +01:00
2549703dc7 verify that parsing saved file is successful 2024-08-29 05:21:04 +01:00
f0958686b7 implement parser for loading (but this parser is untested) 2024-08-29 04:39:23 +01:00
84b7a6a2f5 minor changes to saved format 2024-08-29 03:59:47 +01:00
1fdd4f33ec remember to close file descriptor in file thread 2024-08-29 00:43:51 +01:00
eb13636993 very basic saving (hardcoded file name, which is fine fow now) 2024-08-29 00:05:30 +01:00
c40e8b98e0 slight renaming of constructors in FileMessage.t datatype, to provide more clarity (SAVE_TRIANGLES is for saving to a custom format, LOAD_TRIANGLES is for loading from a file in that custom format, and export is for generating code from custom format) 2024-08-28 20:47:40 +01:00
48c721e29b done with scaffolding for file mailbox; next, send message to file mailbox to export and import, and handle these messages properly from the file mailbox 2024-08-28 20:42:52 +01:00
e587c6cf73 preparation for adding new additional threads/mailboxes (namely, the file mailbox) 2024-08-28 20:11:00 +01:00
fb9202248c a little refactoring (different CML loops have their own files now) 2024-08-28 19:34:47 +01:00
3f4c52e0d8 upload new dots to GPU when there is a window resize too 2024-08-14 21:35:01 +01:00
30dd9de17a rename 'button' (the coloured square that appears over a clickpoint) to 'dot' throughout codebase, because I may want actual buttons later 2024-08-14 21:24:46 +01:00
a3290337a0 done adding ability to toggle graph by pressing 'g' 2024-08-14 02:35:44 +01:00
9b639c9c53 progress towards toggling graph 2024-08-14 02:31:28 +01:00
575b8d009e amend order of Glfw.swapBuffers and Glfw.pollEvents in imperative shell (previous order polled events before swapping buffers which is not the intended order) 2024-08-14 02:00:07 +01:00
dd9ecfcbe5 delete shaders after linking them in program, which reduces memory by like 0.1 MB (very minor) 2024-08-14 01:44:30 +01:00
c740e5d751 delete shaders after linking them in program, which reduces memory by like 0.1 MB (very minor) 2024-08-14 01:43:53 +01:00
0c76edfde2 remove graph lines vector from app type, so the vector can be garbage collected (it is not really needed) 2024-08-13 23:49:34 +01:00
d9c7b753f8 100/home/humza/Downloads/sml/dotscape/README.md done with undo/redo functionality (tested and both of them work as expected) 2024-08-08 23:52:49 +01:00
4243e4c679 refactor a little bit, making signature of app-update.sml simpler to use by storing mouseX and mouseY inside the app_type 2024-08-08 21:58:50 +01:00
89f4ae3b13 undo implemented and working fine 2024-08-08 21:35:48 +01:00
5c7c61586a scaffolding in preparation for implementing undo 2024-08-08 06:34:40 +01:00
a53c5e1ce3 restore imperative shell 2024-08-08 05:56:20 +01:00
ef8852350c remove print statement which is now unnecessary 2024-08-03 12:07:24 +01:00
0d1ea9444b refactor to allow graph lines to be shown at start up 2024-08-03 06:05:26 +01:00
ee2274ffbc improve generated graph lines, so it aligns perfectly with clickPoints (but there are two 'todo' notes: one when the height is greather than the width, and also the constant vector when the program starts is an empty vector) 2024-08-03 04:40:53 +01:00
57c21448e7 add and improve code to generate graphLines dynamically 2024-08-03 02:31:35 +01:00
b01637ba3b a little refactoring 2024-08-02 00:05:24 +01:00
13063ea2c6 add framebufferSize callback (FFI scaffolding and creating new variant of input_message type but don't react to this message in a meaningful way yet) 2024-08-01 23:33:54 +01:00
c5d9ed4c69 add clickPoints to app-type so we are able to change those points at runtime 2024-08-01 21:39:09 +01:00
0fc6201231 reduce number of type conversoins required for mouse move callback (and fix the other code which uses it too) 2024-08-01 21:17:39 +01:00
39b8b45b45 rename to dotscape 2024-08-01 20:52:20 +01:00
818503d0ac formatting 2024-07-31 22:28:42 +01:00
16fa1e49af get drawing of triangles implemented 2024-07-31 22:25:15 +01:00
087998ac6b return normalised device coordinates together with vector, from getClickPos function 2024-07-31 14:52:12 +01:00
a2c499c933 a bit of fiddling to support different resolutions (as long as aspect ratio of window is 1:1) 2024-07-31 14:02:23 +01:00
95345131ab refinements to 'getClickPos' function (and helper functions) in app-update.sml 2024-07-31 13:32:22 +01:00
6a2fe3ed18 a bit of formatting (no other changes in this commit) 2024-07-31 12:30:12 +01:00
d18e6f105d additional scaffolding 2024-07-31 12:27:11 +01:00
29793cccbe refactoring and scaffolding 2024-07-31 12:00:07 +01:00
94611eceee a little refactoring 2024-07-31 10:03:30 +01:00
6edb4f2556 remove hardcoded buttonVec, so later I can upload new vector data programmatically 2024-07-31 08:44:14 +01:00