Simple utility to remap Panda3D events
Project description
Panda3D Event Mapper
A simple utility to remap Panda3D events.
Features
- Remap events
- Configure via PRC variables or an API
- Handle keyboards, mice, and gamepads
Installation
Use pip to install the panda3d-eventmapper
package:
pip install panda3d-eventmapper
Example
import sys
from direct.showbase.ShowBase import ShowBase
import panda3d.core as p3d
import eventmapper
p3d.load_prc_file_data(
'',
'event-map-item-quit escape q\n'
'event-map-item-move-forward raw-w\n'
'event-map-item-move-backward raw-s\n'
'event-map-item-move-left raw-a\n'
'event-map-item-move-right raw-d\n'
)
class GameApp(ShowBase):
def __init__(self):
super().__init__()
self.eventmapper = eventmapper.EventMapper()
self.accept('quit', sys.exit)
self.accept('move-forward', print, ['move forward'])
self.accept('move-backward', print, ['move backward'])
self.accept('move-left', print, ['move left'])
self.accept('move-right', print, ['move right'])
GameApp().run()
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for panda3d-eventmapper-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7efe06154ee7b02c7f651202e6a858db3e13e272720e431ea2278eae4766ba02 |
|
MD5 | dc526fb8139ef6399276e2ac3c16e3d1 |
|
BLAKE2b-256 | a335945da4ea3832bb18900d628aae2411245f6e52c8ec27970e470fe120d57f |
Close
Hashes for panda3d_eventmapper-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5119869b886b67bd92fa62881fede1cafc40a1752eb882142e4d3d42313effab |
|
MD5 | e16a49b5626e24e35ee92edeb254e554 |
|
BLAKE2b-256 | 7d6bcfdd1f0c80ed43b5403922172cfec234953b9703840787772c141c740acf |