The target to render things to.
How wide should the initial target be?
How tall should the initial target be?
The elm that pixelmanipulator will fill the screen with upon initialization,
and what elements should return to when they are "dead". Default value is
0, an element with the color #000F
If you update this, be sure to update defaultRenderAs in renderer
Readonly
elementsA low-level listing of the availiable elements.
Format is much like the argument to addMultipleElements, but is not sanitized.
A List of Uint32Arrays each the length of width times height of the canvas. Frame 0 is the new frame, frame one is the prior, etc. Each item holds the element id of each element on screen, from left to right, top to bottom.
This is the number that indicates what animation frame the iterate function is being called with.
You can use this to mannually stop the iterations like so:
cancelAnimationFrame(this.loopint)
(not reccommended)
A string indicating weather it is currently animating or not.
It is "playing"
if it is currently animating, or "paused"
if not
currently animating.
This has been around since early version 0, and once was the
innerText
value of a pause/play button!
A mapping from old names for elements to new names for elements.
Allows a user to modify the name of an element at runtime.
Called after iterate does its work.
Gets called after a call to modifyElement. The ID is passed as the only argument.
The element that was modified.
Number of pixels per element in the last frame
An instanace of the object that shows the state to the user.
Static
Private
Readonly
_mooreStatic
Private
Readonly
_wolframThe details about the element.
Adds multiple elements.
Index is the element name, value is the element data (and does not require the name). Value is passed to addElement
The old name
The new name
Adds the name to nameAliases, and ensures no alias loops are present.
The state that the bitfied says this pixel should be in the next frame.
The Area to search within
A bitfield of what states a pixel should live or die on.
The element to search for
fundamentalNewState for higher-level tool
number as a bitfied array, in order of the items in area, from left to right.
That means that (fundamentalStatesWithin([loc], search) & 1) === boolToNumber(confirmElm(loc, search))
You may want to see this page for more details on how this might be used.
Locations to look at.
Locations to mark as a true bit.
The element from elements, respecting aliases in nameAliases, or undefined if not found.
Name of the (possibly aliased) element.
A single frame of animation. Media functions pass this into requestAnimationFrame.
Be careful! Calling this while mode is
"playing"
might cause two concurrent calls to this function. If any of your automata have "hidden state" - that is they don't represent every detail about themselves as data within the pixels - it might cause conflicts.
How to identify what element to modify.
Values to apply to the pre-existing element.
Automatically calls aliasElements if
name is present in data
Start iterations on all of the elements on the canvas.
Sets mode to "playing"
, and requests a new animation
frame, saving it in loopint.
Optional
canvasSizes: CanvasSizesReset, resize and initialize the canvas(es). Calls pause then update. Resets all internal state, excluding the element definitions.
Optional
canvasSizes: CanvasSizesAllows one to change the size of the canvases during the reset.
Applies any changes made with renderPixel on renderer to the canvas
fundamentalStatesWithin for lower-level tool
Number used as bit area to indicate occupied cells
Counter tool used in slower wolfram algorithim.
Replaced with wolframNearby for use in faster algorithms
Number of elements in wolfram radius
"Current" pixel location
element to look for
fundamentalNewState for more general tool.
The state that the bitfied says this pixel should be in the next frame.
Generated using TypeDoc
A cellular automata engine