Skip to content

Make systems more convenient to call #6

@Permafacture

Description

@Permafacture

Step 1) make a function that returns a function that takes care of the boiler plate. Ie (from examples/polygons.py):

  render_verts =('render_verts','poly_verts','position','rotator')
  broadcast = ('position__to__poly_verts',)
  sections = get_sections(render_verts + broadcast)
  indices = sections.pop(broadcast[0])
  update_render_verts(*(sections[name] for name in render_verts),indices=indices)

should become

  convinient_update_render_verts('render_verts','poly_verts','position','rotator', 
      indicies = 'position__to__poly_verts')

step 2) make it a decorator

    @system
    def update_render_verts(render_verts, poly_verts, ...)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions