Skip to content

Experimental: window interaction#4719

Open
colinrubow wants to merge 3 commits intoManimCommunity:experimentalfrom
colinrubow:experimental
Open

Experimental: window interaction#4719
colinrubow wants to merge 3 commits intoManimCommunity:experimentalfrom
colinrubow:experimental

Conversation

@colinrubow
Copy link
Copy Markdown

Overview: What does this pull request change?

Enables interaction between the keyboard and mouse with the window.

Motivation and Explanation: Why and how do your changes improve the library?

Currently there's no such interaction. I accomplished this by giving the Scene to the pyglet opengl window and overriding pyglets interaction methods so that they call the Scenes interaction methods. I'd say there are three parts to this PR:

  1. tying the Scene's interaction methods to the opengl window's interaction methods
  2. linearly transforming pyglet window pixel coordinates to the camera coordinates
  3. changing the scaling and sensitivity of mouse motions to be reasonable (the current methods make me lose the mobjects in the scene quite easily).

Links to added or changed documentation pages

NA

Further Information and Comments

NA

Reviewer Checklist

  • The PR title is descriptive enough for the changelog, and the PR is labeled correctly
  • If applicable: newly added non-private functions and classes have a docstring including a short summary and a PARAMETERS section
  • If applicable: newly added functions and classes are tested

@colinrubow colinrubow changed the title Experimental Experimental: window interaction May 5, 2026
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

Successfully merging this pull request may close these issues.

1 participant