v7.0.0
| .mouse |
| input_up( | internal method for key release |
| input_hold( | internal method for handling repeating input that occurs when you hold the key |
| input( | internal method for handling input |
| text_input( | internal method for handling text input |
| step( | use this control the update loop yourself. call app.step() in a while loop for example, instead of app.run() |
| run( |
| Entity.rotation_directions = (-1,-1,1) | |
| .name | |
| .ignore | if True, will not try to run code. |
| .ignore_paused | if True, will still run when application is paused. useful when making a pause menu for example. |
| .ignore_input | |
| .parent | default parent is scene, which means it's in 3d space. to use UI space, set the parent to camera.ui instead. |
| .add_to_scene_entities | set to False to be ignored by the engine, but still get rendered. |
| .scripts | add with add_script(class_instance). will assign an 'entity' variable to the script. |
| .animations | |
| .hovered | will return True if mouse hovers entity. |
| .line_definition | returns a Traceback(filename, lineno, function, code_context, index). |
| .enabled |
| .enabled | disabled entities will not be visible nor run code. |
| .model | set model with model='model_name' (without file type extension) |
| .color | |
| .eternal | eternal entities does not get destroyed on scene.clear() |
| .double_sided | |
| .render_queue | for custom sorting in case of conflict. To sort things in 2d, set .z instead of using this. |
| .parent | |
| .loose_parent | |
| .world_parent | change the parent, but keep position, rotation and scale |
| .types | get all class names including those this inhertits from. |
| .visible | |
| .visible_self | set visibility of self, without affecting children. |
| .collider | set to 'box'/'sphere'/'capsule'/'mesh' for auto fitted collider. |
| .collision | toggle collision without changing collider. |
| .on_click | |
| .origin | |
| .origin_x | |
| .origin_y | |
| .origin_z | |
| .world_position | |
| .world_x | |
| .world_y | |
| .world_z | |
| .position | right, up, forward. can also set self.x, self.y, self.z |
| .x | |
| .y | |
| .z | |
| .X | shortcut for int(entity.x) |
| .Y | shortcut for int(entity.y) |
| .Z | shortcut for int(entity.z) |
| .world_rotation | |
| .world_rotation_x | |
| .world_rotation_y | |
| .world_rotation_z | |
| .rotation | can also set self.rotation_x, self.rotation_y, self.rotation_z |
| .rotation_x | |
| .rotation_y | |
| .rotation_z | |
| .quaternion | |
| .world_scale | |
| .world_scale_x | |
| .world_scale_y | |
| .world_scale_z | |
| .scale | can also set self.scale_x, self.scale_y, self.scale_z |
| .scale_x | |
| .scale_y | |
| .scale_z | |
| .transform | get/set position, rotation and scale |
| .world_transform | get/set world_position, world_rotation and world_scale |
| .forward | get forward direction. |
| .back | get backwards direction. |
| .right | get right direction. |
| .left | get left direction. |
| .up | get up direction. |
| .down | get down direction. |
| .screen_position | get screen position(ui space) from world space. |
| .shader | |
| .shader_input | |
| .material | a way to set shader, texture, texture_scale, texture_offset and shader inputs in one go |
| .texture | set model with texture='texture_name'. requires a model to be set beforehand. |
| .texture_scale | how many times the texture should repeat, eg. texture_scale=(8,8). |
| .texture_offset | |
| .tileset_size | if the texture is a tileset, say how many tiles there are so it only use one tile of the texture, e.g. tileset_size=[8,4] |
| .tile_coordinate | set the tile coordinate, starts in the lower left. |
| .alpha | shortcut for setting color's transparency/opacity |
| .always_on_top | |
| .unlit | set to True to ignore light and not cast shadows |
| .billboard | set to True to make this Entity always face the camera. |
| .wireframe | set to True to render model as wireframe |
| .model_bounds | |
| .bounds | |
| .flipped_faces | |
| .children | |
| .loose_children | |
| .attributes | attribute names. used by duplicate(). |
| enable() | same as .enabled = True |
| disable() | same as .enabled = False |
| get_shader_input( | |
| set_shader_input( | |
| generate_sphere_map( | |
| generate_cube_map( | |
| get_position( | get position relative to on other Entity. In most cases, use .position instead. |
| set_position( | set position relative to on other Entity. In most cases, use .position instead. |
| rotate( | rotate around local axis. |
| add_script( | |
| combine( | |
| look_at( | up defaults to self.up |
| look_at_2d( | |
| look_at_xy( | |
| look_at_xz( | |
| has_ancestor( | |
| has_disabled_ancestor() | |
| get_changes( | returns a dict of all the changes |
| animate( | |
| animate_position( | |
| animate_rotation( | |
| animate_scale( | |
| animate_{e}( | |
| shake( | |
| animate_color( | |
| fade_out( | |
| fade_in( | |
| blink( | |
| intersects( |
| .origin | |
| .color | |
| .highlight_color | |
| .pressed_color | |
| .highlight_scale | multiplier |
| .pressed_scale | multiplier |
| .highlight_sound | |
| .pressed_sound | |
| .collider | |
| .disabled | |
| .text_entity | |
| .text_origin |
| .text | |
| .text_origin | |
| .text_color | |
| .icon | |
| .icon_world_scale | |
| .text_size | |
| .origin |
| input( | |
| on_mouse_enter() | |
| on_mouse_exit() | |
| fit_to_text( |
| Sprite.ppu = 100 | |
| .model | |
| .texture | |
| .ppu | pixels per unit |
| update_scale() | get called automatically on __init__, but if you change the texture or ppu, you can call this to update the scale. |
app = Ursina()
camera.orthographic = True
camera.fov =
| Text.size = .025 | |
| .size | |
| .parent | |
| .shader | |
| .text_nodes | |
| .images | |
| .origin | |
| .font | |
| .resolution | |
| .use_tags | |
| .line_height | |
| .start_tag | |
| .end_tag | |
| .text_colors | |
| .tag | |
| .current_color | |
| .scale_override | |
| .appear_sequence | gets created when calling appear() |
| .text | |
| .font | |
| .color | sets the default color. |
| .line_height | |
| .width | gets the width of the widest line. |
| .height | gets the height of the text |
| .lines | |
| .resolution | |
| .wordwrap | set this to make the text wrap after a certain number of characters. |
| .origin | |
| .background |
| text( | |
| create_text_section( | |
| align() | |
| create_background( | |
| appear( | |
| get_width( |
| Audio.volume_multiplier = .5 # | |
| .clip | |
| .volume | |
| .pitch | |
| .balance | |
| .loop | |
| .autoplay | |
| .auto_destroy |
| .volume | |
| .pitch | |
| .loop | |
| .loops | |
| .clip | |
| .length | get the duration of the audio clip. |
| .status | |
| .ready | |
| .playing | |
| .time | |
| .balance | pan the audio. should be a value between -.5 and .5. default: 0 |
| play( | |
| pause() | |
| resume() | |
| stop( | |
| fade( | |
| fade_in( | |
| fade_out( |
| .parent | |
| .name | |
| .eternal | |
| .ui_size | |
| .perspective_lens_node | |
| .orthographic_lens_node | |
| .ui | |
| .overlay |
| .orthographic | |
| .fov | |
| .clip_plane_near | |
| .clip_plane_far | |
| .aspect_ratio | get current aspect ratio. can not be set. |
| .shader | for applying post-processing effects. |
| set_up() | |
| set_shader_input( |
| .enabled | |
| .visible | |
| .locked | |
| .position | |
| .delta | movement since you pressed a mouse button. |
| .prev_x | |
| .prev_y | |
| .start_x | |
| .start_y | |
| .velocity | |
| .moving | |
| .prev_click_time | |
| .prev_click_pos | |
| .double_click_distance | |
| .double_click_movement_limit | |
| .hovered_entity | returns the closest hovered entity with a collider. |
| .left | |
| .right | |
| .middle | |
| .delta_drag | movement between left mouse down and left mouse up. |
| .update_step | |
| .traverse_target | set this to None to disable collision with scene, which might be a good idea if you have lots of colliders. |
| .raycast | |
| .collision | |
| .collisions | |
| .enabled |
| .x | |
| .y | |
| .position | |
| .locked | |
| .visible | |
| .normal | returns the normal of the polygon, in local space. |
| .world_normal | returns the normal of the polygon, in world space. |
| .point | returns the point hit, in local space |
| .world_point | returns the point hit, in world space |
| .is_outside |
| input( | |
| update() | |
| find_collision() | |
| unhover_everything_not_hit() |
| .title | |
| .icon | |
| .monitors | |
| .main_monitor | |
| .monitor_index | |
| .windowed_position | gets set when entering fullscreen so position will be correct when going back to windowed mode |
| .show_ursina_splash | |
| .top | |
| .bottom | |
| .center | |
| .forced_aspect_ratio | example: window.forced_aspect_ratio |
| .always_on_top | |
| .vsync | can't be set during play |
| .color | |
| .render_modes | |
| .render_mode | |
| .editor_ui | |
| .position | |
| .editor_ui | |
| .input_entity | |
| .exit_button | |
| .fps_counter | |
| .entity_counter | |
| .collider_counter | |
| .cog_menu | |
| .cog_button | |
| .prev_size | |
| .size | |
| .render_mode |
| .left | |
| .right | |
| .top_left | |
| .top_right | |
| .bottom_left | |
| .bottom_right | |
| .position | |
| .size | |
| .aspect_ratio | |
| .forced_aspect_ratio | |
| .render_mode | |
| .title | |
| .icon | |
| .borderless | |
| .fullscreen | |
| .always_on_top | |
| .color | |
| .vsync |
| ready( | |
| apply_settings() | |
| center_on_screen() | |
| make_editor_gui() | called by main after setting up camera and application.development_mode |
| window_input( | |
| update_aspect_ratio() | |
| next_render_mode() | |
| toggle_editor_camera() |
| .paused | |
| .time_scale | |
| .calculate_dt | |
| .sequences | |
| .trace_entity_definition | enable to set entity.line_definition |
| .package_folder | |
| .blender_paths | |
| .development_mode | |
| .window_type | |
| .show_ursina_splash | |
| .ursina_splash | |
| .gltf_no_srgb | |
| .scenes_folder | |
| .scripts_folder | |
| .fonts_folder | |
| .compressed_textures_folder | |
| .compressed_models_folder | |
| .base | this will be set once the Ursina() is created |
| .hot_reloader | will be set my main if development_mode |
| pause() | |
| resume() | |
| quit() | |
| load_settings( |
| .entities | |
| .collidables |
| .fog_color | |
| .fog_density | |
| .children |
| set_up() | |
| clear() | |
| fog_density( |
| .@deprecated("Use hsv(...) instead of color(...)") | |
| .white | |
| .smoke | |
| .light_gray | |
| .gray | |
| .dark_gray | |
| .black | |
| .red | |
| .yellow | |
| .lime | |
| .green | |
| .turquoise | |
| .cyan | |
| .azure | |
| .blue | |
| .violet | |
| .magenta | |
| .pink | |
| .brown | |
| .olive | |
| .peach | |
| .gold | |
| .salmon | |
| .clear | |
| .white10 | |
| .white33 | |
| .white50 | |
| .white66 | |
| .black10 | |
| .black33 | |
| .black50 | |
| .black66 | |
| .black90 | |
| .text | |
| .light_text | |
| .dark_text | |
| .text_color | |
| .color_names | |
| .colors |
| color( | |
| hsv( | |
| rgba32( | |
| rgb32( | |
| rgba( | |
| rgb( | |
| to_hsv( | |
| hex( | |
| rgb_to_hex( | |
| brightness( | |
| inverse( | |
| random_color() | |
| tint( |
| Mesh.} | |
| .vertices | |
| .triangles | |
| .colors | |
| .uvs | |
| .normals | |
| .static | |
| .mode | |
| .thickness | |
| .render_points_in_3d | |
| .vertex_buffer | |
| .vertex_buffer_length | |
| .vertex_buffer_format |
| .indices | |
| .generated_vertices | |
| .render_points_in_3d | |
| .thickness |
| generate() | |
| recipe() | |
| serialize( | |
| generate_normals( | |
| colorize( | |
| project_uvs( | |
| clear( | |
| save( |
| Shader.CG = Panda3dShader.SL_Cg | |
| Shader.GLSL = Panda3dShader.SL_GLSL | |
| Shader.HLSL = Panda3dShader.SL_HLSL | |
| Shader.SPIR_V = Panda3dShader.SL_SPIR_V | |
| .name | |
| .language | |
| .vertex | |
| .fragment | |
| .geometry | |
| .default_input | |
| .continuous_input | |
| .compiled |
| compile( | |
| load( |
| .filtering |
| .name | |
| .size | |
| .width | |
| .height | |
| .pixels | |
| .filtering | |
| .repeat |
| new( | |
| get_pixel( | |
| get_pixels( | |
| set_pixel( | |
| apply() | |
| save( |
| .color |
| .shadow_map_resolution | |
| .shadows |
| .shadows |
| update_bounds( | update the shadow area to fit the bounds of target entity, defaulted to scene. |
| look_at( | up defaults to self.up |
| .vertices |
app = Ursina()
e =
| .vertices, self.triangles | |
| .uvs |
app = Ursina()
front =
| .width | |
| .height |
app = Ursina()
app = Ursina()
| .base_shape | |
| .origin | |
| .path | |
| .thicknesses | |
| .look_at | |
| .cap_ends | |
| .mode | |
| .color_gradient | |
| .prev | |
| .curr |
| generate() |
app = Ursina()
path = [e*
| .width | |
| .depth | |
| .aspect_ratio | |
| .gradient |
| generate() |
app = Ursina()
| .held_keys | |
| .rebinds |
| bind( | |
| unbind( | |
| rebind( | |
| input( | |
| get_combined_key( |
| .blender_scenes |
| load_model( | |
| load_blender_scene( | |
| get_blender( | try to get a matching blender version in case we have multiple blender version installed |
| blend_to_obj( | |
| obj_to_ursinamesh( | |
| blend_to_obj_fast( | |
| ursina_mesh_to_obj( | |
| compress_internal() |
| .file_types | |
| .folders | folder search order |
| .textureless |
| load_texture( | |
| compress_textures( |
| camel_to_snake( | |
| snake_to_camel( | |
| multireplace( | |
| printvar( | |
| print_info( | |
| print_warning( |
| .sequence | |
| .frame_times | |
| .is_playing | |
| .autoplay |
| .duration | get the duration of the animation. you can't set it. to do so, change the fps instead. |
| start() | |
| pause() | |
| resume() | |
| finish() |
app = Ursina()
| .play | |
| .frames | |
| .sequence | |
| .autoplay |
| .duration | |
| .current_frame |
| start() | |
| pause() | |
| resume() | |
| finish() | |
| on_destroy() |
application.asset_folder = application.asset_folder.parent.parent /
| .animations | should be a dict |
| play_animation( |
| .animations | dict |
| .pause_disabled | |
| .start_state | |
| .state |
| .state |
app = Ursina()
anim = Animation(
| .renderer | |
| .segments | |
| .update_step | |
| .min_spacing | |
| .fade_speed | |
| .on_enable | |
| .on_disable |
| update() | |
| on_destroy() |
app = Ursina(vsync=False)
window.color = color.black
mouse.visible = False
player =
| linear( | |
| in_sine( | |
| out_sine( | |
| in_out_sine( | |
| in_quad( | |
| out_quad( | |
| in_out_quad( | |
| in_cubic( | |
| out_cubic( | |
| in_out_cubic( | |
| in_quart( | |
| out_quart( | |
| in_out_quart( | |
| in_quint( | |
| out_quint( | |
| in_out_quint( | |
| in_expo( | |
| out_expo( | |
| in_out_expo( | |
| in_circ( | |
| out_circ( | |
| in_out_circ( | |
| in_back( | |
| out_back( | |
| in_out_back( | |
| in_elastic( | |
| out_elastic( | |
| in_out_elastic( | |
| out_bounce( | |
| in_bounce( | |
| in_out_bounce( | |
| zero( | |
| one( | |
| combine( | |
| reverse( | |
| {e}_boomerang( |
| distance( | |
| distance_2d( | |
| distance_xz( | |
| lerp( | |
| inverselerp( | |
| lerp_angle( | |
| slerp( | |
| clamp( | |
| round_to_closest( | |
| rotate_around_point_2d( | |
| world_position_to_screen_position( | get screen position(ui space) from world space. |
| sum( | |
| make_gradient( | returns a list of 256 colors |
| sample_gradient( | distribute list_of_values equally on a line and get the interpolated value at t (0-1). |
| .x | |
| .y | |
| .X | |
| .Y | |
| .yx |
a =
| .x | |
| .y | |
| .z | |
| .xy | |
| .yx | |
| .xz | |
| .yz | |
| .X | |
| .Y | |
| .Z |
a =
a = Vec
| .a | |
| .b | |
| .c | |
| .d | |
| .cx | |
| .bx | |
| .ax | |
| .cy | |
| .by | |
| .ay |
| sample_curve_x( | |
| sample_curve_y( | |
| sample_curve_derivative_x( | |
| calculate( | |
| solve_curve_x( |
| invoke( | reserved keywords: 'delay', 'unscaled' |
| after( | function for @after decorator. Use the docrator, not this. |
| reset_cooldown() | |
| wrapper( | |
| destroy( | |
| chunk_list( | |
| flatten_list( | |
| flatten_completely( | |
| enumerate_2d( | usage: for (x, y), value in enumerate_2d(my_2d_list) |
| enumerate_3d( | usage: for (x, y, z), value in enumerate_3d(my_3d_list) |
| rotate_2d_list( | |
| list_2d_to_string( | '): |
| size_list() | return a list of current python objects sorted by size |
| find_sequence( | find frame_0, frame_1, frame_2 and so on |
| import_all_classes( | |
| print_on_screen( |
| .args | |
| .t | |
| .time_step | |
| .duration | |
| .funcs | |
| .func_call_time | |
| .func_finished_statuses | |
| .paused | |
| .entity | you can assign this to make the sequence pause when the entity is disabled or .ignore is True |
| .finished |
| generate() | |
| append( | |
| extend( | |
| start() | |
| pause() | |
| resume() | |
| finish() | |
| kill() | |
| update() |
| .func | |
| .args | |
| .kwargs |
| Keys.left_mouse_down = 'left mouse down' | |
| Keys.left_mouse_up = 'left mouse up' | |
| Keys.middle_mouse_down = 'middle mouse down' | |
| Keys.middle_mouse_up = 'middle mouse up' | |
| Keys.right_mouse_down = 'right mouse down' | |
| Keys.right_mouse_up = 'right mouse up' | |
| Keys.double_click = 'double click' | |
| Keys.scroll_up = 'scroll up' | |
| Keys.scroll_down = 'scroll down' | |
| Keys.left_arrow = 'left arrow' | |
| Keys.left_arrow_up = 'left arrow up' | |
| Keys.up_arrow = 'up arrow' | |
| Keys.up_arrow_up = 'up arrow up' | |
| Keys.down_arrow = 'down arrow' | |
| Keys.down_arrow_up = 'down arrow up' | |
| Keys.right_arrow = 'right arrow' | |
| Keys.right_arrow_up = 'right arrow up' | |
| Keys.left_control = 'left control' | |
| Keys.right_control = 'right control' | |
| Keys.left_shift = 'left shift' | |
| Keys.right_shift = 'right shift' | |
| Keys.left_alt = 'left alt' | |
| Keys.right_alt = 'right alt' | |
| Keys.left_control_up = 'left control up' | |
| Keys.right_control_up = 'right control up' | |
| Keys.left_shift_up = 'left shift up' | |
| Keys.right_shift_up = 'right shift up' | |
| Keys.left_alt_up = 'left alt up' | |
| Keys.right_alt_up = 'right alt up' | |
| Keys.page_down = 'page down' | |
| Keys.page_down_up = 'page down up' | |
| Keys.page_up = 'page up' | |
| Keys.page_up_up = 'page up up' | |
| Keys.enter = 'enter' | |
| Keys.backspace = 'backspace' | |
| Keys.escape = 'escape' | |
| Keys.tab = 'tab' | |
| Keys.gamepad_left_stick_x = 'gamepad left stick x' # held_keys only | |
| Keys.gamepad_left_stick_y = 'gamepad left stick y' # held_keys only | |
| Keys.gamepad_right_stick_x = 'gamepad right stick x' # held_keys only | |
| Keys.gamepad_right_stick_y = 'gamepad right stick y' # held_keys only | |
| Keys.gamepad_left_trigger = 'gamepad left trigger' # held_keys only | |
| Keys.gamepad_right_trigger = 'gamepad right trigger' # held_keys only | |
| Keys.gamepad_a = 'gamepad a' | |
| Keys.gamepad_a_up = 'gamepad a up' | |
| Keys.gamepad_b = 'gamepad b' | |
| Keys.gamepad_b_up = 'gamepad b up' | |
| Keys.gamepad_x = 'gamepad x' | |
| Keys.gamepad_x_up = 'gamepad x up' | |
| Keys.gamepad_y = 'gamepad y' | |
| Keys.gamepad_y_up = 'gamepad y up' | |
| Keys.gamepad_left_stick = 'gamepad left stick' | |
| Keys.gamepad_left_stick_up = 'gamepad left stick up' | |
| Keys.gamepad_right_stick = 'gamepad right stick' | |
| Keys.gamepad_right_stick_up = 'gamepad right stick up' | |
| Keys.gamepad_back = 'gamepad back' | |
| Keys.gamepad_back_up = 'gamepad back up' | |
| Keys.gamepad_start = 'gamepad start' | |
| Keys.gamepad_dpad_down = 'gamepad dpad down' | |
| Keys.gamepad_dpad_down_up = 'gamepad dpad down up' | |
| Keys.gamepad_dpad_up = 'gamepad dpad up' | |
| Keys.gamepad_dpad_up_up = 'gamepad dpad up up' | |
| Keys.gamepad_dpad_left = 'gamepad dpad left' | |
| Keys.gamepad_dpad_left_up = 'gamepad dpad left up' | |
| Keys.gamepad_dpad_right = 'gamepad dpad right' | |
| Keys.gamepad_dpad_right_up = 'gamepad dpad right up' | |
| Keys.gamepad_left_shoulder = 'gamepad left shoulder' | |
| Keys.gamepad_left_shoulder_up = 'gamepad left shoulder up' | |
| Keys.gamepad_right_shoulder = 'gamepad right shoulder' | |
| Keys.gamepad_right_shoulder_up = 'gamepad right shoulder up' |
| bind( | |
| unbind( | |
| rebind( | |
| input( | |
| get_combined_key( |
| raycast( |
| terraincast( | uses x and z to return y on terrain. |
app = Ursina()
terrain_entity =
| boxcast( | similar to raycast, but with width and height |
| .collision_node | |
| .shape | |
| .node_path |
| .visible |
| remove() |
| .center | |
| .size |
| .center | |
| .radius |
| .center | |
| .collision_polygons |
| remove() |
| .rotation_speed | |
| .pan_speed | |
| .move_speed | |
| .target_fov | |
| .zoom_speed | |
| .zoom_smoothing | |
| .rotate_around_mouse_hit | |
| .ignore_scroll_on_ui | |
| .smoothing_helper | |
| .rotation_smoothing | |
| .look_at | |
| .look_at_2d | |
| .rotate_key | |
| .start_position | |
| .perspective_fov | |
| .orthographic_fov | |
| .on_destroy | |
| .shortcuts |
| on_enable() | |
| on_disable() | |
| on_destroy() | |
| input( | |
| update() |
| .grid | |
| .tileset | |
| .tileset_size | |
| .model | |
| .texture | |
| .colliders | |
| .auto_render | |
| .outline | |
| .uv_dict | fill |
| .single_block_coordinates | |
| .variation_chance | |
| .uv_margin |
| update() | |
| draw_temp( | |
| input( | |
| render() | |
| save() |
app = Ursina()
EditorCamera()
tilemap =
| .cursor | |
| .speed | |
| .height | |
| .camera_pivot | |
| .mouse_sensitivity | |
| .gravity | |
| .grounded | |
| .jump_height | |
| .jump_up_duration | |
| .fall_after | will interrupt jump up |
| .jumping | |
| .air_time | |
| .traverse_target | by default, it will collide with everything. change this to change the raycasts' traverse targets. |
| .ignore_list | |
| .on_destroy |
| update() | |
| input( | |
| jump() | |
| start_fall() | |
| land() | |
| on_enable() | |
| on_disable() |
| .model | |
| .origin_y | |
| .scale_y | |
| .color | |
| .collider | |
| .animator | |
| .walk_speed | |
| .walking | |
| .velocity | the walk direction is stored here. -1 for left and 1 for right. |
| .jump_height | |
| .jump_duration | |
| .jumping | |
| .max_jumps | |
| .jumps_left | |
| .gravity | |
| .grounded | |
| .air_time | this increase while we're falling and used when calculating the distance we fall so we fall faster and faster instead of linearly. |
| .traverse_target | by default, it will collide with everything except itself. you can change this to change the boxcast traverse target. |
| .ignore_list | |
| .gravity | |
| .min_x | |
| .max_x |
| update() | |
| input( | |
| jump() | |
| start_fall() | |
| land() |
app = Ursina()
camera.orthographic = True
camera.fov =
| .question | |
| .more_indicator | |
| .spacing | |
| .wordwrap | |
| .button_model | |
| .variables_object | |
| .answer_0 | |
| .answer_1 | |
| .answer_2 | |
| .buttons | |
| .question_appear_sequence | |
| .button_appear_sequence | |
| .started |
| ask( | |
| on_click( | |
| input( | |
| next() | |
| start_conversation( | |
| parse_conversation( |
app = Ursina()
variables = Empty(
evil=
| .origin | |
| .color | |
| .highlight_color | |
| .pressed_color | |
| .highlight_scale | multiplier |
| .pressed_scale | multiplier |
| .highlight_sound | |
| .pressed_sound | |
| .collider | |
| .disabled | |
| .text_entity | |
| .text_origin |
| .text | |
| .text_origin | |
| .text_color | |
| .icon | |
| .icon_world_scale | |
| .text_size | |
| .origin |
| input( | |
| on_mouse_enter() | |
| on_mouse_exit() | |
| fit_to_text( |
| .require_key | |
| .dragging | |
| .delta_drag | |
| .start_pos | |
| .start_offset | |
| .step | |
| .plane_direction | |
| .lock | set to 1 to lock movement on any of x, y and z axes |
| .min_x, self.min_y, self.min_z | |
| .max_x, self.max_y, self.max_z |
| .step |
| input( | |
| start_dragging() | |
| stop_dragging() | |
| update() |
app = Ursina()
| update() |
app = Ursina()
tooltip_test =
| .parent | |
| .vertical | |
| .min | |
| .max | |
| .default | |
| .step | for example, setting .step to 1, would make the slider snap to the closest integer. |
| .height | |
| .on_value_changed | set this to a function you want to be called when the slider changes |
| .setattr | set this to (object, 'attrname') to set that value when the slider changes |
| .label | |
| .bg | |
| .knob | |
| .value | |
| .dynamic | if set to True, will call on_value_changed() while dragging. if set to False, will only call on_value_changed() after dragging. |
| .value | |
| .step |
| bg_click() | |
| drop() | |
| update() | |
| slide() |
app = Ursina()
box =
app = Ursina()
box =
| .font | |
| .line_height | |
| .max_lines | |
| .character_limit | |
| .scroll_parent | |
| .text_entity | |
| .line_numbers | |
| .character_width | |
| .cursor_parent | |
| .cursor | |
| .bg | |
| .selection | |
| .selection_parent | |
| .register_mouse_input | |
| .world_space_mouse | |
| .triple_click_delay | |
| .scroll | |
| .scroll_amount | |
| .active | |
| .highlight_color | |
| .text | |
| .delimiters | |
| .replacements | |
| .on_undo | |
| .on_redo | |
| .on_value_changed | |
| .shortcuts | |
| .middle_click_scroller |
| .active |
| middle_click_input( | |
| middle_click_update() | |
| add_text( | |
| move_line( | |
| erase( | |
| delete_selected() | |
| get_selected() | |
| get_mouse_position_unclamped() | |
| get_mouse_position() | |
| set_scroll( | |
| input( | |
| move_to_start_of_word() | |
| move_to_end_of_word() | |
| scroll_to_bottom( | |
| text_input( | |
| render() | |
| update() | |
| select_all() | |
| draw_selection() |
| .parent | |
| .texture | |
| .model | |
| .color | |
| .render_queue |
| update() |
| .default_value | |
| .limit_content_to | |
| .hide_content | if set to True, will display content as '*'. can also be set to character instead of True. |
| .next_field | |
| .submit_on | for example: self.submit_on |
| .on_submit | function to be called when you press self.submit_on. |
| .on_value_changed | |
| .text_field | |
| .active |
| .text | |
| .text_color | |
| .active |
| render() | |
| input( |
app = Ursina()
gradient =
| ContentTypes.int = '0123456789' | |
| ContentTypes.float = int + '.,' | |
| ContentTypes.int_math = int + '+-*/' | |
| ContentTypes.math = float + '+-*/' |
app = Ursina()
gradient =
| .clear_selected_on_enable | |
| .button_height | |
| .width | |
| .text_entity | |
| .bg | |
| .highlight | |
| .selection_marker | |
| .button_dict | |
| .popup |
| .button_dict | |
| .selected |
| input( | |
| update() | |
| on_disable() | |
| on_enable() |
| .deselected_color | |
| .selected_color | |
| .min_selection | |
| .max_selection | |
| .origin | |
| .spacing | |
| .buttons | |
| .selected | |
| .options | |
| .parent | |
| .scale |
| .options | |
| .value | |
| .label |
| layout() | |
| input( | |
| select( | |
| on_value_changed() |
| .content | |
| .popup | |
| .panel |
| layout() |
| .height |
| .file_types |
| .scroll | |
| .path | |
| .selection |
| input( | |
| on_enable() | |
| close() | |
| folder_up() | |
| open( |
app = Ursina()
fb =
| .load_menu | |
| .path | |
| .original_color | |
| .selected |
| .selected |
| on_click() | |
| on_double_click() |
app = Ursina()
fb = FileBrowser(file_types=(
| .save_button | |
| .file_name_field | |
| .file_type | to save as |
| .last_saved_file | gets set when you save a file |
| .overwrite_prompt |
| .file_type |
| on_enable() | |
| on_disable() | |
| on_submit( | implement .on_submit to handle saving |
| .position | |
| .buttons | |
| .arrow_symbol |
| open() | |
| close() | |
| on_mouse_enter() | |
| input( | |
| update() |
| .parent | |
| .buttons | |
| .open_at_cursor | |
| .open_duration | |
| .bg | |
| .z | |
| .scale |
| on_enable() | |
| input( |
app = Ursina()
rm =
app = Ursina()
rm = RadialMenu(
buttons = (
| .bar | |
| .lines | |
| .max_value | |
| .clamp | |
| .roundness | |
| .animation_duration | |
| .show_lines | |
| .show_text | |
| .value |
| .value | |
| .show_text | |
| .show_lines | |
| .bar_color |
app = Ursina()
health_bar_
| .bg | |
| .h_slider | |
| .s_slider | |
| .v_slider | |
| .a_slider | |
| .on_value_changed | assign a function here |
| .preview |
| .path | |
| .path | |
| .hotreload | toggle with f9 |
| .hotkeys | |
| .hotreload_window_settings |
| input( | |
| update() | |
| get_source_code() | |
| toggle_hotreloading() | |
| reload_code( | |
| reload_textures() | |
| reload_models() | |
| reload_shaders() |
| .w, self.h | |
| .canvas | |
| .canvas_collider | |
| .brush_size | |
| .auto_render | |
| .cursor | |
| .selected_char | |
| .palette | |
| .start_pos | |
| .prev_draw | |
| .lock_axis | |
| .outline | |
| .rect_selection | |
| .selection_renderer | |
| .rect_tool | |
| .selection_matrix | |
| .temp_paste_layer | |
| .is_in_paste_mode | |
| .undo_stack | |
| .undo_index | |
| .help_icon | |
| .edit_mode |
| .palette | |
| .edit_mode |
| update() | |
| get_cursor_position() | |
| draw( | |
| input( | |
| record_undo() | |
| floodfill( | |
| copy() | |
| enter_paste_mode() | |
| exit_paste_mode( | |
| clear_selection() | |
| render_selection() |
app = Ursina(borderless=False)
| .texture |
| set_texture( | |
| draw( | |
| render() | |
| save() |
app = Ursina(borderless=False)
| .text_entity | |
| .scale |
| render() | |
| input( |
app = Ursina(borderless=False)
| grid_layout( |
app = Ursina()
center =
| duplicate( | use a for loop instead of duplicate() if you can. |
| .target | |
| .offset | |
| .speed | |
| .rotation_speed | |
| .rotation_offset |
| update() |
app = Ursina()
player =
| .max | |
| .min | |
| .scroll_speed | |
| .scroll_smoothing | |
| .axis | |
| .target_value |
| update() | |
| input( |
| .speed | |
| .require_key | |
| .ignore_paused |
| input( | |
| update() |
app = Ursina()
player =
| .speed | |
| .require_key | |
| .ignore_paused |
| input( | |
| update() |
app = Ursina()
player =
| .project_folder | |
| .project_name | |
| .build_folder | |
| .build_folder.mkdir(exist_ok=True) | |
| .ignore_folders | |
| .ignore_filetypes | |
| .compressed_textures | |
| .compressed_textures_folder | |
| .python_dest | |
| .python_dlls_dest | |
| .python_lib_dest | |
| .src_dest | |
| .build_engine | |
| .build_game | |
| .entry_point | |
| .start_time |
| copytree( |
| quad | |
| wireframe_cube | |
| plane | |
| circle | |
| diamond | |
| wireframe_quad | |
| sphere | |
| cube | |
| icosphere | |
| cube_uv_top | |
| arrow | |
| sky_dome |
| noise | |
| grass | |
| vignette | |
| arrow_right | |
| test_tileset | |
| tilemap_test_level | |
| shore | |
| file_icon | |
| sky_sunset | |
| radial_gradient | |
| circle | |
| perlin_noise | |
| brick | |
| grass_tintable | |
| circle_outlined | |
| ursina_logo | |
| arrow_down | |
| cog | |
| vertical_gradient | |
| white_cube | |
| horizontal_gradient | |
| folder | |
| rainbow | |
| heightmap_1 | |
| sky_default |
| default_input | |
| 'texture_scale' : Vec2(1,1), | |
| 'texture_offset' : Vec2(0.0, 0.0), |
| default_input | |
| 'texture_scale': Vec2(1,1), | |
| 'texture_offset': Vec2(0,0), | |
| 'shadow_color' : Color(0, .5, 1, .25), | |
| 'shadow_blur': .005, | |
| 'shadow_samples': 4 |
| default_input | |
| 'top_color': color.hsv(220, .12, .82), | |
| 'bottom_color': color.hsv(285, .13, .47), | |
| 'left_color': color.hsv(217, .3, .68), | |
| 'right_color': color.hsv(0, .25, .93), | |
| 'front_color': color.hsv(231, .08, .69), | |
| 'back_color': color.hsv(240, .05, .76), |
| default_input | |
| 'texture_scale' : Vec2(1,1), | |
| 'texture_offset' : Vec2(0.0, 0.0), | |
| 'fresnel_color' : color.light_gray, | |
| 'fresnel_texture' : Func(load_texture, 'white_cube'), |
| default_input | |
| 'texture_scale' : Vec2(1,1), | |
| 'side_texture' : 'brick', | |
| 'side_texture_scale' : Vec2(1,1), |
| default_input | |
| 'window_size': Vec2(1280,720), |
app = Ursina()
window.
| default_input | |
| 'contrast': 1, |
| default_input | |
| =dict( | |
| blur_size |