diff --git a/README.md b/README.md index 76e889e..ba60603 100644 --- a/README.md +++ b/README.md @@ -85,69 +85,47 @@ If Charming is properly installed, you should get a _lucky clove_ as below 🎉: ## API Reference -### [Creating Application](#creating-application-1) - -Rendering app into DOM and animate it. - -- [cm.**app**](#cm-app) -- [app.**render**](#app-render) -- [app.**frame**](#app-frame) -- [app.**start**](#app-start) -- [app.**stop**](#app-stop) - -### [Setting Attributes](#setting-attributes-1) - -Controlling the aesthetic appearance of the shapes. - -- [app.**scene**](#app-scene) - Sets the specified css _color_ used for the background of the rendering context of the app and returns this app. -- [app.**background**](#app-background) - Sets the specified color (_ch_, _fg_, _bg_) used for the background of the app in cells and returns this app. -- [app.**stroke**](#app-stroke) - Sets the specified color (_ch_, _fg_, _bg_) for drawing the stroke of shapes and returns this app. -- [app.**noStroke**](#app-nostroke) - Disables drawing the stroke of shapes and returns this app. -- [app.**fill**](#app-fill) - Sets the specified color (_ch_, _fg_, _bg_) for drawing the fill of shapes and returns this app. -- [app.**noFill**](#app-nofill) - Disables drawing the fill of shapes and returns this app. -- [cm.**wide**](#cm-wide) - Marks the _ch_ as a wide character and returns the marked code point of it. - -### [Drawing Shapes](#drawing-shapes-1) - -Adding primitives, vertices, and curves to app. - -- [app.**point**](#app-point) - Draws a single cell at the specified coordinates (x, y) and returns this app. -- [app.**line**](#app-line) - Draws a straight path from the specified coordinates (_x_, _y_) to coordinates (_x1_, _y1_) and returns this app. -- [app.**rect**](#app-rect) - Draws a rectangle at the specified coordinates (_x_, _y_) with specified _width_ and _height_ and returns this app. -- [app.**pixels**](#app-pixels) - Draws pixels specified by the _render_ function at the specified coordinates (_x_, _y_) and returns this app. - -### [Applying Transformations](#applying-transformations-1) - -Transforming shapes. - -- [app.**translate**](#app-translate) -- [app.**scale**](#app-scale) -- [app.**rotate**](#app-rotate) -- [app.**popMatrix**](#app-popMatrix) -- [app.**pushMatrix**](#app-pushMatrix) - -### [Control Flow](#control-flow-1) - -A more declarative programming style. - -- [app.**call**](#app-call) - Calls the specified function on this app with any optional arguments and returns this app. - -### [Instance Properties](#instance-properties-1) - -State of the app. - -- [app.**node**](#app-node) - Returns the canvas used to render the app. -- [app.**cols**](#app-cols) - Returns the number of columns in the terminal. -- [app.**rows**](#app-rows) - Returns the number of rows in the terminal. -- [app.**width**](#app-width) - Returns the computed width of the terminal. -- [app.**height**](#app-height) - Returns the computed height of the terminal. -- [app.**cellWidth**](#app-cellwidth) - Returns the computed width of the cells. -- [app.**cellHeight**](#app-cellheight) - Returns the computed height of the cells. -- [app.**fontSize**](#app-fontsize) - Returns the font size used to render text. -- [app.**fontFamily**](#app-fontfamily) - Returns the font family used to render text. -- [app.**fontWeight**](#app-fontweight) - Returns the font weight used to render text. -- [app.**frameCount**](#app-framecount) - Returns the number of frames that have been displayed since the app started. -- [app.**frameRate**](#app-framerate) - Returns or sets the number of frames to be displayed every seconds. +- [Creating Application](#creating-application-1) + - [cm.**app**](#cm-app) + - [app.**render**](#app-render) + - [app.**frame**](#app-frame) + - [app.**start**](#app-start) + - [app.**stop**](#app-stop) + +- [Setting Attributes](#setting-attributes-1) + - [app.**scene**](#app-scene) - Sets the specified css _color_ used for the background of the rendering context of the app and returns this app. + - [app.**background**](#app-background) - Sets the specified color (_ch_, _fg_, _bg_) used for the background of the app in cells and returns this app. + - [app.**stroke**](#app-stroke) - Sets the specified color (_ch_, _fg_, _bg_) for drawing the stroke of shapes and returns this app. + - [app.**noStroke**](#app-nostroke) - Disables drawing the stroke of shapes and returns this app. + - [app.**fill**](#app-fill) - Sets the specified color (_ch_, _fg_, _bg_) for drawing the fill of shapes and returns this app. + - [app.**noFill**](#app-nofill) - Disables drawing the fill of shapes and returns this app. + - [cm.**wide**](#cm-wide) - Marks the _ch_ as a wide character and returns the marked code point of it. +- [Drawing Shapes](#drawing-shapes-1) + - [app.**point**](#app-point) - Draws a single cell at the specified coordinates (x, y) and returns this app. + - [app.**line**](#app-line) - Draws a straight path from the specified coordinates (_x_, _y_) to coordinates (_x1_, _y1_) and returns this app. + - [app.**rect**](#app-rect) - Draws a rectangle at the specified coordinates (_x_, _y_) with specified _width_ and _height_ and returns this app. + - [app.**pixels**](#app-pixels) - Draws pixels specified by the _render_ function at the specified coordinates (_x_, _y_) and returns this app. +- [Applying Transformations](#applying-transformations-1) + - [app.**translate**](#app-translate) + - [app.**scale**](#app-scale) + - [app.**rotate**](#app-rotate) + - [app.**popMatrix**](#app-popMatrix) + - [app.**pushMatrix**](#app-pushMatrix) +- [Control Flow](#control-flow-1) + - [app.**call**](#app-call) - Calls the specified function on this app with any optional arguments and returns this app. +- [Instance Properties](#instance-properties-1) + - [app.**node**](#app-node) - Returns the canvas used to render the app. + - [app.**cols**](#app-cols) - Returns the number of columns in the terminal. + - [app.**rows**](#app-rows) - Returns the number of rows in the terminal. + - [app.**width**](#app-width) - Returns the computed width of the terminal. + - [app.**height**](#app-height) - Returns the computed height of the terminal. + - [app.**cellWidth**](#app-cellwidth) - Returns the computed width of the cells. + - [app.**cellHeight**](#app-cellheight) - Returns the computed height of the cells. + - [app.**fontSize**](#app-fontsize) - Returns the font size used to render text. + - [app.**fontFamily**](#app-fontfamily) - Returns the font family used to render text. + - [app.**fontWeight**](#app-fontweight) - Returns the font weight used to render text. + - [app.**frameCount**](#app-framecount) - Returns the number of frames that have been displayed since the app started. + - [app.**frameRate**](#app-framerate) - Returns or sets the number of frames to be displayed every seconds. ## Creating Application