microecs 0.4.3__tar.gz → 0.4.4__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.
- {microecs-0.4.3 → microecs-0.4.4}/PKG-INFO +2 -2
- {microecs-0.4.3 → microecs-0.4.4}/README.md +1 -1
- {microecs-0.4.3 → microecs-0.4.4}/microecs/world.py +1 -1
- {microecs-0.4.3 → microecs-0.4.4}/microecs.egg-info/PKG-INFO +2 -2
- {microecs-0.4.3 → microecs-0.4.4}/setup.py +1 -1
- {microecs-0.4.3 → microecs-0.4.4}/LICENSE.TXT +0 -0
- {microecs-0.4.3 → microecs-0.4.4}/microecs/__init__.py +0 -0
- {microecs-0.4.3 → microecs-0.4.4}/microecs/component.py +0 -0
- {microecs-0.4.3 → microecs-0.4.4}/microecs/entity.py +0 -0
- {microecs-0.4.3 → microecs-0.4.4}/microecs/pool.py +0 -0
- {microecs-0.4.3 → microecs-0.4.4}/microecs/query_result.py +0 -0
- {microecs-0.4.3 → microecs-0.4.4}/microecs/utils.py +0 -0
- {microecs-0.4.3 → microecs-0.4.4}/microecs.egg-info/SOURCES.txt +0 -0
- {microecs-0.4.3 → microecs-0.4.4}/microecs.egg-info/dependency_links.txt +0 -0
- {microecs-0.4.3 → microecs-0.4.4}/microecs.egg-info/requires.txt +0 -0
- {microecs-0.4.3 → microecs-0.4.4}/microecs.egg-info/top_level.txt +0 -0
- {microecs-0.4.3 → microecs-0.4.4}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: microecs
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.4
|
|
4
4
|
Summary: MicroECS: Minimal Entity Component System (ECS) in python and numpy
|
|
5
5
|
Home-page: https://gitlab.com/meehai/microecs
|
|
6
6
|
License: MIT
|
|
@@ -33,7 +33,7 @@ Docs: [meehai.gitlab.io/microecs](https://meehai.gitlab.io/microecs/)
|
|
|
33
33
|
|
|
34
34
|
These are the main primitives:
|
|
35
35
|
|
|
36
|
-
- `Component` is a simple python dataclass holding only data. All entries must be numpy arrays with metadata fields: shape and dtype. We support
|
|
36
|
+
- `Component` is a simple python dataclass holding only data. All entries must be numpy arrays with metadata fields: shape and dtype. We support 4 dtypes only: `int32`, `float32`, `bool` and `object`. Python strings (and any other non-numeric data) go in `dtype=object` — numpy's fixed-width strings truncate in a pre-allocated pool, so they are not supported. A component with no fields is a valid **tag** for querying (e.g. `class Frozen(Component): pass`).
|
|
37
37
|
- `Entity` is an `OOP-like` view inside the arrays of components. The data is column-major, so this approach is the slowest (row-major), but is sometimes needed when iterating through all the objects of some type (e.g. rendering or serialization).
|
|
38
38
|
- `Pool` is a simple 'archetype' dynamic array, holding entities of the same type (same set of components). Uses `Components` metadata to construct contiguous arrays for all entities of the same type. All fields of all entities of the same archetype are stored in column-major numpy arrays.
|
|
39
39
|
- `QueryResult` is a list of pools that match some query on all the entities of the `World`. It acts as a contiguous numpy-like container that implements numpy's interface. For all intents and purposes it should feel like a `(N, ...)` view over all selected entities. To get a proper numpy array, use `qr.numpy()`. To iterate over each entity in a query result (e.g. rendering), use `for eid, position in zip(qr.entity_ids, qr.position): ...`.
|
|
@@ -21,7 +21,7 @@ Docs: [meehai.gitlab.io/microecs](https://meehai.gitlab.io/microecs/)
|
|
|
21
21
|
|
|
22
22
|
These are the main primitives:
|
|
23
23
|
|
|
24
|
-
- `Component` is a simple python dataclass holding only data. All entries must be numpy arrays with metadata fields: shape and dtype. We support
|
|
24
|
+
- `Component` is a simple python dataclass holding only data. All entries must be numpy arrays with metadata fields: shape and dtype. We support 4 dtypes only: `int32`, `float32`, `bool` and `object`. Python strings (and any other non-numeric data) go in `dtype=object` — numpy's fixed-width strings truncate in a pre-allocated pool, so they are not supported. A component with no fields is a valid **tag** for querying (e.g. `class Frozen(Component): pass`).
|
|
25
25
|
- `Entity` is an `OOP-like` view inside the arrays of components. The data is column-major, so this approach is the slowest (row-major), but is sometimes needed when iterating through all the objects of some type (e.g. rendering or serialization).
|
|
26
26
|
- `Pool` is a simple 'archetype' dynamic array, holding entities of the same type (same set of components). Uses `Components` metadata to construct contiguous arrays for all entities of the same type. All fields of all entities of the same archetype are stored in column-major numpy arrays.
|
|
27
27
|
- `QueryResult` is a list of pools that match some query on all the entities of the `World`. It acts as a contiguous numpy-like container that implements numpy's interface. For all intents and purposes it should feel like a `(N, ...)` view over all selected entities. To get a proper numpy array, use `qr.numpy()`. To iterate over each entity in a query result (e.g. rendering), use `for eid, position in zip(qr.entity_ids, qr.position): ...`.
|
|
@@ -209,7 +209,7 @@ class World:
|
|
|
209
209
|
def _check_components(self, components: list[ComponentType]):
|
|
210
210
|
reserved_names = (ENTITY_INTERNAL_ATTRS | {n for n in vars(Entity) if not n.startswith("__")} |
|
|
211
211
|
QUERY_RESULT_INTERNAL_ATTRS | {n for n in vars(QueryResult) if not n.startswith("__")})
|
|
212
|
-
dtypes = {"float32", "int32", "bool", "
|
|
212
|
+
dtypes = {"float32", "int32", "bool", "object"}
|
|
213
213
|
expected_meta = {"shape", "dtype", *self.extra_metadata}
|
|
214
214
|
|
|
215
215
|
for component in components:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: microecs
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.4
|
|
4
4
|
Summary: MicroECS: Minimal Entity Component System (ECS) in python and numpy
|
|
5
5
|
Home-page: https://gitlab.com/meehai/microecs
|
|
6
6
|
License: MIT
|
|
@@ -33,7 +33,7 @@ Docs: [meehai.gitlab.io/microecs](https://meehai.gitlab.io/microecs/)
|
|
|
33
33
|
|
|
34
34
|
These are the main primitives:
|
|
35
35
|
|
|
36
|
-
- `Component` is a simple python dataclass holding only data. All entries must be numpy arrays with metadata fields: shape and dtype. We support
|
|
36
|
+
- `Component` is a simple python dataclass holding only data. All entries must be numpy arrays with metadata fields: shape and dtype. We support 4 dtypes only: `int32`, `float32`, `bool` and `object`. Python strings (and any other non-numeric data) go in `dtype=object` — numpy's fixed-width strings truncate in a pre-allocated pool, so they are not supported. A component with no fields is a valid **tag** for querying (e.g. `class Frozen(Component): pass`).
|
|
37
37
|
- `Entity` is an `OOP-like` view inside the arrays of components. The data is column-major, so this approach is the slowest (row-major), but is sometimes needed when iterating through all the objects of some type (e.g. rendering or serialization).
|
|
38
38
|
- `Pool` is a simple 'archetype' dynamic array, holding entities of the same type (same set of components). Uses `Components` metadata to construct contiguous arrays for all entities of the same type. All fields of all entities of the same archetype are stored in column-major numpy arrays.
|
|
39
39
|
- `QueryResult` is a list of pools that match some query on all the entities of the `World`. It acts as a contiguous numpy-like container that implements numpy's interface. For all intents and purposes it should feel like a `(N, ...)` view over all selected entities. To get a proper numpy array, use `qr.numpy()`. To iterate over each entity in a query result (e.g. rendering), use `for eid, position in zip(qr.entity_ids, qr.position): ...`.
|
|
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
|