Remove showAnimation ref page (#3934)
* Remove showAnimation ref page * spurious comma * update SUMMARY
This commit is contained in:
Родитель
60bdd668d7
Коммит
a7bc75bbb2
|
@ -189,7 +189,6 @@
|
|||
* [forever](/reference/basic/forever)
|
||||
* [pause](/reference/basic/pause)
|
||||
* [show arrow](/reference/basic/show-arrow)
|
||||
* [show animation](/reference/basic/show-animation)
|
||||
* [Input](/reference/input)
|
||||
* [on button pressed](/reference/input/on-button-pressed)
|
||||
* [on gesture](/reference/input/on-gesture)
|
||||
|
|
|
@ -27,4 +27,4 @@ basic.showArrow(ArrowNames.North);
|
|||
[showIcon](/reference/basic/show-icon),
|
||||
[showLeds](/reference/basic/show-leds), [showString](/reference/basic/show-string),
|
||||
[clearScreen](/reference/basic/clear-screen), [forever](/reference/basic/forever), [pause](/reference/basic/pause),
|
||||
[showArrow](/reference/basic/show-arrow), [showAnimation](/reference/basic/show-animation)
|
||||
[showArrow](/reference/basic/show-arrow)
|
|
@ -1,34 +0,0 @@
|
|||
# Plot LEDs
|
||||
|
||||
Display an [Image](/reference/images/image) on the @boardname@'s [LED screen](/device/screen).
|
||||
|
||||
```sig
|
||||
basic.showLeds(`
|
||||
. . . . .
|
||||
. # . # .
|
||||
. . # . .
|
||||
# . . . #
|
||||
. # # # .
|
||||
`)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
* leds - a series of LED on/off states that form an image (see steps below)
|
||||
|
||||
## Example: smiley
|
||||
|
||||
```blocks
|
||||
basic.showLeds(`
|
||||
. . . . .
|
||||
. # . # .
|
||||
. . # . .
|
||||
# . . . #
|
||||
. # # # .
|
||||
`)
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
[show animation](/reference/basic/show-animation), [image](/reference/images/image), [show image](/reference/images/show-image), [scroll image](/reference/images/scroll-image)
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
# show Animation
|
||||
|
||||
Show a group of image frames (pictures) one after another on the [LED screen](/device/screen). It pauses the amount of time you tell it after each frame.
|
||||
|
||||
```sig
|
||||
basic.showAnimation(`
|
||||
. . # . . . # # # . . # # # .
|
||||
. # # . . . . . # . . . . # .
|
||||
. . # . . . . # . . . # # # .
|
||||
. . # . . . # . . . . . . # .
|
||||
. . # . . . # # # . . # # # .
|
||||
`)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
* `leds` is a [string](/types/string) that shows which LEDs are on and off, in groups one after another.
|
||||
* `interval` is an optional [number](/types/number). It means the number of milliseconds to pause after each image frame.
|
||||
|
||||
## Example: Animating a group of image frames
|
||||
|
||||
In this animation, each row is 15 spaces wide because
|
||||
there are three frames in the animation, and each frame is
|
||||
five spaces wide, just like the screen on the @boardname@.
|
||||
|
||||
```blocks
|
||||
basic.showAnimation(`
|
||||
. . # . . . # # # . . # # # .
|
||||
. # # . . . . . # . . . . # .
|
||||
. . # . . . . # . . . # # # .
|
||||
. . # . . . # . . . . . . # .
|
||||
. . # . . . # # # . . # # # .
|
||||
`)
|
||||
```
|
||||
|
||||
## ~hint
|
||||
|
||||
If the animation is too fast, make `interval` bigger.
|
||||
|
||||
## ~
|
||||
|
||||
## Example: animating frames with a pause
|
||||
|
||||
This example shows six frames on the screen, pausing 500 milliseconds after each frame.
|
||||
|
||||
In this animation, each row is 30 spaces wide because
|
||||
there are six frames in the animation, and each frame is
|
||||
five spaces wide, just like the screen.
|
||||
|
||||
```blocks
|
||||
basic.showAnimation(`
|
||||
. . . . . # . . . . . . . . . . . . . # . . . . . # . . . .
|
||||
. . # . . . . . . . . . # . . . . . . . . . # . . . . . . .
|
||||
. # . # . . . # . . . # . # . . . # . . . # . # . . . # . .
|
||||
. . # . . . . . . . . . # . . . . . . . . . # . . . . . . .
|
||||
. . . . . . . . . # . . . . . # . . . . . . . . . . . . . #
|
||||
`, 500)
|
||||
```
|
||||
|
||||
## ~hint
|
||||
|
||||
Use [forever](/reference/basic/forever) to show an animation over and over.
|
||||
|
||||
## ~
|
|
@ -19,4 +19,4 @@ led.enable(false)
|
|||
## See Also
|
||||
|
||||
[plot](/reference/led/plot), [unplot](/reference/led/unplot), [point](/reference/led/point), [brightness](/reference/led/brightness), [setBrightness](/reference/led/set-brightness), [stopAnimation](/reference/led/stop-animation), [plotBarGraph](/reference/led/plot-bar-graph), [toggle](/reference/led/toggle), [setDisplayMode](/reference/led/set-display-mode), [enabled](/reference/led/enable),
|
||||
[plotBrightness](/reference/led/plot-brightness),
|
||||
[plotBrightness](/reference/led/plot-brightness)
|
||||
|
|
Загрузка…
Ссылка в новой задаче