124 lines
4 KiB
Lua
124 lines
4 KiB
Lua
|
|
local util = require('util')
|
||
|
|
|
||
|
|
app.on('init', function()
|
||
|
|
end)
|
||
|
|
|
||
|
|
app.on('scan_experience', function(exp)
|
||
|
|
end)
|
||
|
|
|
||
|
|
app.on('scan_experience_file', function(exp)
|
||
|
|
end)
|
||
|
|
|
||
|
|
app.on('set', function(k,v)
|
||
|
|
end)
|
||
|
|
|
||
|
|
app.on('scheduler', function(opts)
|
||
|
|
-- if opts.interval == app.opts.plugin_archive_when then
|
||
|
|
--
|
||
|
|
-- end
|
||
|
|
end)
|
||
|
|
|
||
|
|
local sync_URL = app.opts_plugin_openbrush_sync_URL or ''
|
||
|
|
|
||
|
|
-- this registers the plugin UI
|
||
|
|
local plugin = {
|
||
|
|
name = "OpenBrush",
|
||
|
|
infowide = true,
|
||
|
|
info = [[
|
||
|
|
<img src="img/openbrush.png" style="width:50%; max-width:233px; display:inline-block; float:left; margin-right:20px;"/>
|
||
|
|
<a href="https://openbrush.app/" target="_blank">OpenBrush</a> lets you paint in 3D space with virtual reality.<br>
|
||
|
|
XRForge's webviewer (<a href="https://github.com/jbaicoianu/janusweb">JanusWeb</a>) supports interconnecting OpenBrush projects via 3D portals.<br/>
|
||
|
|
OpenBrush projects are stored in a (selfhosted) <a href="https://icosa.gallery" target="_blank">icosa.gallery</a> instance, which can be configured below.
|
||
|
|
]],
|
||
|
|
opts = {
|
||
|
|
{
|
||
|
|
key='app.opts.plugin_openbrush_sync_when',
|
||
|
|
title='When to sync',
|
||
|
|
info='when to check for new experiences?',
|
||
|
|
default = "hourly",
|
||
|
|
values={disabled="disabled", daily="daily", hourly="hourly"}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
key='app.opts.plugin_openbrush_sync_folder_thumbnail',
|
||
|
|
title='Sync to folder',
|
||
|
|
info='openbrush (icosa.gallery) assets will be saved here',
|
||
|
|
placeholder = "openbrush",
|
||
|
|
default = "openbrush",
|
||
|
|
values=''
|
||
|
|
},
|
||
|
|
{
|
||
|
|
key='app.opts.plugin_openbrush_sync_folder',
|
||
|
|
title='Thumbnail',
|
||
|
|
info='URL of Thumbnail for folder/portal',
|
||
|
|
placeholder = "img/openbrush.png",
|
||
|
|
default = "img/openbrush.png",
|
||
|
|
values=''
|
||
|
|
},
|
||
|
|
{
|
||
|
|
key='app.opts.plugin_openbrush_sync_URL',
|
||
|
|
title='Icosa gallery URL',
|
||
|
|
info='public/selfhosted <a href="https://github.com/icosa-foundation/icosa-gallery target="_blank">icosa.gallery</a> server-instance',
|
||
|
|
placeholder = "https://icosa.gallery",
|
||
|
|
default = "https://icosa.gallery",
|
||
|
|
values=''
|
||
|
|
},
|
||
|
|
{
|
||
|
|
key='app.opts.plugin_openbrush_sync_category',
|
||
|
|
title='category',
|
||
|
|
info=( sync_URL and 'space-separated, leave empty or see <a href="https://api.' .. sync_URL .. '/v1/docs#/Assets/icosa_api_assets_get_assets">API docs</a>' or ''),
|
||
|
|
placeholder = "ART",
|
||
|
|
default = "",
|
||
|
|
values=''
|
||
|
|
},
|
||
|
|
{
|
||
|
|
key='app.opts.plugin_openbrush_sync_keywords',
|
||
|
|
title='keywords',
|
||
|
|
info=( sync_URL and 'space-separated, leave empty or see <a href="https://api.' .. sync_URL .. '/v1/docs#/Assets/icosa_api_assets_get_assets">API docs</a>' or ''),
|
||
|
|
placeholder = "xrforge",
|
||
|
|
default = "",
|
||
|
|
values=''
|
||
|
|
},
|
||
|
|
{
|
||
|
|
key='app.opts.plugin_openbrush_sync_tag',
|
||
|
|
title='tags',
|
||
|
|
info=( sync_URL and 'space-separated, leave empty or see <a href="https://api.' .. sync_URL .. '/v1/docs#/Assets/icosa_api_assets_get_assets">API docs</a>' or ''),
|
||
|
|
placeholder = "xrforge",
|
||
|
|
default = "",
|
||
|
|
values=''
|
||
|
|
},
|
||
|
|
{
|
||
|
|
key='app.opts.plugin_openbrush_sync_triangle_max',
|
||
|
|
title='Polygons maximum',
|
||
|
|
info=( sync_URL and 'performance-cap, leave empty or see <a href="https://api.' .. sync_URL .. '/v1/docs#/Assets/icosa_api_assets_get_assets">API docs</a>' or ''),
|
||
|
|
placeholder = "10000",
|
||
|
|
default = "",
|
||
|
|
values=''
|
||
|
|
},
|
||
|
|
{
|
||
|
|
key='app.opts.plugin_openbrush_sync_author',
|
||
|
|
title='Author name',
|
||
|
|
info='filter assets on specific Author name',
|
||
|
|
placeholder='sarah',
|
||
|
|
default = "",
|
||
|
|
values=""
|
||
|
|
},
|
||
|
|
{
|
||
|
|
key='app.opts.plugin_openbrush_sync_authorid',
|
||
|
|
title='Author id',
|
||
|
|
info='filter assets on specific Author id',
|
||
|
|
placeholder='9e8b98fbe',
|
||
|
|
default = "",
|
||
|
|
values=""
|
||
|
|
},
|
||
|
|
{
|
||
|
|
key='app.opts.plugin_openbrush_sync_collection',
|
||
|
|
title='Collection required',
|
||
|
|
info='should assets be part of a collection?',
|
||
|
|
default = "enabled",
|
||
|
|
values={enabled="enabled", disabled="disabled"}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
return plugin
|