Releases: AbstractPlay/renderer
Abstract Play Renderer
[1.0.0-beta] - 2023-04-30
Initial beta release.
Abstract Play Renderer
[0.8.0] - 2021-12-27
Added
- Column labels are now infinite and fully customizable using the
columnLabelsrenderer option. Just pass a string of characters. - Added
buttonBarto theareasproperty. This lets you create a vertical bank of buttons for use by the click handler. Button text can be arbitrarily styled. Example added to the playground. - Added the
keyfeature back, but it is now in theareasproperty and can only be arranged vertically and placed on the left or right. Other orientations may be added in the future. Example added to the playground.
Changed
- The
staticproperty has been added to theejectannotation if you don't want each consecutive notation to be wider and wider.
Abstract Play Renderer
Breaking Change
- Yet another breaking change. Found an issue where nested glyphs (symbols within symbols) couldn't be reused because of how the IDs got duplicated. So I completely refactored the glyph loading code. This has vastly simplified the
<defs>section. It now only contains the glyphs defined in the legend. It means that glyphs in the sheets may not have hard-coded IDs. Let the renderer auto-assign them. More documentation on this is forthcoming.
Added
- Documented the API. This involved adding full TSDoc comments and using TypeDoc to generate the HTML. Also included an API description from Microsoft's API Extractor. The JSON schema is still documented manually. See the
/docsfolder. - A new playground/demo site is now available at https://abstractplay.com/renderer/.
- Added
tileSpacingproperty that, when combined withtileWidthandtileHeight, will break the tiles apart and space them from each other. Only works forsquares*andvertex*boards. - Added a
glyphmap: [string,string][]option to the renderer (where[string,string]is the old glyph name mapped to a new glyph name). This lets the user swap any glyph for another. Say they prefer the square pieces to the default round ones. The front end could let them mappiecetopiece-square. - Added glyphs for Alfred's Wyke.
Abstract Play Renderer
[0.6.0] - 2021-12-15
Breaking Change
- The renderer now works correctly in both Chrome and Firefox. The glyph sheets have now all been converted to
symbols instead of basicgroups. This has vastly simplified the layout code, though it required extensive code changes. Further testing is planned on other browsers.
Added
-
Added a new
glyphmarker for incorporating glyphs defined in thelegendinto the board itself. Only works in thedefaultandstacking-offsetrenderers. This marker applies no extra padding around the glyph like it does for pieces. That would have to be added in the legend. -
Added a new
textproperty to glyph definitions. This allows you to create arbitrary text glyphs using all the standard colour and layout options. It is mutually exclusive with thenameproperty. Because not all implementations of JSON schema handle this sort of validation equally, validation is not handled at that level. Ifnameis present, it will override thetextproperty. If neither are present, a runtime error is thrown. -
Added a new
bufferproperty to theboardschema to create adjustable buffer zones on given edges of the board. The intent is that these would be used by the click handlers to do things like bear pieces off the board or other such interactions. Only works forsquare*,vertex*, andgoboards. If a click handler is attached, they will all return the coordinates-1, -1and the label_buffer_[DIR], eitherN,E,S, orW. Rotates correctly.Note: To avoid the buffer click handlers from interfering with the generic click handler on
vertexboards, if a buffer is present at all (regardless of whether it is shown), the generic handler ignores clicks outside of the board's outer edge. This reduces the sensitivity of clicks along the edge, but it's still quite functional.
Removed
- Removed the
keyfeature for now. It is a decidedly nontrivial task to generalize this in a way that works cross-browser. Its only use so far has been for Volcano, and that is now obviated by the click handler. This is something I may revisit.
Abstract Play Renderer
[0.5.0] - 2021-12-10
Added
- You can now render individual glyphs using all user settings by setting
boardtonull. See the docs for details. - Added
playeras a colour option in annotations. - The pieces fit too snugly in the
hex-of-hexboard style. A 15% reduction has been baked in. - Added a
fencemarker for drawing thick lines between cells. Only works forsquares*board styles. - Added a
dotsannotation so you can add dots on top of pieces as well as just on the board itself. - Added a
squares-beveledstyle that simply draws very faint gridlines, for use with fences. Will make this nicer later. - Added a
stackOffsetproperty to the schema for manual adjustment of stack offsets in thestacking-offsetrenderer. - Changed
annotationsto allow an empty list. There's really no reason to disallow it, other than to minimize JSON size. Still a good practice to cull it from the output if there aren't any. - Added
boardHovercallback that triggers onmousemove. It is only applied tostacking-expandingboards and is intended to trigger the cell expansion feature. - Attached
boardClickhandler to pieces inlocalStashareas and the Homeworlds global stash. It returns coordinates of-1,-1and the name of the piece. - Adjusted
stacking-expandingrenderer to allow for theboardandpiecesattributes to benullto render just anexpandedColumnarea. This is an attempt and improving performance ofstacking-expandinggames in live use. - Added
house,palace, andtowerglyphs to thecoresheet for Urbino. Also added a dragon glyph that ended up not being used, but there it is.
Fixed
- Fixed
renderStatic()to work properly now under SVG.js 3.x and respect the size and id options. - Fixed bug in
entropyrenderer that caused only the first character of pieces to be recognized. - Fixed
renderglyph(). - Boards now finally rotate properly.
- Homeworlds rotation has always worked and supports rotating in increments of 90 degrees, allowing players to see the board from their own perspective.
- For the default renderer, rotation by 180 degrees is all that will ever be supported.
- Rotation is disabled for the
stacking-expandingrenderer. - For the default renderer, all board styles are now fully supported, including click handlers, annotations, and markers.
- The
stacking-offsetrenderer also appears to work correctly.
Abstract Play Renderer
[0.4.0] - 2021-11-17
Added
Boards
- Entropy board added as a special renderer. I want to minimize the number of special renderers, but there may end up being a few.
- Added basic hex maps. Right now the labels are designed for pointy-topped grids. As more games get added, some convenience options will be added to the schema and implementation adjusted.
- Added click handlers to the rest of the boards.
- Added better board rotation (180 degrees only) to all except the
stackingExpandingrenderer.
Schema
stacking-expandingrenderer added. It's the same as the default renderer but supports displaying an expanded column of pieces in a stack alongside the board.- Added an
svgidoption to the main option set, letting you assign anidto the containingsvgelement. By default it is_aprender. - Added a
showAnnotationsoption to the main options set. Whenfalse, last-move indicators will be hidden. - Added a
keyattribute that you can use to give players a key to the colours and pieces on the board. This is sometimes necessary if there are a lot of colours on the board and you want to make move entry simpler. Or if you want to indicate which player owns which colour. This is still in development. See "Known Issues" section. - Added an
ejectannotation meant to show consequential movement (like eruptions in Volcano). - Added
localStashareas for rendering things liked captured pyramid pieces in Volcano. - Added
markersattribute to schema for adding three things:- small circles at given points
- shaded polygons directly on the board (showing ownership, perhaps)
- highlighted board edges (showing goals or ownership)
Glyphs
- Added
flattenedversions of the Looney pyramids. They all share a baseline instead of a centre. - Added glyphs for Accasta. The horse is "wrong," but it's the closest I could get for now. Will adjust later.
Changed
- Breaking Change:
boardClickhandler now moved into the options object for consistency. All that's changing is how you pass it to the library. It should only require a single change to client code, but let me know if the impact is much larger. areadefinitions changed to include atypefield to simplify coding.
Known Issues
- The key still needs positioning code tweaked for top and bottom, and for some reason I cannot move the glyph within each entry. I can move the text, but not the glyph. That will need to be sorted before a new release.
- The key also needs to be built and placed for all renderers. Right now it's only rendered by the
stacking-expandingrenderer.
Abstract Play Renderer
[0.3.0] - 2021-10-21
Added
- Homeworlds renderer added, including proper rotation of the board.
- You can now adjust the height and width of the generated image within the container.
- Public API documented.
boardClickcallback now available.
Abstract Play Renderer
[0.2.1] - 2021-10-17
Added
tileWidthandtileHeightare now supported. This lets you draw thicker lines at intervals, simulating tiles.
Fixed
- Rotation now works properly.
Abstract Play Renderer
[0.2.0] - 2021-10-05
Added
- Most boards are now implemented:
squares: Grid of squares with no checkered pattern.squares-checkered: Grid of squares with checkered pattern.vertex: Grid where the pieces are placed at the intersections instead of the squares themselves.vertex-cross: Same asvertexbut with lines showing diagonal movement.go: A standard Go board.hex-of-hex/tri/cir: A hexagonal field composed of either hexes, triangles, or circles.snubsquare: A unique topography where most cells have 4 or 5 connections.
- The lines making up the boards can now have their opacity, colour, and weight adjusted.
- Basic stacking renderers are now implemented.
- Composite pieces are now supported, including colouring, rotating, scaling, and nudging.
- The glyph library has been significantly expanded, including Piecepack icons, Looney pyramids, dice, and modern chess fonts.
Changed
- Annotations have changed. There are three now supported:
move: Draws lines between the selected cells.enter&exit: Both currently do the same thing. Different options will be added later.
Known Issues
- Rotation of pieces can sometimes cause bizarre misalignments. This is mostly a problem for Looney pyramid glyphs. Rotation in increments of 90 degrees works fine most of the time.
Abstract Play Renderer
First minimally viable release of the rendering engine! Playground will appear eventually.
(Rereleased after fixing build errors.)