MCPcopy Create free account
hub / github.com/Mesh2Motion/mesh2motion-app / constructor

Method constructor

src/Mesh2MotionEngine.ts:84–134  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

82 private readonly camera_shake: CameraShake
83
84 constructor () {
85 this.initialize_shared_dom_mounts()
86
87 // this will add a platform CSS file if we are running our desktop app
88 new PlatformManager().init();
89 new NetworkStatusManager();
90
91 this.eventListeners = new EventListeners(this)
92 // helps resolve requestAnimationFrame calling animate() with wrong context
93 this.animate = this.animate.bind(this)
94 this.camera_shake = new CameraShake(this.camera)
95
96 this.scene = new Scene()
97 this.theme_manager = new ThemeManager()
98 this.ui = UI.getInstance()
99 this.settings_dropdown_manager = undefined
100
101 // setting up steps
102 this.load_model_step = new StepLoadModel()
103 this.load_skeleton_step = new StepLoadSkeleton(this.scene)
104 this.edit_skeleton_step = new StepEditSkeleton()
105 this.weight_skin_step = new StepWeightSkin()
106 this.animations_listing_step = new StepAnimationsListing(this.theme_manager)
107 this.download_settings = new DownloadSettings()
108 this.file_export_step = new StepExportToFile()
109 this.mesh_drag_bone_placement = new MeshDragBonePlacement(
110 this.camera,
111 this.edit_skeleton_step,
112 this.load_model_step,
113 this.weight_skin_step,
114 this.transform_controls_hover_distance
115 )
116
117 this.scene_environment = new SceneEnvironmentManager(
118 this.scene,
119 this.renderer,
120 this.camera,
121 this.transform_controls,
122 this.theme_manager,
123 this.mesh_drag_bone_placement
124 )
125
126 this.settings_dropdown_manager = new SettingsDropdownManager(this.scene_environment)
127
128 this.setup_environment()
129 this.eventListeners.addEventListeners()
130 this.process_step = this.process_step_changed(ProcessStep.LoadModel)
131 this.animate() // start the render loop which will continue rendering the scene
132 this.inject_build_version()
133 this.setup_tooltips()
134 }
135
136 public get_theme_manager(): ThemeManager {
137 return this.theme_manager

Callers

nothing calls this directly

Calls 9

setup_environmentMethod · 0.95
process_step_changedMethod · 0.95
animateMethod · 0.95
inject_build_versionMethod · 0.95
setup_tooltipsMethod · 0.95
addEventListenersMethod · 0.80
initMethod · 0.45
getInstanceMethod · 0.45

Tested by

no test coverage detected