-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed the server and added some base features for demos #70
Conversation
Is it possible to add the assembly-docs folder to the cache? And then make a simple server route that serves from this directory? I think it would be great if once generated, the rack pops up and underneath there was a big button saying something like "Go to assembly documentation" and perhaps a smaller one that was "download zip". |
Also.. the preview is upside down, but the controls are gimbal locked so you can't spin it the right way up. |
That should be possible. I'll give it a try.
Yeah, I haven't figured out the model-viewer options to fix the gimbal lock yet. I can at least set the view to be right side up by default with the view direction settings. |
@julianstirling I fixed the issue with the preview being upside down. Hosting the resulting |
…nes of the wrong config
Something else that should not be too hard, is to start with no drop downs. There would be an add button for each component type, something like |
@julianstirling Your suggestions have been implemented.
In addition, I have renamed I think I'll go ahead and take a shot at making the drop downs configurable. |
Ok, there are improvements that could be made, but I am going to stop and wait for feedback. The UI is dynamic now, allowing for arbitrarily complex racks to be configured. Setting a drop down to One question I have is whether or not the rack's CAD model is being built in the right order relative to the order of the drop downs in the UI. I'm not sure if it should be bottom-up or top-down relative to how the controls are arranged in the UI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few little comments that are optional.
How do I actually suggest code changes rather than just adding comments?
@julianstirling If you want to completely clear the cache during testing (start from scratch), delete the contents of the The cache is keyed on the existence of the build zip file that gets sent to the client, so a dirty cache clear can be completed by deleting the zip file, which should trigger a new build. All the other directories for that specific configuration should be re-created. If the order of the components in the config is changed, it should be treated as a completely different build. |
@julianstirling I think all the comments have been resolved now. I also moved the loading spinner up to the same area as the 3D preview, and toggle the visibility now so that it does not look like a left-over preview belongs to a new config. It causes a quick flash when requesting a cached config while running locally, but I think that is the price we pay for making sure users are not seeing old previews for new configs while the new preview is loading. |
Perfect. Merge is approved so feel free to merge when you are ready. |
With the exception of allowing download of individual components (which might end up being a #wontfix anyway), the server is fixed and has a couple of new features.
devices.json
file, and any components that are missing necessary metadata ("HeightUnits") are filtered out so that you cannot generate a broken config.This is a contrived screenshot. The preview actually works, and has full 3D mouse controls.
This server is still a mess in some ways. The
generate
call blocks, and special care will be needed to make that work async without breaking the server framework (it is weird about spinning off threads from within it's own threads). This means that it is not ready for multiple simultaneous users. However, it should work fine for a local demo on a laptop.Caching is still in place, but works differently than before. Both the build zip file and the glTF file are both cached.
@julianstirling If you get a chance, you could see if you can get this running on your local machine. The
requirements.txt
in theserver
directory has been updated, and is what I am running on.