public class RunwayHTTP extends Runway
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DATA |
static java.lang.String |
ERROR |
static int |
HTTP_TIMEOUT_SECONDS |
static java.lang.String |
INFO |
static int |
PORT |
static java.lang.String |
QUERY |
DEFAULT_HOST, VERSION
Constructor and Description |
---|
RunwayHTTP(PApplet parent)
Constructor, usually called in the setup() method in your sketch to
initialize and start the Library.
|
RunwayHTTP(PApplet parent,
java.lang.String host)
Constructor variant that takes in an IPv4 Address
for situations where Runway runs on a different computer on the same network
|
RunwayHTTP(PApplet parent,
java.lang.String host,
int port) |
Modifier and Type | Method and Description |
---|---|
boolean |
isAutoUpdating() |
void |
pre()
Don't call method directly The sketch calls this before each frame if
|
void |
query(PImage input)
send an image query to Runway (defaults to jpg encoding format and "image" JSON object key)
|
void |
query(PImage input,
java.lang.String format,
java.lang.String key)
send an image query to Runway
|
void |
query(java.lang.String input)
send a JSON string query to Runway
|
void |
setAutoUpdate(boolean autoUpdate)
Call Runway before each frame or not ?
|
void |
update()
call
|
drawPoseNetParts, version
public static int HTTP_TIMEOUT_SECONDS
public static final int PORT
public static final java.lang.String QUERY
public static final java.lang.String DATA
public static final java.lang.String ERROR
public static final java.lang.String INFO
public RunwayHTTP(PApplet parent)
parent
- - the parent PApplet (usually this)
public RunwayHTTP(PApplet parent, java.lang.String host)
parent
- - the parent PApplet (usually this)
host
- - the IPv4 Address where Runway is runningpublic RunwayHTTP(PApplet parent, java.lang.String host, int port)
public void pre()
isAutoUpdating()
public void update()
/errorand
/dataendpoints to retrieve new information from Runway calling
setAutoUpdate(true)(true by default) automatically calls update() before each frame
public boolean isAutoUpdating()
public void setAutoUpdate(boolean autoUpdate)
autoUpdate
- the value to setpublic void query(PImage input)
public void query(PImage input, java.lang.String format, java.lang.String key)
Processing Library RunwayML by George Profenza. (c) 2019