e2D 1.4.10__py3-none-any.whl → 1.4.11__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
e2D/__init__.py CHANGED
@@ -1168,15 +1168,14 @@ def get_points(position:Vector2D, size:Vector2D, rotation:int|float=0, pos_in_mi
1168
1168
  clockwise order (A, B, D, C), otherwise, they will be returned in counterclockwise order (A, B, C, D).
1169
1169
  """
1170
1170
  if pos_in_middle:
1171
- A, B, C, D = [position.point_from_degs(rotation + V2z.angle_to(size/-2), V2z.distance_to(size/-2)),
1172
- position.point_from_degs(rotation + V2z.angle_to(Vector2D(size.x, -1*size.y)/2), V2z.distance_to(Vector2D(size.x, -1*size.y)/2)),
1173
- position.point_from_degs(rotation + V2z.angle_to(Vector2D(-1*size.x, size.y)/2), V2z.distance_to(Vector2D(-1*size.x, size.y)/2)),
1174
- position.point_from_degs(rotation + V2z.angle_to(size/2), V2z.distance_to(size/2))]
1171
+ d,a = size.length()/2, size.angle()
1172
+ d1, d2 = V2z.point_from_rads(rotation+a, d), V2z.point_from_rads(rotation-a, d)
1173
+ A, B, C, D = position+d1, position+d2, position-d2, position-d1
1175
1174
  else:
1176
- A, B, C, D = [position.copy(),
1177
- position.point_from_degs(rotation + V2z.angle_to(Vector2D(size.x, 0)), V2z.distance_to(Vector2D(size.x, 0))),
1178
- position.point_from_degs(rotation + V2z.angle_to(Vector2D(0, size.y)), V2z.distance_to(Vector2D(0, size.y))),
1179
- position.point_from_degs(rotation + V2z.angle_to(size), V2z.distance_to(size))]
1175
+ A, B, C, D = position.copy(),\
1176
+ position.point_from_rads(rotation + V2z.angle_to(Vector2D(size.x, 0)), V2z.distance_to(Vector2D(size.x, 0))),\
1177
+ position.point_from_rads(rotation + V2z.angle_to(Vector2D(0, size.y)), V2z.distance_to(Vector2D(0, size.y))),\
1178
+ position.point_from_rads(rotation + V2z.angle_to(size), V2z.distance_to(size))
1180
1179
  points = (A, B, C, D) if not clockwise_return else (A, B, D, C)
1181
1180
  return points if not return_list else tuple(x() for x in points)
1182
1181
 
e2D/envs.py CHANGED
@@ -5,6 +5,7 @@ import pygame as pg
5
5
  from pygame.event import Event
6
6
  from time import time as __tm__
7
7
  import math as _mt
8
+
8
9
  """ CODE EXAMPLE FOR RootEnv
9
10
  from e2D.envs import *
10
11
 
e2D/plots.py CHANGED
@@ -509,7 +509,7 @@ class Plot:
509
509
  self.update_grid()
510
510
  self.render()
511
511
 
512
- def get_humanoid_zoom(self) -> None:
512
+ def get_humanoid_zoom(self) -> V2|Vector2D:
513
513
  return 2 ** (-.1*self.current_zoom)
514
514
 
515
515
  def focus(self, center:V2|Vector2D|None=None, zoom:float|Vector2D|V2|None=None) -> None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: e2D
3
- Version: 1.4.10
3
+ Version: 1.4.11
4
4
  Summary: Python library for 2D games. Streamlines dev with keyboard/mouse input, vector calculations, color manipulation, and collision detection. Simplify game creation and unleash creativity!
5
5
  Home-page: https://github.com/marick-py/e2D
6
6
  Author: Riccardo Mariani
@@ -0,0 +1,11 @@
1
+ e2D/__init__.py,sha256=m7BKK9r6t8csv9k_Rmm5sTegvvyx-6-2xPof85Y5BI4,56244
2
+ e2D/cvb.py,sha256=xMpwUBE1G2TOdah-x62W_6yXZey-n1p0OkvfiijZfNY,37445
3
+ e2D/envs.py,sha256=9T5COi1mwbEXOSXOBtZWBYr48WnqJQWhVny8U0g2ql0,9771
4
+ e2D/plots.py,sha256=hLib9scdz10pXgiimaqdg7A363h1TP1X8KpIGRpM1cw,33111
5
+ e2D/utils.py,sha256=0BBnUygsLp-fx5cVgKhxe-WGZNj0YZvJz1ejlD7Emfc,5534
6
+ e2D/winrec.py,sha256=WBdRJELP4ia_xPinBbY5AfHrFqRRkehqCPLDq5wH2s4,1218
7
+ e2D-1.4.11.dist-info/LICENSE,sha256=wymkNVDvj3qmjdO_rAhkRPM4t5y3_SqffGsFdgfvznU,1066
8
+ e2D-1.4.11.dist-info/METADATA,sha256=6R1oYvr4cFOrbW_AWj2Hs0q3toGZfCNUv6r92OR6ya4,9609
9
+ e2D-1.4.11.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
10
+ e2D-1.4.11.dist-info/top_level.txt,sha256=3vKZ-CGzNlTCpzVMmM0Ht76krCofKw7hZ0wBf-dnKdM,4
11
+ e2D-1.4.11.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (72.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,11 +0,0 @@
1
- e2D/__init__.py,sha256=qVjX50giklf5s2F-LeTCO1PaxxN4edxJ_9mH_3wWFQo,56593
2
- e2D/cvb.py,sha256=xMpwUBE1G2TOdah-x62W_6yXZey-n1p0OkvfiijZfNY,37445
3
- e2D/envs.py,sha256=FC29mwYGaV2nmhEhB746ggTVQIt2bUlD9An1rr7Ed50,9770
4
- e2D/plots.py,sha256=-mrDCrLBV60dPdEsVc4yizEDgFCfaHmyjQTMd5np4Q4,33104
5
- e2D/utils.py,sha256=0BBnUygsLp-fx5cVgKhxe-WGZNj0YZvJz1ejlD7Emfc,5534
6
- e2D/winrec.py,sha256=WBdRJELP4ia_xPinBbY5AfHrFqRRkehqCPLDq5wH2s4,1218
7
- e2D-1.4.10.dist-info/LICENSE,sha256=wymkNVDvj3qmjdO_rAhkRPM4t5y3_SqffGsFdgfvznU,1066
8
- e2D-1.4.10.dist-info/METADATA,sha256=8ivfF-PUK-JqO_eB1LwXsDlbWXITLkcYrPiJmbeAVBU,9609
9
- e2D-1.4.10.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
10
- e2D-1.4.10.dist-info/top_level.txt,sha256=3vKZ-CGzNlTCpzVMmM0Ht76krCofKw7hZ0wBf-dnKdM,4
11
- e2D-1.4.10.dist-info/RECORD,,
File without changes