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 +7 -8
- e2D/envs.py +1 -0
- e2D/plots.py +1 -1
- {e2D-1.4.10.dist-info → e2D-1.4.11.dist-info}/METADATA +1 -1
- e2D-1.4.11.dist-info/RECORD +11 -0
- {e2D-1.4.10.dist-info → e2D-1.4.11.dist-info}/WHEEL +1 -1
- e2D-1.4.10.dist-info/RECORD +0 -11
- {e2D-1.4.10.dist-info → e2D-1.4.11.dist-info}/LICENSE +0 -0
- {e2D-1.4.10.dist-info → e2D-1.4.11.dist-info}/top_level.txt +0 -0
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
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
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 =
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
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
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) ->
|
|
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.
|
|
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,,
|
e2D-1.4.10.dist-info/RECORD
DELETED
|
@@ -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
|
|
File without changes
|