VertexEngine 1.8rc2__tar.gz → 1.8.2__tar.gz
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.
- {vertexengine-1.8rc2/src/VertexEngine.egg-info → vertexengine-1.8.2}/PKG-INFO +12 -2
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/README.md +11 -1
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/pyproject.toml +1 -1
- vertexengine-1.8rc2/src/VertexEngine/GraphicalMath/Vector2.py → vertexengine-1.8.2/src/VertexEngine/Math/_Vector2.py +24 -24
- vertexengine-1.8.2/src/VertexEngine/Math/__init__.py +9 -0
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/VertexScreenModifiers.py +1 -1
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/__init__.py +5 -2
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/engine.py +1 -1
- {vertexengine-1.8rc2 → vertexengine-1.8.2/src/VertexEngine.egg-info}/PKG-INFO +12 -2
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine.egg-info/SOURCES.txt +2 -2
- vertexengine-1.8rc2/src/VertexEngine/GraphicalMath/__init__.py +0 -3
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/LICENSE +0 -0
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/setup.cfg +0 -0
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/Collisions/__init__.py +0 -0
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/Collisions/collisions.py +0 -0
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/InputSystem/BtnInputs.py +0 -0
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/InputSystem/Events.py +0 -0
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/InputSystem/KeyInputs.py +0 -0
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/Vertex/__init__.py +0 -0
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/ChatBubble.py +0 -0
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/CheckBox.py +0 -0
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/Counter.py +0 -0
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/Dropdown.py +0 -0
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/List.py +0 -0
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/OptionBtnWidget.py +0 -0
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/StatusLight.py +0 -0
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/ToggleSwitch.py +0 -0
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/WindowMods.py +0 -0
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/Windows.py +0 -0
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/VertexWidgets/BasicWidgets/SimpleGUI.py +0 -0
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/VertexWidgets/PygameVWidgets/__init__.py +0 -0
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/assets.py +0 -0
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/audio.py +0 -0
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/examples/games/Dodge/main.py +0 -0
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/examples/games/platformer/main.py +0 -0
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/examples/games/snake/main.py +0 -0
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/examples/test.py +0 -0
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/scenes.py +0 -0
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine.egg-info/dependency_links.txt +0 -0
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine.egg-info/requires.txt +0 -0
- {vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: VertexEngine
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.8.2
|
|
4
4
|
Summary: A high-performance SDK for Python Development.
|
|
5
5
|
Author-email: Tyrel Miguel <annbasilan0828@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -30,7 +30,17 @@ VertexEngine is a GUI and Game Engine for python applications, it works best if
|
|
|
30
30
|
## Community
|
|
31
31
|
Discord is out NOW!
|
|
32
32
|
[Discord Server](https://discord.com/channels/1468208686869643327/1468208687670890588)
|
|
33
|
-
## Change Logs (1.0rc1 - 1.
|
|
33
|
+
## Change Logs (1.0rc1 - 1.8.2), NEW!
|
|
34
|
+
### 1.8.2
|
|
35
|
+
- Graphical Math Tweaks!
|
|
36
|
+
- Old classes now moved into Math
|
|
37
|
+
- GraphicalMath is now just Math
|
|
38
|
+
### 1.8.1
|
|
39
|
+
- Some Fixes!
|
|
40
|
+
- Tweaks!
|
|
41
|
+
### 1.8.0
|
|
42
|
+
- Updated Documentation!
|
|
43
|
+
- Engine Fixes!
|
|
34
44
|
### 1.8rc2
|
|
35
45
|
- Fixed math not defined errors
|
|
36
46
|
- Renamed to GraphicalMath
|
|
@@ -9,7 +9,17 @@ VertexEngine is a GUI and Game Engine for python applications, it works best if
|
|
|
9
9
|
## Community
|
|
10
10
|
Discord is out NOW!
|
|
11
11
|
[Discord Server](https://discord.com/channels/1468208686869643327/1468208687670890588)
|
|
12
|
-
## Change Logs (1.0rc1 - 1.
|
|
12
|
+
## Change Logs (1.0rc1 - 1.8.2), NEW!
|
|
13
|
+
### 1.8.2
|
|
14
|
+
- Graphical Math Tweaks!
|
|
15
|
+
- Old classes now moved into Math
|
|
16
|
+
- GraphicalMath is now just Math
|
|
17
|
+
### 1.8.1
|
|
18
|
+
- Some Fixes!
|
|
19
|
+
- Tweaks!
|
|
20
|
+
### 1.8.0
|
|
21
|
+
- Updated Documentation!
|
|
22
|
+
- Engine Fixes!
|
|
13
23
|
### 1.8rc2
|
|
14
24
|
- Fixed math not defined errors
|
|
15
25
|
- Renamed to GraphicalMath
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import math
|
|
2
2
|
|
|
3
|
-
class
|
|
3
|
+
class _Vector2:
|
|
4
4
|
"""Represents a 2D vector using (x, y) coordinates.
|
|
5
5
|
|
|
6
6
|
Supports common vector math operations such as addition,
|
|
@@ -8,7 +8,7 @@ class Vector2:
|
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
10
|
def __init__(self, x=0.0, y=0.0):
|
|
11
|
-
"""Initialize a
|
|
11
|
+
"""Initialize a _Vector2.
|
|
12
12
|
|
|
13
13
|
Args:
|
|
14
14
|
x (float): X-coordinate.
|
|
@@ -19,7 +19,7 @@ class Vector2:
|
|
|
19
19
|
|
|
20
20
|
def __repr__(self):
|
|
21
21
|
"""Return a readable string representation."""
|
|
22
|
-
return f"
|
|
22
|
+
return f"_Vector2({self.x}, {self.y})"
|
|
23
23
|
|
|
24
24
|
# ------------------------
|
|
25
25
|
# Basic Operators
|
|
@@ -27,15 +27,15 @@ class Vector2:
|
|
|
27
27
|
|
|
28
28
|
def __add__(self, other):
|
|
29
29
|
"""Add two vectors."""
|
|
30
|
-
return
|
|
30
|
+
return _Vector2(self.x + other.x, self.y + other.y)
|
|
31
31
|
|
|
32
32
|
def __sub__(self, other):
|
|
33
33
|
"""Subtract another vector from this vector."""
|
|
34
|
-
return
|
|
34
|
+
return _Vector2(self.x - other.x, self.y - other.y)
|
|
35
35
|
|
|
36
36
|
def __mul__(self, scalar):
|
|
37
37
|
"""Multiply vector by a scalar."""
|
|
38
|
-
return
|
|
38
|
+
return _Vector2(self.x * scalar, self.y * scalar)
|
|
39
39
|
|
|
40
40
|
def __rmul__(self, scalar):
|
|
41
41
|
"""Allow scalar * vector multiplication."""
|
|
@@ -45,7 +45,7 @@ class Vector2:
|
|
|
45
45
|
"""Divide vector by a scalar."""
|
|
46
46
|
if scalar == 0:
|
|
47
47
|
raise ValueError("Cannot divide by zero.")
|
|
48
|
-
return
|
|
48
|
+
return _Vector2(self.x / scalar, self.y / scalar)
|
|
49
49
|
|
|
50
50
|
# ------------------------
|
|
51
51
|
# Magnitude & Normalization
|
|
@@ -63,7 +63,7 @@ class Vector2:
|
|
|
63
63
|
"""Return a normalized (unit length) version of the vector."""
|
|
64
64
|
mag = self.magnitude()
|
|
65
65
|
if mag == 0:
|
|
66
|
-
return
|
|
66
|
+
return _Vector2(0, 0)
|
|
67
67
|
return self / mag
|
|
68
68
|
|
|
69
69
|
# ------------------------
|
|
@@ -71,7 +71,7 @@ class Vector2:
|
|
|
71
71
|
# ------------------------
|
|
72
72
|
|
|
73
73
|
def dot(self, other):
|
|
74
|
-
"""Return the dot product with another vector."""
|
|
74
|
+
"""Return the dot product with another vector."""
|
|
75
75
|
return self.x * other.x + self.y * other.y
|
|
76
76
|
|
|
77
77
|
def distance_to(self, other):
|
|
@@ -92,13 +92,13 @@ class Vector2:
|
|
|
92
92
|
angle_radians = math.radians(angle_degrees)
|
|
93
93
|
cos_a = math.cos(angle_radians)
|
|
94
94
|
sin_a = math.sin(angle_radians)
|
|
95
|
-
return
|
|
95
|
+
return _Vector2(
|
|
96
96
|
self.x * cos_a - self.y * sin_a,
|
|
97
97
|
self.x * sin_a + self.y * cos_a
|
|
98
98
|
)
|
|
99
99
|
|
|
100
|
-
class
|
|
101
|
-
"""These are the
|
|
100
|
+
class _UtilityFunctions:
|
|
101
|
+
"""These are the Utility Functions of `GraphicalMath`."""
|
|
102
102
|
# ------------------------
|
|
103
103
|
# Utility Functions
|
|
104
104
|
# ------------------------
|
|
@@ -107,13 +107,13 @@ class UtiliyFunctions:
|
|
|
107
107
|
"""Clamp this vector between two vectors.
|
|
108
108
|
|
|
109
109
|
Args:
|
|
110
|
-
min_vec (
|
|
111
|
-
max_vec (
|
|
110
|
+
min_vec (_Vector2): Minimum bounds.
|
|
111
|
+
max_vec (_Vector2): Maximum bounds.
|
|
112
112
|
|
|
113
113
|
Returns:
|
|
114
|
-
|
|
114
|
+
_Vector2: Clamped vector.
|
|
115
115
|
"""
|
|
116
|
-
return
|
|
116
|
+
return _Vector2(
|
|
117
117
|
max(min_vec.x, min(self.x, max_vec.x)),
|
|
118
118
|
max(min_vec.y, min(self.y, max_vec.y))
|
|
119
119
|
)
|
|
@@ -123,38 +123,38 @@ class UtiliyFunctions:
|
|
|
123
123
|
mag = self.magnitude()
|
|
124
124
|
if mag > max_length:
|
|
125
125
|
return self.normalize() * max_length
|
|
126
|
-
return
|
|
126
|
+
return _Vector2(self.x, self.y)
|
|
127
127
|
|
|
128
128
|
def lerp(self, other, t):
|
|
129
129
|
"""Linearly interpolate between this vector and another.
|
|
130
130
|
|
|
131
131
|
Args:
|
|
132
|
-
other (
|
|
132
|
+
other (_Vector2): Target vector.
|
|
133
133
|
t (float): Interpolation factor (0.0 to 1.0).
|
|
134
134
|
|
|
135
135
|
Returns:
|
|
136
|
-
|
|
136
|
+
_Vector2: Interpolated vector.
|
|
137
137
|
"""
|
|
138
|
-
return
|
|
138
|
+
return _Vector2(
|
|
139
139
|
self.x + (other.x - self.x) * t,
|
|
140
140
|
self.y + (other.y - self.y) * t
|
|
141
141
|
)
|
|
142
142
|
|
|
143
143
|
def floor(self):
|
|
144
144
|
"""Return a vector with each component floored."""
|
|
145
|
-
return
|
|
145
|
+
return _Vector2(math.floor(self.x), math.floor(self.y))
|
|
146
146
|
|
|
147
147
|
def ceil(self):
|
|
148
148
|
"""Return a vector with each component ceiled."""
|
|
149
|
-
return
|
|
149
|
+
return _Vector2(math.ceil(self.x), math.ceil(self.y))
|
|
150
150
|
|
|
151
151
|
def round(self):
|
|
152
152
|
"""Return a vector with each component rounded."""
|
|
153
|
-
return
|
|
153
|
+
return _Vector2(round(self.x), round(self.y))
|
|
154
154
|
|
|
155
155
|
def abs(self):
|
|
156
156
|
"""Return a vector with absolute values."""
|
|
157
|
-
return
|
|
157
|
+
return _Vector2(abs(self.x), abs(self.y))
|
|
158
158
|
|
|
159
159
|
# ------------------------
|
|
160
160
|
# Static Helpers
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"""This is the math module of VertexEngine. This contains some math classes for sprites and other things.
|
|
2
|
+
This is NOT to be confused with `math` python stdlib. This is `VertexEngine.GraphicalMath`, not `math`"""
|
|
3
|
+
from ._Vector2 import _Vector2, _UtilityFunctions
|
|
4
|
+
|
|
5
|
+
class math:
|
|
6
|
+
"""This is the GraphicalMath class of VertexEngine. It contains some math classes for sprites and other things."""
|
|
7
|
+
def __init__(self):
|
|
8
|
+
self.Vector2 = _Vector2()
|
|
9
|
+
self.Utils = _UtilityFunctions()
|
|
@@ -55,7 +55,7 @@ class FancyWindow(BaseWindow):
|
|
|
55
55
|
class FunWindow(BaseWindow):
|
|
56
56
|
def __init__(self, title="Fun Window"):
|
|
57
57
|
super().__init__(title)
|
|
58
|
-
self.add_label("Welcome to FunWindow!
|
|
58
|
+
self.add_label("Welcome to FunWindow!")
|
|
59
59
|
self.add_button("Close me", self.close)
|
|
60
60
|
|
|
61
61
|
if __name__ == "__main__":
|
|
@@ -25,9 +25,9 @@ from .audio import AudioManager
|
|
|
25
25
|
from PyQt6.QtWidgets import QPushButton, QLineEdit, QLabel, QWidget
|
|
26
26
|
from PyQt6.QtGui import QFont, QCursor, QFontMetrics
|
|
27
27
|
from PyQt6.QtCore import Qt
|
|
28
|
-
from typing_extensions import deprecated as dep
|
|
29
28
|
from VertexEngine.Vertex import VBox
|
|
30
29
|
from VertexEngine.audio import AudioManager
|
|
30
|
+
import os
|
|
31
31
|
|
|
32
32
|
class VertexScreen():
|
|
33
33
|
"""Draw on VertexEngine's Screen."""
|
|
@@ -583,5 +583,8 @@ class VertexUI():
|
|
|
583
583
|
def pain():
|
|
584
584
|
"""Good Luck."""
|
|
585
585
|
Audio = AudioManager()
|
|
586
|
-
|
|
586
|
+
script_path = os.path.abspath(__file__)
|
|
587
|
+
dirname = os.path.dirname(script_path)
|
|
588
|
+
script = os.path.join(dirname, "WHY.mp3")
|
|
589
|
+
Audio.load_sound("No.", script)
|
|
587
590
|
Audio.play_sound("No.")
|
|
@@ -36,7 +36,7 @@ class GameEngine(QWidget):
|
|
|
36
36
|
|
|
37
37
|
# Timer
|
|
38
38
|
self.timer = QTimer(self)
|
|
39
|
-
self.timer.timeout.connect(self.
|
|
39
|
+
self.timer.timeout.connect(self._update_frame)
|
|
40
40
|
self.timer.start(1000 // self.fps)
|
|
41
41
|
|
|
42
42
|
self.setFocusPolicy(Qt.FocusPolicy.StrongFocus)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: VertexEngine
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.8.2
|
|
4
4
|
Summary: A high-performance SDK for Python Development.
|
|
5
5
|
Author-email: Tyrel Miguel <annbasilan0828@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -30,7 +30,17 @@ VertexEngine is a GUI and Game Engine for python applications, it works best if
|
|
|
30
30
|
## Community
|
|
31
31
|
Discord is out NOW!
|
|
32
32
|
[Discord Server](https://discord.com/channels/1468208686869643327/1468208687670890588)
|
|
33
|
-
## Change Logs (1.0rc1 - 1.
|
|
33
|
+
## Change Logs (1.0rc1 - 1.8.2), NEW!
|
|
34
|
+
### 1.8.2
|
|
35
|
+
- Graphical Math Tweaks!
|
|
36
|
+
- Old classes now moved into Math
|
|
37
|
+
- GraphicalMath is now just Math
|
|
38
|
+
### 1.8.1
|
|
39
|
+
- Some Fixes!
|
|
40
|
+
- Tweaks!
|
|
41
|
+
### 1.8.0
|
|
42
|
+
- Updated Documentation!
|
|
43
|
+
- Engine Fixes!
|
|
34
44
|
### 1.8rc2
|
|
35
45
|
- Fixed math not defined errors
|
|
36
46
|
- Renamed to GraphicalMath
|
|
@@ -15,11 +15,11 @@ src/VertexEngine.egg-info/requires.txt
|
|
|
15
15
|
src/VertexEngine.egg-info/top_level.txt
|
|
16
16
|
src/VertexEngine/Collisions/__init__.py
|
|
17
17
|
src/VertexEngine/Collisions/collisions.py
|
|
18
|
-
src/VertexEngine/GraphicalMath/Vector2.py
|
|
19
|
-
src/VertexEngine/GraphicalMath/__init__.py
|
|
20
18
|
src/VertexEngine/InputSystem/BtnInputs.py
|
|
21
19
|
src/VertexEngine/InputSystem/Events.py
|
|
22
20
|
src/VertexEngine/InputSystem/KeyInputs.py
|
|
21
|
+
src/VertexEngine/Math/_Vector2.py
|
|
22
|
+
src/VertexEngine/Math/__init__.py
|
|
23
23
|
src/VertexEngine/Vertex/__init__.py
|
|
24
24
|
src/VertexEngine/VertexWidgets/AdvancedVWidgets/ChatBubble.py
|
|
25
25
|
src/VertexEngine/VertexWidgets/AdvancedVWidgets/CheckBox.py
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/List.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/VertexWidgets/BasicWidgets/SimpleGUI.py
RENAMED
|
File without changes
|
{vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/VertexWidgets/PygameVWidgets/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{vertexengine-1.8rc2 → vertexengine-1.8.2}/src/VertexEngine/examples/games/platformer/main.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|