plec
: Starts the plecplec (file)
: Starts the repl with the specified script(.plec)plec -lstd
: Starts the repl with the specified preloaded lib(require), in this case lib.stdplec -l lib/std.lua
: Starts the repl with the specified not-preloaded lib(import), in this case ./lib/std.luaplec -gl43
: Sets openGL version to specified version, in this example 4.3. Avaliable: 11, 21, 33, 43 and es2 (default is OpenGL2.1)
require modname
: require a preloaded lib named modnameimport filepath
: load via dofile pointed by filepath
lib.core
: core are the essential to get a working console session, it is automatically loaded into plec from main.lua, only need to worry about loading it if running a custom/modified pleclib.std
: standard is a extension of core, mostly composed by utilslib.time
: creates session.data.time and automaticly set a timepass worker on top of otherslib.worker
: allow workers to be modified from inside a plec script or repllib.raylib
: includes raylib, an awesome game-development lib
session.temp.exit
: responsible for exiting repl or keep in loopsession.temp.keep
: prevent the session.temp begin cleared, auto-disablesession.temp.break
: cancel current list processingsession.temp.skip
: prevent next command from running
session.data.preload
: prevent the preload from automaticaly runsession.data.setup
: prevent the setup from automaticaly run
run scriptname
: run the filename scriptset name anything
: set a variable inside plec's session, you can also use this to set referencesunset var-name
: unset a variabledef lua-code-here
: create a command from inside plecundef cmd-name
: delete a cmd from dataautodef lua-code-here
: create a command from inside plec and automaticly load itload
: load a existing cmd to session.unload
: unload a loaded cmd from session.> lua-code
: solve a lua code
=
: turn varname = any1 into set varname any1=>
: turn functioname => any1 into def functioname any1unref
: turn @any into its setted value, or replace by '' if no value setunwrapcmd
: turn ([any]) into session:run('any') resultspacendclean
: remove all spaces on start and end of commandtimepass
: increments session.timesigfault
: verify if the asked command is avaliable
help
: list all existing commandslhelp
: list all loaded commandsclear
: clear terminalpause
: send the user to api.run()echo string
: print text and return it--- string
: return comment$ cmd
: direct access to OS terminalexit
: quit, but complete the current loopterminate
: force quit, terminate the process
worker.add id position newid
: workeradd a loaded worker, only id is obligatoryworker.rm index/id
: remove worker at index or by its idworker.help
: list all workeradded workersworker.lhelp
: list all loaded workers
compile luajitpath Ccompiler -V -Cgcc -I/include/folder/ -L/library/folder
: compile command, it runs automaticaly if you do not disable setup, -V activate vitrinecpreload
: manual preload in case you want more control over the compilationcsetup
: manual setup in case you want more control over the compilationsession.data.compile.vitrine
: demonstration mode, this copy the examples in the compilationsession.data.compile.ccompiler
: allow you to set a C compilersession.data.compile.lib
: allow you to set a the lib path to your librariessession.data.compile.include
: allow you to set a the include path to your headers
new.window width length
: create a new windows on size width:lengthclose
: terminate current windownew.scene type
: create a new scene, type can be 2d or 3dnew.cube px py pz sx sy sz color
: create a new cube of size {x=sx,y=sy,z=sz} in position {x=px,y=py,z=pz} in color colornew.text
: creates a new text in current scenecolor.text
: sets default text colorcolor.background
: sets default background colorfontsize
: sets default font sizeconsolemode
: enters console modeset.flag flag
: sets a renderer flag flag, must be used only before creating window. Avaliable: FLAG_VSYNC_HINT, FLAG_FULLSCREEN_MODE, FLAG_WINDOW_RESIZABLE, FLAG_WINDOW_UNDECORATED, FLAG_WINDOW_HIDDEN, FLAG_WINDOW_MINIMIZED, FLAG_WINDOW_MAXIMIZED, FLAG_WINDOW_UNFOCUSED, FLAG_WINDOW_TOPMOST, FLAG_WINDOW_ALWAYS_RUN, FLAG_WINDOW_TRANSPARENT, FLAG_WINDOW_HIGHDPI, FLAG_WINDOW_MOUSE_PASSTHROUGH, FLAG_BORDERLESS_WINDOWED_MODE, FLAG_MSAA_4X_HINT, FLAG_INTERLACED_HINTset.scene x
: set main scene to scene of index x
startdraw
: Begins drawing the frame. Call this before any drawing operation.start3d
: Begins 3D mode with the camera associated with the current scene.clearbg
: Clears the background with the color defined in the current scene.end3d
: Ends 3D mode and returns to 2D mode.drawtxt
: Draws all the texts defined in the current scene using the properties specified for each text.drawcube
: Draws all the cubes defined in the current scene using the properties specified for each cube.enddraw
: Ends drawing and swaps buffers, displaying the rendered frame on the screen.
@variable
: is replaced by the variable valuewl!wl2!wl3
: this set the current command to run on wl wl2 wl3 pipelines([command])
: run command on plec layer;
: separate commands, finish the command and start a new one
- remember that plec will ALWAYS start from its folder, no matter what you do, no matter where you are it will always start in the plec executable folder