mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 03:29:44 -06:00
Rename single color image function
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
local assetHelper = asset.require('util/asset_helper')
|
||||
|
||||
local singeColorTexturePath = openspace.createPixelImage("example_ring_color", {0.0, 1.0, 1.0})
|
||||
local color = {0.0, 1.0, 1.0}
|
||||
|
||||
-- @TODO (emmbr 2020-02-03) Potential threading issue later on? This will run on the main thread
|
||||
local singeColorTexturePath = openspace.createSingeColorImage("example_ring_color", color)
|
||||
|
||||
local BasicDisc = {
|
||||
Identifier = "BasicDisc",
|
||||
@@ -17,6 +20,6 @@ local BasicDisc = {
|
||||
}
|
||||
}
|
||||
|
||||
assetHelper.registerSceneGraphNodesAndExport(asset, {
|
||||
assetHelper.registerSceneGraphNodesAndExport(asset, {
|
||||
BasicDisc
|
||||
})
|
||||
|
||||
@@ -1540,8 +1540,8 @@ scripting::LuaLibrary OpenSpaceEngine::luaLibrary() {
|
||||
"Removes a tag (second argument) from a scene graph node (first argument)"
|
||||
},
|
||||
{
|
||||
"createPixelImage",
|
||||
&luascriptfunctions::createPixelImage,
|
||||
"createSingeColorImage",
|
||||
&luascriptfunctions::createSingeColorImage,
|
||||
{},
|
||||
"string, vec3",
|
||||
"Creates a 1 pixel image with a certain color in the cache folder and "
|
||||
|
||||
@@ -294,11 +294,11 @@ int downloadFile(lua_State* L) {
|
||||
|
||||
/**
|
||||
* \ingroup LuaScripts
|
||||
* createPixelImage():
|
||||
* Creates a one pixel image with a given color and returns the p
|
||||
* createSingeColorImage():
|
||||
* Creates a one pixel image with a given color and returns the path to the cached file
|
||||
*/
|
||||
int createPixelImage(lua_State* L) {
|
||||
ghoul::lua::checkArgumentsAndThrow(L, 2, "lua::createPixelImage");
|
||||
int createSingeColorImage(lua_State* L) {
|
||||
ghoul::lua::checkArgumentsAndThrow(L, 2, "lua::createSingeColorImage");
|
||||
|
||||
const std::string& name = ghoul::lua::value<std::string>(L, 1);
|
||||
const ghoul::Dictionary& d = ghoul::lua::value<ghoul::Dictionary>(L, 2);
|
||||
|
||||
Reference in New Issue
Block a user