WEB Prototype #944
Replies: 19 comments 9 replies
-
Beta Was this translation helpful? Give feedback.
-
@hrgdavor how goes the new application? I took a look at the code and the build. Looks really interesting and compact. I’ll continue to keep watch so let me know if there are any questions. Also, if there are some nice improvements then let me know and I’ll try things out. Sadly, I’m back at full time work again, and don’t have a lot of time for JSCAD. So, please be patient. |
Beta Was this translation helpful? Give feedback.
-
@z3dev mini update: I have been playing more with my ui lib, but finally started to assemble code for new worker. This is a tricky step to get right as I want also to support same file access in electron app. this will take some time, so I will tackle it in multiple iterations while working on execution and render for single script that is edited in the embeded editor. |
Beta Was this translation helpful? Give feedback.
-
it has been slow 2 months, still here is something to look forward to: threejs and babylon have some level of support for better transparency rendering. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
new progress :) @z3dev ;)
bandicam.2022-02-03.21-47-32-200.mp4 |
Beta Was this translation helpful? Give feedback.
-
bybylon.js basic scene with grid and axes ... needs more tweaking, but it works.. babylon view is currently 6.7 mb , but it should go down in size when customized closer to 1MB.. bandicam.2022-02-04.22-47-43-172.mp4 |
Beta Was this translation helpful? Give feedback.
-
after setting up threejs and regl basic scene with grid and axis, babylon is taking some time to tune to match camera view One major difference is handiness also default fov in babylon is 0.8 which is not exact match to regl and threejs default, but easy fix after playing around the views are getting closer bandicam.2022-02-21.21-50-41-659.mp4 |
Beta Was this translation helpful? Give feedback.
-
I was trying to use library specific code to render grid and axes, but both threejs ang babylonjs implementations are missing things that would enable me to make all 3 look the same. The most robust way to get grid and axis to work and look the same it to generate properly colored line segments. I will switch to model where jscad(web ui) will generate axis lines and grid and give it along with models from executed jscad script, I will try make it so all 3 engine wrappers support grouping of objects and multiple scenes to be rendered on a section of the screen. this will also mean no need to reimplement things in wrappers if we add support to different grid types in jscad. Threejs and sharing of objects:
|
Beta Was this translation helpful? Give feedback.
-
Code that used grid and axis for the specific library (regl,threejs,babylon) was removed and implemented a manually generated grid and axes Even though opacity in jscad theme is 1 for color1 and 0.5 for color2, the closest match to the color on the website this is also the start of supporting line-segments geometry type in renderer (currently only threejs viewer) Opacity per line-segment is tricky and was added only in threejs 127. so splitting the grid into 2 separate set of lines It remains to be seen if using bunch of lines is a good choice for grid (if it has some perf penalty) This is also first step towards defining common format for geometries (that uses TypedArrays). https://github.com/jscad/OpenJSCAD.org/blob/proto-web2/packages/web2/geom.format.md |
Beta Was this translation helpful? Give feedback.
-
Nothing visual to report as I have recreated succesfully grid and axis in babylon and screen above is representative, but soon the grid and axis will be consistent for all 3 engines. This also will open posibility to allow for more types of grids or axis visualization. there are 2 major geometries to display:
lines now work in Threejs and babylon but some interesting implementation details came-up. The minor issue is with a use-case that not used in jscad yet: color per vertex for lines but will likely be present in mesh too. Looking at the code, it is definitely 4 channel in babylon. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
finally one further step was made:
video shows
bandicam.2022-04-10.22-39-20-826.mp4 |
Beta Was this translation helpful? Give feedback.
-
I have just made another step forward: mesh support (but with some quirks ATM) Also when switching viewers, if they are different orientation currently I need to run the script again manually to get properly oriented triangles bandicam.2022-04-17.21-54-43-627.mp4 |
Beta Was this translation helpful? Give feedback.
-
after 20 days, another small update support for paramaters is integrated (there will be UX changes) and work for the purpose of testing worker communication and parameter updating this also demonstrates how nice it is when worker is not killed, but reused. fast scripts have an option to give instant feedback on param changes and I think this will be also a nice incentive to make faster scripts. bandicam.2022-05-08.00-09-10-271.mp4 |
Beta Was this translation helpful? Give feedback.
-
Last missing piece is closer to be ready: Reusable orgit contros, and a bonus a nice camera gizmo. bandicam.2022-12-01.23-04-12-843.mp4I have gathered a lot of experience with Monaco, and runnig code with imports in workers. I am able to run code taht usese |
Beta Was this translation helpful? Give feedback.
-
Themes in all 3 engines bandicam.2022-12-06.23-25-59-113.mp4 |
Beta Was this translation helpful? Give feedback.
-
some more progress with prototype. Loading of folder projects works, it can handle ESM modules, cjs scripts (require) and even typescript projects. Also worker improvements that allow script developers to optimize execution when parameters change and cache expensive operations. current jscad bandicam.2023-01-21.19-05-31-375.mp4my new prototype is still ugly, but things are progressing bit by bit It was my mission from the first attempt at making a new jscad prototype to allow script developers to optimize for performance and bling. in this example I took a complex model and added caching so that model is kept in case only View Options parameters change. Those only affect rotation of the parts. also I enhanced parameter definition to allow for live updates for any of the parameter (it is not default, but opt-in) bandicam.2023-01-21.18-58-23-661.mp4 |
Beta Was this translation helpful? Give feedback.
-
@hrgdavor have you seen this? Wow! or this! |
Beta Was this translation helpful? Give feedback.
-
This prototype is moving to another repo to allow another developer/s to contribute and to even release some official versions until it is ready to be contributed back to jscad. Repo is https://github.com/hrgdavor/jscadui
current work is in hrgdavor/jscadui#9
it is about making actual usable components for users to combine jscad into an application, vanilla-js and a React example.
bandicam.2022-12-06.23-25-59-113.mp4
parameter form is working 2023-01-21
bandicam.2023-01-21.18-58-23-661.mp4
right renderer works and orbit controls (both threejs) plus making a camera navigation gizmo
more details here: hrgdavor/jscadui#10
I will change this text and also post replies so those interested can follow the progress.
Disclaimer:
branch: https://github.com/jscad/OpenJSCAD.org/tree/proto-web2
Looking at the code
checklist [2022-05-07]
copied from readme in the prototype branch, and it will grow as more is clear what I plan to play with there
nice to have or to consider if worth doing
progress
support for paramaters
bandicam.2022-05-08.00-09-10-271.mp4
Beta Was this translation helpful? Give feedback.
All reactions