Commit Graph

145 Commits

Author SHA1 Message Date
9cd3845975 Franknoirot/add walkthrough (#189)
* Barebones onboarding triggering and resetting

* Make onboarding route-based

* Add Camera step, highlighting camera feed

* Implement redirect behavior

* Unify navigation hooks

* Formatting

* add useResizeObserver, convert to custom hook
2023-07-25 10:40:26 -04:00
87aecf7f50 Integrate sketch mode debug (#186)
integrate sketch mode debug
2023-07-21 16:53:06 +10:00
b89faa4a28 Migrate from CRA to Vite (#170)
* Basic CRA to Vite conversion

* Restore ESLint support

* Remove semicolons from vite config

* Add vite client types to tsconfig

* Migrate to Vitest for testing (not working on Mac)

* some test progress (#175)

* some test progress

* something maybe working

* remove local lib

* small clean up

* tweaks

* fix dependency

* clean up deps

* remove vitest import

* vitest config is needed even though we're not using vitest

* more tweaks to vite config

---------

Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
2023-07-21 09:25:04 +10:00
59fa51d75a Add settings UI page (#171)
* Add theme colors from Figma

* Rough-in of AppHeader

* Add styled ActionButton

* Add react-router and placeholder Settings page

* Add ability to set persistent defaultDir

* Add react-hot-toast for save success message

* Add defaultProjectName setting

* Handle case of stale empty defaultDir in storage

* Wrap app in BrowserRouter

* Wrap test App in BrowserRouter

* Don't need BrowserRouter outside of testing
because we use RouterProvider
2023-07-13 07:22:08 -04:00
317dc6d0b2 rough tauri auth (#167) 2023-07-11 20:34:09 +10:00
3510abfcb9 delay execute till after stream ready (#143) 2023-06-23 14:19:15 +10:00
7289965916 send mouse drag over wrtc (#139)
* send mouse drag over wrtc

* add more debugging code

* wrtc data channel working
2023-06-23 09:56:37 +10:00
2d3c73d46a asyncronise executor (#115)
* Intital async of executor

The execture now sends websocket message instead of calling functions
directly from the engine, When it does so it holds onto the id.
The engine is still returning geo/polys directly but I'm working make it
so that the UI doesn't need to know about that, so that we can switch
over the streaming ui.

Things left to do:
- it is still making both direct function calls and websockets, and the former should be removed.
- It does highlighting of segments and sourceRanges not through websockets and that needs to be fixed.
- Tests have not been adjusted for these changes.
- Selecting the head of a segment is not working correctly again yet.

* Rough engine prep changes (#135)

* rough changes for engine prep

* mouse movements working again

* connect to engine for startsketch, line, close and extrude
2023-06-22 16:43:33 +10:00
dd3117cf03 Steal Jess's mouse move code (#137)
steal Jess's mouse move code
2023-06-21 09:15:02 +10:00
a8b68bab6a Users should be able to select points (not just lines) (#97)
* update selection datastructure to accomodate more selection metadata

* Users should be able to select points (not just lines)
2023-04-03 16:05:25 +10:00
252ace6d69 Add common angles are permanent variables, 0, 90,180 etc (#89) 2023-04-01 21:25:00 +11:00
0868eaa0f7 Use shift instead of capslock for multiple line selection (#62)
Use shift instead of caplock for multiple line selection
2023-03-15 19:03:55 +11:00
2ac24bcd95 Horz/Vert distance constraint with modal workflow (#43)
* button style tweak

* Remove duplication constraint ast transforms

* giveSketchFnCallTag to return if line already had a tag

* remove duplication

* update tag name to referenceSegName

* Update transform shape to return key details about the transform

* add modal to hor vert distance workflow

* fix browser env stuff from breaking tests

* fmt
2023-03-07 15:45:59 +11:00
a0518c556f Stream setup (#46)
* set up stream

* clean up
2023-03-06 20:13:34 +11:00
433c29217e tidy up (#37) 2023-03-03 20:35:48 +11:00
6446601a67 Add equal-length constraints & implement UnaryExpressions (#35)
* add segLen help to lang std

* adding helpers functions to sketchConstraints

* update tokeniser tests because they were annoying me not being 100%

* compare async lexer with sync lexer instead

* add helper functions

* remove unneeded nesting

* update add ast modifier function for angledLine

* initial equal ast modification

It adds a tag to the primary line, and converts any secondary lines to angledLine, but doesn't reference the taged/primary line yet

* Update fn call with refernce to previous line using segLen

* add test for giveSketchFnCallTag

* fix excutor bug, executing call expression in array expression

* fix small issue in executor

* add CallExpressions to BinaryExpressions

* add unary Expressions

* tweaks to unaryExpression logic

* add recasting for unaryExpressions and CallExpressions in BinaryExpressions

* ensure pipe substitution info is passed down to unary expressions and others

* allow binary expressions in function argumentns

* inital setup, new way of organising sketch fn transforms

Starting with equal length

* overhaul equalLength button

* add equal length support for angledLine

* line with one variable supports signed legLength

* fix indentation when recasting long arrayExpressions in a pipeExpression

* improve modifyAst consision

* further modify ast tidy

* equalLength transfroms far angledLineOfXLength

* add transforms for line-yRelative

* add equal constraint for angledLineOfYLength

* quick test fix

* add equal length constrain transforms for lineTo

* add equal length constraints for angledLineToX

* add equalLength constraints for angledLineToY

* test tidy

* setup new vertical-horizontal constraints

* Add equal Length constraints for vertical/horizontal lines

* migrate old tests, and refactor callback tag

* tweaks and refactor horzVert component

* fix leg len with small negative leg length
2023-03-02 21:19:11 +11:00
f70f0f7bc3 persist code in local storage (#34)
Just a little frustrating to have code disapear on you, will probably need to be made less naive at some point
2023-02-21 14:50:22 +11:00
ea05f804cc Add multi-cursor support (#30)
* update execution of callExpressions

* tweak types to store multiple cursor ranges and hook up with artifact highlighting

* multi-cursor from 3d scene

Working but has to be capslock for the time being

* tweak pannel headers

* add issue to todo comment
2023-02-21 10:28:34 +11:00
594d55576a functional sketch working (#26)
* functional sketch working

With old sketch block still there

* get all version of lines working with add line and update line

* remove old ui state types

* some clean up

* rename some things

* add todo for multi cursor

* shorten useStore repitition

* small type improvement

* big overhaul to group sketch function and they ast modifying helpers together

* unneeded tweak

* ruthlessly rip out sketch logic

* clean up path keyword

* getting sketch on face working again with all the new sketch line types

* add a bunch of tests and re-arrage file structure
2023-02-12 10:56:45 +11:00
9bb4f68794 change logs aswell (#21)
* kurt-19-change-logs-aswell

* fix tests
2023-02-03 11:09:09 +11:00
487d61b862 add memory dump panel (#20) 2023-02-03 10:04:16 +11:00
96720023db clean up panels a little (#18) 2023-02-02 20:41:28 +11:00
29e06ec852 Add non-code metadata to the ast (#15)
* Revert "wire up comments to ui (#11)"

This reverts commit bdf778530f.

* Revert "Add the ability to recast comments and some whitespace (#10)"

This reverts commit dd5022b38e.

* ast metadata

* clean up
2023-02-01 07:30:55 +11:00
bdf778530f wire up comments to ui (#11) 2023-01-24 21:09:00 +11:00
cb16d3efd7 rename file 2023-01-10 15:42:22 +11:00
9ad6b946c0 massive overhall to how program memory works and how artifacts their metada are rendered 2023-01-08 16:37:31 +11:00
0779befc65 fix sketch plan orientation 2023-01-04 01:28:26 +11:00
6b19966e49 update near far cam settings 2023-01-01 07:50:09 +11:00
1c1ceae4d3 fmt 2022-12-23 07:47:46 +11:00
cecc4b1f01 drag sphere - edit sketch working for xy plane 2022-12-07 10:02:21 +11:00
034c903672 add the ability to edit sketch later 2022-12-06 05:40:05 +11:00
faf37d1b03 fix up code model connection a little 2022-11-29 19:03:50 +11:00
95f9c4c2b4 get nested geomtry structure working for highlighting 2022-11-29 11:24:04 +11:00
1ed96ad7b6 fix up axis 2022-11-28 21:05:56 +11:00
80f513401c fmt 2022-11-28 19:44:08 +11:00
b671db1e81 add format button 2022-11-28 19:43:20 +11:00
ade1e9fb82 start of code gen from direct manipulation 2022-11-28 09:37:46 +11:00
6f24e75f92 Gui scafolding toolbar, log console, axis for sketching 2022-11-27 14:06:33 +11:00
48e59ac710 remove semi-colons 2022-11-26 08:38:57 +11:00
ca020e14eb get feature highlighting working both ways
From the editor to the viewer and from the viewer to the editor
2022-11-26 05:15:32 +11:00
e7e0f2a4fd make boilder plate react test happy with new dependencies 2022-11-25 11:04:14 +11:00
b4f9e70752 get tests passing again and add codemirror 2022-11-24 06:18:13 +11:00
5ce89d83fc sketch code to 3d scene initial connection working 2022-11-23 21:28:38 +11:00
266edb578a start 3d work
Setup r3f, drei, tailwindcss and start with first 3d util, to-from line
2022-11-22 09:06:08 +11:00
033f00754a create react app template 2022-11-12 13:11:54 +11:00