diff --git a/docs/api_reference.html b/docs/api_reference.html index 4d14f7dc..a5744fec 100644 --- a/docs/api_reference.html +++ b/docs/api_reference.html @@ -1124,7 +1124,7 @@

camera

.clip_plane_far - .aspect_ratioget currect aspect ratio. can not be set. + .aspect_ratioget current aspect ratio. can not be set. .shaderfor applying post-processing effects. @@ -1383,22 +1383,21 @@

window

.editor_ui = Entity(parent=camera.ui, eternal=True, enabled=bool(application.development_mode)) - .input_entity = Entity(name + .input_entity = Entity(name='window.input_entity', input=window_input, ignore_paused=True) - .exit_button = Button(parent=self.editor_ui, text='x', eternal=True, ignore_paused=True, origin=(.5, .5), enabled=self.borderless, - position=self.top_right, z=-999, scale=(.05, .025), color=color.red.tint(-.2), shortcuts=('control+shift+alt+q', 'alt+f4'), on_click=application.quit, name='exit_button') + .exit_button = Button(parent=self.editor_ui, text='x', eternal=True, ignore_paused=True, origin=(.5, .5), enabled=self.borderless and application.development_mode, position=self.top_right, z=-999, scale=(.05, .025), color=color.red.tint(-.2), shortcuts=('control+shift+alt+q', 'alt+f4'), on_click=application.quit, name='exit_button') .fps_counter = Text(parent=self.editor_ui, eternal=True, text='60', ignore=False, i=0, ignore_paused=True, position=((.5*self.aspect_ratio)-self.exit_button.scale_x, .47+(.02*(not self.exit_button.enabled)), -999)) - .entity_counter = Text(parent=self.editor_ui, eternal=True, origin=(-.5,.5), text='00', ignore=False, t=0, + .entity_counter = Text(parent=self.editor_ui, enabled=application.development_mode, eternal=True, origin=(-.5,.5), text='00', ignore=False, t=0, position=((.5*self.aspect_ratio)-self.exit_button.scale_x, .425+(.02*(not self.exit_button.enabled)), -999)) - .collider_counter = Text(parent=self.editor_ui, eternal=True, origin=(-.5,.5), text='00', ignore=False, t=.1, + .collider_counter = Text(parent=self.editor_ui, enabled=application.development_mode, eternal=True, origin=(-.5,.5), text='00', ignore=False, t=.1, position=((.5*self.aspect_ratio)-self.exit_button.scale_x, .38+(.02*(not self.exit_button.enabled)), -999)) @@ -1407,6 +1406,7 @@

window

'ursfx (Sound Effect Maker)' : lambda: exec('from ursina.prefabs import ursfx; ursfx.open_gui()'), 'Change Render Mode <gray>[F10]<default>' : self.next_render_mode, 'Reset Render Mode <gray>[Shift+F10]<default>' : Func(setattr, self, 'render_mode', 'default'), + 'Toggle Editor Camera <gray>[Control+F10]<default>' : self.toggle_editor_camera, 'Toggle Hotreloading <gray>[F9]<default>' : application.hot_reloader.toggle_hotreloading, 'Reload Shaders <gray>[F7]<default>' : application.hot_reloader.reload_shaders, 'Reload Models <gray>[F7]<default>' : application.hot_reloader.reload_models, @@ -1414,7 +1414,7 @@

window

'Reload Code <gray>[F5]<default>' : application.hot_reloader.reload_code,
- .cog_button = Button(parent=self.editor_ui, eternal=True, model='quad', texture='cog', scale=.015, origin=(1,-1), position=self.bottom_right, ignore_paused=True, name='cog_button') + .cog_button = Button(parent=self.editor_ui, eternal=True, model='quad', texture='cog', scale=.015, origin=(1,-1), position=self.bottom_right, ignore_paused=True, name='cog_button', enabled=application.development_mode) .prev_size = self.size @@ -1473,6 +1473,9 @@

window

.fullscreen + + .always_on_top + .color @@ -1503,6 +1506,9 @@

window

 next_render_mode() + +  toggle_editor_camera() +
example:

from ursina import * @@ -1549,6 +1555,7 @@

window

+Entity(model='cube', color=color.green, collider='box', texture='shore') app.run()

@@ -2149,10 +2156,10 @@

Shader

.geometry = geometry - .entity = None + .default_input = dict() - .default_input = dict() + .continuous_input = dict() .compiled = False @@ -2307,6 +2314,9 @@

DirectionalLight(L .shadow_map_resolution = Vec2(1024, 1024) + + .shadows = shadows +
properties:
@@ -2319,6 +2329,9 @@

DirectionalLight(L

+ + +
 update_bounds(entity=scene) update the shadow area to fit the bounds of target entity, defaulted to scene.
 look_at(target, axis='forward', up=None) up defaults to self.up

example:

from ursina import Ursina, EditorCamera, color, Vec3 @@ -3226,6 +3239,9 @@

curve

 zero(t) + +  one(t) +  combine(curve_a, curve_b, split_at) @@ -6265,10 +6281,10 @@

RadialMenuButton(

HealthBar(Button)

ursina/prefabs/health_bar

-
HealthBar(max_value=100, value=Default, roundness=.25, animation_duration=.1, show_text=True, show_lines=False, text_size=.7, origin=(-.5,.5), **kwargs)

+
HealthBar(max_value=100, value=Default, roundness=.25, bar_color=color.red.tint(-.2), highlight_color=color.black66, animation_duration=.1, show_text=True, show_lines=False, text_size=.7, scale=(.5,.025), origin=(-.5,.5), name='health_bar', **kwargs)

- + @@ -6313,7 +6329,7 @@

HealthBar(Button)
example:

+ } + + + +
.bar = Entity(parent=self, model=Quad(radius=roundness), origin=origin, z=-.005, color=color.red.tint(-.2), ignore=True).bar = Entity(parent=self, model=Quad(radius=roundness), origin=origin, z=-.005, color=bar_color, highlight_color=highlight_color, ignore=True)
.lines = Entity(parent=self.bar, y=-1, color=color.black33, ignore=True, enabled=show_lines, z=-.05)
.hotreload_window_settings = dict(size=(window.size[0]/2,window.size[1]/2), always_on_top=True, position=(window.fullscreen_size[0]-window.size[0]/22, 0))

functions:
@@ -6419,7 +6439,6 @@

HotReloader(Entit
example:

from ursina import * app = Ursina() -application.hot_reloader.path = application.asset_folder.parent.parent / 'samples' / 'platformer.py' ''' By default you can press F5 to reload the starting script, F6 to reimport textures and F7 to reload models. diff --git a/ursina/camera.py b/ursina/camera.py index f15268e3..a7f7976a 100644 --- a/ursina/camera.py +++ b/ursina/camera.py @@ -122,7 +122,7 @@ def clip_plane_far_setter(self, value): self.lens.set_far(value) - def aspect_ratio_getter(self): # get currect aspect ratio. can not be set. + def aspect_ratio_getter(self): # get current aspect ratio. can not be set. return self.perspective_lens.get_aspect_ratio()