An open API service indexing awesome lists of open source software.

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

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))