mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
fix pixel_coords_to_space_coords
This commit is contained in:
parent
965564853b
commit
ccb47db3bb
1 changed files with 5 additions and 1 deletions
|
@ -186,7 +186,11 @@ class Camera(object):
|
||||||
self.frame.move_to(center)
|
self.frame.move_to(center)
|
||||||
|
|
||||||
def pixel_coords_to_space_coords(self, px, py, relative=False):
|
def pixel_coords_to_space_coords(self, px, py, relative=False):
|
||||||
pw, ph = self.fbo.size
|
# pw, ph = self.fbo.size
|
||||||
|
# Back hack, not sure why this is needed.
|
||||||
|
pw, ph = self.get_pixel_shape()
|
||||||
|
pw //= 2
|
||||||
|
ph //= 2
|
||||||
fw, fh = self.get_frame_shape()
|
fw, fh = self.get_frame_shape()
|
||||||
fc = self.get_frame_center()
|
fc = self.get_frame_center()
|
||||||
if relative:
|
if relative:
|
||||||
|
|
Loading…
Add table
Reference in a new issue