VaelisDocs
v1.0.0
API reference · v1.0.0

Runtime modules

Vaelis 1.0.0 global scripting and runtime module reference.

View as Markdownllms.txt
Need to know what must exist first?Use the API requirements & complete usage map to see prerequisites for every global and component API.

#Global runtime API

Module/functionSummary
findFirst(name)Find the first entity by name.
findAll(name)Find all entities by name.
findById(id)Find one exact entity by stable ID.
findWithTag(tag)Find all entities with a tag.
findInRadius(x,y,radius,opts)Find nearby entities, nearest first.
sceneScene lookup, loading, restart, pause/resume and lighting.
physicsRaycasts and collision-layer masks.
navPathfinding, walkability and navigation area utilities.
inputKeyboard held/pressed state.
mouseCursor position, button state and shape-accurate hit tests.
touchMultitouch state plus swipe/pinch gestures.
timeFrame delta and elapsed game time.
randomRandom integers/floats.
mathxGameplay math helpers.
globalTransient cross-script state.
savePersistent per-slot IndexedDB state.
debugOn-screen debugging HUD/logging.
spawn()Clone authored entities at runtime.
wait()/repeat()Entity-owned timers.
sendMessage()Targeted or tag-group messaging.
broadcastMessage()Scene-wide message broadcast.

#Fixed update

onFixedUpdate(dt) is driven at a fixed 60 Hz accumulator. Keep physics-step decisions here when deterministic cadence matters; use onUpdate(dt) for per-render-frame behavior.

#Coordinate spaces

Entity positions, mouse world coordinates, touch world coordinates and raycast points share the game world’s 2D coordinate space. Screen coordinates (screenX/screenY) are raw canvas pixels. Camera reference resolutions are separate from world units.