This extension allows users to assign personality attributes to a glTF node appended to a file. The attributes include agent
, spellName
, endpoint
, personality
and defaultMessage
. Currently this extension is only compatible with MagickML but will be adjusted to be interoperable with others as more options are available.
Usage:
npm install
node script.js someobject.glb tubby '#agent is cheery and says nya nya a lot' https://localendpoint:8001 'nya nya!'
SXP_personality
Node extension
agent
(string) - The name of the agent assigned to the node.personality
(string) - Typically a long prompt describing the character and their backstory.endpoint
(string) - The endpoint URL for the node.defaultMessage
(string) - The default message for the node.
The following JSON schema defines the extension properties:
{
"definitions": {
"SXP_personality": {
"type": "object",
"properties": {
"agent": { "type": "string" },
"personality": { "type": "string" },
"endpoint": { "type": "string" },
"defaultMessage": { "type": "string" }
}
}
},
"type": "object",
"properties": {
"extensions": {
"type": "object",
"properties": {
"SXP_personality": { "$ref": "#/definitions/SXP_personality" }
}
}
}
}
Here is an example of how the extension can be used in a glTF file:
{
"nodes": [
{
"name": "TubbyPet",
"extensions": {
"SXP_personality": {
"agent": "tubby",
"personality": "#agent is cheery.",
"endpoint": "https://localendpoint:8001",
"defaultMessage": "nya nya!"
}
}
}
],
"extensionsUsed": [ "SXP_personality" ]
}