Skip to content

Commit 0ae8403

Browse files
committed
Remove all callbacks from effect
1 parent 9d2c296 commit 0ae8403

File tree

1 file changed

+1
-27
lines changed

1 file changed

+1
-27
lines changed

demosys/effects/effect.py

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,9 @@ class Effect:
7676
_ctx = None # type: moderngl.Context
7777
_sys_camera = None # type: camera.SystemCamera
7878

79-
def __init__(self, *args, **kwargs):
80-
self.on_resouces_loaded(self.post_load)
81-
8279
def post_load(self):
8380
"""
84-
Called when all resources are loaded before effects start running.
85-
This assumes you have called Effect.__init__()
81+
Called when all effects are initialized before effects start running.
8682
"""
8783
pass
8884

@@ -215,28 +211,6 @@ def get_data(self, path, local=False, **kwargs) -> Data:
215211
"""
216212
return resources.data.get(path, create=True, **kwargs)
217213

218-
# Register callbacks
219-
220-
def on_resouces_loaded(self, func):
221-
"""Register callback function when all resources are loaded"""
222-
resources.on_loaded(func)
223-
224-
def on_shaders_loaded(self, func):
225-
"""Register callback function when shaders are loaded"""
226-
resources.shaders.on_loaded(func)
227-
228-
def on_textures_loaded(self, func):
229-
"""Register callback function when textures are loaded"""
230-
resources.textures.on_loaded(func)
231-
232-
def on_scenes_loaded(self, func):
233-
"""Register callback function when scenes are loaded"""
234-
resources.scenes.on_loaded(func)
235-
236-
def on_data_loaded(self, func):
237-
"""Register callback function when data files are loaded"""
238-
resources.data.on_loaded(func)
239-
240214
# Utility methods for matrices
241215

242216
def create_projection(self, fov=75.0, near=1.0, far=100.0, ratio=None):

0 commit comments

Comments
 (0)