joostn / OpenJsCad

3D solid CAD using only Javascript
313 stars 127 forks source link

I dont ever drag files #27

Closed o-jasper closed 9 years ago

o-jasper commented 11 years ago

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.

o-jasper commented 11 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.

v01pe commented 11 years ago

``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!

andrewhodel commented 9 years ago

https://github.com/andrewhodel/OpenJsCad/commit/ec235088d169463306b5e83e639b4b6abad230f9

Added a file upload button.

matthijskooijman commented 9 years ago

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...

bebbi commented 9 years ago

merged ec23508 to gh-pages