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

Python超人-宇宙模拟器

上级 3afaee81
...@@ -290,7 +290,7 @@ def create_light_ship(size_scale, init_position, speed=LIGHT_SPEED): ...@@ -290,7 +290,7 @@ def create_light_ship(size_scale, init_position, speed=LIGHT_SPEED):
from objs.space_ship import SpaceShip from objs.space_ship import SpaceShip
return SpaceShip(name='光速飞船', mass=0, size_scale=size_scale, color=(255, 110, 0), return SpaceShip(name='光速飞船', mass=0, size_scale=size_scale, color=(255, 110, 0),
init_position=init_position, init_position=init_position,
init_velocity=[0, 0, speed]).set_light_disable(True) init_velocity=[0, 0, speed]).set_light_disable(False)
def create_3d_card(left=-.885, top=0.495, width=0.02, height=0.02): def create_3d_card(left=-.885, top=0.495, width=0.02, height=0.02):
......
...@@ -54,6 +54,7 @@ elif camera_pos == "left": # 摄像机左眼 ...@@ -54,6 +54,7 @@ elif camera_pos == "left": # 摄像机左眼
init.light_init_position[0] = 5000000 init.light_init_position[0] = 5000000
init.light_init_position[1] = 1500000 init.light_init_position[1] = 1500000
# init.auto_control_speed = True # init.auto_control_speed = True
init.camera_position = (0, -AU / 100, -AU / 50)
# 从 init 对象中获取 光体的大小(light_size_scale),光体的位置(light_init_position) # 从 init 对象中获取 光体的大小(light_size_scale),光体的位置(light_init_position)
# 创建一个以光速前进的天体(模拟一个光子) speed=1光速=299792.458千米/秒,注意:质量为0才能达到光速,虽然如此,但也可以试试超光速 # 创建一个以光速前进的天体(模拟一个光子) speed=1光速=299792.458千米/秒,注意:质量为0才能达到光速,虽然如此,但也可以试试超光速
......
...@@ -241,11 +241,14 @@ def make_3d_video(): ...@@ -241,11 +241,14 @@ def make_3d_video():
_3d_card = img[4:20, 3:20, ] _3d_card = img[4:20, 3:20, ]
_3d_card_p = _3d_card[10, 10,] _3d_card_p = _3d_card[10, 10,]
index = int(_3d_card_p[1]) + int(_3d_card_p[0]) index = int(_3d_card_p[1]) + int(_3d_card_p[0])
if index < last_index: if index < last_index:
index_base += (last_index + 1) index_base += (last_index + 1)
create_frame_temp_files(index + index_base, l_frames, r_frames) create_frame_temp_files(index + index_base, l_frames, r_frames)
r_frames.clear() r_frames.clear()
l_frames.clear() l_frames.clear()
r_frames = {}
l_frames = {}
last_index = index last_index = index
index = index + index_base index = index + index_base
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册