tilemap-parser 3.1.6__tar.gz → 3.1.7__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.
- {tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/PKG-INFO +1 -1
- {tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/pyproject.toml +1 -1
- {tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/src/tilemap_parser/runtime/animation_player.py +18 -0
- {tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/src/tilemap_parser.egg-info/PKG-INFO +1 -1
- {tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/LICENSE +0 -0
- {tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/README.md +0 -0
- {tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/setup.cfg +0 -0
- {tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/src/tilemap_parser/__init__.py +0 -0
- {tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/src/tilemap_parser/parser/__init__.py +0 -0
- {tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/src/tilemap_parser/parser/animation.py +0 -0
- {tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/src/tilemap_parser/parser/collision.py +0 -0
- {tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/src/tilemap_parser/parser/collision_loader.py +0 -0
- {tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/src/tilemap_parser/parser/map_parse.py +0 -0
- {tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/src/tilemap_parser/runtime/__init__.py +0 -0
- {tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/src/tilemap_parser/runtime/collision_cache.py +0 -0
- {tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/src/tilemap_parser/runtime/map_loader.py +0 -0
- {tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/src/tilemap_parser/runtime/object_collision.py +0 -0
- {tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/src/tilemap_parser/runtime/renderer.py +0 -0
- {tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/src/tilemap_parser/runtime/tile_collision.py +0 -0
- {tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/src/tilemap_parser/utils/__init__.py +0 -0
- {tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/src/tilemap_parser/utils/geometry.py +0 -0
- {tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/src/tilemap_parser.egg-info/SOURCES.txt +0 -0
- {tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/src/tilemap_parser.egg-info/dependency_links.txt +0 -0
- {tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/src/tilemap_parser.egg-info/requires.txt +0 -0
- {tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/src/tilemap_parser.egg-info/top_level.txt +0 -0
- {tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/tests/test_collision.py +0 -0
- {tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/tests/test_geometry.py +0 -0
- {tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/tests/test_map_loader.py +0 -0
- {tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/tests/test_object_collision.py +0 -0
- {tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/tests/test_render_scale.py +0 -0
- {tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/tests/test_tile_collision.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tilemap-parser
|
|
3
|
-
Version: 3.1.
|
|
3
|
+
Version: 3.1.7
|
|
4
4
|
Summary: Standalone parser/loader for tilemap-editor JSON maps, sprite animations, and collision detection runtime.
|
|
5
5
|
Author: tilemap parser contributors
|
|
6
6
|
License: GNU GENERAL PUBLIC LICENSE
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "tilemap-parser"
|
|
7
|
-
version = "3.1.
|
|
7
|
+
version = "3.1.7"
|
|
8
8
|
description = "Standalone parser/loader for tilemap-editor JSON maps, sprite animations, and collision detection runtime."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
{tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/src/tilemap_parser/runtime/animation_player.py
RENAMED
|
@@ -68,6 +68,24 @@ class SpriteAnimationSet:
|
|
|
68
68
|
grid_offset_y=library.grid_offset[1],
|
|
69
69
|
)
|
|
70
70
|
|
|
71
|
+
def get_content_bounds(self, clip_name: str) -> Optional[Rect]:
|
|
72
|
+
clip = self.library.get(clip_name)
|
|
73
|
+
if clip is None or not clip.frames:
|
|
74
|
+
return None
|
|
75
|
+
union: Optional[Rect] = None
|
|
76
|
+
for frame in clip.frames:
|
|
77
|
+
surf = self.get_image(frame.variant_id, copy_surface=False)
|
|
78
|
+
if surf is None:
|
|
79
|
+
continue
|
|
80
|
+
rect = surf.get_bounding_rect()
|
|
81
|
+
if rect.width == 0 or rect.height == 0:
|
|
82
|
+
continue
|
|
83
|
+
if union is None:
|
|
84
|
+
union = rect.copy()
|
|
85
|
+
else:
|
|
86
|
+
union.union_ip(rect)
|
|
87
|
+
return union
|
|
88
|
+
|
|
71
89
|
def get_image(self, variant_id: int, *, copy_surface: bool = True) -> Optional[Surface]:
|
|
72
90
|
tw, th = self.library.tile_size
|
|
73
91
|
if tw <= 0 or th <= 0:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tilemap-parser
|
|
3
|
-
Version: 3.1.
|
|
3
|
+
Version: 3.1.7
|
|
4
4
|
Summary: Standalone parser/loader for tilemap-editor JSON maps, sprite animations, and collision detection runtime.
|
|
5
5
|
Author: tilemap parser contributors
|
|
6
6
|
License: GNU GENERAL PUBLIC LICENSE
|
|
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
|
{tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/src/tilemap_parser/runtime/object_collision.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tilemap_parser-3.1.6 → tilemap_parser-3.1.7}/src/tilemap_parser.egg-info/dependency_links.txt
RENAMED
|
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
|