Solar2D Simulator
you have published .psd files in step 1. The images are the code for Solar2D are available in the output folder. Here you will load it to Solar2D simulator. You may build an app for iOS, Android, Desktop(mac or win).
Navigation
Open Simulator
Open main.lua in the output folder - Solar2D project
Simulator > Window > View As
- kwik editor
There is an option to open the simualtor in Publish command in Kwik UXP plugin when publish is completed.
TODO UXP::Publish to include swipe page or A/D keys for navigation ⭐️
kwiconfig.lua
debug = {enable = true, navigation= "swipe/keys"}
Auto open after publish in Kwik UXP plugin
from publishing pages
- book & page view
click page name to change the page view
from publishing the active document
- compnent view
Use up/down or right/left keys to go previous/next page
how to change page transition effect by editing a lua code in vs code
Kwik Visual Code Editor
Linear Animation
Button
Action
Product build
disiable the editor or only enable the editor simulator
if ( system.getInfo( "environment" ) == "simulator" ) then print( "You're in the Solar2D Simulator." ) end
main.lua
if os.getenv("LOCAL_LUA_DEBUGGER_VSCODE") == "1" then
local lldebugger = loadfile(os.getenv("LOCAL_LUA_DEBUGGER_FILEPATH"))()
lldebugger.start()
end
inspect = require("extlib.inspect")
local common = {
commands = {"myEvent"},
components = {
-- "align",
"myComponent",
"thumbnailNavigation",
"index" -- this loads editor!
}
}
Solar2D/components/common/index.lua
local editor = require("editor.index")
--
function _M:init(UI)
editor:init(UI)
end
--
function _M:create(UI)
editor:create(UI)
end
--
function _M:didShow(UI)
editor:didShow(UI)
end
--
function _M:didHide(UI)
editor:didHide(UI)
end
--
function _M:destroy(UI)
editor:destroy(UI)
end
--
return _M