Spine viewer with practical manipulation feature, based on runtime for DxLib.
- Spine runtime for DxLib provides functionality to (1) load texture and (2) render skeleton.
- There are two kind of runtimes depending on the official generic runtimes to be used with.
dxlib_spine.cpp
anddxlib_spine.h
are to be used withspine-cpp
. (3.8
to4.1
)dxlib_spine_c.cpp
anddxlib_spine_c.h
are to be used withspine-c
. (3.5
to4.1
)- Class is used because DxLib is C++ library, but STL is avoided.
Besides, there is a runtime for spine 2.1.27
under projects/DxLibSpineViewerC-2.1
. But note that transformation method is totally different from later versions.
The viewer is built with Spine generic runtime 2.1
, 3.5
, 3.6
, 3.7
, 3.8
, 4.0
, and 4.1
.
- Multiple Spines rendering
- Rendered in filename ascending or descending order.
- Runtime manipulation
- Exclude slot
- Mix skins
- Mix animations
- Replace attachment
- Media file export
- As
PNG
,GIF
,JPG
, andH264
.H264
encoding is available only for Intel CPU.
- As
- Transparent/borderless window style
Multiple rendering
Multiple.rendering.mp4
Mix animations
Mix.animation.mp4
Exclude slot
Exclude.slot.mp4
Replace attachment
Replace.attachment.mp4
Media export
Media.export.mp4
Transparent window
Transparent.window.mp4
The following sections are on the viewer.
Entry | Item | Action |
---|---|---|
File | Open folder |
Open folder-select-dialogue. |
- | Setting |
Open a dialogue to set atlas/skelton extensions to pick up when opening folder. |
- | Select files |
Pick up atlas and skeleton files one by one regardless of their extension. |
Image | Manipulation |
Open a dialogue to specify slots to be excluded, skins or animations to be mixed. |
- | Re-attachment |
Open a dialogue to replace attachment. |
Window | Through-seen |
Toggle window's transparancy. |
- | Allow manual sizing |
Allow/forbid manual sizing of window. Default: forbidden |
- | Move view on release |
Toggle view-point behaviour; move while dragging or when dragged button is released. |
- In the
Setting
dialogue, specify atlas and skeleton extensions. - From
Open folder
, select a folder containing atlas/skel(s) with specified extensions.
- From
Select files
, first select atlas file(s) to load. - In the secoend dialogue, select skel file(s) which is/are pair(s) of atlas.
- The context-menu appears only when spine is loaded, and the items of which varies depending on whether it is under recording or not.
Menu item | Action |
---|---|
Snap as PNG |
Save the current screen as PNG. |
Snap as JPG |
Save the current screen as JPG. |
Start image recording |
Start storing screen frames at intervals. |
Start video recording |
Start recording screen as H264. |
Menu item | Action |
---|---|
Save as GIF |
Save stored frames into a single GIF file. |
Save as PNGs |
Save stored frames as separate PNG files. |
Menu item | Action |
---|---|
End recording |
End video recording. |
- The files are saved in the subdirectory of the execution file.
- The folder is named after folder-name when loaded via
Open folder
, and the first atlas filename when viaSelect files
.
- The folder is named after folder-name when loaded via
- PNG and JPG file will be named like
home_4.475018.png
wherehome
is animation name, and4.475018
is animation frame when saved. - GIF file will be named like
wait.gif
wherewait
is animation name. - Mind that
width * height * 4
byte of memory will be consumed every recording frame. - H264 file will be named like
fp.mp4
wherefp
is animation name.
Input | Action |
---|---|
Wheel scroll | Scale up/down. Combining with Ctrl to retain window size. |
Left pressed + wheel scroll | Speed up/down the animation. |
Left click | Switch the animation. |
Left drag | Move view-point. |
Middle click | Reset scale, animation speed, and view-point to default. |
Right pressed + middle click | Hide/show window's border and menu. Having hidden, the window goes to the origin of display. |
Right pressed + left click | Start moving borderless window. Left click to end. |
Right pressed + wheel scroll | Switch the skin. |
- Check menu item
Window->Through-seen
to make window transparent. - Right pressed + middle click to make window borderless.
- Right pressed + left click to move borderless window.
Input | Action |
---|---|
Esc | Close the application. |
Up | Open the previpus folder. |
Down | Open the next folder. |
A | Enable/disable premultiplied alpha. Default: enabled. |
B | Prefer/ignore blned-mode specified by slots. Default: preferred. |
R | Toggle draw-order between filename asc/descending order. Default: ascending order. |
Z | Enable/disable depth-buffer. Default: disabled. |
- Up and Down key are valid only when the current spine(s) is/are loaded via
Open folder
. - Disable
PMA
with A if it is too bright, and enable if darkish. - Force
normal
blend mode with B ifmultiply
is not well represented.
- Run
shared-src/deps/CMakeLists.txt
. - Open
DxLibSpineViewer.sln
with Visual Studio.
The CMakeLists.txt
modifies some of the external sources as well as obtains them.
- For spine-c
3.5
, renames some of the functions which lacksp
prefix inextension.c
andextension.h
so as to be consistent with those of3.6
and later. - For spine-c
2.1
, supplies binary skeleton reader which is lacking in official2.1.25
runtime, and overwrites some of the files with those from here.
deps directory will be as follows:
... ├ DxLibSpineC │ └ ... ├ DxLibSpineCpp │ └ ... ├ projects │ └ ... ├ shared-src │ ├ deps │ │ ├ dxlib // static libraries and headers of DxLib for VC │ │ │ └ ... │ │ ├ spine-c-x.x // Spine C generic runtime for version x.x │ │ │ ├ include │ │ │ │ └ ... │ │ │ └ src │ │ │ └ ... │ │ ├ ... │ │ ├ spine-cpp-x.x // Spine C++ generic runtime for version x.x │ │ │ ├ include │ │ │ │ └ ... │ │ │ └ src │ │ │ └ ... │ │ └ ... │ └ ... ├ DxLibSpineViewer.sln └ ...