Closed o-jasper closed 9 years ago
Been messing with javascript a little.(I know rather little of it) Feh, strange how data transfer seems to be drag-drop only. It also looks like you cant just use a string to fetch the file because that'd cause security issues.(So i guess -from-the-url is out?..)
A simple way to get stuff working commandline-style is to simply write a little shell script that puts basically the equivalent of an example together.
Oh, and i tried it with epiphany, it mentions it only working on chrome, but it is at least mostly working on firefox for me so far.
``I did a simmilar thing in my fork of this repo! In my case I want a static .jscad script (on the server side) to always be loaded… I bet you can easily expand that functionality to load scripts from somewhere else as well.
Check out the index page on my 'gh-pages' branch. In the function onload()
I used the jQuery library to load the script and pass it's content to the OpenJsCad.Processor
!
https://github.com/andrewhodel/OpenJsCad/commit/ec235088d169463306b5e83e639b4b6abad230f9
Added a file upload button.
Having a file upload button would be nice for me too - I don't usually use graphical file managers, so having to launch one just to select a file for jscad is a bit of a fuss...
merged ec23508 to gh-pages
I dont ever drag files, and i dont really feel like starting, I would prefer that the filename comes from the url. Perhaps while at it, maybe parameters of the object can come from the url too.
Came here via CoffeeSCad, but got here because it wouldnt work readily, and the apparently more 'heavier' tooling. It did a lot of compiling, thought coffeescad was 'just javascript'.. I am not quite clear what the differences are.
Also would be nice if a way could be figured out how to use this thing from the commandline.