Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hrgdavor committed Jul 16, 2024
1 parent e97f0b1 commit 75de089
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,31 @@ Most of the things are work in progres, but some parts are pretty ready to be us
- [apps/jscad-web](apps/jscad-web) - code for [jscad.app](https://jscad.app) . It is a nice demo and our attempt at making a an improved version of [openjscad.xyz](https://openjscad.xyz).
- other example apps are much work in progress, you can try them out but they may or may not even work


# Worker
- [x] can run folder projects
- [x] can run scripts that pull deps from unkpg by simply using import or require
Missing features that are in openjscad.xyz and not in jscad.app
- auto zoom (zoom to fit)
- auto rotate
- button to open a project
- language selector
- pick other themes, aside from light/dark
- worker timeout (or a button to kill worker if taking too long)
- keyboard commands and ability to change them


# Worker improvements
- [x] can run scripts that use npm packages (pulls the deps from unkpg)
- [x] can run es6 modules code
- [x] can run typescript
- [x] can run mixed typescript js+require, js+import
- [x] worker is preserved, so caching optimizations are possible between parameter changes
- [x] worker instance is preserved, so caching optimizations are possible between parameter changes

aim is also to simplify integrating worker in other projects

# About jscadui

A jscad UI playground developed here and meant to be later contributed into jscad. This way this is not limited by jscad release cycle.
- support Three.js Babylon.js regl
- create no-dep pure js parameters
- supports: Three.js Babylon.js regl
- implements no-dep pure js [parameters form generator](./packages/params-form/) based on jscad parameter definitions
- allow to be easily used within React, Angular, Vue, Solidj ... or whatever is popular at some point.
- simplify integrating worker



As proof of concept, the goal is to make UI for jscad development that should be able to visualize the changes in realtime.

- to feel responsive on script save, refresh of the preview under 50ms is desirable, but can be few times higher

- for responsiveness to on live parameter change it should feel like animation (60fps\~16ms, 30fps\~32ms)

## Bring more options for debugging
- `jscadDebugger(shapes|object)` - function that can be called at any point to see intermediate results from the script
Expand All @@ -50,7 +50,7 @@ As proof of concept, the goal is to make UI for jscad development that should be
- A second instance of jscad can be used to display any shapes needed to be seen while debugging (original instance can be frozen by debugger)
- the debugger instance of jscad can also be further enhanced to inspect the 3d model

## allow fastest response
## Some thoughts on how to allow fastest response

- initial render may be a simple preview with progressive enhancement in background.
- global precision should be possible so preview has lower precision
Expand All @@ -59,7 +59,7 @@ As proof of concept, the goal is to make UI for jscad development that should be
- progressive enhancement should be stopped and restarted on script or parameter change


## Parallelizing background work
## Some houghts on parallelizing background work

- Use of TypedArrays where possible is preferred to allow for sending data between thread with no cost
- it should be examined if regenerating model in the worker is fast enough, as sending TypedArray out removes access for the sender and coordinating who needs which data can be difficult.
Expand All @@ -71,7 +71,7 @@ As proof of concept, the goal is to make UI for jscad development that should be

## Allowing for changes to be localized instead of recalculating everything

- to extent this can be automatic
- to extent this can be automatic by marking output geometries with id so if it was already sent from worker to main thread sending can be skipped (and in the end likely also upload to GPU)
- much more is possible if developers are taught some best practices that allow for most performance


Expand Down

0 comments on commit 75de089

Please sign in to comment.