Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Standard Library Map

The standard library is written in J3 and ships inside j3c. This page is a map; for names and signatures, run j3c doc <module>.

Core

ModuleWhat it’s for
j3.ioPrinting and files
j3.sysProcess and OS: arguments, environment, panic, which OS (PLATFORM == PLATFORM_WINDOWS, PLATFORM_NAME; which CPU: ARCH == ARCH_AARCH64, ARCH_NAME)
j3.mathf32 math, Vec2, Vec3, Quat, Mat4
j3.randSeedable random numbers
j3.memoryArena, List<T>, the scratch arena
j3.textBuilding and editing text
j3.option, j3.resultOption<T> and Result<T, E>
j3.threadThreads, pools, queues, mutexes
j3.buildDEV / RELEASE constants
j3.procRun other programs

Games

ModuleWhat it’s for
j3.appGame runner: startup, update and draw stages, fixed time step
j3.gameWindow, input, 2D drawing, text, audio
j3.game.inputNamed actions bound to keys and pad buttons
j3.game.displayVideo settings: window mode, resolution, vsync
j3.game.ecsEntities, components, commands, events
j3.game.physics2D bodies, and 3D bodies on voxels
j3.game.collideAABB and circle tests, tile-grid sliding
j3.game.spaceGrid for broadphase queries
j3.game.pathA* on a grid
j3.game.animSprite clips and transform tracks
j3.game.fxTimers, tweens, particle bursts
j3.game.tileTile maps

Graphics

ModuleWhat it’s for
j3.gfxOpenGL 3.3 forward renderer: meshes, lights, shadows
j3.gfx.paintBatched 2D painter: shapes, text, clip, transforms
j3.gfx.canvasDraw RGBA images in memory, no window; save PNGs
j3.gfx.mesh, j3.gfx.meshgenMesh files and meshes built in code
j3.gfx.voxelVoxel grids
j3.gfx.noiseTileable noise for textures
j3.gfx.urp.*Optional ray-traced reflections, glass, and shadows
j3.scene3dScenes from the editor: load, script, draw
j3.scene3d.fpwalkFirst-person controller

UI

ModuleWhat it’s for
j3.ui.j3ui components: markup, CSS, events (j3c doc j3ui, j3c doc css; supported HTML/CSS overview: j3ui Feature Support)
j3.i18nTranslated text with plurals

Data and network

ModuleWhat it’s for
j3.data.saveSimple key/value save files
j3.data.assetsLoad-once asset cache
j3.data.jsonJSON parse and write
j3.j2j2 mod scripts the game loads at runtime (see Mods with j2)
j3.netNon-blocking UDP
j3.net.tcp, j3.net.dnsTCP connections and name lookup
j3.net.http, j3.net.tlsHTTP/1.1 and HTTPS clients
j3.steam, j3.steam.game, j3.steam.uiSteamworks: achievements, cloud, Deck, lobbies; no-op without Steam (j3c doc steam)

Networking and processes work on Linux and Android.