Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jfxr without Angular and as a package on NPM #31

Closed
blurymind opened this issue Oct 9, 2018 · 9 comments
Closed

jfxr without Angular and as a package on NPM #31

blurymind opened this issue Oct 9, 2018 · 9 comments

Comments

@blurymind
Copy link

Hi, I like this library very much, but the app I want to use it with uses React and not Angular. What if I dont want that dependency. Also I seem to be having trouble locating it on npm
https://www.npmjs.com/search?q=jfxr

Is it available as a nodejs module?

@ttencate
Copy link
Owner

That's the second time someone asks for this, so I'll consider this a feature request now. But as this is just a hobby project, and I'm quite busy at the moment, I can't promise anything.

Maybe the notes on #30 are useful to you in the meantime.

Pull requests to split things up better are welcome!

@blurymind
Copy link
Author

blurymind commented Oct 17, 2018

Hi, thank you for taking the time to explain. That is understandable.
I had to go with jsfx instead of jfxr in the end

My intention was to bundle it with gdevelop5
4ian/GDevelop#693
:)
At least there is an alternative library already, but must admit that jfxr is cooler

Thank you for developing it

@blurymind
Copy link
Author

blurymind commented Oct 20, 2018

Hi, after getting jsfx added to gdevelop
4ian/GDevelop#695
We got to the conclusion that we might switch to jfxr in the future- if it becomes available as a node module and the angular dependency becomes optional. It seems to give better results and to be better maintained than jsfx. It's an awesome sound effects generator

@ttencate
Copy link
Owner

GDevelop sounds really cool! Reminds me a lot of Stencil, which no doubt you've heard of.

I'm happy to contribute to such awesomeness, so I've pushed and prodded until an npm package emerged. It should give you a raw array of samples, not a .wav file or anything. Is that enough?

Also, this is the first time I've made an npm package. If there's anything that doesn't work or could be improved, let me know!

@4ian
Copy link

4ian commented Oct 21, 2018

GDevelop author here :)
Thanks a lot for your work @ttencate to make jfxr available as a npm package! I'll let @blurymind see if/how we could integrate it as a replacement to jsfx.
I think we might need to generate a .wav file, but that could be done outside of jfxr maybe?

@ttencate
Copy link
Owner

I could (and should) just move the WAV-generating code from the app to the library instead. It's not a lot..

@4ian
Copy link

4ian commented Oct 21, 2018

Looks like it's something that could be moved indeed! (if you think it makes sense to have it in the library of course 😊).
Otherwise it wouldn't be too hard to just re-implement it (either in GDevelop in the LocalJfxrBridge.js "bridge" file that launches the editor or in jfxr-main.js, the "glue code" that wraps the editor (usually by adding buttons on the top to save changes/close the editor and go back to GDevelop)).

@blurymind
Copy link
Author

blurymind commented Oct 21, 2018

@ttencate thank you for this! I will look into replacing jsfx with jfxr this week. @4ian is telling me that the angular dependency could be ok if the editor is stand-alone by itself.

The only thing required is the ability to export wav- as it is what the game engine uses for sound resources - this is already available,so there shouldnt be a problem. Jfxr data will still be stored as sound resource metadata and reloaded

@ttencate
Copy link
Owner

There ya go. Please file new issues for anything that doesn't work -- I didn't exactly test this thoroughly (and jfxr has been... a bit light... on automated testing from the start).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants