Repository navigation
New Demos
- Normal Maps - Balls and bevelled tiles that catch a light following the mouse, with a sun on Space and the wheel raising the light
- Decals - Paint trails and splats drawn into a canvas layer on the GPU, click to splat
New Changes
- 2D normal maps: give an object a
normalMapand turn onlightSystem.normalMaps, and every light shades it from itsheightabove the scene, the sun too; turned, mirrored and animated sprites shade as they should - Draw into a
CanvasLayerin world space withdrawRectanddrawTile, for decals, paint or fog of war with no tile grid, andscroll(offset)moves the layer through the world while what is drawn stays put - Tile layers draw themselves: a new layer draws on its first render with no
redraw()needed, and a cell changed withsetDatashows on the next render textureInfo.updateDatauploads only part of a texture, for a texture the game changes every framecameraShake(amount, direction)can shake along one axis,vec2(0, 1)for a heavy landingFirstPersonCamera3Dworks on a gamepad and the touch gamepad: left stick moves, right stick looksrandPick(items)andrandWeighted(items, weights)pick from an array or aSet, with seeded versions onRandomGeneratorsetMouseScreenTransformmakes clicks land on a curved screen, withpostProcessCurveMouseforpostProcessCurvetouchGamepadButtonPos(button)says where a touch gamepad button is, to draw an icon in itsoundPauseWhenBlurredpauses sound while the window has no focus- A 3D
Shadercan set its own depth withviewProjection - Much more precise TypeScript types: particle effects, the 3D level format and Tiled maps are typed, from 203
anydown to 86
Breaking Changes
setDataandclearDatawith noredrawargument now draw the cell on the next render; a game that paints its own cells over the tiles passesfalse- A turned or mirrored
TileLayer'sdrawRectanddrawTilenow land where they show in the world
Fixes
tileInfo.frame, and soSpriteAnimation, carries on to the next row of the sheet instead of asserting- The touch gamepad keeps working when the browser refuses its pointer capture, and a camera with
lockPointerno longer locks on a phone engineStepunder atimeScaleother than 1 runs the right number of updates from its first frame
Check out the latest on GitHub to see everything we've been working on!
