SkelForm runtime for Kraken Engine
Project description
SkelForm runtime for Kraken Engine.
pip install skelform_kraken
Demo
After installing the library:
skelform-demo
Usage
import skelform_kraken as skf
Basic Setup
skf.load()- loads.skf/.skfefile and returns armature & textures, to be used laterskf.animate()- transforms the armature's bones based on the animation(s)skf.construct()- provides the bones from this armature that are ready for useskf.draw()- draws the bones on-screen, with the provided style(s)
1. Load:
(armature, textures) = skf.load("skellington.skfe")
This should only be called once (eg; before main game loop), and armature and
textures should be kept for later use.
2. Animate:
# use `skf_pg.time_frame()` to get the animation frame based on time (1000 = 1 second)
time = 2000
frame = skf.time_frame(time, armature.animations[0], False, True)
print(frame) # will be at the 2 second mark of the animation
armature.bones = skf.animate(armature, [armature.animations[0]], [0], [0])
Note: not needed if armature is static
3. Construct:
center = kn.Vec2(screen.get_width()/2, screen.get_height()/2)
final_bones = skf.construct(
armature,
screen,
skf_pg.AnimOptions(
pos=center
)
)
Modifications to the armature (eg; aiming at cursor) may be done before or after construction.
4. Draw:
skf.draw(final_bones, armature.styles, textures, screen)
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file skelform_kraken-0.4.13.tar.gz.
File metadata
- Download URL: skelform_kraken-0.4.13.tar.gz
- Upload date:
- Size: 13.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83bbacdb7dbb19a2e33e669e6476475fd6554e44e18232bcd25b38717a9ce655
|
|
| MD5 |
237b830fb9482dd2dcb911de9cb443f9
|
|
| BLAKE2b-256 |
bf85297eb94e252a91f0ac10d40ac9948601801fac66df3ff943fc5c78a0eb89
|
File details
Details for the file skelform_kraken-0.4.13-py3-none-any.whl.
File metadata
- Download URL: skelform_kraken-0.4.13-py3-none-any.whl
- Upload date:
- Size: 444.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7e27e67eb344cf8e58735642101430926ec24fc50b76511b3ea6f57c1776a5d
|
|
| MD5 |
2302bcf8f5ea432afb35e6deb675e120
|
|
| BLAKE2b-256 |
6d3937ea40efb06b890a00b6adcd7c8dbf65527ff50238972ad79c81896916a4
|