-
Notifications
You must be signed in to change notification settings - Fork 12
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
Any plan to make a Typescript version and publish to npmjs ? #47
Comments
I am speaking for myself as a non-programmer / non-developer. There is no such plan as I don't see how that change would be beneficial for the end user (i.e. for a visitor of your web page containing the AnimCubeJS simulators). Regarding webmasters / developers, I don't see how to ease use of AnimCubeJS more than this. |
Indeed for somebody for wants to write HTML directly, this would add not benefit, on the contrary it would make things unecessarily complex. But today most web sites are built in frameworks like React or Vue. In this case being able to wrap AnimCubeJS in a properly package component helps - as opposed to resorting to global variables, which can become messy. Additionally these frameworks allow reactivity, ie here responding to changes in the state of a cube. Asking the question I had in mind to use AnimCubeJS in a vitepress web site.
Side notes:
If some of the above would be of interest to AnimCubeJS repo, pls let me know. |
Glad to see you got AnimCubeJS working with Vue. Here is how I look at it: to keep things as simple as possible, AnimCubeJS is not designed to directly support every JS framework or package registry there is. However, it is designed to support them indirectly - as long as webmasters are allowed to work with HTML & JS code, they should be able to get AnimCubeJS simulators to work on their web pages regardless of the tools being used to build them. Among other tools, AnimCubeJS is already known to be working with React Native and Docusaurus - search for "CubeXpert" on App Store / Google Play to see an example for React Native, for Docusaurus example see cubinghistory.com. |
I understand the general viewpoint. However, I would argue there are 3 levels of 'packaging': (1) current state, good for 'flat' HTML with global variables, (2) module possibly with typescript with inputs and handler enabling manipulation of an individual widget in a 'non flat' page and (3) component in various framework (React, Vue, X, Y, Z ) indeed how of scope for AnimCubeJS. Without (2) anybody trying to do (3) has to do (2) again and need dig quite deep into the AnimCubeJS function to understand the inputs and outputs and expose the interface properly. For example some params are documented, others can only be changed via a global But never mind. This is only food for thought. Thx for the link to cubinghistory: an impressive encyclopedia ! 👍 |
Thank you for your suggestion and explanation. If there is a change regarding this topic in the future, we will let you know by replying to this thread. Closing for now. Edit: I don´t have a permission to close this issue right now for some reason. |
To ease use of AnimCubeJS, it would be convenient (even ideal) to have it available in Typescript and published on npmjs.
Is there any plan for this ? or is it out of scope ?
Btw congrats for the lib ! 👍
The text was updated successfully, but these errors were encountered: