Ability to share OpenJSCAD application via URL
Feature request:
Ability to embed OpenJSCAD code by encoding it together with URL. This way URL can be shareable.
Example:
http://wavedrom.com/editor.html?%7B%20%22signal%22%20%3A%20%5B%0A%20%20%7B%20%22name%22%3A%20%22clk%22%2C%20%20%22wave%22%3A%20%22P......%22%20%7D%2C%0A%20%20%7B%20%22name%22%3A%20%22bus%22%2C%20%20%22wave%22%3A%20%22x.%3D%3D.%3Dx%22%2C%20%22data%22%3A%20%5B%22head%22%2C%20%22body%22%2C%20%22tail%22%2C%20%22data%22%5D%20%7D%2C%0A%20%20%7B%20%22name%22%3A%20%22wire%22%2C%20%22wave%22%3A%20%220.1..0.%22%20%7D%0A%5D%7D%0A
Opens editor with specific code block.
Do you mean encoding the contentof the jscad script(s) into the url ?
Or just shareable urls pointing to a specific design ?
If the first, then I do not think this is very realistic given the potential complexity of the scripts (you would end up with unmanageable urls), if the second one, I have been exploring (nothing public for now) possibilities for self hosted, peer to peer designs etc which would work like that.
First Option:
Agree, it can be bulky, but maybe OK for some small code tweets. https://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers
Second option:
https://gist.github.com is public. Some projects using gist: https://bl.ocks.org https://jsbin.com/help/import-gists http://requirebin.com
I use require.bin all the time, so I get the appeal :)
The problems & solutions :
- the current "UI" of openjscad is the same for running locally and on the official site, so it would need work to work correctly in both cases ( neither @z3dev nor I are particularly happy about the current UI in the first place, but that is a different problem)
- I think this needs module support first https://github.com/jscad/OpenJSCAD.org/issues/245 so we can use the same kind of tech as requirebin for a more evolved UI
- take a look at https://datproject.org/ for one of the most promising peer to peer data systems (without any crappy coin stuff) there are even ways to share & install node.js packages in a peer to peer manner : https://github.com/depjs/dep : imagine shareable peer to peer cad designs !
@kaosat-dev I ❤️ dat . Let's do dat
love the idea, but hard to implement in practice, especially with data that is essentially unlimited code.