yyagl.lib.p3d package

Submodules

yyagl.lib.p3d.audio module

class yyagl.lib.p3d.audio.P3dSound(filepath)[source]

Bases: object

play()[source]
property playing
set_loop(val)[source]
set_play_rate(rate)[source]
set_volume(vol)[source]
stop()[source]

yyagl.lib.p3d.gfx module

class yyagl.lib.p3d.gfx.P3dAmbientLight(color)[source]

Bases: object

destroy()[source]
class yyagl.lib.p3d.gfx.P3dAnimNode(filepath, anim_dct)[source]

Bases: object

destroy()[source]
loop(val)[source]
property name
optimize()[source]
reparent_to(node)[source]
set_omni()[source]
class yyagl.lib.p3d.gfx.P3dGfxMgr(model_path, antialiasing, shaders, srgb)[source]

Bases: object

static disable_shader()[source]
static enable_shader()[source]
load_model(filename, callback=None, anim=None)[source]
static pos2d(node)[source]
static print_stats()[source]
screenshot()[source]
set_bloom()[source]
set_srgb(model)[source]
set_toon()[source]
property shader_support
static toggle_aa()[source]
class yyagl.lib.p3d.gfx.P3dNode(nodepath)[source]

Bases: object

add_shape(shape)[source]
attach_node(name)[source]
property children
cleanup()[source]
clear_model_nodes()[source]
find(name)[source]
find_all_matches(name)[source]
flatten_strong()[source]
get_distance(other_node)[source]
get_pos(other=None)[source]
get_python_tag(name)[source]
get_relative_vector(node, vec)[source]
get_tag(name)[source]
property h
has_tag(name)[source]
hide(mask=None)[source]
property hpr
property is_empty
loop(val)[source]
property name
property node
optimize()[source]
property p
property p3dnode
property parent
property r
remove_node()[source]
reparent_to(parent)[source]
property scale
set_alpha_scale(val)[source]
set_collide_mask(mask)[source]
set_depth_offset(val)[source]
set_h(val)[source]
set_hpr(val)[source]
set_material(mat)[source]
set_p(val)[source]
set_pos(pos)[source]
set_python_tag(name, val)[source]
set_r(val)[source]
set_scale(val)[source]
set_texture(texturestage, texture)[source]
set_transparency(val)[source]
set_x(val)[source]
set_y(val)[source]
set_z(val)[source]
show()[source]
property tight_bounds
write_bam_file(fname)[source]
wrt_reparent_to(parent)[source]
property x
property y
property z
class yyagl.lib.p3d.gfx.P3dSpotlight(mask=None)[source]

Bases: object

destroy()[source]
look_at(pos)[source]
set_color(color)[source]
set_pos(pos)[source]
class yyagl.lib.p3d.gfx.RenderToTexture(size=(256, 256))[source]

Bases: object

destroy()[source]
property texture

yyagl.lib.p3d.gui module

class yyagl.lib.p3d.gui.CommonBase[source]

Bases: object

set_enter_transition()[source]
set_exit_transition(destroy)[source]
set_widget()[source]
translate()[source]
class yyagl.lib.p3d.gui.P3dAbs(tra_src=None, tra_tra=None)[source]

Bases: yyagl.lib.p3d.gui.P3dBase

attachNewNode(gui_itm, sort_order)[source]
bind(evt, mth)[source]
get_value()[source]
initialiseoptions()[source]
property is_enabled
set_shader(shader)[source]
set_shader_input(name, val)[source]
set_transparency(val)[source]
set_z(val)[source]
class yyagl.lib.p3d.gui.P3dBase(tra_src=None, tra_tra=None)[source]

Bases: yyagl.lib.p3d.gui.CommonBase

bind_tra(text_src, text_transl)[source]
destroy()[source]
get_np()[source]
get_pos(pos=None)[source]
property hidden
hide()[source]
set_pos(pos)[source]
show()[source]
class yyagl.lib.p3d.gui.P3dBtn(text='', parent=None, pos=(0, 0), scale=(1, 1), cmd=None, frame_size=(-1, 1, -1, 1), click_snd=None, text_fg=(1, 1, 1, 1), frame_col=(1, 1, 1, 1), text_font=None, over_snd=None, extra_args=None, frame_texture=None, img=None, tra_src=None, tra_tra=None, text_scale=1.0)[source]

Bases: yyagl.lib.p3d.gui.P3dAbs

class yyagl.lib.p3d.gui.P3dCheckBtn(pos=(0, 0), text='', indicator_val=False, indicator_frame_col=(1, 1, 1, 1), frame_col=(1, 1, 1, 1), scale=(1, 1, 1), click_snd=None, over_snd=None, text_fg=(1, 1, 1, 1), text_font=None, cmd=None, tra_src=None, tra_tra=None)[source]

Bases: yyagl.lib.p3d.gui.P3dAbs

class yyagl.lib.p3d.gui.P3dEntry(scale=0.05, pos=(0, 0), entry_font=None, width=12, frame_col=(1, 1, 1, 1), initial_text='', obscured=False, cmd=None, focus_in_cmd=None, focus_in_args=None, focus_out_cmd=None, focus_out_args=None, parent=None, tra_src=None, tra_tra=None, text_fg=(1, 1, 1, 1), on_tab=None, on_click=None)[source]

Bases: yyagl.lib.p3d.gui.P3dAbs, direct.showbase.DirectObject.DirectObject, yyagl.observer.Subject

destroy()[source]
disable()[source]
enable()[source]
property focused
on_tab()[source]
property text
class yyagl.lib.p3d.gui.P3dFrame(frame_size=(-1, 1, -1, 1), frame_col=(1, 1, 1, 1), pos=(0, 0), parent=None, texture_coord=False)[source]

Bases: yyagl.lib.p3d.gui.P3dAbs

class yyagl.lib.p3d.gui.P3dImg(filepath, pos=(0, 0), scale=1.0, background=False, foreground=False, parent=None)[source]

Bases: yyagl.lib.p3d.gui.CommonBase

destroy()[source]
get_pos(pos=None)[source]
property hidden
hide()[source]
property parent
reparent_to(node)[source]
set_exit_transition(destroy)[source]
set_pos(pos)[source]
set_shader(shader)[source]
set_shader_input(name, val)[source]
set_texture(texturestage, texture)[source]
set_transparent()[source]
show()[source]
class yyagl.lib.p3d.gui.P3dLabel(text='', pos=(0, 0), parent=None, text_wordwrap=12, text_align=None, text_fg=(1, 1, 1, 1), text_font=None, scale=0.05, frame_col=(1, 1, 1, 1), tra_src=None, tra_tra=None, hpr=(0, 0, 0))[source]

Bases: yyagl.lib.p3d.gui.P3dAbs

class yyagl.lib.p3d.gui.P3dOptionMenu(text='', items=None, pos=(0, 0), scale=(1, 1, 1), initialitem='', cmd=None, frame_size=(-1, 1, -1, 1), click_snd=None, over_snd=None, text_may_change=False, text_fg=(1, 1, 1, 1), item_frame_col=(1, 1, 1, 1), frame_col=(1, 1, 1, 1), highlight_col=(1, 1, 1, 1), text_scale=0.05, popup_marker_col=(1, 1, 1, 1), item_relief=None, item_text_font=None, text_font=None, tra_src=None, tra_tra=None)[source]

Bases: yyagl.lib.p3d.gui.P3dAbs

property curr_idx
property curr_val
set(idx, f_cmd=1)[source]
class yyagl.lib.p3d.gui.P3dScrolledFrame(frame_sz=(-1, 1, -1, 1), canvas_sz=(0, 1, 0, 1), scrollbar_width=0.05, frame_col=(1, 1, 1, 1), pos=(0, 0), parent='topleft')[source]

Bases: yyagl.lib.p3d.gui.P3dAbs

property canvas
class yyagl.lib.p3d.gui.P3dSlider(parent=None, pos=(0, 0), scale=1, val=0, frame_col=(1, 1, 1, 1), thumb_frame_col=(1, 1, 1, 1), cmd=None, range_=(0, 1), tra_src=None, tra_tra=None)[source]

Bases: yyagl.lib.p3d.gui.P3dAbs

class yyagl.lib.p3d.gui.P3dTxt(txt='', pos=(0, 0), scale=0.05, wordwrap=12, parent=None, fg=(1, 1, 1, 1), font=None, align=None, tra_src=None, tra_tra=None)[source]

Bases: yyagl.lib.p3d.gui.P3dBase

yyagl.lib.p3d.ivals module

class yyagl.lib.p3d.ivals.P3dFunc(fun, *args)[source]

Bases: object

class yyagl.lib.p3d.ivals.P3dPosIval(node, time=1.0, pos=(0, 0, 0), blend_type='ease')[source]

Bases: object

class yyagl.lib.p3d.ivals.P3dSeq(*ivals)[source]

Bases: object

start()[source]
class yyagl.lib.p3d.ivals.P3dWait(time)[source]

Bases: object

yyagl.lib.p3d.joystick module

class yyagl.lib.p3d.joystick.P3dJoystickMgr[source]

Bases: object

clear_vibration(player_idx, code=None)[source]
destroy()[source]
static get_joystick(player_idx)[source]
init_joystick()[source]
property num_joysticks
set_vibration(player_idx, code, time=-1)[source]

yyagl.lib.p3d.p3d module

class yyagl.lib.p3d.p3d.LibP3d[source]

Bases: direct.showbase.DirectObject.DirectObject

static add_task(mth, priority=0)[source]
property aspect_ratio
property build_version
static configure()[source]
property curr_path
destroy()[source]
static do_later(time, meth, args=None)[source]
property driver_renderer
property driver_shader_version_major
property driver_shader_version_minor
property driver_vendor
property driver_version
property driver_version_major
property driver_version_minor
static find_geoms(model, name)[source]
static fixpath(path)[source]
property fullscreen
property has_window
static hide_std_cursor()[source]
init(green=(0.2, 0.8, 0.2, 1), red=(0.8, 0.2, 0.2, 1), end_cb=None)[source]
property last_frame_dt
property lib_commit
static load_font(filepath, outline=True)[source]
static load_sfx(filepath, loop=False)[source]
static log(msg)[source]
property mousepos
static on_aspect_ratio_changed()[source]
static p3dpath(path)[source]
property phys_version
remap_code(key)[source]
remap_str(key)[source]
static remove_task(tsk)[source]
property resolution
property resolutions
static runtime()[source]
static send(msg)[source]
static set_icon(filename)[source]
static set_resolution(res, fullscreen=None)[source]
static show_std_cursor()[source]
task_cont = 1
static toggle_fullscreen()[source]
property user_appdata_dir
property version
property volume
class yyagl.lib.p3d.p3d.LibShowBase(fStartDirect=True, windowType=None)[source]

Bases: direct.showbase.ShowBase.ShowBase

yyagl.lib.p3d.particle module

class yyagl.lib.p3d.particle.P3dParticle(emitter, texture, color=(1, 1, 1, 1), ampl=0.5235987755982988, ray=0.5, rate=0.001, gravity=-9.81, vel=1.0, part_duration=1.0, autodestroy=None)[source]

Bases: yyagl.gameobject.GameObject

destroy(now=False)[source]

yyagl.lib.p3d.pause module

class yyagl.lib.p3d.pause.P3dPause[source]

Bases: yyagl.gameobject.GameObject

destroy()[source]
pause()[source]
pause_tasks()[source]
property paused
remove_task(tsk)[source]
resume()[source]
class yyagl.lib.p3d.pause.TaskDec(tsk)[source]

Bases: object

pause()[source]
paused_taskchain = 'paused tasks'
process()[source]
resume()[source]

yyagl.lib.p3d.shader module

class yyagl.lib.p3d.shader.P3dShaderMgr(shaders, gamma)[source]

Bases: object

apply()[source]
clear_lights()[source]
destroy()[source]
set_amb_lgt(col)[source]
static set_default_args(idx)[source]
set_dir_lgt(col, direction)[source]
set_lgt_args(idx, lgt)[source]
set_pnt_lgt(col, pos)[source]
set_shader_pars(model)[source]
set_spotlight(col, exp, cutoff, pos, look_at)[source]
setup_post_fx()[source]
toggle_shader()[source]
class yyagl.lib.p3d.shader.ShaderSetter[source]

Bases: object

static build(lgt)[source]
class yyagl.lib.p3d.shader.ShaderSetterAmbient[source]

Bases: yyagl.lib.p3d.shader.ShaderSetter

static set(pref, lgt)[source]
class yyagl.lib.p3d.shader.ShaderSetterDirectionalLight[source]

Bases: yyagl.lib.p3d.shader.ShaderSetter

static set(pref, lgt)[source]
class yyagl.lib.p3d.shader.ShaderSetterPointLight[source]

Bases: yyagl.lib.p3d.shader.ShaderSetter

static set(pref, lgt)[source]
class yyagl.lib.p3d.shader.ShaderSetterSpotlight[source]

Bases: yyagl.lib.p3d.shader.ShaderSetter

static set(pref, lgt)[source]
yyagl.lib.p3d.shader.load_shader(vert, frag)[source]

yyagl.lib.p3d.vec module

class yyagl.lib.p3d.vec.P3dVec2(*args)[source]

Bases: object

attr_lst = ['x', 'y']
property attrs
dot(other)[source]
length()[source]
normalize()[source]
property normalized
p3d_cls

alias of panda3d.core.LVector2f

rotate(deg)[source]
signed_angle_deg(vec)[source]
property x
property xy
property y
class yyagl.lib.p3d.vec.P3dVec3(*args)[source]

Bases: yyagl.lib.p3d.vec.P3dVec2

attr_lst = ['x', 'y', 'z']
p3d_cls

alias of panda3d.core.LVector3f

signed_angle_deg(vec)[source]
property z

yyagl.lib.p3d.widget module

class yyagl.lib.p3d.widget.BtnMixin[source]

Bases: yyagl.lib.p3d.widget.FrameMixin

disable()[source]
enable()[source]
init(wdg)[source]
on_arrow(direction)[source]
on_enter(player)[source]
on_wdg_enter(pos=None, player=0)[source]
on_wdg_exit(pos=None, player=0)[source]
class yyagl.lib.p3d.widget.CheckBtnMixin[source]

Bases: yyagl.lib.p3d.widget.BtnMixin

on_enter(player=0)[source]
class yyagl.lib.p3d.widget.EntryMixin[source]

Bases: yyagl.lib.p3d.widget.FrameMixin

on_arrow(direction)[source]
on_enter(player=0)[source]
on_wdg_enter(pos=None, player=0)[source]
on_wdg_exit(pos=None, player=0)[source]
class yyagl.lib.p3d.widget.FrameMixin[source]

Bases: yyagl.lib.p3d.widget.WidgetMixin

disable()[source]
enable()[source]
init(wdg)[source]
on_wdg_enter(pos=None, player=0)[source]
on_wdg_exit(pos=None, player=0)[source]
class yyagl.lib.p3d.widget.ImgMixin[source]

Bases: yyagl.lib.p3d.widget.WidgetMixin

init(wdg)[source]
class yyagl.lib.p3d.widget.OptionMenuMixin[source]

Bases: yyagl.lib.p3d.widget.BtnMixin

on_arrow(direction)[source]
on_enter(player=0)[source]
class yyagl.lib.p3d.widget.ScrolledFrameMixin[source]

Bases: yyagl.lib.p3d.widget.WidgetMixin

disable()[source]
enable()[source]
init(wdg)[source]
on_wdg_enter(pos=None, player=0)[source]
on_wdg_exit(pos=None, player=0)[source]
class yyagl.lib.p3d.widget.SliderMixin[source]

Bases: yyagl.lib.p3d.widget.FrameMixin

on_arrow(direction)[source]
on_enter(player=0)[source]
class yyagl.lib.p3d.widget.WidgetMixin[source]

Bases: object

disable()[source]
enable()[source]
get_np()[source]
property global_pos
highlight_color_offset = [LVecBase4f(0, 0, 0.4, 0), LVecBase4f(0, 0.4, 0, 0), LVecBase4f(0.4, 0, 0, 0), LVecBase4f(0.4, 0.4, 0, 0)]
property pos

Module contents