HISTORY.markdown @master — view markup · raw · history · blame
populateFromPairshelper method to
NaNbugs in element-factory.
Fixed a bug in
Fixed a bug in
yoob/element-factory.js, which improves upon
sliderPlusTextInputby adding optional increment and decrement buttons, and taking a configuration object as a parameter for construction.
resizeCanvasargument, which defaults to true, but can be set to false to suppress the default behaviour of resizing the canvas to fit the playfield just before each time it is drawn.
In many places where the code was calling
alert()to signify an error, it now throws a new
yoob.Playfield, its Views (
yoob.TextTerminalall take configuration dictionaries as their single argument to
yoob.Cursors are now attached to
yoob.Tapeobjects, and are no longer attached to the PlatfieldViews.
yoob.Cursoralso no longer has a "built-in simple view"; viewing methods for cursors have been added to the PlayfieldViews.
yoob.Cursorno longer supports
yoob.Tapeboth support the "cursored read/write interface".
yoob.Tapeno longer contains "built in canvas view"; these methods have been moved to a new
yoob.Tapehas been given
getSize()methods to allow it to be used as a first-in, first-out stack.
yoob.StackHTMLViewhave been removed.
yoob.Controllernow has a
setResetState()method, which can be called, typically before
clickReset(), to set the state that resetting the controller will reset to.
inited with a
colorToAlphatriple; if it is given, that color will be treated as transparent when creating the coloured bitmaps of the characters.
Tape.foreach()supports a dense traversal, which visits every cell of the tape between the lowest and highest written cells, even if intervening cells have never been written.
yoob/element-factory.js, now takes optional arguments:
fun(a function that will be called when the selection is changed) and
def(a default value which will be initially selected. This will also cause the callback function to be called.)
Several more objects support the standard
initprotocol: caller passes in a configuation object, and the method is chainable (returns the object that was initialized.)
yoob.Tapenow has a
clear()method, and supports default values for cells that have never been written.
yoob.SpriteManagerunderwent significant refactoring. In particular, the x and y values are assumed to always refer to the centre of the sprite. An
intersects()method was added, to help detect collision between two sprites. A
clearSprites()method was also added.
Added a new
yoob.CanvasResizerobject, which attempts to intelligently resize a canvas element to fit in the browser window, with options to preserve maximum size, aspect ratio, etc.
yoob/element-factory.js, a bug was fixed in
makeTextArea, and functions were added for creating SVG elements.
initmethod now takes a configuration object, for consistency, and spells the word
color, if not correctly, then at least consistently.
yoob.Controlleris no longer responsible for showing the editor for the textual source of a program/configuration; that's the new
yoob.SourceManager's job. All that code has been removed from
yoob.Controller, and several backwards-incompatible changes have been made to its API as well. In particular, a subclass or client must supply a
resetmethod now rather than a
loadmethod. Please consuly the source comments in
yoob/controller.jsfor more details.
yoob.SourceManagerare capable of creating their control panels (full of buttons) programmatically.
yoob.PresetManagerno longer takes a
yoob.Controllerto establish a default callback. Instead, a default callback can be configured with the
yoob.PlayfieldHTMLView. Also added
yoob.PlayfieldHTMLView, mostly as compatibility with
yoob.PlayfieldHTMLViewrenders undefined values as
(space) by default now.
Fixed bug in
yoob.Controllerwhere the "Reset" button was not being disabled during source editing.
.size()method to yoob.Stack.
Fixed z-index bugs in yoob.SplashScreen.
yoob.Controllernow supports a 'reset' button. In addition, the 'speed' control defaults to reversed mode (low values = slow.)
yoob.Controllernow has rudimentary support for loading source via XHR (AJAX).
proportionalmode) to return the exact object
falseto force the animation to stop immediately.
yoob.PlayfieldHTMLViewmay now have cursors. The extents of both kinds of Playfield View now include cursors. Cursors may be drawn early or late in
yoob.Controlleris no longer responsible for selecting between provided programs/configurations. It also keeps track of its state (running/paused/stopped/blocked on input) internally.
animationFrame shims improved; animation functions deprecated in favour of the
yoob.TapeHeaddeprecated in favour of
yoob.SpriteManagerhandles both mouse and touch events.
yoob.PlayfieldCanvasViewnow sets up some reasonable default values for cell size and cursors, and
yoob.PlayfieldHTMLViewis less incomplete.
Moved all-display related code from
yoob.Playfieldinto a new class,
yoob.PlayfieldConsoleView; in MVC parlance,
yoob.Playfieldis now a "model", and to actually display it in a browser, you will need a "view".
drawCellmethod instead of the old
drawElementwhich will try to call
drawon the value in the cell, if it has such a method, and will also takes (and will pass) the x and y co-ordinates of the cell in the playfield being drawn.
yoob.TextTerminaland don't call
write(), just call
writeRaw(), if you want a console that doesn't understand terminal control codes.
yoob.TextTerminalto be a facade over a
yoob.Cursor. Thus, you can now read characters from any position in the terminal — however it has lost the ability to overstrike characters. Again, since
yoob.Playfieldis now a "model",
yoob.TextTerminalitself does not concern itself with displaying the terminal (although there is a helper method to create a canvas view.)
yoob.LineInputBuffergenerally improved; it listens to
keyupfor special keys, prevents the default action for them, and has been tested in Firefox, Chrome, and Internet Explorer (recent versions.)
yoob.Tree, and added
substmethods to it.
Added support for
yoob.Playfield, and fixed issue with drawing cursors at wrong offsets.
- made attributes camelCase
- added support for
- added support for default values (