| 91 | return camera |
| 92 | |
| 93 | def get_loading_manager(): |
| 94 | loading_mgr = new(THREE.LoadingManager) |
| 95 | ev = asyncio.Event() |
| 96 | |
| 97 | @create_proxy |
| 98 | def on_start(url, itemsLoaded, itemsTotal): |
| 99 | print(f'[{itemsLoaded}/{itemsTotal}] Started loading file: {url}') |
| 100 | loading_mgr.onStart = on_start |
| 101 | |
| 102 | @create_proxy |
| 103 | def on_progress(url, itemsLoaded, itemsTotal): |
| 104 | print(f'[{itemsLoaded}/{itemsTotal}] Loading file: {url}') |
| 105 | loading_mgr.onProgress = on_progress |
| 106 | |
| 107 | @create_proxy |
| 108 | def on_error(url): |
| 109 | print(f'There was a problem loading {url}') |
| 110 | loading_mgr.onError = on_error |
| 111 | |
| 112 | @create_proxy |
| 113 | def on_load(): |
| 114 | print('Loading assets complete!') |
| 115 | ev.set() |
| 116 | loading_mgr.onLoad = on_load |
| 117 | |
| 118 | return loading_mgr, ev |
| 119 | |
| 120 | |
| 121 | def get_perspective_camera(): |