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

CDN link for v2.x? #97

Closed
BartmanEH opened this issue Jan 5, 2023 · 11 comments
Closed

CDN link for v2.x? #97

BartmanEH opened this issue Jan 5, 2023 · 11 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers question Further information is requested

Comments

@BartmanEH
Copy link

Description

what's the CDN link for v2?
the following link:
https://unpkg.com/fireworks-js@latest/dist/fireworks.js
results in:
Cannot find "/dist/fireworks.js" in fireworks-js@2.10.0
and
https://cdn.jsdelivr.net/npm/fireworks-js@latest/dist/fireworks.js
links to v1.4.1

Which package are you using?

fireworks-js

fireworks-js version

1.4.1

Browser

Chrome

@BartmanEH BartmanEH added the bug Something isn't working label Jan 5, 2023
@crashmax-dev crashmax-dev added good first issue Good for newcomers question Further information is requested and removed bug Something isn't working labels Jan 5, 2023
@BartmanEH
Copy link
Author

thanks for your help. I'm a bit of a hack so you'll have to bear with me as I move from 1.4.1 to 2.10.0. I'm using https://cdn.jsdelivr.net/npm/fireworks-js@latest/dist/index.umd.js
but getting:
Uncaught TypeError: Fireworks is not a constructor
for
fireworks = new Fireworks(container,{});

@crashmax-dev
Copy link
Owner

crashmax-dev commented Jan 5, 2023

for some reason now it is in window
new window.Fireworks(container)

it was my mistake to rename the file from version 2.0. better to use fixed version in cdn's

@crashmax-dev
Copy link
Owner

upd:
image

@crashmax-dev
Copy link
Owner

@BartmanEH

the best way to used via cdn for latest version 🤷

image

@crashmax-dev crashmax-dev added the bug Something isn't working label Jan 5, 2023
@BartmanEH
Copy link
Author

BartmanEH commented Jan 5, 2023

this is getting me further:
container = document.querySelector('.fireworks-container');
new Fireworks.default(container)
but now fireworks.updateOptions({ traceSpeed: 1 }); is not working (neither is fireworks.setOptions({ traceSpeed: 1 }); ):
I get:
Wordle_Solver.js:527 Uncaught TypeError: fireworks.setOptions is not a function
or
Wordle_Solver.js:527 Uncaught TypeError: fireworks.updateOptions is not a function

edit: trying fireworks = new Fireworks.default(container) testing now...

@crashmax-dev
Copy link
Owner

@BartmanEH
Copy link
Author

BartmanEH commented Jan 5, 2023

OK, thanks to your help, I'm back to where I was: fireworks working but using v2.10.0 instead of v1.4.1 but I still cannot get updateOptions to work. I moved it to after .start() but still fireworks.updateOptions({ traceSpeed: 1 }); has no effect.

edit: hang on, maybe traceSpeed = 1 just isn't as slow as I'm expecting. I'm playing with your sandbox example. thanks!

@BartmanEH
Copy link
Author

BartmanEH commented Jan 5, 2023

OK, I think it's all working now. Thanks for your help. I do wish I could make is slower than traceSpeed = 1 :-)
Edit: I'm experimenting with traceSpeed < 1 like 0.01 but it seems to just start out slowly but not actually "fire" traces more slowly

@BartmanEH BartmanEH reopened this Jan 5, 2023
@BartmanEH
Copy link
Author

fireworks.updateOptions({ traceSpeed: 1 }); in my application is no where near as slow as in your sandbox example.

@BartmanEH
Copy link
Author

I give up. Something traceSpeed = 1 is very slow in your sandbox, sometimes it seems the same as default of 10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants