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.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 898a90f8f7bdfbb1be529c7fcf8fda245076b5d63ae74ef35bf428e93b591bb0 |
|
MD5 | 19ed108f079db2b3608eaa587136d73a |
|
BLAKE2b-256 | 59dd9e9336fce556e33eafe9118b61e82ed5cda2a4be1950325e302d40c96d6d |
Close
Hashes for panda3d_eventmapper-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b81af929c37055254528253e947b1eaa2d97caa463ed049a1b1447b8ad770a8 |
|
MD5 | 0e1c9b8e6effc8de9dec0460680ef7b7 |
|
BLAKE2b-256 | cbdda4259f2f45ddce681a7eeb879b8eda860f320c8a807021e9ac017d2b3983 |