Repository navigation
1.24 - Lens Flares, LDtk and Example Write-ups
New Demos
- 3D Lens Flare - Now with hexagons, and flares on lamps as well as the sun
- Text - What drawText can do: sizes, outlines, alignment, fonts, rows and text placed in pixels
- Physics - The engine's own objects falling, bouncing, sliding and floating, and a sensor
- Random - Random numbers, and a seeded generator that gives the same result every time
New Changes
- Every short example has a write-up in the example browser: what it shows, how its code works, things to try in the editor and where to look next, with links to the docs and to other examples
- Lens flares on lights:
light.addFlare()gives aLight3Da lens flare of its own and returns it,light.flareis the flare, and it goes with the light; aDirectionalLight3Dcan have one too, far away like the sun's - Lens flares in the 3D level editor: a level's Light has a
lensFlareproperty, and the Scene box has a Lens flare checkbox for the sun's, saved in the level's scene block - Lens flares have three more shapes,
hex,streakandstar;flare.shapessays what the ghosts are picked from,glowSizeandghostSizescale its parts, and an element may be a tile of the game's own (tileInfo), turned (angle) and wider than tall - 3D picking is triangle accurate:
render3D.pick,engineObjectsRaycast3Dand clicks in the 3D level editor hit a mesh on its triangles, not the box around it - LDtk levels load:
tileLayersFromLDtk(ldtk, level)makes a level of an LDtk project a Tiled map fortileLayersLoadandobjectLayersLoad, with its tile, auto and IntGrid layers, tiles stacked in a cell, its entities as objects and their fields as properties - A Tiled tileset with a margin or a spacing, a sheet with gaps between its tiles, is read where its tiles are
- The 3D Example has lens flares, on the sun and on each orb
- CHANGELOG.md lists what changed in each release, and the site's root goes to the example browser
Breaking Changes
- ZzFXM, the tracker music plugin, is removed: it was made for the js13k size limit. A game with a song in that format includes ZzFXM itself and hands its samples to a
Sound - 3D picking hits only the faces that are drawn: a mesh seen from inside is no longer hit unless it is
doubleSided LensFlare3D:getSunScreenPosis nowgetScreenPosandisSunHiddenis nowisHidden, since a flare may be a light's;visibleis 0 while the sun is off the screen; a flare pointed at a light is destroyed with it- The repository's
dist/is now the last release, not the latest source: it is committed only for a release, and the site is built from the source
Fixes
- A lens flare that is off the screen, or of a light that is off, no longer looks for what hides it every frame
- 3D level editor: an edit of a level's scene, or its undo, no longer takes away a sun lens flare that an earlier level's scene gave the game
- Shorts: the lander lands upright after a full turn, the maze reaches its top row and works at even sizes, a pocketed cue ball comes back, the 3D Voxels player floats in water, and more that writing them up turned up
Check out the latest on GitHub to see everything we've been working on!
