mirror of
https://github.com/reanimate/reanimate.git
synced 2026-09-09 15:12:21 +00:00
LaTeX and objects tutorial (#156)
This commit is contained in:
parent
217c54ab38
commit
a634e4ad87
5 changed files with 746 additions and 212 deletions
|
|
@ -82,7 +82,7 @@ Scripting in Haskell also gives access to the extensive body of code libraries.
|
|||
<details>
|
||||
<summary>Toggle source code.</summary>
|
||||
<pre><code class="haskell">
|
||||
{!examples/tut_glue_physics.hs!}
|
||||
{!reanimate-examples/tut_glue_physics.hs!}
|
||||
</code></pre>
|
||||
</details>
|
||||
<br/>
|
||||
|
|
|
|||
495
docs/tut_equation.md
Normal file
495
docs/tut_equation.md
Normal file
|
|
@ -0,0 +1,495 @@
|
|||
# Introduction
|
||||
|
||||
This tutorial will guide you through the steps to set up a simple animation and teach you the basics of timing, positioning, and $\LaTeX$. It is assumed that you are familiar with [Haskell](https://www.haskell.org/) but you don't have to know anything about reanimate or animation in general.
|
||||
|
||||
All of the code snippets are interactive and require JavaScript.
|
||||
|
||||
# Tutorial Goal
|
||||
|
||||
By the end of this tutorial, we will have a short animation that shows an equation and then draws an explanation of each term:
|
||||
|
||||
<video width="640" height="320" muted autoplay loop style="display:block;margin:auto;">
|
||||
<source src="https://i.imgur.com/5a78Ot5.mp4">
|
||||
</video>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Step 1: Blank canvas
|
||||
|
||||
To begin with, let's draw a light-blue background and make it easier to see our animation canvas. We can do this in the imperative scene context by creating a sprite containing the background color. All [SVG color names](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value) are supported so give `mistyrose`, `aquamarine` or `burlywood` a try. Don't try hex codes, though, as they are beyond the scope of this tutorial.
|
||||
|
||||
<pre class="interactive">
|
||||
animation :: Animation
|
||||
animation = scene $ do
|
||||
newSpriteSVG_ $
|
||||
mkBackground "lightblue"
|
||||
</pre>
|
||||
|
||||
API references: [scene](https://hackage.haskell.org/package/reanimate-0.5.0.1/docs/Reanimate-Scene.html#v:scene), [newSpriteSVG_](https://hackage.haskell.org/package/reanimate-0.5.0.1/docs/Reanimate-Scene.html#v:newSpriteSVG_), [mkBackground](https://hackage.haskell.org/package/reanimate-0.5.0.1/docs/Reanimate-Svg-Constructors.html#v:mkBackground), [Animation](https://hackage.haskell.org/package/reanimate-0.5.0.1/docs/Reanimate.html#t:Animation).
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Step 2: Typesetting an equation
|
||||
|
||||
Let's start by refactoring the previous animation and create a separate function that defines our environment. This will make it easier to modify the environment in the future:
|
||||
|
||||
```haskell
|
||||
env :: Animation -> Animation
|
||||
env = addStatic bg
|
||||
|
||||
bg :: SVG
|
||||
bg = mkBackground "lightblue"
|
||||
```
|
||||
|
||||
SVG has no support for typesetting equations but reanimate offers a convenient interface to LaTeX via `latexAlign :: Text -> SVG`. To place the equation at the center of the screen with the right size, we'll use `scale :: Double -> SVG -> SVG` and `center :: SVG -> SVG`. Try using `centerX :: SVG -> SVG`, changing the scaling factor, or using a different equation like `\\frac{\\infty}{\\pi}`.
|
||||
|
||||
<pre class="interactive">
|
||||
animation :: Animation
|
||||
animation = env $ scene $ do
|
||||
newSpriteSVG_ equation
|
||||
wait 1
|
||||
|
||||
equation :: SVG
|
||||
equation = scale 3 $ center $
|
||||
latexAlign "E = mc^2"
|
||||
|
||||
env :: Animation -> Animation
|
||||
env = addStatic bg
|
||||
|
||||
bg :: SVG
|
||||
bg = mkBackground "lightblue"
|
||||
</pre>
|
||||
API references: [addStatic](https://hackage.haskell.org/package/reanimate-0.5.0.1/docs/Reanimate.html#v:addStatic), [center](https://hackage.haskell.org/package/reanimate-0.5.0.1/docs/Reanimate-Svg-Constructors.html#v:center), [scale](https://hackage.haskell.org/package/reanimate-0.5.0.1/docs/Reanimate-Svg-Constructors.html#v:scale), [latexAlign](https://hackage.haskell.org/package/reanimate-0.5.0.1/docs/Reanimate.html#v:latexAlign)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Step 3: Accessing glyphs
|
||||
|
||||
So far, so good. We have an environment with a blue background color and we have an equation in SVG format. It's almost time to start animating but first we need to split the equation SVG into smaller pieces. We can use the `splitGlyphs :: [Int] -> SVG -> (SVG, SVG)` to access a set of child nodes of an SVG by index.
|
||||
|
||||
<pre class="interactive">
|
||||
animation :: Animation
|
||||
animation = env $ scene $ do
|
||||
play $ staticFrame 1 equation
|
||||
play $ staticFrame 1 symb_e
|
||||
play $ staticFrame 1 symb_eq
|
||||
play $ staticFrame 1 symb_m
|
||||
play $ staticFrame 1 symb_c2
|
||||
|
||||
symb_e :: SVG
|
||||
symb_e = snd $
|
||||
splitGlyphs [0] equation
|
||||
|
||||
symb_eq :: SVG
|
||||
symb_eq = snd $
|
||||
splitGlyphs [1] equation
|
||||
|
||||
symb_m :: SVG
|
||||
symb_m = snd $
|
||||
splitGlyphs [2] equation
|
||||
|
||||
symb_c2 :: SVG
|
||||
symb_c2 = snd $
|
||||
splitGlyphs [3,4] equation
|
||||
|
||||
equation :: SVG
|
||||
equation = scale 3 $ center $
|
||||
latexAlign "E = mc^2"
|
||||
|
||||
env :: Animation -> Animation
|
||||
env = addStatic bg
|
||||
|
||||
bg :: SVG
|
||||
bg = mkBackground "lightblue"
|
||||
</pre>
|
||||
API references: [splitGlyphs](https://hackage.haskell.org/package/reanimate-0.5.0.1/docs/Reanimate-Svg.html#v:splitGlyphs), [staticFrame](https://hackage.haskell.org/package/reanimate-0.5.0.1/docs/Reanimate.html#v:staticFrame), [play](https://hackage.haskell.org/package/reanimate-0.5.0.1/docs/Reanimate.html#v:play).
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Step 4: Moving objects
|
||||
|
||||
Objects in reanimate encapsulate SVG nodes and makes it easier to animate properties such as position and scale. In the example below, we create an object from the `E` SVG node and 'tween' position properties to make it move around the canvas. [Tweening](https://en.wikipedia.org/wiki/Inbetweening) (or inbetweening) is an animation concept that simply meanings moving smoothly from one value to another.
|
||||
|
||||
Reanimate exports many properties such as `oLeftX`, `oTopY` and `oCenterXY`. These properties manipulate the object's position with respect to its bounding box and margins. The position of an object is ultimately captured in the `oTranslate` property and resetting this property will undo any movements.
|
||||
|
||||
<pre class="interactive">
|
||||
animation :: Animation
|
||||
animation = env $ scene $ do
|
||||
newSpriteSVG_ equation
|
||||
obj <- oNew symb_e
|
||||
oShow obj
|
||||
|
||||
oTweenS obj 1 moveTopLeft
|
||||
oTweenS obj 1 moveTopRight
|
||||
oTweenS obj 1 moveBotRight
|
||||
oTweenS obj 1 moveBotLeft
|
||||
oTweenS obj 1 moveToOrigin
|
||||
|
||||
moveTopLeft t = do
|
||||
oLeftX %= \origin ->
|
||||
fromToS origin screenLeft t
|
||||
oTopY %= \origin ->
|
||||
fromToS origin screenTop t
|
||||
|
||||
moveTopRight t = do
|
||||
oRightX %= \origin ->
|
||||
fromToS origin screenRight t
|
||||
oTopY %= \origin ->
|
||||
fromToS origin screenTop t
|
||||
|
||||
moveBotRight t = do
|
||||
oRightX %= \origin ->
|
||||
fromToS origin screenRight t
|
||||
oBottomY %= \origin ->
|
||||
fromToS origin screenBottom t
|
||||
|
||||
moveBotLeft t = do
|
||||
oLeftX %= \origin ->
|
||||
fromToS origin screenLeft t
|
||||
oBottomY %= \origin ->
|
||||
fromToS origin screenBottom t
|
||||
|
||||
moveToOrigin t =
|
||||
oTranslate %= lerp t (V2 0 0)
|
||||
|
||||
symb_e :: SVG
|
||||
symb_e = snd $
|
||||
splitGlyphs [0] equation
|
||||
|
||||
equation :: SVG
|
||||
equation = scale 3 $ center $
|
||||
latexAlign "E = mc^2"
|
||||
|
||||
env :: Animation -> Animation
|
||||
env = addStatic bg
|
||||
|
||||
bg :: SVG
|
||||
bg = mkBackground "lightblue"
|
||||
</pre>
|
||||
API references: [oTweenS](https://hackage.haskell.org/package/reanimate-0.5.0.1/docs/Reanimate-Scene.html#v:oTweenS), [oNew](https://hackage.haskell.org/package/reanimate-0.5.0.1/docs/Reanimate-Scene.html#v:oNew), [oShow](https://hackage.haskell.org/package/reanimate-0.5.0.1/docs/Reanimate-Scene.html#v:oShow), [oLeftX](https://hackage.haskell.org/package/reanimate-0.5.0.1/docs/Reanimate-Scene.html#v:oLeftX), [oTopY](https://hackage.haskell.org/package/reanimate-0.5.0.1/docs/Reanimate-Scene.html#v:oTopY), [oRightX](https://hackage.haskell.org/package/reanimate-0.5.0.1/docs/Reanimate-Scene.html#v:oRightX), [oBottomY](https://hackage.haskell.org/package/reanimate-0.5.0.1/docs/Reanimate-Scene.html#v:oBottomY), [oTranslate](https://hackage.haskell.org/package/reanimate-0.5.0.1/docs/Reanimate-Scene.html#v:oTranslate), [screenBottom](https://hackage.haskell.org/package/reanimate-0.5.0.1/docs/Reanimate.html#v:screenBottom), [screenLeft](https://hackage.haskell.org/package/reanimate-0.5.0.1/docs/Reanimate.html#v:screenLeft), [screenRight](https://hackage.haskell.org/package/reanimate-0.5.0.1/docs/Reanimate.html#v:screenRight), [screenTop](https://hackage.haskell.org/package/reanimate-0.5.0.1/docs/Reanimate.html#v:screenTop).
|
||||
|
||||
|
||||
|
||||
Now that we know how to move around an object, let's move each symbol in the equation to the left of the screen and scale them down slightly to make it a better fit. The animation looks a lot better if moves overlap slightly and this can be achieved by running them in parallel with `fork` and inserting a `wait 0.3` in between them.
|
||||
|
||||
<pre class="interactive">
|
||||
animation :: Animation
|
||||
animation = env $ scene $ do
|
||||
symbols <- mapM oNew
|
||||
[symb_e, symb_eq, symb_m, symb_c2]
|
||||
mapM_ oShow symbols
|
||||
|
||||
forM_ (zip symbols yPositions) $
|
||||
\(obj, yPos) -> do
|
||||
fork $ oTweenS obj 1 $ \t -> do
|
||||
oScale %= \origin ->
|
||||
fromToS origin scaleFactor t
|
||||
oLeftX %= \origin ->
|
||||
fromToS origin screenLeft t
|
||||
oCenterY %= \origin ->
|
||||
fromToS origin yPos t
|
||||
wait 0.3
|
||||
|
||||
symb_e :: SVG
|
||||
symb_e = snd $
|
||||
splitGlyphs [0] equation
|
||||
|
||||
symb_eq :: SVG
|
||||
symb_eq = snd $
|
||||
splitGlyphs [1] equation
|
||||
|
||||
symb_m :: SVG
|
||||
symb_m = snd $
|
||||
splitGlyphs [2] equation
|
||||
|
||||
symb_c2 :: SVG
|
||||
symb_c2 = snd $
|
||||
splitGlyphs [3,4] equation
|
||||
|
||||
equation :: SVG
|
||||
equation = scale 3 $ center $
|
||||
latexAlign "E = mc^2"
|
||||
|
||||
yPositions = [3,1,-1,-3]
|
||||
scaleFactor = 0.7
|
||||
|
||||
env :: Animation -> Animation
|
||||
env = addStatic bg
|
||||
|
||||
bg :: SVG
|
||||
bg = mkBackground "lightblue"
|
||||
</pre>
|
||||
API references: [fork](https://hackage.haskell.org/package/reanimate-0.5.0.1/docs/Reanimate.html#v:fork), [wait](https://hackage.haskell.org/package/reanimate-0.5.0.1/docs/Reanimate.html#v:wait).
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Step 5: Drawing text
|
||||
|
||||
Objects are invisible by default and there are many built-in ways of showing them. Let's have a look at `oFadeIn`, `oDraw`, `oScaleIn`, and `oGrow`:
|
||||
|
||||
<pre class="interactive">
|
||||
animation :: Animation
|
||||
animation = env $ scene $ do
|
||||
fadeIn <- newText "oFadeIn"
|
||||
oModify fadeIn $ oCenterY .~ 3
|
||||
oShowWith fadeIn oFadeIn
|
||||
|
||||
draw <- newText "oDraw"
|
||||
oModify draw $ oCenterY .~ 1
|
||||
oShowWith draw oDraw
|
||||
|
||||
scaleIn <- newText "oScaleIn"
|
||||
oModify scaleIn $ oCenterY .~ -1
|
||||
oShowWith scaleIn $
|
||||
setDuration 1 . oScaleIn
|
||||
|
||||
grow <- newText "oGrow"
|
||||
oModify grow $ oCenterY .~ -3
|
||||
oShowWith grow oGrow
|
||||
|
||||
forM_ [fadeIn, draw, scaleIn, grow]
|
||||
$ \obj -> fork $
|
||||
oHideWith obj oFadeOut
|
||||
|
||||
newText =
|
||||
oNew . scale 1.5 . center . latex
|
||||
|
||||
env :: Animation -> Animation
|
||||
env = addStatic bg .
|
||||
mapA (withStrokeWidth defaultStrokeWidth) .
|
||||
mapA (withStrokeColor "black")
|
||||
|
||||
bg :: SVG
|
||||
bg = mkBackground "lightblue"
|
||||
</pre>
|
||||
API references: [oFadeIn](https://hackage.haskell.org/package/reanimate-0.5.0.1/docs/Reanimate-Scene.html#v:oFadeIn), [oDraw](https://hackage.haskell.org/package/reanimate-0.5.0.1/docs/Reanimate-Scene.html#v:oDraw), [oScaleIn](https://hackage.haskell.org/package/reanimate-0.5.0.1/docs/Reanimate-Scene.html#v:oScaleIn), [oGrow](https://hackage.haskell.org/package/reanimate-0.5.0.1/docs/Reanimate-Scene.html#v:oGrow).
|
||||
|
||||
Let's use the `oDraw` function to draw text on the screen and let's make sure the text is right-aligned:
|
||||
|
||||
<pre class="interactive">
|
||||
animation :: Animation
|
||||
animation = env $ scene $ do
|
||||
ls <- mapM oNew [energy, equals, mass, speedOfLight]
|
||||
|
||||
forM_ (zip ls yPositions) $
|
||||
\(obj, nth) -> do
|
||||
oModifyS obj $ do
|
||||
oLeftX .= -4
|
||||
oCenterY .= nth
|
||||
oShowWith obj oDraw
|
||||
|
||||
forM_ ls $ \obj ->
|
||||
fork $ oHideWith obj oFadeOut
|
||||
|
||||
energy = scale 1.5 $ centerX $
|
||||
latex "Energy"
|
||||
|
||||
equals = scale 1.5 $ centerX $
|
||||
latex "equals"
|
||||
|
||||
mass = scale 1.5 $ centerX $
|
||||
latex "mass times"
|
||||
|
||||
speedOfLight = scale 1.5 $ centerX $
|
||||
latex "speed of light$^2$"
|
||||
|
||||
yPositions = [3,1,-1,-3]
|
||||
|
||||
env :: Animation -> Animation
|
||||
env = addStatic (mkBackground "lightblue") .
|
||||
mapA (withStrokeWidth defaultStrokeWidth) .
|
||||
mapA (withStrokeColor "black")
|
||||
</pre>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Step 6: Putting it all together
|
||||
|
||||
We've reached the end and have all the parts needed to re-create the GIF shown in the beginning. To recap:
|
||||
|
||||
* The `Scene` monad is useful for animating a sequence of events.
|
||||
* We can typeset equations with `latex :: Text -> SVG`.
|
||||
* SVG nodes are regular Haskell data and we can extract child nodes with `splitGlyphs`.
|
||||
* Objects wrap SVG nodes and make it easy to set positioning.
|
||||
* Objects have many built-in ways of being shown on canvas.
|
||||
|
||||
Putting everything together gives us this short animation:
|
||||
|
||||
<pre class="interactive">
|
||||
animation :: Animation
|
||||
animation = env $ scene $ do
|
||||
symbols <- mapM oNew
|
||||
[symb_e, symb_eq, symb_m, symb_c2]
|
||||
mapM_ oShow symbols
|
||||
wait 1
|
||||
|
||||
forM_ (zip symbols yPositions) $
|
||||
\(obj, yPos) -> do
|
||||
fork $ oTweenS obj 1 $ \t -> do
|
||||
oScale %= \origin -> fromToS origin scaleFactor t
|
||||
oLeftX %= \origin -> fromToS origin screenLeft t
|
||||
oCenterY %= \origin -> fromToS origin yPos t
|
||||
wait 0.3
|
||||
|
||||
wait 1
|
||||
|
||||
ls <- mapM oNew [energy, equals, mass, speedOfLight]
|
||||
|
||||
forM_ (zip ls yPositions) $
|
||||
\(obj, nth) -> do
|
||||
oModifyS obj $ do
|
||||
oLeftX .= -4
|
||||
oCenterY .= nth
|
||||
oShowWith obj oDraw
|
||||
|
||||
wait 2
|
||||
|
||||
forM_ ls $ \obj ->
|
||||
fork $ oHideWith obj oFadeOut
|
||||
|
||||
forM_ (reverse symbols) $ \obj -> do
|
||||
fork $ oTweenS obj 1 $ \t -> do
|
||||
oScale %= \origin -> fromToS origin 1 t
|
||||
oTranslate %= lerp t (V2 0 0)
|
||||
wait 0.3
|
||||
wait 2
|
||||
|
||||
scaleFactor = 0.7
|
||||
|
||||
symb_e :: SVG
|
||||
symb_e = snd $ splitGlyphs [0] svg
|
||||
|
||||
symb_eq :: SVG
|
||||
symb_eq = snd $ splitGlyphs [1] svg
|
||||
|
||||
symb_m :: SVG
|
||||
symb_m = snd $ splitGlyphs [2] svg
|
||||
|
||||
symb_c2 :: SVG
|
||||
symb_c2 = snd $ splitGlyphs [3,4] svg
|
||||
|
||||
svg = scale 3 $ center $
|
||||
latexAlign "E = mc^2"
|
||||
|
||||
energy = scale 1.5 $ centerX $
|
||||
latex "Energy"
|
||||
|
||||
equals = scale 1.5 $ centerX $
|
||||
latex "equals"
|
||||
|
||||
mass = scale 1.5 $ centerX $
|
||||
latex "mass times"
|
||||
|
||||
speedOfLight = scale 1.5 $ centerX $
|
||||
latex "speed of light$^2$"
|
||||
|
||||
yPositions = [3,1,-1,-3]
|
||||
|
||||
env :: Animation -> Animation
|
||||
env = addStatic (mkBackground "lightblue") .
|
||||
mapA (withStrokeWidth defaultStrokeWidth) .
|
||||
mapA (withStrokeColor "black")
|
||||
</pre>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
setTimeout(function () {
|
||||
const pres = document.querySelectorAll(".interactive");
|
||||
var delay=0;
|
||||
for(var i=0; i<pres.length; i++) {
|
||||
const elt = pres[i];
|
||||
setTimeout(function() {
|
||||
embedPlayground(elt);
|
||||
},delay);
|
||||
delay += 0;
|
||||
}
|
||||
},0);
|
||||
</script>
|
||||
16
mkdocs.yml
16
mkdocs.yml
|
|
@ -13,16 +13,26 @@ markdown_extensions:
|
|||
- pymdownx.arithmatex
|
||||
extra_javascript:
|
||||
- https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_CHTML
|
||||
- https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.56.0/codemirror.min.js
|
||||
- https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.56.0/mode/haskell/haskell.min.js
|
||||
- https://reanimate.github.io/reanimate/playground/elm.js
|
||||
- https://reanimate.github.io/reanimate/playground/playground.js
|
||||
- https://reanimate.github.io/reanimate/playground/embed.js
|
||||
extra_css:
|
||||
- fix.css
|
||||
- https://reanimate.github.io/reanimate/playground/embed.css
|
||||
- https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.56.0/codemirror.min.css
|
||||
nav:
|
||||
- Reanimate: index.md
|
||||
- Core concepts: introduction.md
|
||||
- Gluing together animations: glue_tut.md
|
||||
# - Morphology (incomplete): morphology.md
|
||||
# - Voice control: voice.md
|
||||
# - How to:
|
||||
# - Use fonts (incomplete): fonts.md
|
||||
- Tutorials:
|
||||
- Animating an Equation: tut_equation.md
|
||||
- Concepts:
|
||||
- Core concepts: introduction.md
|
||||
- Gluing together animations: glue_tut.md
|
||||
- Voice control: voice.md
|
||||
- Showcase:
|
||||
- Color Theory: showcase_colortheory.md
|
||||
- Discord bot: discord_bot.md
|
||||
|
|
|
|||
103
playground/viewer-elm/dist/playground.js
vendored
103
playground/viewer-elm/dist/playground.js
vendored
|
|
@ -1,5 +1,22 @@
|
|||
const backend = "149.56.132.163";
|
||||
|
||||
var lastConnect;
|
||||
|
||||
function scheduleConnect(cb) {
|
||||
let minDelay = 2000;
|
||||
if( lastConnect === undefined ) {
|
||||
console.log('Connecting immediately');
|
||||
lastConnect = new Date().getTime();
|
||||
cb();
|
||||
} else {
|
||||
let now = new Date().getTime();
|
||||
let target = Math.max(now, lastConnect + minDelay);
|
||||
console.log('Connecting in', target-now);
|
||||
lastConnect = target;
|
||||
setTimeout(cb, target-now);
|
||||
}
|
||||
}
|
||||
|
||||
function playgroundInit(elt) {
|
||||
var mySockets = {};
|
||||
var frames = {};
|
||||
|
|
@ -7,45 +24,57 @@ function playgroundInit(elt) {
|
|||
|
||||
function sendSocketCommand(wat) {
|
||||
if (wat.cmd == "connect") {
|
||||
socket = new WebSocket(wat.address);
|
||||
socket.onopen = function (event) {
|
||||
socket.send(lastScript);
|
||||
app.ports.receiveSocketMsg.send({
|
||||
name: wat.name,
|
||||
msg: "data",
|
||||
data: "connection established"
|
||||
});
|
||||
}
|
||||
socket.onmessage = function (event) {
|
||||
const lines = event.data.split('\n');
|
||||
const cmd = lines[0];
|
||||
if( cmd === "frame_count" ) {
|
||||
frames = {};
|
||||
} else if ( cmd === "frame") {
|
||||
// Prefetch image.
|
||||
const nth = parseInt(lines[1]);
|
||||
const url = lines[2];
|
||||
frames[nth] = new Image();
|
||||
frames[nth].src = "https://reanimate.clozecards.com/"+url;
|
||||
scheduleConnect(function () {
|
||||
socket = new WebSocket(wat.address);
|
||||
socket.onopen = function (event) {
|
||||
if( socket.readyState !== 1 ) {
|
||||
app.ports.receiveSocketMsg.send({
|
||||
name: wat.name,
|
||||
msg: "data",
|
||||
data: "connection failed"
|
||||
});
|
||||
return;
|
||||
}
|
||||
console.log('onopen', socket, mySockets);
|
||||
socket.send(lastScript);
|
||||
app.ports.receiveSocketMsg.send({
|
||||
name: wat.name,
|
||||
msg: "data",
|
||||
data: "connection established"
|
||||
});
|
||||
}
|
||||
app.ports.receiveSocketMsg.send({
|
||||
name: wat.name,
|
||||
msg: "data",
|
||||
data: event.data
|
||||
});
|
||||
}
|
||||
connectionFailedHandler = function (event) {
|
||||
app.ports.receiveSocketMsg.send({
|
||||
name: wat.name,
|
||||
msg: "data",
|
||||
data: "connection failed"
|
||||
});
|
||||
}
|
||||
socket.onerror = connectionFailedHandler;
|
||||
socket.onclose = connectionFailedHandler;
|
||||
mySockets[wat.name] = socket;
|
||||
socket.onmessage = function (event) {
|
||||
const lines = event.data.split('\n');
|
||||
const cmd = lines[0];
|
||||
if( cmd === "frame_count" ) {
|
||||
frames = {};
|
||||
} else if ( cmd === "frame") {
|
||||
// Prefetch image.
|
||||
const nth = parseInt(lines[1]);
|
||||
const url = lines[2];
|
||||
frames[nth] = new Image();
|
||||
frames[nth].src = "https://reanimate.clozecards.com/"+url;
|
||||
}
|
||||
app.ports.receiveSocketMsg.send({
|
||||
name: wat.name,
|
||||
msg: "data",
|
||||
data: event.data
|
||||
});
|
||||
}
|
||||
connectionFailedHandler = function (event) {
|
||||
app.ports.receiveSocketMsg.send({
|
||||
name: wat.name,
|
||||
msg: "data",
|
||||
data: "connection failed"
|
||||
});
|
||||
}
|
||||
socket.onerror = connectionFailedHandler;
|
||||
socket.onclose = connectionFailedHandler;
|
||||
mySockets[wat.name] = socket;
|
||||
console.log('mySockets set');
|
||||
});
|
||||
} else if (wat.cmd == "send") {
|
||||
if( mySockets[wat.name].readyState === mySockets[wat.name].OPEN ) {
|
||||
if( mySockets[wat.name] && mySockets[wat.name].readyState === mySockets[wat.name].OPEN ) {
|
||||
mySockets[wat.name].send(wat.content);
|
||||
}
|
||||
} else if (wat.cmd == "close") {
|
||||
|
|
|
|||
342
viewer-elm/package-lock.json
generated
342
viewer-elm/package-lock.json
generated
|
|
@ -9,10 +9,10 @@
|
|||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz",
|
||||
"integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==",
|
||||
"requires": {
|
||||
"fast-deep-equal": "2.0.1",
|
||||
"fast-json-stable-stringify": "2.0.0",
|
||||
"json-schema-traverse": "0.4.1",
|
||||
"uri-js": "4.2.2"
|
||||
"fast-deep-equal": "^2.0.1",
|
||||
"fast-json-stable-stringify": "^2.0.0",
|
||||
"json-schema-traverse": "^0.4.1",
|
||||
"uri-js": "^4.2.2"
|
||||
}
|
||||
},
|
||||
"ansi-regex": {
|
||||
|
|
@ -33,8 +33,8 @@
|
|||
"integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"normalize-path": "3.0.0",
|
||||
"picomatch": "2.1.1"
|
||||
"normalize-path": "^3.0.0",
|
||||
"picomatch": "^2.0.4"
|
||||
}
|
||||
},
|
||||
"asn1": {
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
|
||||
"integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
|
||||
"requires": {
|
||||
"safer-buffer": "2.1.2"
|
||||
"safer-buffer": "~2.1.0"
|
||||
}
|
||||
},
|
||||
"assert-plus": {
|
||||
|
|
@ -76,7 +76,7 @@
|
|||
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
|
||||
"integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
|
||||
"requires": {
|
||||
"tweetnacl": "0.14.5"
|
||||
"tweetnacl": "^0.14.3"
|
||||
}
|
||||
},
|
||||
"binary": {
|
||||
|
|
@ -85,8 +85,8 @@
|
|||
"integrity": "sha1-n2BVO8XOjDOG87VTz/R0Yq3sqnk=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"buffers": "0.1.1",
|
||||
"chainsaw": "0.1.0"
|
||||
"buffers": "~0.1.1",
|
||||
"chainsaw": "~0.1.0"
|
||||
}
|
||||
},
|
||||
"binary-extensions": {
|
||||
|
|
@ -101,11 +101,11 @@
|
|||
"integrity": "sha512-Y+Wvypk3JhH5GPZAvlwJAWOVH/OsOhQMSj37vySuWHwQivoALplPxfBA8b973rFJI7OS+O+1YmmYXIiEXVMAcw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"mustache": "3.1.0",
|
||||
"request": "2.88.0",
|
||||
"request-promise": "4.2.5",
|
||||
"tar": "4.4.13",
|
||||
"unzip-stream": "0.3.0"
|
||||
"mustache": "^3.0.1",
|
||||
"request": "^2.88.0",
|
||||
"request-promise": "^4.2.4",
|
||||
"tar": "^4.4.10",
|
||||
"unzip-stream": "^0.3.0"
|
||||
}
|
||||
},
|
||||
"bluebird": {
|
||||
|
|
@ -120,7 +120,7 @@
|
|||
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"fill-range": "7.0.1"
|
||||
"fill-range": "^7.0.1"
|
||||
}
|
||||
},
|
||||
"buffers": {
|
||||
|
|
@ -140,7 +140,7 @@
|
|||
"integrity": "sha1-XqtQsor+WAdNDVgpE4iCi15fvJg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"traverse": "0.3.9"
|
||||
"traverse": ">=0.3.0 <0.4"
|
||||
}
|
||||
},
|
||||
"chalk": {
|
||||
|
|
@ -149,11 +149,11 @@
|
|||
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-styles": "2.2.1",
|
||||
"escape-string-regexp": "1.0.5",
|
||||
"has-ansi": "2.0.0",
|
||||
"strip-ansi": "3.0.1",
|
||||
"supports-color": "2.0.0"
|
||||
"ansi-styles": "^2.2.1",
|
||||
"escape-string-regexp": "^1.0.2",
|
||||
"has-ansi": "^2.0.0",
|
||||
"strip-ansi": "^3.0.0",
|
||||
"supports-color": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"charenc": {
|
||||
|
|
@ -168,14 +168,14 @@
|
|||
"integrity": "sha512-c4PR2egjNjI1um6bamCQ6bUNPDiyofNQruHvKgHQ4gDUP/ITSVSzNsiI5OWtHOsX323i5ha/kk4YmOZ1Ktg7KA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"anymatch": "3.1.1",
|
||||
"braces": "3.0.2",
|
||||
"fsevents": "2.1.2",
|
||||
"glob-parent": "5.1.0",
|
||||
"is-binary-path": "2.1.0",
|
||||
"is-glob": "4.0.1",
|
||||
"normalize-path": "3.0.0",
|
||||
"readdirp": "3.3.0"
|
||||
"anymatch": "^3.0.1",
|
||||
"braces": "^3.0.2",
|
||||
"fsevents": "^2.0.6",
|
||||
"glob-parent": "^5.0.0",
|
||||
"is-binary-path": "^2.1.0",
|
||||
"is-glob": "^4.0.1",
|
||||
"normalize-path": "^3.0.0",
|
||||
"readdirp": "^3.1.1"
|
||||
}
|
||||
},
|
||||
"chownr": {
|
||||
|
|
@ -189,7 +189,7 @@
|
|||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
||||
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
|
||||
"requires": {
|
||||
"delayed-stream": "1.0.0"
|
||||
"delayed-stream": "~1.0.0"
|
||||
}
|
||||
},
|
||||
"commander": {
|
||||
|
|
@ -215,9 +215,9 @@
|
|||
"integrity": "sha1-o7uzAtsil8vqPATt82lB9GE6o5k=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lru-cache": "4.1.5",
|
||||
"shebang-command": "1.2.0",
|
||||
"which": "1.3.1"
|
||||
"lru-cache": "^4.0.1",
|
||||
"shebang-command": "^1.2.0",
|
||||
"which": "^1.2.9"
|
||||
}
|
||||
},
|
||||
"crypt": {
|
||||
|
|
@ -231,7 +231,7 @@
|
|||
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
|
||||
"integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
|
||||
"requires": {
|
||||
"assert-plus": "1.0.0"
|
||||
"assert-plus": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"debug": {
|
||||
|
|
@ -249,8 +249,8 @@
|
|||
"integrity": "sha512-h6sMrVB1VMWVrW13mSc6ia/DwYYw5MN6+exNu1OaJeFac5aSAvwM7lZ0NVfTABuSkQelr4h5oebg3KB1XPdjgA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"execa": "1.0.0",
|
||||
"ip-regex": "2.1.0"
|
||||
"execa": "^1.0.0",
|
||||
"ip-regex": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"delayed-stream": {
|
||||
|
|
@ -275,8 +275,8 @@
|
|||
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
|
||||
"integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
|
||||
"requires": {
|
||||
"jsbn": "0.1.1",
|
||||
"safer-buffer": "2.1.2"
|
||||
"jsbn": "~0.1.0",
|
||||
"safer-buffer": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"ee-first": {
|
||||
|
|
@ -290,7 +290,7 @@
|
|||
"resolved": "https://registry.npmjs.org/elm/-/elm-0.19.1-3.tgz",
|
||||
"integrity": "sha512-6y36ewCcVmTOx8lj7cKJs3bhI5qMfoVEigePZ9PhEUNKpwjjML/pU2u2YSpHVAznuCcojoF6KIsrS1Ci7GtVaQ==",
|
||||
"requires": {
|
||||
"request": "2.88.0"
|
||||
"request": "^2.88.0"
|
||||
}
|
||||
},
|
||||
"elm-format": {
|
||||
|
|
@ -299,7 +299,7 @@
|
|||
"integrity": "sha512-BRQaVQOGt9gxK1hqSJn1MISxDGdln22PSYzmHMjqpQY3S9OJY/3kPn5HoiH3bHQYQFwC+X0apsMZldK9VxySow==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"binwrap": "0.2.2"
|
||||
"binwrap": "^0.2.2"
|
||||
}
|
||||
},
|
||||
"elm-hot": {
|
||||
|
|
@ -314,7 +314,7 @@
|
|||
"integrity": "sha512-IlonaC1pO/QoXlOrwwrJaxyvpJAT8QDSfzenkChbhU1PC1fJetkj2TwZfki+y1ZxpSMTnMSomMraOdWA6DO3VQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"chalk": "1.1.3",
|
||||
"chalk": "^1.1.1",
|
||||
"chokidar": "3.0.2",
|
||||
"commander": "2.17.1",
|
||||
"crocks": "0.12.1",
|
||||
|
|
@ -350,7 +350,7 @@
|
|||
"integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"once": "1.4.0"
|
||||
"once": "^1.4.0"
|
||||
}
|
||||
},
|
||||
"es6-promisify": {
|
||||
|
|
@ -389,13 +389,13 @@
|
|||
"integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"cross-spawn": "6.0.5",
|
||||
"get-stream": "4.1.0",
|
||||
"is-stream": "1.1.0",
|
||||
"npm-run-path": "2.0.2",
|
||||
"p-finally": "1.0.0",
|
||||
"signal-exit": "3.0.2",
|
||||
"strip-eof": "1.0.0"
|
||||
"cross-spawn": "^6.0.0",
|
||||
"get-stream": "^4.0.0",
|
||||
"is-stream": "^1.1.0",
|
||||
"npm-run-path": "^2.0.0",
|
||||
"p-finally": "^1.0.0",
|
||||
"signal-exit": "^3.0.0",
|
||||
"strip-eof": "^1.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"cross-spawn": {
|
||||
|
|
@ -404,11 +404,11 @@
|
|||
"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"nice-try": "1.0.5",
|
||||
"path-key": "2.0.1",
|
||||
"semver": "5.7.1",
|
||||
"shebang-command": "1.2.0",
|
||||
"which": "1.3.1"
|
||||
"nice-try": "^1.0.4",
|
||||
"path-key": "^2.0.1",
|
||||
"semver": "^5.5.0",
|
||||
"shebang-command": "^1.2.0",
|
||||
"which": "^1.2.9"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -439,7 +439,7 @@
|
|||
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"to-regex-range": "5.0.1"
|
||||
"to-regex-range": "^5.0.1"
|
||||
}
|
||||
},
|
||||
"finalhandler": {
|
||||
|
|
@ -449,12 +449,12 @@
|
|||
"dev": true,
|
||||
"requires": {
|
||||
"debug": "2.6.9",
|
||||
"encodeurl": "1.0.2",
|
||||
"escape-html": "1.0.3",
|
||||
"on-finished": "2.3.0",
|
||||
"parseurl": "1.3.3",
|
||||
"statuses": "1.5.0",
|
||||
"unpipe": "1.0.0"
|
||||
"encodeurl": "~1.0.2",
|
||||
"escape-html": "~1.0.3",
|
||||
"on-finished": "~2.3.0",
|
||||
"parseurl": "~1.3.3",
|
||||
"statuses": "~1.5.0",
|
||||
"unpipe": "~1.0.0"
|
||||
}
|
||||
},
|
||||
"follow-redirects": {
|
||||
|
|
@ -463,7 +463,7 @@
|
|||
"integrity": "sha512-CRcPzsSIbXyVDl0QI01muNDu69S8trU4jArW9LpOt2WtC6LyUJetcIrmfHsRBx7/Jb6GHJUiuqyYxPooFfNt6A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"debug": "3.2.6"
|
||||
"debug": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
|
|
@ -472,7 +472,7 @@
|
|||
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.1.2"
|
||||
"ms": "^2.1.1"
|
||||
}
|
||||
},
|
||||
"ms": {
|
||||
|
|
@ -493,9 +493,9 @@
|
|||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
|
||||
"integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
|
||||
"requires": {
|
||||
"asynckit": "0.4.0",
|
||||
"combined-stream": "1.0.8",
|
||||
"mime-types": "2.1.25"
|
||||
"asynckit": "^0.4.0",
|
||||
"combined-stream": "^1.0.6",
|
||||
"mime-types": "^2.1.12"
|
||||
}
|
||||
},
|
||||
"fresh": {
|
||||
|
|
@ -510,7 +510,7 @@
|
|||
"integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"minipass": "2.9.0"
|
||||
"minipass": "^2.6.0"
|
||||
}
|
||||
},
|
||||
"fsevents": {
|
||||
|
|
@ -526,7 +526,7 @@
|
|||
"integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"pump": "3.0.0"
|
||||
"pump": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"getpass": {
|
||||
|
|
@ -534,7 +534,7 @@
|
|||
"resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
|
||||
"integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
|
||||
"requires": {
|
||||
"assert-plus": "1.0.0"
|
||||
"assert-plus": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"glob-parent": {
|
||||
|
|
@ -543,7 +543,7 @@
|
|||
"integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-glob": "4.0.1"
|
||||
"is-glob": "^4.0.1"
|
||||
}
|
||||
},
|
||||
"har-schema": {
|
||||
|
|
@ -556,8 +556,8 @@
|
|||
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz",
|
||||
"integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==",
|
||||
"requires": {
|
||||
"ajv": "6.10.2",
|
||||
"har-schema": "2.0.0"
|
||||
"ajv": "^6.5.5",
|
||||
"har-schema": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"has-ansi": {
|
||||
|
|
@ -566,7 +566,7 @@
|
|||
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-regex": "2.1.1"
|
||||
"ansi-regex": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"http-errors": {
|
||||
|
|
@ -575,10 +575,10 @@
|
|||
"integrity": "sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"depd": "1.1.2",
|
||||
"depd": "~1.1.2",
|
||||
"inherits": "2.0.4",
|
||||
"setprototypeof": "1.1.1",
|
||||
"statuses": "1.5.0",
|
||||
"statuses": ">= 1.5.0 < 2",
|
||||
"toidentifier": "1.0.0"
|
||||
}
|
||||
},
|
||||
|
|
@ -588,9 +588,9 @@
|
|||
"integrity": "sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"eventemitter3": "3.1.2",
|
||||
"follow-redirects": "1.9.0",
|
||||
"requires-port": "1.0.0"
|
||||
"eventemitter3": "^3.0.0",
|
||||
"follow-redirects": "^1.0.0",
|
||||
"requires-port": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"http-signature": {
|
||||
|
|
@ -598,9 +598,9 @@
|
|||
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
|
||||
"integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
|
||||
"requires": {
|
||||
"assert-plus": "1.0.0",
|
||||
"jsprim": "1.4.1",
|
||||
"sshpk": "1.16.1"
|
||||
"assert-plus": "^1.0.0",
|
||||
"jsprim": "^1.2.2",
|
||||
"sshpk": "^1.7.0"
|
||||
}
|
||||
},
|
||||
"inherits": {
|
||||
|
|
@ -615,8 +615,8 @@
|
|||
"integrity": "sha512-S1zBo1D6zcsyuC6PMmY5+55YMILQ9av8lotMx447Bq6SAgo/sDK6y6uUKmuYhW7eacnIhFfsPmCNYdDzsnnDCg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"default-gateway": "4.2.0",
|
||||
"ipaddr.js": "1.9.1"
|
||||
"default-gateway": "^4.2.0",
|
||||
"ipaddr.js": "^1.9.0"
|
||||
}
|
||||
},
|
||||
"ip-regex": {
|
||||
|
|
@ -637,7 +637,7 @@
|
|||
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"binary-extensions": "2.0.0"
|
||||
"binary-extensions": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"is-buffer": {
|
||||
|
|
@ -658,7 +658,7 @@
|
|||
"integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-extglob": "2.1.1"
|
||||
"is-extglob": "^2.1.1"
|
||||
}
|
||||
},
|
||||
"is-number": {
|
||||
|
|
@ -738,8 +738,8 @@
|
|||
"integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"pseudomap": "1.0.2",
|
||||
"yallist": "2.1.2"
|
||||
"pseudomap": "^1.0.2",
|
||||
"yallist": "^2.1.2"
|
||||
}
|
||||
},
|
||||
"md5": {
|
||||
|
|
@ -748,9 +748,9 @@
|
|||
"integrity": "sha1-U6s41f48iJG6RlMp6iP6wFQBJvk=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"charenc": "0.0.2",
|
||||
"crypt": "0.0.2",
|
||||
"is-buffer": "1.1.6"
|
||||
"charenc": "~0.0.1",
|
||||
"crypt": "~0.0.1",
|
||||
"is-buffer": "~1.1.1"
|
||||
}
|
||||
},
|
||||
"mime": {
|
||||
|
|
@ -784,8 +784,8 @@
|
|||
"integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"safe-buffer": "5.2.0",
|
||||
"yallist": "3.1.1"
|
||||
"safe-buffer": "^5.1.2",
|
||||
"yallist": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"yallist": {
|
||||
|
|
@ -802,7 +802,7 @@
|
|||
"integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"minipass": "2.9.0"
|
||||
"minipass": "^2.9.0"
|
||||
}
|
||||
},
|
||||
"mkdirp": {
|
||||
|
|
@ -841,7 +841,7 @@
|
|||
"integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"path-key": "2.0.1"
|
||||
"path-key": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"oauth-sign": {
|
||||
|
|
@ -864,7 +864,7 @@
|
|||
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"wrappy": "1.0.2"
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"open": {
|
||||
|
|
@ -873,7 +873,7 @@
|
|||
"integrity": "sha512-IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-wsl": "1.1.0"
|
||||
"is-wsl": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"os-tmpdir": {
|
||||
|
|
@ -906,10 +906,10 @@
|
|||
"integrity": "sha512-TOnPtq3ZFnCniOZ+rka4pk8UIze9xG1qI+wNE7EmkiR/cg+53uVvk5QbkWZ7M6RsuOxzz62FW1hlAobJr/lTOA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"es6-promisify": "6.0.2",
|
||||
"md5": "2.2.1",
|
||||
"os-tmpdir": "1.0.2",
|
||||
"which": "1.3.1"
|
||||
"es6-promisify": "^6.0.0",
|
||||
"md5": "^2.2.1",
|
||||
"os-tmpdir": "^1.0.1",
|
||||
"which": "^1.3.1"
|
||||
}
|
||||
},
|
||||
"performance-now": {
|
||||
|
|
@ -940,8 +940,8 @@
|
|||
"integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"end-of-stream": "1.4.4",
|
||||
"once": "1.4.0"
|
||||
"end-of-stream": "^1.1.0",
|
||||
"once": "^1.3.1"
|
||||
}
|
||||
},
|
||||
"punycode": {
|
||||
|
|
@ -966,7 +966,7 @@
|
|||
"integrity": "sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"picomatch": "2.1.1"
|
||||
"picomatch": "^2.0.7"
|
||||
}
|
||||
},
|
||||
"request": {
|
||||
|
|
@ -974,26 +974,26 @@
|
|||
"resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz",
|
||||
"integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==",
|
||||
"requires": {
|
||||
"aws-sign2": "0.7.0",
|
||||
"aws4": "1.9.0",
|
||||
"caseless": "0.12.0",
|
||||
"combined-stream": "1.0.8",
|
||||
"extend": "3.0.2",
|
||||
"forever-agent": "0.6.1",
|
||||
"form-data": "2.3.3",
|
||||
"har-validator": "5.1.3",
|
||||
"http-signature": "1.2.0",
|
||||
"is-typedarray": "1.0.0",
|
||||
"isstream": "0.1.2",
|
||||
"json-stringify-safe": "5.0.1",
|
||||
"mime-types": "2.1.25",
|
||||
"oauth-sign": "0.9.0",
|
||||
"performance-now": "2.1.0",
|
||||
"qs": "6.5.2",
|
||||
"safe-buffer": "5.2.0",
|
||||
"tough-cookie": "2.4.3",
|
||||
"tunnel-agent": "0.6.0",
|
||||
"uuid": "3.3.3"
|
||||
"aws-sign2": "~0.7.0",
|
||||
"aws4": "^1.8.0",
|
||||
"caseless": "~0.12.0",
|
||||
"combined-stream": "~1.0.6",
|
||||
"extend": "~3.0.2",
|
||||
"forever-agent": "~0.6.1",
|
||||
"form-data": "~2.3.2",
|
||||
"har-validator": "~5.1.0",
|
||||
"http-signature": "~1.2.0",
|
||||
"is-typedarray": "~1.0.0",
|
||||
"isstream": "~0.1.2",
|
||||
"json-stringify-safe": "~5.0.1",
|
||||
"mime-types": "~2.1.19",
|
||||
"oauth-sign": "~0.9.0",
|
||||
"performance-now": "^2.1.0",
|
||||
"qs": "~6.5.2",
|
||||
"safe-buffer": "^5.1.2",
|
||||
"tough-cookie": "~2.4.3",
|
||||
"tunnel-agent": "^0.6.0",
|
||||
"uuid": "^3.3.2"
|
||||
}
|
||||
},
|
||||
"request-promise": {
|
||||
|
|
@ -1002,10 +1002,10 @@
|
|||
"integrity": "sha512-ZgnepCykFdmpq86fKGwqntyTiUrHycALuGggpyCZwMvGaZWgxW6yagT0FHkgo5LzYvOaCNvxYwWYIjevSH1EDg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bluebird": "3.7.2",
|
||||
"bluebird": "^3.5.0",
|
||||
"request-promise-core": "1.1.3",
|
||||
"stealthy-require": "1.1.1",
|
||||
"tough-cookie": "2.4.3"
|
||||
"stealthy-require": "^1.1.1",
|
||||
"tough-cookie": "^2.3.3"
|
||||
}
|
||||
},
|
||||
"request-promise-core": {
|
||||
|
|
@ -1014,7 +1014,7 @@
|
|||
"integrity": "sha512-QIs2+ArIGQVp5ZYbWD5ZLCY29D5CfWizP8eWnm8FoGD1TX61veauETVQbrV60662V0oFBkrDOuaBI8XgtuyYAQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lodash": "4.17.15"
|
||||
"lodash": "^4.17.15"
|
||||
}
|
||||
},
|
||||
"requires-port": {
|
||||
|
|
@ -1046,18 +1046,18 @@
|
|||
"dev": true,
|
||||
"requires": {
|
||||
"debug": "2.6.9",
|
||||
"depd": "1.1.2",
|
||||
"destroy": "1.0.4",
|
||||
"encodeurl": "1.0.2",
|
||||
"escape-html": "1.0.3",
|
||||
"etag": "1.8.1",
|
||||
"depd": "~1.1.2",
|
||||
"destroy": "~1.0.4",
|
||||
"encodeurl": "~1.0.2",
|
||||
"escape-html": "~1.0.3",
|
||||
"etag": "~1.8.1",
|
||||
"fresh": "0.5.2",
|
||||
"http-errors": "1.7.3",
|
||||
"http-errors": "~1.7.2",
|
||||
"mime": "1.6.0",
|
||||
"ms": "2.1.1",
|
||||
"on-finished": "2.3.0",
|
||||
"range-parser": "1.2.1",
|
||||
"statuses": "1.5.0"
|
||||
"on-finished": "~2.3.0",
|
||||
"range-parser": "~1.2.1",
|
||||
"statuses": "~1.5.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"mime": {
|
||||
|
|
@ -1080,9 +1080,9 @@
|
|||
"integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"encodeurl": "1.0.2",
|
||||
"escape-html": "1.0.3",
|
||||
"parseurl": "1.3.3",
|
||||
"encodeurl": "~1.0.2",
|
||||
"escape-html": "~1.0.3",
|
||||
"parseurl": "~1.3.3",
|
||||
"send": "0.17.1"
|
||||
}
|
||||
},
|
||||
|
|
@ -1098,7 +1098,7 @@
|
|||
"integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"shebang-regex": "1.0.0"
|
||||
"shebang-regex": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"shebang-regex": {
|
||||
|
|
@ -1124,15 +1124,15 @@
|
|||
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
|
||||
"integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==",
|
||||
"requires": {
|
||||
"asn1": "0.2.4",
|
||||
"assert-plus": "1.0.0",
|
||||
"bcrypt-pbkdf": "1.0.2",
|
||||
"dashdash": "1.14.1",
|
||||
"ecc-jsbn": "0.1.2",
|
||||
"getpass": "0.1.7",
|
||||
"jsbn": "0.1.1",
|
||||
"safer-buffer": "2.1.2",
|
||||
"tweetnacl": "0.14.5"
|
||||
"asn1": "~0.2.3",
|
||||
"assert-plus": "^1.0.0",
|
||||
"bcrypt-pbkdf": "^1.0.0",
|
||||
"dashdash": "^1.12.0",
|
||||
"ecc-jsbn": "~0.1.1",
|
||||
"getpass": "^0.1.1",
|
||||
"jsbn": "~0.1.0",
|
||||
"safer-buffer": "^2.0.2",
|
||||
"tweetnacl": "~0.14.0"
|
||||
}
|
||||
},
|
||||
"statuses": {
|
||||
|
|
@ -1153,7 +1153,7 @@
|
|||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-regex": "2.1.1"
|
||||
"ansi-regex": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"strip-eof": {
|
||||
|
|
@ -1174,13 +1174,13 @@
|
|||
"integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"chownr": "1.1.3",
|
||||
"fs-minipass": "1.2.7",
|
||||
"minipass": "2.9.0",
|
||||
"minizlib": "1.3.3",
|
||||
"mkdirp": "0.5.1",
|
||||
"safe-buffer": "5.2.0",
|
||||
"yallist": "3.1.1"
|
||||
"chownr": "^1.1.1",
|
||||
"fs-minipass": "^1.2.5",
|
||||
"minipass": "^2.8.6",
|
||||
"minizlib": "^1.2.1",
|
||||
"mkdirp": "^0.5.0",
|
||||
"safe-buffer": "^5.1.2",
|
||||
"yallist": "^3.0.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"yallist": {
|
||||
|
|
@ -1197,7 +1197,7 @@
|
|||
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-number": "7.0.0"
|
||||
"is-number": "^7.0.0"
|
||||
}
|
||||
},
|
||||
"toidentifier": {
|
||||
|
|
@ -1211,8 +1211,8 @@
|
|||
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz",
|
||||
"integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==",
|
||||
"requires": {
|
||||
"psl": "1.6.0",
|
||||
"punycode": "1.4.1"
|
||||
"psl": "^1.1.24",
|
||||
"punycode": "^1.4.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"punycode": {
|
||||
|
|
@ -1233,7 +1233,7 @@
|
|||
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
|
||||
"integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
|
||||
"requires": {
|
||||
"safe-buffer": "5.2.0"
|
||||
"safe-buffer": "^5.0.1"
|
||||
}
|
||||
},
|
||||
"tweetnacl": {
|
||||
|
|
@ -1247,8 +1247,8 @@
|
|||
"integrity": "sha512-uhRwZcANNWVLrxLfNFEdltoPNhECUR3lc+UdJoG9CBpMcSnKyWA94tc3eAujB1GcMY5Uwq8ZMp4qWpxWYDQmaA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"commander": "2.20.3",
|
||||
"source-map": "0.6.1"
|
||||
"commander": "~2.20.3",
|
||||
"source-map": "~0.6.1"
|
||||
}
|
||||
},
|
||||
"unpipe": {
|
||||
|
|
@ -1263,8 +1263,8 @@
|
|||
"integrity": "sha512-NG1h/MdGIX3HzyqMjyj1laBCmlPYhcO4xEy7gEqqzGiSLw7XqDQCnY4nYSn5XSaH8mQ6TFkaujrO8d/PIZN85A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"binary": "0.3.0",
|
||||
"mkdirp": "0.5.1"
|
||||
"binary": "^0.3.0",
|
||||
"mkdirp": "^0.5.1"
|
||||
}
|
||||
},
|
||||
"uri-js": {
|
||||
|
|
@ -1272,7 +1272,7 @@
|
|||
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
|
||||
"integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
|
||||
"requires": {
|
||||
"punycode": "2.1.1"
|
||||
"punycode": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"uuid": {
|
||||
|
|
@ -1285,9 +1285,9 @@
|
|||
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
|
||||
"integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
|
||||
"requires": {
|
||||
"assert-plus": "1.0.0",
|
||||
"assert-plus": "^1.0.0",
|
||||
"core-util-is": "1.0.2",
|
||||
"extsprintf": "1.3.0"
|
||||
"extsprintf": "^1.2.0"
|
||||
}
|
||||
},
|
||||
"which": {
|
||||
|
|
@ -1296,7 +1296,7 @@
|
|||
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"isexe": "2.0.0"
|
||||
"isexe": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"wrappy": {
|
||||
|
|
@ -1311,7 +1311,7 @@
|
|||
"integrity": "sha512-o41D/WmDeca0BqYhsr3nJzQyg9NF5X8l/UdnFNux9cS3lwB+swm8qGWX5rn+aD6xfBU3rGmtHij7g7x6LxFU3A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"async-limiter": "1.0.1"
|
||||
"async-limiter": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"yallist": {
|
||||
|
|
|
|||
Loading…
Reference in a new issue