basilisk-engine 0.1.51__py3-none-any.whl → 0.1.52__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.
Potentially problematic release.
This version of basilisk-engine might be problematic. Click here for more details.
- basilisk/nodes/node_handler.py +10 -1
- basilisk/particles/particle_handler.py +5 -1
- basilisk/particles/particle_renderer.py +1 -2
- basilisk/scene.py +4 -0
- {basilisk_engine-0.1.51.dist-info → basilisk_engine-0.1.52.dist-info}/METADATA +1 -1
- {basilisk_engine-0.1.51.dist-info → basilisk_engine-0.1.52.dist-info}/RECORD +8 -8
- {basilisk_engine-0.1.51.dist-info → basilisk_engine-0.1.52.dist-info}/WHEEL +0 -0
- {basilisk_engine-0.1.51.dist-info → basilisk_engine-0.1.52.dist-info}/top_level.txt +0 -0
basilisk/nodes/node_handler.py
CHANGED
|
@@ -95,4 +95,13 @@ class NodeHandler():
|
|
|
95
95
|
self.nodes.remove(node)
|
|
96
96
|
node.node_handler = None
|
|
97
97
|
|
|
98
|
-
for child in node.children: self.remove(child)
|
|
98
|
+
for child in node.children: self.remove(child)
|
|
99
|
+
|
|
100
|
+
def clear(self) -> None:
|
|
101
|
+
"""
|
|
102
|
+
Removes all nodes from the scene
|
|
103
|
+
TODO: this is prolly not the optimal solution lmao
|
|
104
|
+
"""
|
|
105
|
+
|
|
106
|
+
while self.nodes:
|
|
107
|
+
self.remove(self.nodes[0])
|
|
@@ -61,5 +61,9 @@ class ParticleHandler:
|
|
|
61
61
|
|
|
62
62
|
def render(self) -> None:
|
|
63
63
|
for renderer in self.particle_renderers.values(): renderer.render()
|
|
64
|
+
|
|
64
65
|
def update(self) -> None:
|
|
65
|
-
for renderer in self.particle_renderers.values(): renderer.update()
|
|
66
|
+
for renderer in self.particle_renderers.values(): renderer.update()
|
|
67
|
+
|
|
68
|
+
def clear(self) -> None:
|
|
69
|
+
self.particle_renderers.clear()
|
|
@@ -9,7 +9,7 @@ from numba import njit
|
|
|
9
9
|
def update_particle_matrix(particle_instances, dt):
|
|
10
10
|
particle_instances[:,6:9] += particle_instances[:,9:12] * dt
|
|
11
11
|
particle_instances[:,:3] += particle_instances[:,6:9] * dt
|
|
12
|
-
particle_instances[:,5] -= dt
|
|
12
|
+
particle_instances[:,5] -= dt
|
|
13
13
|
return particle_instances
|
|
14
14
|
|
|
15
15
|
@njit
|
|
@@ -88,7 +88,6 @@ class ParticleRenderer:
|
|
|
88
88
|
new_particle = np.array([*position, material, scale, life, *velocity, *acceleration])
|
|
89
89
|
self.particle_instances = np.vstack([new_particle, self.particle_instances], dtype='f4')
|
|
90
90
|
|
|
91
|
-
|
|
92
91
|
def __del__(self):
|
|
93
92
|
self.instance_buffer.release()
|
|
94
93
|
self.vao.release()
|
basilisk/scene.py
CHANGED
|
@@ -159,6 +159,10 @@ class Scene():
|
|
|
159
159
|
if len(returns) == 1: return returns[0]
|
|
160
160
|
return returns
|
|
161
161
|
|
|
162
|
+
def clear(self) -> None:
|
|
163
|
+
self.node_handler.clear()
|
|
164
|
+
self.particle.clear()
|
|
165
|
+
|
|
162
166
|
def set_engine(self, engine: any) -> None:
|
|
163
167
|
"""
|
|
164
168
|
Sets the back references to the engine and creates handlers with the context
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
basilisk/__init__.py,sha256=X7Mljz41Z97Fx0P3qL445mF5-kEX-82x_i3nCAAgyFc,1135
|
|
2
2
|
basilisk/config.py,sha256=Ajm3BjCryuX5bmJglqRZDR1SjE0sDjTbulta5GZ67hA,1712
|
|
3
3
|
basilisk/engine.py,sha256=QwKGhnxAulGsMmIIUrY80fUnbWVe-Y2-t2d8PH2xP4c,6025
|
|
4
|
-
basilisk/scene.py,sha256=
|
|
4
|
+
basilisk/scene.py,sha256=L_XpXU0t-9kYUH_N8EP2y7oh0tyqm-_oMm3BNyQL0mg,12483
|
|
5
5
|
basilisk/audio/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
basilisk/audio/sound.py,sha256=feRzVzp1ssu5QcyEErK0eGezPTZrhzEbbRRZw2d9aWc,1087
|
|
7
7
|
basilisk/bsk_assets/Roboto-Regular.ttf,sha256=kqYnZjMRQMpbyLulIChCLSdgYa1XF8GsUIoRi2Gcauw,168260
|
|
@@ -58,10 +58,10 @@ basilisk/mesh/narrow_primative.py,sha256=Dlw0jnFewPwAvT0Ap9IxAh05tgjZAdjAyuiRy1D
|
|
|
58
58
|
basilisk/nodes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
59
59
|
basilisk/nodes/helper.py,sha256=GZ2-TY_4PDEfxBGp7ddktYoDDMOogPMbDeRPqsrPu1A,2069
|
|
60
60
|
basilisk/nodes/node.py,sha256=IYWKqRrFACdZl95SRxkvwdVS8px2cCCYwdbgZQyLfTQ,33177
|
|
61
|
-
basilisk/nodes/node_handler.py,sha256=
|
|
61
|
+
basilisk/nodes/node_handler.py,sha256=aai0Dm0yoB9Vd96O_mYVLId2AeXAfc_RYUnMfS_jAhQ,4334
|
|
62
62
|
basilisk/particles/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
63
|
-
basilisk/particles/particle_handler.py,sha256=
|
|
64
|
-
basilisk/particles/particle_renderer.py,sha256=
|
|
63
|
+
basilisk/particles/particle_handler.py,sha256=FRwCC9tTyTI2zGDjWl-ZYzN3BX0gTuIT-LlTygHJ3O8,2998
|
|
64
|
+
basilisk/particles/particle_renderer.py,sha256=e7HrNc0IfiBhNMLPXq4RTugkWnuvbKcqNq5uGIll35A,3698
|
|
65
65
|
basilisk/physics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
66
66
|
basilisk/physics/impulse.py,sha256=a_Ks-4LrjaN3siMmVwGp92_iyr9a-G1lb5Q-J7g6ipA,5761
|
|
67
67
|
basilisk/physics/physics_body.py,sha256=-iqo3YyCfMzpBVNA2I34JbfN7Z6phj5nnGHN-S8lBgs,1465
|
|
@@ -104,7 +104,7 @@ basilisk/shaders/particle.frag,sha256=IskhyXelHs9GqABKwTYSwooWL0nP-nkmXl6a5iT6Q3
|
|
|
104
104
|
basilisk/shaders/particle.vert,sha256=oiBz6S_2dzqioAhyzVYT1ZKOED4h4R6IoP-UJ8KRHhU,3227
|
|
105
105
|
basilisk/shaders/sky.frag,sha256=dJRdSbg16aZYYjxdoG1spVQRIVBGNVdyX0rqp4ER6v8,556
|
|
106
106
|
basilisk/shaders/sky.vert,sha256=oAnrknEgsd9MawE_zx8P0u9nUSFEBYBg5ykBmWpqZ_g,332
|
|
107
|
-
basilisk_engine-0.1.
|
|
108
|
-
basilisk_engine-0.1.
|
|
109
|
-
basilisk_engine-0.1.
|
|
110
|
-
basilisk_engine-0.1.
|
|
107
|
+
basilisk_engine-0.1.52.dist-info/METADATA,sha256=WBuIaNKdinXwjl9RxX-eUekrSkK8Xuex4rGp3QMGql8,3793
|
|
108
|
+
basilisk_engine-0.1.52.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
109
|
+
basilisk_engine-0.1.52.dist-info/top_level.txt,sha256=enlSYSf7CUyAly1jmUCNNGInTbaFUjGk4SKwyckZQkw,9
|
|
110
|
+
basilisk_engine-0.1.52.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|