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

JSXGraph wrapper for TypeScript #617

Open
tom-berend opened this issue Mar 4, 2024 · 1 comment
Open

JSXGraph wrapper for TypeScript #617

tom-berend opened this issue Mar 4, 2024 · 1 comment

Comments

@tom-berend
Copy link
Contributor

Hi Friends,

I have built a 'wrapper', a thin layer over JSXGraph to make it friendlier for emerging geometers learning JavaScript or TypeScript. You can try it here.

One of the design goals is to maximize the scaffolding in VSCode. The image gives a flavor of wrapper syntax, and what you would see in VSCode.

The question immediately arises - how can this wrapper be kept in sync with JSXGraph?

c

But there are other questions as well.

The organization of functions in the wrapper can be very different from the 'create-with-100-overloads' in JSXGraph.

For example, I have moved Transforms into an object grouping where I would type board.transform.rotate(..., and also create elements from transforms in the same grouping board.transform.circle(....

  // // Rotate image around point "offset" by dragging point "rot+scale"
    let tRot = brd.transform.rotate(() => Math.atan2(p1.Y() - p0.Y(), p1.X() - p0.X()), p0);

Is there any appetite for a new approach to the user interface for JSXGraph? We cannot change the existing interface by even a comma, but a wrapper gives us an opportunity to reimagine JSXGraph.

@tom-berend
Copy link
Contributor Author

Hi Friends,

I've released a clean version of the JSXGraph wrapper for TypeScript, with support for almost everything in 1.8.0. Alfred, I would be grateful if you added a link in the next JSXGraph release.

here

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

1 participant