44"""
55import time
66
7- from demosys import resources
87from demosys .conf import settings
9- from demosys .effects .registry import Effect
10- from demosys .opengl import texture
11- from demosys .scene import camera
128from demosys .utils .module_loading import import_string
139
1410
@@ -18,18 +14,21 @@ def run(project=None):
1814
1915 :param manager: The effect manager to use
2016 """
17+ from demosys .scene import camera
18+ from demosys .opengl import texture
19+ from demosys .effects .registry import Effect
20+
2121 window = create_window ()
22- timeline = import_string (settings .TIMELINE )()
23- window .timeline = timeline
2422
2523 if not project :
2624 project = import_string (settings .PROJECT )()
2725
26+ timeline = import_string (settings .TIMELINE )(project )
27+ window .timeline = timeline
28+
2829 texture ._init_texture2d_draw ()
2930 texture ._init_depth_texture_draw ()
3031
31- print ("Loader started at" , time .time ())
32-
3332 # Inject attributes into the base Effect class
3433 setattr (Effect , '_window' , window )
3534 setattr (Effect , '_ctx' , window .ctx )
@@ -39,9 +38,9 @@ def run(project=None):
3938 window .sys_camera = camera .SystemCamera (aspect = window .aspect_ratio , fov = 60.0 , near = 1 , far = 1000 )
4039 setattr (Effect , '_sys_camera' , window .sys_camera )
4140
42- # Window key events can reload shaders
43- window . resources = resources
44- resources .load ()
41+ print ( "Loading started at" , time . time ())
42+
43+ project .load ()
4544
4645 # Initialize timer
4746 timer_cls = import_string (settings .TIMER )
0 commit comments