Comments (5)
Include button to add blocks, text fields to define block positions. Move app to master and document on wiki when it's done.
from vesseljs.
There is a beta version of the app on https://shiplab.github.io/vesseljs/examples/Ship_stability_with_blocks.html. Give me feedback on whether you like the direction the app is going.
Next features should add:
- Text fields to define x and y positions of blocks. The app should include a warning that the x position is merely for spatial arrangement, as the library does not support trim calculations.
- A button to update calculations and visualizations. Calculations are not responsive enough for the current
onchange
approach. - Documentation on wiki.
from vesseljs.
I think it is a sensible extension of the table approach. It is one possible way of editing the block configuration. I am working on a more visually oriented approach. I guess there is no reason we can't have both, or at least experiment with both.
Regarding responsivity, I agree that modifying immediately on every single change might not be the best solution. I don't particularly like having to click a button either, though. Maybe we can use a setInterval that calls an update function every second or so (maybe more). Each onChange then should set a shared confModified flag that is checked by the update function before doing any expensive calculations, and reset to false afterwards. Actually, that may not turn out to be perfectly thread-safe. Maybe we even need to use some version numbers, storing one appliedConfVersion and one currentConfVersion, reading the currentConfVersion at the beginning of the update function, and updating appliedConfVersion at the end of it.
The thread-safety concerns may also be ungrounded. Maybe we can just try with a simple boolean flag first, and change only if necessary.
from vesseljs.
OK, now I looked at the code. Right, it is not a good solution to rebuild the entire visualization on every change. It is the easiest solution, though. I believe a better solution will be to add an interface to the Ship3D prototype, for simultaneously modifying the Ship3D and the underlying Ship. Then we probably also want a proper interface in the Ship prototype.
My initial concern about calculations was with the draft and geometric attributes, and that concern is still alive.
from vesseljs.
I'm working on a new version of the code, I should commit in some minutes. Then you can suggest any improvements based on the new version. But the points you made on your post will remain, though.
from vesseljs.
Related Issues (20)
- Idea for Envelope Hull HOT 1
- "Rugen-Kutta" should be "Runge-Kutta"... HOT 2
- Ship3D_v2 deck geometry error HOT 2
- undefined position gives NaN CG HOT 1
- New organization of project resources HOT 2
- Ship3D_v2.js in examples: e is not defined (shows in crane pendulum example)
- Organizing Equipment, Lines and Dynamical Matrices HOT 2
- InsertMooring general function snippet HOT 2
- Modernizing with ES6 classes, modules and smarter build process HOT 3
- Fix caching, or disable, as proposed in #87 HOT 1
- Examples: Reduce camera range to improve depth resolution
- Duplicated code HOT 1
- Compatibility for THREE.js r118 HOT 2
- Bulkhead just reaching half the Breadth of Ship
- Is it possible to create a catamaran hullform with a wave piercer? HOT 1
- Adjustments on ES6 patterns HOT 5
- Publishing Vesseljs on npm HOT 2
- Great idea HOT 1
- Twin Outboards HOT 1
- Does the Patch_interpolation.js makes any difference at all? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vesseljs.