提交 b135a34d 编写于 作者: 三月三net's avatar 三月三net

太阳系三体模拟器

上级 13ced94f
......@@ -81,7 +81,6 @@ class UrsinaUI:
wp = WindowPanel(
title='',
content=(
Text('方位控制: Q W E A S D + 鼠标右键', font='msyhl.ttc'),
# InputField(name='name_field'),
# Button(text='Submit', color=color.azure),
self.point_button,
......@@ -116,8 +115,9 @@ class UrsinaUI:
# self.text_time_scale_info = None
self.settings_handler.input = self.settings_handler_input
# self.show_text_time_scale_info()
key_info_str = "按[空格]设置"
key_info = Text(text=key_info_str, font=UrsinaConfig.CN_FONT, position=(-0.5, 0.5), origin=(-1, 1),
# Text('方位控制: Q W E A S D + 鼠标右键', font='msyhl.ttc'),
key_info_str = "方位控制[键盘QWEASD]+[鼠标右键],按[空格]更多控制"
key_info = Text(text=key_info_str, font=UrsinaConfig.CN_FONT, position=(-1, 0.5), origin=(-1, 1),
background=True)
# # self.show_button()
# slider_text = Text(text='自转速度', scale=1, position=(-0.6, 0.3))
......
......@@ -84,6 +84,7 @@ class UrsinaSimulator(Simulator):
else:
evolve_dt = UrsinaConfig.seconds_per * run_speed_factor
evolve_dt = evolve_dt * self.interval_fator
super().evolve(evolve_dt)
def cosmic_background(self, texture='../textures/cosmic2.jpg'):
......@@ -182,9 +183,9 @@ class UrsinaSimulator(Simulator):
# camera.rotation_x = -30
# 设定时间间隔为0.01秒
interval = 0.01
self.evolve_dt = dt * interval
self.interval = datetime.timedelta(seconds=interval)
self.interval_fator = 0.01
self.evolve_dt = dt
self.interval = datetime.timedelta(seconds=self.interval_fator)
self.last_time = datetime.datetime.now() - datetime.timedelta(seconds=2)
if "light" in kwargs:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册