The pack
core3d
function core3d(): Pack<Core3dApi>
The 3D core. No options: everything it composes is configured by its defaults, or by naming that pack in the manifest.
Types
Core3dApi
interface Core3dApi
What core-3d puts on the game.
text(text: string | number, x: number, y: number, style?: TextStyle): Text— Text on the HUD, centered on screen pixelsx, yby default:game.text('Score 0', 640, 40, { size: 32 }).readonly background: Background— What is behind everything, behind every mesh: a color, a gradient (a sky), stars, a picture.moveDir(right: number, forward: number): { x: number; z: number }— A move on screen as a direction on the ground, for the camera as it is turned now:rightis toward the screen's right,forwardaway from the camera, each -1..1. Returns world{ x, z }(y is up, so it never climbs). Arrow keys through this move a thing the way the player sees it, whichever way the camera faces:const d = game.moveDir(ax, az); hero.x += d.x * SPEED * dt; hero.z += d.z * SPEED * dt;


