diff --git a/simulators/ursina_simulator.py b/simulators/ursina_simulator.py index cbd77e41de2f69b1b63f7f3c56a72c5c6db5edef..0c98f3b67f5ae1c3718d21757bad90d462abc948 100644 --- a/simulators/ursina_simulator.py +++ b/simulators/ursina_simulator.py @@ -99,7 +99,7 @@ class UrsinaSimulator(Simulator): light = PointLight(parent=v, intensity=10, range=10, color=color.white) light.brightness = 10 lights.append(light) - v.lights = lights + v.lights = v.lights + lights pass # PointLight(parent=camera, color=color.white, position=(0, 0, 0)) diff --git a/simulators/views/ursina_view.py b/simulators/views/ursina_view.py index b887fb59a7a776e0adff3f73961df819e8a93217..1ff3d95a84e329c03bfa38ed09db59f1de1994f2 100644 --- a/simulators/views/ursina_view.py +++ b/simulators/views/ursina_view.py @@ -124,6 +124,14 @@ class UrsinaView(BodyView): if self.body.is_fixed_star: # 如果是恒星(如:太阳),自身会发光,则需要关闭灯光 self.planet.set_light_off() + self.lights = [] + self.create_light_sphere() + + def create_light_sphere(self): + for i in range(5): + light = Entity(parent=self.planet, model='sphere', color=color.rgba(1.0, 0.6, 0.2, 1), + scale=math.pow(1.03, i), alpha=0.2) + # self.lights.append(light) def create_rings(self): """