https://github.com/inochi2d/vts-d
VTube Studio API for D using vibe-d
https://github.com/inochi2d/vts-d
Last synced: 3 months ago
JSON representation
VTube Studio API for D using vibe-d
- Host: GitHub
- URL: https://github.com/inochi2d/vts-d
- Owner: Inochi2D
- License: bsd-2-clause
- Created: 2023-01-30T10:19:45.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-07-04T22:27:08.000Z (almost 3 years ago)
- Last Synced: 2025-02-26T00:46:00.868Z (over 1 year ago)
- Language: D
- Homepage:
- Size: 13.7 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# VTube Studio Bindings for D
This repository contains bindings for the VTube Studio websocket API.
To use the library create a VTSPlugin instance and use the functions it provides to access the API
## Example (Change model every 5 seconds)
```d
module app;
import vts;
import std.datetime;
import std.stdio : writeln;
import std.random : choice;
import vibe.core.core : sleep;
void main() {
VTSPlugin plugin = new VTSPlugin(PluginInfo("Test", "Me", null), "127.0.0.1");
plugin.login();
auto models = plugin.getModels();
do {
if (models.length > 0) plugin.tryLoadModel(choice(models).modelId);
sleep(5.seconds);
} while(plugin.isConnected());
plugin.disconnect();
}
```
## Known Issues
* If VTube Studio is closed the application will segfault, some bug deep within vibe-d is causing it. (see [vibe.d#2706](https://github.com/vibe-d/vibe.d/issues/2706))