crystalwindow 5.1__py3-none-any.whl → 5.2__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.
crystalwindow/camera.py CHANGED
@@ -6,13 +6,14 @@ class Camera:
6
6
  self.speed = speed # smoothness
7
7
 
8
8
  def update(self, win_width, win_height, dt):
9
- # camera aims for target center
10
- target_x = self.target.x - win_width // 2
11
- target_y = self.target.y - win_height // 2
12
-
13
- # smooth lerp follow
14
- self.offset_x += (target_x - self.offset_x) * self.speed
15
- self.offset_y += (target_y - self.offset_y) * self.speed
9
+ # camera aims for target selected
10
+ if self.target is not None:
11
+ target_x = self.target.x - win_width // 2
12
+ target_y = self.target.y - win_height // 2
13
+
14
+ # smooth lerp follow
15
+ self.offset_x += (target_x - self.offset_x) * self.speed
16
+ self.offset_y += (target_y - self.offset_y) * self.speed
16
17
 
17
18
  if hasattr(self, "shake"):
18
19
  self.shake.update(dt)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: crystalwindow
3
- Version: 5.1
3
+ Version: 5.2
4
4
  Summary: A Tkinter powered window + GUI toolkit made by Crystal (ME)! Easier apps, smoother UI and all-in-one helpers!, Gui, Buttons, FileHelper, Sprites, Animations, Colors, Math, Gravity, Camera, 3D and more!
5
5
  Home-page: https://pypi.org/project/crystalwindow/
6
6
  Author: CrystalBallyHereXD
@@ -3,7 +3,7 @@ crystalwindow/__init__.py,sha256=dqow94sID2DEnUwiIFtmz38RrVGautAVMz1c4Wrt6BU,295
3
3
  crystalwindow/ai.py,sha256=YIt6dNe1QljSAlNECCVa3DMUSIqQEJRIAAbQpYqFNNo,11525
4
4
  crystalwindow/animation.py,sha256=zHjrdBXQeyNaLAuaGPldJueX05OZ5j31YR8NizmR0uQ,427
5
5
  crystalwindow/assets.py,sha256=8MxPSk7W5YcBnKDh6KcLdg34uxmACf_m6feSYFCWHqA,11405
6
- crystalwindow/camera.py,sha256=1PGGzCCelI6a7aWOuiqqM2OgmrHOBeyobAnSbX-tWgw,1338
6
+ crystalwindow/camera.py,sha256=sjaC7g_9TstypLQ99MacSlIKm2wky0OrBOiMDcngL-I,1397
7
7
  crystalwindow/chatvpn.py,sha256=Ij3wRNrMbPINO-SX9vx8xlrKRLvG7zJgzAN2T0jzSz8,2477
8
8
  crystalwindow/clock.py,sha256=M7oMjnGNkFOcchqtQn_voWao4kFtxXpTJe2VUjqvGKQ,5041
9
9
  crystalwindow/collision.py,sha256=hpkHTp_KparghVK-itp_rxuYdd2GbQMxICHlUBv0rSw,472
@@ -38,8 +38,8 @@ crystalwindow/gametests/sandbox.py,sha256=Oo2tU2N0y3BPVa6T5vs_h9N6islhQrjSrr_78X
38
38
  crystalwindow/gametests/squaremove.py,sha256=ei6DMnvcgpOhmxbGv-Yqmx5EqiZjKbVlZhI7YbT2hY8,643
39
39
  crystalwindow/gametests/testtttagain.py,sha256=oIhK9MGgMVly_W2lRwD9Hn9WyPdd8JnX2HGrLTGZdxY,373
40
40
  crystalwindow/gametests/windowtesting.py,sha256=_9X6wnV1-_X_PtNS-0zu-k209NtFIwAc4vpxLPp7V2o,97
41
- crystalwindow-5.1.dist-info/licenses/LICENSE,sha256=Gt5cJRchdNt0guxyQMHKsATN5PM5mjuDhdO6Gzs9qQc,1096
42
- crystalwindow-5.1.dist-info/METADATA,sha256=FZFBz4n7kKSScSqNqT1mxn5pM05SgwcCBqMmwqC29XE,7523
43
- crystalwindow-5.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
44
- crystalwindow-5.1.dist-info/top_level.txt,sha256=PeQSld4b19XWT-zvbYkvE2Xg8sakIMbDzSzSdOSRN8o,14
45
- crystalwindow-5.1.dist-info/RECORD,,
41
+ crystalwindow-5.2.dist-info/licenses/LICENSE,sha256=Gt5cJRchdNt0guxyQMHKsATN5PM5mjuDhdO6Gzs9qQc,1096
42
+ crystalwindow-5.2.dist-info/METADATA,sha256=6XkDWa8OTbQC4aeAaceeydLDAxPhAVl022ogenpVTII,7523
43
+ crystalwindow-5.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
44
+ crystalwindow-5.2.dist-info/top_level.txt,sha256=PeQSld4b19XWT-zvbYkvE2Xg8sakIMbDzSzSdOSRN8o,14
45
+ crystalwindow-5.2.dist-info/RECORD,,