interactive-shader-format-js icon indicating copy to clipboard operation
interactive-shader-format-js copied to clipboard

how to use without node?

Open EVERYTHINGING opened this issue 8 years ago • 9 comments

Hey there, wondeful library. I love the format and how it works with VDMX.

I was able to run the server in the examples using budo however, I would like to use the library without node, locally with one js file. What is the best way to do this? Or is it not recommended as node is doing some sort of heavy lifting that would not work well on the client side?

Thank you

EVERYTHINGING avatar Apr 09 '17 22:04 EVERYTHINGING

Good idea. If you pull to master, you should be able to run npm run build-global which will output build/isf.global.js and should add the classes to your window object when included.

If this doesn't run let me know. Whats the latest packaging norms for non-browserify based distribution?

msfeldstein avatar Apr 10 '17 02:04 msfeldstein

also if this does work let me know

msfeldstein avatar Apr 10 '17 02:04 msfeldstein

command doesn't work. says missing script: build-global.

I was able to get this to work locally by running browserify examples/app.js > examples/app-build.js and then swapping app.js for app-build.js in the examples/index.html. However, this still uses the require statements. I was wondering if there was a way to build this out similarly to requirejs optimization tools which concats all of the js into one file in the necessary order?

EVERYTHINGING avatar Apr 13 '17 02:04 EVERYTHINGING

do you see this line in your package.json? That is the script its trying to run: https://github.com/msfeldstein/interactive-shader-format-js/blob/master/package.json#L11

On Wed, Apr 12, 2017 at 7:46 PM EVERYTHINGING [email protected] wrote:

command doesn't work. says missing script: build-global.

I was able to get this to work locally by running browserify examples/app.js > examples/app-build.js and then swapping app.js for app-build.js in the examples/index.html. However, this still uses the require statements. I was wondering if there was a way to build this out similarly to requirejs optimization tools which concats all of the js into one file in the necessary order?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/msfeldstein/interactive-shader-format-js/issues/6#issuecomment-293762726, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJ1b8uBNj-TVQ_YH7JlMGWPvpBAY4sUks5rvYySgaJpZM4M4LiA .

msfeldstein avatar Apr 13 '17 02:04 msfeldstein

Rad thank you. I would like to submit a pull request with a separate index-local.html and app-local.js which makes it easy to get going without any tinkering but... I am getting a fatal: unable to access 'https://github.com/msfeldstein/interactive-shader-format-js.git/': The requested URL returned error: 403 when I try to push up my new branch...

EVERYTHINGING avatar Apr 19 '17 00:04 EVERYTHINGING

you can't push to my repo, you need to create a fork to your own account, then create a pull request

msfeldstein avatar Apr 20 '17 00:04 msfeldstein

aye ok will do this later thank you

EVERYTHINGING avatar May 04 '17 20:05 EVERYTHINGING

Im curious about this as well. I was trying to see if i could run this in CODA for ios on my ipad pro, and getting the console error: "ReferenceError: Can't find variable: require I am here" I haven't yet used node.js / npm / browserify in practice, so i am assuming there are dependencies there, @msfeldstein would your prior comment be a remedy for this, or is there a version somewhere that might have already done this?

It seems like it should be possible to slim this all down into portable JS, am i correct in that assumption?

@EVERYTHINGING did you happen to post your version you mention?

MacroMachines avatar Dec 30 '17 04:12 MacroMachines

The ability to use this as an ES Module would be really nice.

SelfDrivingCarp avatar Aug 07 '24 20:08 SelfDrivingCarp