diff --git a/404.html b/404.html new file mode 100644 index 000000000..df9189874 --- /dev/null +++ b/404.html @@ -0,0 +1,33 @@ + + + + + + VuePress + + + + + + + + + + + + + + + + + + + + + +

404

Looks like we've got some broken links.
+ Take me home. +
+ + + diff --git a/CNAME b/CNAME new file mode 100644 index 000000000..94f49b85c --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +two.js.org diff --git a/assets/css/0.styles.0c8e09bc.css b/assets/css/0.styles.0c8e09bc.css new file mode 100644 index 000000000..534e871e2 --- /dev/null +++ b/assets/css/0.styles.0c8e09bc.css @@ -0,0 +1 @@ +code[class*=language-],pre[class*=language-]{color:#ccc;background:none;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#2d2d2d}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.block-comment,.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#999}.token.punctuation{color:#ccc}.token.attr-name,.token.deleted,.token.namespace,.token.tag{color:#e2777a}.token.function-name{color:#6196cc}.token.boolean,.token.function,.token.number{color:#f08d49}.token.class-name,.token.constant,.token.property,.token.symbol{color:#f8c555}.token.atrule,.token.builtin,.token.important,.token.keyword,.token.selector{color:#cc99cd}.token.attr-value,.token.char,.token.regex,.token.string,.token.variable{color:#7ec699}.token.entity,.token.operator,.token.url{color:#67cdcc}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.token.inserted{color:green}.theme-default-content code{color:#5c5c5c;padding:.25rem .5rem;margin:0;font-size:.85em;background-color:rgba(27,31,35,.05);border-radius:3px}.theme-default-content code .token.deleted{color:#ec5975}.theme-default-content code .token.inserted{color:#ff8000}.theme-default-content pre,.theme-default-content pre[class*=language-]{line-height:1.4;padding:1.25rem 1.5rem;margin:.85rem 0;background-color:#282c34;border-radius:6px;overflow:auto}.theme-default-content pre[class*=language-] code,.theme-default-content pre code{color:#fff;padding:0;background-color:transparent;border-radius:0}div[class*=language-]{position:relative;background-color:#282c34;border-radius:6px}div[class*=language-] .highlight-lines{-webkit-user-select:none;user-select:none;padding-top:1.3rem;position:absolute;top:0;left:0;width:100%;line-height:1.4}div[class*=language-] .highlight-lines .highlighted{background-color:rgba(0,0,0,.66)}div[class*=language-] pre,div[class*=language-] pre[class*=language-]{background:transparent;position:relative;z-index:1}div[class*=language-]:before{position:absolute;z-index:3;top:.8em;right:1em;font-size:.75rem;color:hsla(0,0%,100%,.4)}div[class*=language-]:not(.line-numbers-mode) .line-numbers-wrapper{display:none}div[class*=language-].line-numbers-mode .highlight-lines .highlighted{position:relative}div[class*=language-].line-numbers-mode .highlight-lines .highlighted:before{content:" ";position:absolute;z-index:3;left:0;top:0;display:block;width:3.5rem;height:100%;background-color:rgba(0,0,0,.66)}div[class*=language-].line-numbers-mode pre{padding-left:4.5rem;vertical-align:middle}div[class*=language-].line-numbers-mode .line-numbers-wrapper{position:absolute;top:0;width:3.5rem;text-align:center;color:hsla(0,0%,100%,.3);padding:1.25rem 0;line-height:1.4}div[class*=language-].line-numbers-mode .line-numbers-wrapper br{-webkit-user-select:none;user-select:none}div[class*=language-].line-numbers-mode .line-numbers-wrapper .line-number{position:relative;z-index:4;-webkit-user-select:none;user-select:none;font-size:.85em}div[class*=language-].line-numbers-mode:after{content:"";position:absolute;z-index:2;top:0;left:0;width:3.5rem;height:100%;border-radius:6px 0 0 6px;border-right:1px solid rgba(0,0,0,.66);background-color:#282c34}div[class~=language-js]:before{content:"js"}div[class~=language-ts]:before{content:"ts"}div[class~=language-html]:before{content:"html"}div[class~=language-md]:before{content:"md"}div[class~=language-vue]:before{content:"vue"}div[class~=language-css]:before{content:"css"}div[class~=language-sass]:before{content:"sass"}div[class~=language-scss]:before{content:"scss"}div[class~=language-less]:before{content:"less"}div[class~=language-stylus]:before{content:"stylus"}div[class~=language-go]:before{content:"go"}div[class~=language-java]:before{content:"java"}div[class~=language-c]:before{content:"c"}div[class~=language-sh]:before{content:"sh"}div[class~=language-yaml]:before{content:"yaml"}div[class~=language-py]:before{content:"py"}div[class~=language-docker]:before{content:"docker"}div[class~=language-dockerfile]:before{content:"dockerfile"}div[class~=language-makefile]:before{content:"makefile"}div[class~=language-javascript]:before{content:"js"}div[class~=language-typescript]:before{content:"ts"}div[class~=language-markup]:before{content:"html"}div[class~=language-markdown]:before{content:"md"}div[class~=language-json]:before{content:"json"}div[class~=language-ruby]:before{content:"rb"}div[class~=language-python]:before{content:"py"}div[class~=language-bash]:before{content:"sh"}div[class~=language-php]:before{content:"php"}.custom-block .custom-block-title{font-weight:600;margin-bottom:-.4rem}.custom-block.danger,.custom-block.tip,.custom-block.warning{padding:.1rem 1.5rem;border-left-width:.5rem;border-left-style:solid;margin:1rem 0}.custom-block.tip{background-color:#f3f5f7;border-color:#42b983}.custom-block.warning{background-color:rgba(255,229,100,.3);border-color:#e7c000;color:#6b5900}.custom-block.warning .custom-block-title{color:#b29400}.custom-block.warning a{color:#333}.custom-block.danger{background-color:#ffe6e6;border-color:#c00;color:#4d0000}.custom-block.danger .custom-block-title{color:#900}.custom-block.danger a{color:#333}.custom-block.details{display:block;position:relative;border-radius:2px;margin:1.6em 0;padding:1.6em;background-color:#eee}.custom-block.details h4{margin-top:0}.custom-block.details figure:last-child,.custom-block.details p:last-child{margin-bottom:0;padding-bottom:0}.custom-block.details summary{outline:none;cursor:pointer}.arrow{display:inline-block;width:0;height:0}.arrow.up{border-bottom:6px solid #ccc}.arrow.down,.arrow.up{border-left:4px solid transparent;border-right:4px solid transparent}.arrow.down{border-top:6px solid #ccc}.arrow.right{border-left:6px solid #ccc}.arrow.left,.arrow.right{border-top:4px solid transparent;border-bottom:4px solid transparent}.arrow.left{border-right:6px solid #ccc}.theme-default-content:not(.custom){max-width:860px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.theme-default-content:not(.custom){padding:2rem}}@media (max-width:419px){.theme-default-content:not(.custom){padding:1.5rem}}.table-of-contents .badge{vertical-align:middle}body,html{padding:0;margin:0;background-color:#fff}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:16px}.page{padding-left:20rem}.navbar{z-index:20;right:0;height:3.6rem;background-color:#fff;box-sizing:border-box;border-bottom:1px solid #eaecef}.navbar,.sidebar-mask{position:fixed;top:0;left:0}.sidebar-mask{z-index:9;width:100vw;height:100vh;display:none}.sidebar{font-size:16px;background-color:#fff;width:20rem;position:fixed;z-index:10;margin:0;top:3.6rem;left:0;bottom:0;box-sizing:border-box;border-right:1px solid #eaecef;overflow-y:auto}.theme-default-content:not(.custom)>:first-child{margin-top:3.6rem}.theme-default-content:not(.custom) a:hover{text-decoration:underline}.theme-default-content:not(.custom) p.demo{padding:1rem 1.5rem;border:1px solid #ddd;border-radius:4px}.theme-default-content:not(.custom) img{max-width:100%}.theme-default-content.custom{padding:0;margin:0}.theme-default-content.custom img{max-width:100%}a{font-weight:500;text-decoration:none}a,p a code{color:#ff8000}p a code{font-weight:400}kbd{background:#eee;border:.15rem solid #ddd;border-bottom:.25rem solid #ddd;border-radius:.15rem;padding:0 .15em}blockquote{font-size:1rem;color:#999;border-left:.2rem solid #dfe2e5;margin:1rem 0;padding:.25rem 0 .25rem 1rem}blockquote>p{margin:0}ol,ul{padding-left:1.2em}strong{font-weight:600}h1,h2,h3,h4,h5,h6{font-weight:600;line-height:1.25}.theme-default-content:not(.custom)>h1,.theme-default-content:not(.custom)>h2,.theme-default-content:not(.custom)>h3,.theme-default-content:not(.custom)>h4,.theme-default-content:not(.custom)>h5,.theme-default-content:not(.custom)>h6{margin-top:-3.1rem;padding-top:4.6rem;margin-bottom:0}.theme-default-content:not(.custom)>h1:first-child,.theme-default-content:not(.custom)>h2:first-child,.theme-default-content:not(.custom)>h3:first-child,.theme-default-content:not(.custom)>h4:first-child,.theme-default-content:not(.custom)>h5:first-child,.theme-default-content:not(.custom)>h6:first-child{margin-top:-1.5rem;margin-bottom:1rem}.theme-default-content:not(.custom)>h1:first-child+.custom-block,.theme-default-content:not(.custom)>h1:first-child+p,.theme-default-content:not(.custom)>h1:first-child+pre,.theme-default-content:not(.custom)>h2:first-child+.custom-block,.theme-default-content:not(.custom)>h2:first-child+p,.theme-default-content:not(.custom)>h2:first-child+pre,.theme-default-content:not(.custom)>h3:first-child+.custom-block,.theme-default-content:not(.custom)>h3:first-child+p,.theme-default-content:not(.custom)>h3:first-child+pre,.theme-default-content:not(.custom)>h4:first-child+.custom-block,.theme-default-content:not(.custom)>h4:first-child+p,.theme-default-content:not(.custom)>h4:first-child+pre,.theme-default-content:not(.custom)>h5:first-child+.custom-block,.theme-default-content:not(.custom)>h5:first-child+p,.theme-default-content:not(.custom)>h5:first-child+pre,.theme-default-content:not(.custom)>h6:first-child+.custom-block,.theme-default-content:not(.custom)>h6:first-child+p,.theme-default-content:not(.custom)>h6:first-child+pre{margin-top:2rem}h1:focus .header-anchor,h1:hover .header-anchor,h2:focus .header-anchor,h2:hover .header-anchor,h3:focus .header-anchor,h3:hover .header-anchor,h4:focus .header-anchor,h4:hover .header-anchor,h5:focus .header-anchor,h5:hover .header-anchor,h6:focus .header-anchor,h6:hover .header-anchor{opacity:1}h1{font-size:2.2rem}h2{font-size:1.65rem;padding-bottom:.3rem;border-bottom:1px solid #eaecef}h3{font-size:1.35rem}a.header-anchor{font-size:.85em;float:left;margin-left:-.87em;padding-right:.23em;margin-top:.125em;-webkit-user-select:none;user-select:none;opacity:0}a.header-anchor:focus,a.header-anchor:hover{text-decoration:none}.line-number,code,kbd{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}ol,p,ul{line-height:1.7}hr{border:0;border-top:1px solid #eaecef}table{border-collapse:collapse;margin:1rem 0;display:block;overflow-x:auto}tr{border-top:1px solid #dfe2e5}tr:nth-child(2n){background-color:#f6f8fa}td,th{border:1px solid #dfe2e5;padding:.6em 1em}.theme-container.sidebar-open .sidebar-mask{display:block}.theme-container.no-navbar .theme-default-content:not(.custom)>h1,.theme-container.no-navbar h2,.theme-container.no-navbar h3,.theme-container.no-navbar h4,.theme-container.no-navbar h5,.theme-container.no-navbar h6{margin-top:1.5rem;padding-top:0}.theme-container.no-navbar .sidebar{top:0}@media (min-width:720px){.theme-container.no-sidebar .sidebar{display:none}.theme-container.no-sidebar .page{padding-left:0}}@media (max-width:959px){.sidebar{font-size:15px;width:16.4rem}.page{padding-left:16.4rem}}@media (max-width:719px){.sidebar{top:0;padding-top:3.6rem;transform:translateX(-100%);transition:transform .2s ease}.page{padding-left:0}.theme-container.sidebar-open .sidebar{transform:translateX(0)}.theme-container.no-navbar .sidebar{padding-top:0}}@media (max-width:419px){h1{font-size:1.9rem}.theme-default-content div[class*=language-]{margin:.85rem -1.5rem;border-radius:0}}body{font-family:proxima-nova,arial,sans-serif;font-size:1rem;line-height:1.5rem;color:#333}body .sidebar-open{overflow:hidden;width:100vw;height:100vh}body p{line-height:1.5rem;margin-top:0;margin-bottom:1.25rem}body .edit-link span{display:none}body #carbonads{margin-top:2rem}body .page-edit .edit-link a,body .page a{color:#00bfa8;text-decoration:none;font-weight:600;transition:color .2s,border-color .2s,background-color .2s;word-break:break-word;border-bottom:1px solid #00bfa8}body .page-edit .edit-link a span,body .page a span{display:none}body .page-edit .edit-link a:visited,body .page a:visited{text-decoration:none}body .page-edit .edit-link a:hover,body .page a:hover{color:#4cd2c2;text-decoration:none;border-bottom-color:#99e5dc}body .page-edit .edit-link a.header-anchor,body .page a.header-anchor{border-bottom-width:0;display:none}body .theme-default-content code{font-family:anonymous-pro,monospace;font-size:.85rem;line-height:100%;color:#3e3e3e;padding:.2rem .4rem;border-radius:4px;background:#f6f6f6;word-break:break-word}body .theme-default-content pre[class*=language-] code{color:#333;font-size:1rem}body .theme-default-content div[class*=language-]:before{color:transparent}body .theme-default-content code[class*=language-],body .theme-default-content pre[class*=language-]{color:#ccc;background:none;font-family:anonymous-pro,monospace;font-size:1rem;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5rem;tab-size:4;-webkit-hyphens:none;hyphens:none}body .theme-default-content pre[class*=language-]{padding:1rem;margin:.5em 0;overflow:auto;font-weight:600;font-size:1rem}body .theme-default-content :not(pre)>code[class*=language-]{padding:.1rem;border-radius:.3rem;white-space:normal}body .theme-default-content .token.block-comment,body .theme-default-content .token.cdata,body .theme-default-content .token.comment,body .theme-default-content .token.doctype,body .theme-default-content .token.prolog{color:#7c7c7c;font-style:italic}body .theme-default-content .token.attr-name,body .theme-default-content .token.deleted,body .theme-default-content .token.function-name,body .theme-default-content .token.namespace,body .theme-default-content .token.punctuation,body .theme-default-content .token.tag{color:#7c7c7c}body .theme-default-content .token.boolean{color:#2aa89a}body .theme-default-content .token.number{color:#ff4040}body .theme-default-content .token.function{color:#7c7c7c}body .theme-default-content .token.class-name,body .theme-default-content .token.constant,body .theme-default-content .token.property,body .theme-default-content .token.symbol{color:#ff4040}body .theme-default-content .token.atrule,body .theme-default-content .token.builtin,body .theme-default-content .token.important,body .theme-default-content .token.keyword,body .theme-default-content .token.selector{color:#7a52cc}body .theme-default-content .token.attr-value,body .theme-default-content .token.char,body .theme-default-content .token.regex,body .theme-default-content .token.string,body .theme-default-content .token.variable{color:#ff8000}body .theme-default-content .token.entity,body .theme-default-content .token.operator,body .theme-default-content .token.url{color:#7c7c7c}body .theme-default-content .token.bold,body .theme-default-content .token.important{font-weight:700}body .theme-default-content .token.italic{font-style:italic}body .theme-default-content .token.entity{cursor:help}body .theme-default-content .token.inserted{color:#7c7c7c}body div[class*=language-]{background:rgba(255,244,95,.2);border:none;font-weight:700;color:#7c7c7c}body .theme-default-content div[class*=language-]{margin:.85rem 0;border-radius:0}body div.inspiration{margin-bottom:1.5rem;margin-left:-.5rem;margin-right:-.5rem}body div.inspiration ul{list-style:none;padding:0}body div.inspiration ul li{display:inline-block;padding:0 .4rem .5rem!important;margin:0 .25rem;position:relative}body div.inspiration ul li a{text-align:center;display:block;width:100%;height:100%;padding:.5rem!important;border:1px solid #00bfa8;border-radius:.33rem}body div.inspiration ul li a:hover{border-color:#4cd2c2}body div.project-footnote{text-align:center;font-size:85%;margin-bottom:2rem}body div.project-footnote a{color:#515151;font-weight:400;border-bottom:none;text-decoration:underline}body div.project-footnote a:hover{color:#707070;border-bottom:none;text-decoration:underline!important}body div.project-footnote p{margin:0}.theme-default-content:not(.custom) a:hover{text-decoration:none}.theme-default-content:not(.custom) .icon.outbound{padding-left:5px}.theme-default-content:not(.custom) h1{font-size:2.25rem}.theme-default-content:not(.custom) h1:first-child+p{margin-top:1rem}.theme-default-content:not(.custom) h2{border:none;padding:4rem 0 0;margin:-1rem 0 0;height:0;overflow:hidden;pointer-events:none}.theme-default-content:not(.custom) h2.longname{visibility:visible;font-size:1.25rem;padding:0;margin:0 0 1.5rem;height:auto}.theme-default-content:not(.custom) h2.longname a{color:#ff8000;text-decoration:none;border-left:2px solid #ff8000;padding:.25rem 0 .4rem 1.25rem}.theme-default-content:not(.custom) h2.longname a:hover{color:#ff4040;border-color:#ff4040}.theme-default-content:not(.custom) h2.longname span{display:inline-block}.theme-default-content:not(.custom) h3{display:inline-block;font-size:1.25rem;border:none;border-top:2px solid #333;padding-top:.625rem;margin:2.5rem 0 1.25rem}.theme-default-content:not(.custom) h3.visible{margin-top:0}.theme-default-content:not(.custom) h3.visible a{color:inherit;font-weight:inherit;border-bottom:none}.theme-default-content:not(.custom) h3.visible a:hover{color:inherit;border-bottom:none}.theme-default-content:not(.custom) h4{margin:0 0 .25rem;padding:0}.theme-default-content:not(.custom) ul{margin:0}.theme-default-content:not(.custom) li{padding-left:.5rem}.custom-block.tip{background-color:#f6f2ff;color:#ab82ff;border:none;margin:1.5rem 0;padding:1rem 1rem 1rem 3.5rem;position:relative}.custom-block.tip p:last-child{margin-bottom:0}.custom-block.tip .custom-block-title{position:absolute;top:1rem;left:1rem;width:1.5rem;height:1.5rem;background:transparent;color:transparent;overflow:hidden;text-indent:-999px;background-image:url(/images/info.svg);background-position:50%;background-size:100%;background-repeat:no-repeat}.custom-block.tip a{color:#ab82ff;border-bottom:1px solid #cdb4ff}.custom-block.tip a:hover{color:#cdb4ff;border-bottom-color:#ddcdff;text-decoration:none}.custom-block.tip code{color:#ab82ff;background:transparent}.docs div.fires{padding-bottom:1rem}.docs div.fires>p{margin-bottom:.5rem}.docs .sidebar .sidebar-sub-headers{margin-left:calc(2em + 5px);padding-left:0;font-size:1rem}.docs .sidebar .sidebar-sub-headers a.sidebar-link{padding-left:1rem;color:#ff8000;border-left:2px solid #f93;padding-top:.125rem;padding-bottom:.125rem}.docs .sidebar .sidebar-sub-headers a.sidebar-link:hover{color:#ff4040}.docs .sidebar .sidebar-sub-headers a.sidebar-link:.active{color:#ff8000}.examples .examples-wrapper{display:flex;flex-wrap:wrap;margin:0 -1rem}.examples .example{padding:0 .5rem 1rem;width:calc(25% - 1rem)}.examples .example h2{margin-top:-4rem}.examples .example h3{font-size:0;border:none;margin:0;padding:0}.examples .example a.cover,.examples .example a.cover:hover{border-bottom:none!important}.examples .example .thumb{border-radius:.5rem .5rem 0 0;border-top:1px solid #ccc;border-left:1px solid #ccc;border-right:1px solid #ccc;box-sizing:border-box}.examples .example .tags{display:flex;flex-wrap:wrap;padding:.75rem .75rem .5rem;border-radius:0 0 .5rem .5rem;border:1px solid #ccc}.change-log .sidebar .sidebar-link{display:none}.change-log .sidebar .sidebar-sub-headers{padding:0;font-size:1rem}.change-log .sidebar .sidebar-sub-headers a.sidebar-link{display:inline-block;font-size:1rem;line-height:1.7rem;font-weight:600;padding:.35rem 1rem .35rem 1.25rem;border-left:.25rem solid transparent}th{font-weight:600}tr{background-color:#f9f9f9}thead tr,tr:nth-child(2n){background-color:transparent}table{border-collapse:separate;border-spacing:0}table tr td,table tr th{border:1px solid #eee;border-top:none;border-left:none}table tr td:first-child,table tr th:first-child{border-left:1px solid #eee}table tr th{background:transparent;border-top:1px solid #eee;text-align:left}table tr:first-child th:first-child{border-top-left-radius:6px}table tr:first-child th:last-child{border-top-right-radius:6px}table tr:last-child td:first-child{border-bottom-left-radius:6px}table tr:last-child td:last-child{border-bottom-right-radius:6px}.page a.lineno{color:#b0b0b0;font-family:anonymous-pro,monospace;font-size:.85rem;line-height:100%;word-break:break-word;border-bottom:1px solid #b0b0b0;padding-bottom:.2rem}.page a.lineno:hover{border-bottom-color:#7c7c7c;color:#7c7c7c}.change-log .version{font-size:1.25rem;margin-left:.5rem;display:inline-block}.change-log .version p{display:inline}.returns{margin:0 0 1.25rem}.page,.sidebar{transition:opacity .35s ease-in-out}.search-open .page,.search-open .sidebar{opacity:.5}.theme-container .sidebar-mask{display:block!important}@media (max-width:719px){.page{padding-top:4rem;padding-bottom:4rem!important}.theme-default-content:not(.custom) h2{padding-top:8rem;margin-top:-5rem}.examples .example{width:100%}.examples .example h2{margin-top:-8rem}}#nprogress{pointer-events:none}#nprogress .bar{background:#00bfa8;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #00bfa8,0 0 5px #00bfa8;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border-color:#00bfa8 transparent transparent #00bfa8;border-style:solid;border-width:2px;border-radius:50%;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}html{scroll-behavior:smooth}.icon.outbound{color:#aaa;display:inline-block;vertical-align:middle;position:relative;top:-1px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.algolia-search-wrapper>span{vertical-align:middle}.algolia-search-wrapper .algolia-autocomplete{line-height:normal}.algolia-search-wrapper .algolia-autocomplete .ds-dropdown-menu{background-color:#fff;border:1px solid #999;border-radius:4px;font-size:16px;margin:6px 0 0;padding:4px;text-align:left}.algolia-search-wrapper .algolia-autocomplete .ds-dropdown-menu:before{border-color:#999}.algolia-search-wrapper .algolia-autocomplete .ds-dropdown-menu [class*=ds-dataset-]{border:none;padding:0}.algolia-search-wrapper .algolia-autocomplete .ds-dropdown-menu .ds-suggestions{margin-top:0}.algolia-search-wrapper .algolia-autocomplete .ds-dropdown-menu .ds-suggestion{border-bottom:1px solid #eaecef}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion--highlight{color:#2c815b}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion{border-color:#eaecef;padding:0}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--category-header{padding:5px 10px;margin-top:0;background:#ff8000;color:#fff;font-weight:600}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--highlight{background:hsla(0,0%,100%,.6)}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--wrapper{padding:0}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--title{font-weight:600;margin-bottom:0;color:#333}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column{vertical-align:top;padding:5px 7px 5px 5px;border-color:#eaecef;background:#f1f3f5}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column:after{display:none}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column-text{color:#555}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-footer{border-color:#eaecef}.algolia-search-wrapper .algolia-autocomplete .ds-cursor .algolia-docsearch-suggestion--content{background-color:#e7edf3!important;color:#333}@media (min-width:719px){.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column{float:none;width:150px;min-width:150px;display:table-cell}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--content{float:none;display:table-cell;width:100%;vertical-align:top}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .ds-dropdown-menu{min-width:515px!important}}@media (max-width:719px){.algolia-search-wrapper .ds-dropdown-menu{min-width:calc(100vw - 4rem)!important;max-width:calc(100vw - 4rem)!important}.algolia-search-wrapper .algolia-docsearch-suggestion--wrapper{padding:5px 7px 5px 5px!important}.algolia-search-wrapper .algolia-docsearch-suggestion--subcategory-column{padding:0!important;background:#fff!important}.algolia-search-wrapper .algolia-docsearch-suggestion--subcategory-column-text:after{content:" > ";font-size:10px;line-height:14.4px;display:inline-block;width:5px;margin:-3px 3px 0;vertical-align:middle}}.home{padding:3.6rem 2rem 0;max-width:960px;margin:0 auto;display:block}.home .hero{text-align:center}.home .hero img{max-width:100%;max-height:280px;display:block;margin:3rem auto 1.5rem}.home .hero h1{font-size:3rem}.home .hero .action,.home .hero .description,.home .hero h1{margin:1.8rem auto}.home .hero .description{max-width:35rem;font-size:1.6rem;line-height:1.3;color:#858585}.home .hero .action-button{display:inline-block;font-size:1.2rem;color:#fff;background-color:#ff8000;padding:.8rem 1.6rem;border-radius:4px;transition:background-color .1s ease;box-sizing:border-box;border-bottom:1px solid #e67300}.home .hero .action-button:hover{background-color:#ff8d1a}.home .features{border-top:1px solid #eaecef;padding:1.2rem 0;margin-top:2.5rem;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:stretch;justify-content:space-between}.home .feature{flex-grow:1;flex-basis:30%;max-width:30%}.home .feature h2{font-size:1.4rem;font-weight:500;border-bottom:none;padding-bottom:0;color:#474747}.home .feature p{color:#666}.home .footer{padding:2.5rem;border-top:1px solid #eaecef;text-align:center;color:#666}@media (max-width:719px){.home .features{flex-direction:column}.home .feature{max-width:100%;padding:0 2.5rem}}@media (max-width:419px){.home{padding-left:1.5rem;padding-right:1.5rem}.home .hero img{max-height:210px;margin:2rem auto 1.2rem}.home .hero h1{font-size:2rem}.home .hero .action,.home .hero .description,.home .hero h1{margin:1.2rem auto}.home .hero .description{font-size:1.2rem}.home .hero .action-button{font-size:1rem;padding:.6rem 1.2rem}.home .feature h2{font-size:1.25rem}}.search-box{display:inline-block;position:relative;margin-right:1rem}.search-box input{cursor:text;max-width:22.5rem;width:33.3vw;height:2rem;color:#666;display:inline-block;border:1px solid #cfd4db;border-radius:2rem;font-family:proxima-nova,arial,sans-serif;font-size:1rem;font-weight:600;line-height:2rem;outline:none;transition:all .2s ease;background-size:1rem;background:#fff url(/images/search.svg) .55rem .25rem no-repeat;padding:0 .5rem 0 2.5rem}.search-box input:focus{cursor:auto;border-color:#ffbf7f;color:#333}.search-box input::-moz-placeholder{color:#999}.search-box input::placeholder{color:#999}.search-box .suggestions{background:#fff;width:100%;position:absolute;top:1.85rem;border:1px solid #ffbf7f;border-radius:6px;padding:0;list-style-type:none}.search-box .suggestions.align-right{right:0}.search-box .suggestion{padding:.75rem 1.25rem;border-radius:4px;cursor:pointer;font-size:1rem;line-height:auto;font-weight:400}.search-box .suggestion a{white-space:normal;color:#555}.search-box .suggestion a .page-title{font-weight:600}.search-box .suggestion a .header{font-size:.9em;margin-left:.25em}.search-box .suggestion a .is-tag .chevron{display:none}.search-box .suggestion.focused{background-color:#fff4ea}.search-box .suggestion.focused a{color:#ff8000}@media (-ms-high-contrast:none){.search-box input{height:2rem}}@media (max-width:719px){.search-box{margin-right:0;width:100%}.search-box input{height:3rem;width:100vw;max-width:100vw;background-position:.5rem .75rem;left:0;border-radius:0;border:1px solid #e6e6e6;border-right:none;border-left:none}.search-box ul.suggestions{left:0;right:0;border-radius:0;border-right:0;border-left:0}}.sidebar-button{cursor:pointer;display:none;width:1.25rem;height:1.25rem;position:absolute;padding:.6rem;top:.6rem;left:1rem}.sidebar-button .icon{display:block;width:1.25rem;height:1.25rem}@media (max-width:719px){.sidebar-button{display:block}}.dropdown-enter,.dropdown-leave-to{height:0!important}.badge[data-v-15b7b770]{display:inline-block;font-size:14px;height:18px;line-height:18px;border-radius:3px;padding:0 6px;color:#fff;background-color:#42b983}.badge.green[data-v-15b7b770],.badge.tip[data-v-15b7b770]{background-color:$purplebg}.badge.error[data-v-15b7b770]{background-color:#da5961}.badge.warn[data-v-15b7b770],.badge.warning[data-v-15b7b770],.badge.yellow[data-v-15b7b770]{background-color:#e7c000}.badge+.badge[data-v-15b7b770]{margin-left:5px}.theme-code-block[data-v-759a7d02]{display:none}.theme-code-block__active[data-v-759a7d02]{display:block}.theme-code-block>pre[data-v-759a7d02]{background-color:orange}.theme-code-group__nav[data-v-deefee04]{margin-bottom:-35px;background-color:#282c34;padding-bottom:22px;border-top-left-radius:6px;border-top-right-radius:6px;padding-left:10px;padding-top:10px}.theme-code-group__ul[data-v-deefee04]{margin:auto 0;padding-left:0;display:inline-flex;list-style:none}.theme-code-group__nav-tab[data-v-deefee04]{border:0;padding:5px;cursor:pointer;background-color:transparent;font-size:.85em;line-height:1.4;color:hsla(0,0%,100%,.9);font-weight:600}.theme-code-group__nav-tab-active[data-v-deefee04]{border-bottom:1px solid #42b983}.pre-blank[data-v-deefee04]{color:#42b983}#carbonads *{margin:initial;padding:initial}#carbonads{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,Helvetica,Arial,sans-serif;display:flex;max-width:330px;background-color:#fafafa;border:1px solid #ddd;border-radius:4px;z-index:100;overflow:hidden}#carbonads a{text-decoration:none;border:none;font-weight:400}#carbonads a,#carbonads a:hover{color:inherit}#carbonads span{position:relative;display:block;overflow:hidden}#carbonads .carbon-wrap{display:flex}#carbonads .carbon-img{display:block;margin:0;line-height:1}#carbonads .carbon-img img{display:block}#carbonads .carbon-text{font-size:10px;padding:10px;margin-bottom:16px;line-height:1.5;text-align:left}#carbonads .carbon-poweredby{display:block;padding:6px 8px;background:#f1f1f2;text-align:center;text-transform:uppercase;letter-spacing:.5px;font-weight:600;font-size:8px;line-height:1;border-top-left-radius:3px;position:absolute;bottom:0;right:0}a.button[data-v-c5bb3906]{display:inline-block;background:#f2fbfa;color:#00bfa8;border:2px solid #00bfa8;border-radius:9999px;padding:.5rem 1rem .5rem 2.75rem;margin:0 1rem .5rem 0;position:relative}a.button span[data-v-c5bb3906]{display:inline-block}a.button.source[data-v-c5bb3906]{position:fixed;top:6rem;right:1rem;left:auto;bottom:auto;z-index:10}a.button[data-v-c5bb3906]:hover{background:#fff4ea;color:#ff8000;border:2px solid #ff8000;text-decoration:none}a.button:hover .icon[data-v-c5bb3906]{background-color:#ff8000}a.button .icon[data-v-c5bb3906]{width:1.5em;height:1.5em;background-color:#00bfa8;background-position:50%;background-size:100%;background-repeat:no-repeat;position:absolute;top:.475rem;left:.8rem}a.button .icon.download[data-v-c5bb3906]{mask-image:url(/images/download.svg);-webkit-mask-image:url(/images/download.svg)}a.button .icon.sponsor[data-v-c5bb3906]{mask-image:url(/images/sponsor.svg);-webkit-mask-image:url(/images/sponsor.svg)}a.button .icon.github[data-v-c5bb3906]{mask-image:url(/images/github.svg);-webkit-mask-image:url(/images/github.svg)}a.button .icon.source[data-v-c5bb3906]{mask-image:url(/images/source.svg);-webkit-mask-image:url(/images/source.svg)}a.button .label[data-v-c5bb3906]{font-weight:600}a.button .size[data-v-c5bb3906]{font-weight:200}@media (max-width:719px){a.button.source[data-v-c5bb3906]{bottom:1rem;right:.5rem;top:auto;left:auto;width:0;padding:.5rem 1.25rem}a.button.source span.icon.source[data-v-c5bb3906]{top:50%;left:50%;transform:translate(-50%,-50%)}a.button.source span.label[data-v-c5bb3906]{display:none}}.thumb[data-v-66597b69]{display:block;width:100%;height:15vh;min-height:120px;background-size:cover;background-position:50%}.title[data-v-66597b69]{font-size:1rem;font-weight:600;padding:.5rem .7rem .5rem 2.7rem;border:1px solid #ccc;border-bottom:0;color:#333;position:relative}.title[data-v-66597b69]:hover{color:#333}.type[data-v-66597b69]{background-repeat:no-repeat;background-position:50%;height:1rem;display:inline-block;position:absolute;width:2rem;left:.5rem;top:.7rem}.type.codepen[data-v-66597b69]{background-image:url(/images/codepen.svg)}.type.codesandbox[data-v-66597b69]{background-image:url(/images/codesandbox.svg)}.type.glitch[data-v-66597b69]{background-image:url(/images/glitch.svg)}.type.jsfiddle[data-v-66597b69]{background-image:url(/images/jsfiddle.svg)}.type.observable[data-v-66597b69]{background-image:url(/images/observable.svg)}.type.internet[data-v-66597b69]{background-image:url(/images/internet.svg)}@media (max-width:719px){.thumb[data-v-66597b69]{height:240px}}ul.tags[data-v-66597b69]{list-style:none}ul.tags .tag[data-v-66597b69]{border-radius:.2rem;padding:0 .75rem;font-size:.625rem;line-height:1.25rem;font-weight:400;color:#333;margin:0 .15rem .25rem 0;display:inline-block;cursor:default}ul.tags .tag.grey[data-v-66597b69]{background:#f9f9f9}ul.tags .tag.red[data-v-66597b69]{background:#ffc5c5}ul.tags .tag.orange[data-v-66597b69]{background:#ffd8b2}ul.tags .tag.yellow[data-v-66597b69]{background:#fffbcf}ul.tags .tag.green[data-v-66597b69]{background:#b2ebe4}ul.tags .tag.blue[data-v-66597b69]{background:#b2eeff}ul.tags .tag.purple[data-v-66597b69]{background:#e5d9ff}.version[data-v-24f72e98]{font-size:1.25rem}.searchbox{display:inline-block;position:relative;width:200px;height:32px!important;white-space:nowrap;box-sizing:border-box;visibility:visible!important}.searchbox .algolia-autocomplete{display:block;width:100%;height:100%}.searchbox__wrapper{width:100%;height:100%;z-index:999;position:relative}.searchbox__input{display:inline-block;box-sizing:border-box;transition:box-shadow .4s ease,background .4s ease;border:0;border-radius:16px;box-shadow:inset 0 0 0 1px #ccc;background:#fff!important;padding:0 26px 0 32px;width:100%;height:100%;vertical-align:middle;white-space:normal;font-size:12px;-webkit-appearance:none;-moz-appearance:none;appearance:none}.searchbox__input::-webkit-search-cancel-button,.searchbox__input::-webkit-search-decoration,.searchbox__input::-webkit-search-results-button,.searchbox__input::-webkit-search-results-decoration{display:none}.searchbox__input:hover{box-shadow:inset 0 0 0 1px #b3b3b3}.searchbox__input:active,.searchbox__input:focus{outline:0;box-shadow:inset 0 0 0 1px #aaa;background:#fff}.searchbox__input::-moz-placeholder{color:#aaa}.searchbox__input::placeholder{color:#aaa}.searchbox__submit{position:absolute;top:0;margin:0;border:0;border-radius:16px 0 0 16px;background-color:rgba(69,142,225,0);padding:0;width:32px;height:100%;vertical-align:middle;text-align:center;font-size:inherit;-webkit-user-select:none;-moz-user-select:none;user-select:none;right:inherit;left:0}.searchbox__submit:before{display:inline-block;margin-right:-4px;height:100%;vertical-align:middle;content:""}.searchbox__submit:active,.searchbox__submit:hover{cursor:pointer}.searchbox__submit:focus{outline:0}.searchbox__submit svg{width:14px;height:14px;vertical-align:middle;fill:#6d7e96}.searchbox__reset{display:block;position:absolute;top:8px;right:8px;margin:0;border:0;background:none;cursor:pointer;padding:0;font-size:inherit;-webkit-user-select:none;-moz-user-select:none;user-select:none;fill:rgba(0,0,0,.5)}.searchbox__reset.hide{display:none}.searchbox__reset:focus{outline:0}.searchbox__reset svg{display:block;margin:4px;width:8px;height:8px}.searchbox__input:valid~.searchbox__reset{display:block;animation-name:sbx-reset-in;animation-duration:.15s}@keyframes sbx-reset-in{0%{transform:translate3d(-20%,0,0);opacity:0}to{transform:none;opacity:1}}.algolia-autocomplete.algolia-autocomplete-right .ds-dropdown-menu{right:0!important;left:inherit!important}.algolia-autocomplete.algolia-autocomplete-right .ds-dropdown-menu:before{right:48px}.algolia-autocomplete.algolia-autocomplete-left .ds-dropdown-menu{left:0!important;right:inherit!important}.algolia-autocomplete.algolia-autocomplete-left .ds-dropdown-menu:before{left:48px}.algolia-autocomplete .ds-dropdown-menu{top:-6px;border-radius:4px;margin:6px 0 0;padding:0;text-align:left;height:auto;position:relative;background:transparent;border:none;z-index:999;max-width:600px;min-width:500px;box-shadow:0 1px 0 0 rgba(0,0,0,.2),0 2px 3px 0 rgba(0,0,0,.1)}.algolia-autocomplete .ds-dropdown-menu:before{display:block;position:absolute;content:"";width:14px;height:14px;background:#fff;z-index:1000;top:-7px;border-top:1px solid #d9d9d9;border-right:1px solid #d9d9d9;transform:rotate(-45deg);border-radius:2px}.algolia-autocomplete .ds-dropdown-menu .ds-suggestions{position:relative;z-index:1000;margin-top:8px}.algolia-autocomplete .ds-dropdown-menu .ds-suggestions a:hover{text-decoration:none}.algolia-autocomplete .ds-dropdown-menu .ds-suggestion{cursor:pointer}.algolia-autocomplete .ds-dropdown-menu .ds-suggestion.ds-cursor .algolia-docsearch-suggestion.suggestion-layout-simple,.algolia-autocomplete .ds-dropdown-menu .ds-suggestion.ds-cursor .algolia-docsearch-suggestion:not(.suggestion-layout-simple) .algolia-docsearch-suggestion--content{background-color:rgba(69,142,225,.05)}.algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-]{position:relative;border:1px solid #d9d9d9;background:#fff;border-radius:4px;overflow:auto;padding:0 8px 8px}.algolia-autocomplete .ds-dropdown-menu *{box-sizing:border-box}.algolia-autocomplete .algolia-docsearch-suggestion{display:block;position:relative;padding:0 8px;background:#fff;color:#02060c;overflow:hidden}.algolia-autocomplete .algolia-docsearch-suggestion--highlight{color:#174d8c;background:rgba(143,187,237,.1);padding:.1em .05em}.algolia-autocomplete .algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--category-header-lvl0 .algolia-docsearch-suggestion--highlight,.algolia-autocomplete .algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--category-header-lvl1 .algolia-docsearch-suggestion--highlight,.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight{padding:0 0 1px;background:inherit;box-shadow:inset 0 -2px 0 0 rgba(69,142,225,.8);color:inherit}.algolia-autocomplete .algolia-docsearch-suggestion--content{display:block;float:right;width:70%;position:relative;padding:5.33333px 0 5.33333px 10.66667px;cursor:pointer}.algolia-autocomplete .algolia-docsearch-suggestion--content:before{content:"";position:absolute;display:block;top:0;height:100%;width:1px;background:#ddd;left:-1px}.algolia-autocomplete .algolia-docsearch-suggestion--category-header{position:relative;border-bottom:1px solid #ddd;display:none;margin-top:8px;padding:4px 0;font-size:1em;color:#33363d}.algolia-autocomplete .algolia-docsearch-suggestion--wrapper{width:100%;float:left;padding:8px 0 0}.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column{float:left;width:30%;text-align:right;position:relative;padding:5.33333px 10.66667px;color:#a4a7ae;font-size:.9em;word-wrap:break-word}.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column:before{content:"";position:absolute;display:block;top:0;height:100%;width:1px;background:#ddd;right:0}.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-inline{display:none}.algolia-autocomplete .algolia-docsearch-suggestion--title{margin-bottom:4px;color:#02060c;font-size:.9em;font-weight:700}.algolia-autocomplete .algolia-docsearch-suggestion--text{display:block;line-height:1.2em;font-size:.85em;color:#63676d}.algolia-autocomplete .algolia-docsearch-suggestion--no-results{width:100%;padding:8px 0;text-align:center;font-size:1.2em}.algolia-autocomplete .algolia-docsearch-suggestion--no-results:before{display:none}.algolia-autocomplete .algolia-docsearch-suggestion code{padding:1px 5px;font-size:90%;border:none;color:#222;background-color:#ebebeb;border-radius:3px;font-family:Menlo,Monaco,Consolas,Courier New,monospace}.algolia-autocomplete .algolia-docsearch-suggestion code .algolia-docsearch-suggestion--highlight{background:none}.algolia-autocomplete .algolia-docsearch-suggestion.algolia-docsearch-suggestion__main .algolia-docsearch-suggestion--category-header,.algolia-autocomplete .algolia-docsearch-suggestion.algolia-docsearch-suggestion__secondary{display:block}@media (min-width:768px){.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column{display:block}}@media (max-width:768px){.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column{display:inline-block;width:auto;float:left;padding:0;color:#02060c;font-size:.9em;font-weight:700;text-align:left;opacity:.5}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column:before{display:none}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column:after{content:"|"}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--content{display:inline-block;width:auto;text-align:left;float:left;padding:0}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--content:before{display:none}}.algolia-autocomplete .suggestion-layout-simple.algolia-docsearch-suggestion{border-bottom:1px solid #eee;padding:8px;margin:0}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--content{width:100%;padding:0}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--content:before{display:none}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header{margin:0;padding:0;display:block;width:100%;border:none}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header-lvl0,.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header-lvl1{opacity:.6;font-size:.85em}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header-lvl1:before{background-image:url('data:image/svg+xml;utf8,');content:"";width:10px;height:10px;display:inline-block}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--wrapper{width:100%;float:left;margin:0;padding:0}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--duplicate-content,.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--subcategory-inline{display:none!important}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--title{margin:0;color:#458ee1;font-size:.9em;font-weight:400}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--title:before{content:"#";font-weight:700;color:#458ee1;display:inline-block}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--text{margin:4px 0 0;display:block;line-height:1.4em;padding:5.33333px 8px;background:#f8f8f8;font-size:.85em;opacity:.8}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight{color:#3f4145;font-weight:700;box-shadow:none}.algolia-autocomplete .algolia-docsearch-footer{width:134px;height:20px;z-index:2000;margin-top:10.66667px;float:right;font-size:0;line-height:0}.algolia-autocomplete .algolia-docsearch-footer--logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='168' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M78.988.938h16.594a2.968 2.968 0 012.966 2.966V20.5a2.967 2.967 0 01-2.966 2.964H78.988a2.967 2.967 0 01-2.966-2.964V3.897A2.961 2.961 0 0178.988.938zm41.937 17.866c-4.386.02-4.386-3.54-4.386-4.106l-.007-13.336 2.675-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-10.846-2.18c.821 0 1.43-.047 1.855-.129v-2.719a6.334 6.334 0 00-1.574-.199 5.7 5.7 0 00-.897.069 2.699 2.699 0 00-.814.24c-.24.116-.439.28-.582.491-.15.212-.219.335-.219.656 0 .628.219.991.616 1.23s.938.362 1.615.362zm-.233-9.7c.883 0 1.629.109 2.231.328.602.218 1.088.525 1.444.915.363.396.609.922.76 1.483.157.56.232 1.175.232 1.85v6.874a32.5 32.5 0 01-1.868.314c-.834.123-1.772.185-2.813.185-.69 0-1.327-.069-1.895-.198a4.001 4.001 0 01-1.471-.636 3.085 3.085 0 01-.951-1.134c-.226-.465-.343-1.12-.343-1.803 0-.656.13-1.073.384-1.525a3.24 3.24 0 011.047-1.106c.445-.287.95-.492 1.532-.615a8.8 8.8 0 011.82-.185 8.404 8.404 0 011.972.24v-.438c0-.307-.035-.6-.11-.874a1.88 1.88 0 00-.384-.73 1.784 1.784 0 00-.724-.493 3.164 3.164 0 00-1.143-.205c-.616 0-1.177.075-1.69.164a7.735 7.735 0 00-1.26.307l-.321-2.192c.335-.117.834-.233 1.478-.349a10.98 10.98 0 012.073-.178zm52.842 9.626c.822 0 1.43-.048 1.854-.13V13.7a6.347 6.347 0 00-1.574-.199c-.294 0-.595.021-.896.069a2.7 2.7 0 00-.814.24 1.46 1.46 0 00-.582.491c-.15.212-.218.335-.218.656 0 .628.218.991.615 1.23.404.245.938.362 1.615.362zm-.226-9.694c.883 0 1.629.108 2.231.327.602.219 1.088.526 1.444.915.355.39.609.923.759 1.483a6.8 6.8 0 01.233 1.852v6.873c-.41.088-1.034.19-1.868.314-.834.123-1.772.184-2.813.184-.69 0-1.327-.068-1.895-.198a4.001 4.001 0 01-1.471-.635 3.085 3.085 0 01-.951-1.134c-.226-.465-.343-1.12-.343-1.804 0-.656.13-1.073.384-1.524.26-.45.608-.82 1.047-1.107.445-.286.95-.491 1.532-.614a8.803 8.803 0 012.751-.13c.329.034.671.096 1.04.185v-.437a3.3 3.3 0 00-.109-.875 1.873 1.873 0 00-.384-.731 1.784 1.784 0 00-.724-.492 3.165 3.165 0 00-1.143-.205c-.616 0-1.177.075-1.69.164a7.75 7.75 0 00-1.26.307l-.321-2.193c.335-.116.834-.232 1.478-.348a11.633 11.633 0 012.073-.177zm-8.034-1.271a1.626 1.626 0 01-1.628-1.62c0-.895.725-1.62 1.628-1.62.904 0 1.63.725 1.63 1.62 0 .895-.733 1.62-1.63 1.62zm1.348 13.22h-2.689V7.27l2.69-.423v11.956zm-4.714 0c-4.386.02-4.386-3.54-4.386-4.107l-.008-13.336 2.676-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-8.698-5.903c0-1.156-.253-2.119-.746-2.788-.493-.677-1.183-1.01-2.067-1.01-.882 0-1.574.333-2.065 1.01-.493.676-.733 1.632-.733 2.788 0 1.168.246 1.953.74 2.63.492.683 1.183 1.018 2.066 1.018.882 0 1.574-.342 2.067-1.019.492-.683.738-1.46.738-2.63zm2.737-.007c0 .902-.13 1.584-.397 2.33a5.52 5.52 0 01-1.128 1.906 4.986 4.986 0 01-1.752 1.223c-.685.286-1.739.45-2.265.45-.528-.006-1.574-.157-2.252-.45a5.096 5.096 0 01-1.744-1.223c-.487-.527-.863-1.162-1.137-1.906a6.345 6.345 0 01-.41-2.33c0-.902.123-1.77.397-2.508a5.554 5.554 0 011.15-1.892 5.133 5.133 0 011.75-1.216c.679-.287 1.425-.423 2.232-.423.808 0 1.553.142 2.237.423a4.88 4.88 0 011.753 1.216 5.644 5.644 0 011.135 1.892c.287.738.431 1.606.431 2.508zm-20.138 0c0 1.12.246 2.363.738 2.882.493.52 1.13.78 1.91.78.424 0 .828-.062 1.204-.178.377-.116.677-.253.917-.417V9.33a10.476 10.476 0 00-1.766-.226c-.971-.028-1.71.37-2.23 1.004-.513.636-.773 1.75-.773 2.788zm7.438 5.274c0 1.824-.466 3.156-1.404 4.004-.936.846-2.367 1.27-4.296 1.27-.705 0-2.17-.137-3.34-.396l.431-2.118c.98.205 2.272.26 2.95.26 1.074 0 1.84-.219 2.299-.656.459-.437.684-1.086.684-1.948v-.437a8.07 8.07 0 01-1.047.397c-.43.13-.93.198-1.492.198-.739 0-1.41-.116-2.018-.349a4.206 4.206 0 01-1.567-1.025c-.431-.45-.774-1.017-1.013-1.694-.24-.677-.363-1.885-.363-2.773 0-.834.13-1.88.384-2.577.26-.696.629-1.298 1.129-1.796.493-.498 1.095-.881 1.8-1.162a6.605 6.605 0 012.428-.457c.87 0 1.67.109 2.45.24.78.129 1.444.265 1.985.415V18.17z' fill='%235468FF'/%3E%3Cpath d='M6.972 6.677v1.627c-.712-.446-1.52-.67-2.425-.67-.585 0-1.045.13-1.38.391a1.24 1.24 0 00-.502 1.03c0 .425.164.765.494 1.02.33.256.835.532 1.516.83.447.192.795.356 1.045.495.25.138.537.332.862.582.324.25.563.548.718.894.154.345.23.741.23 1.188 0 .947-.334 1.691-1.004 2.234-.67.542-1.537.814-2.601.814-1.18 0-2.16-.229-2.936-.686v-1.708c.84.628 1.814.942 2.92.942.585 0 1.048-.136 1.388-.407.34-.271.51-.646.51-1.125 0-.287-.1-.55-.302-.79-.203-.24-.42-.42-.655-.542-.234-.123-.585-.29-1.053-.503a61.27 61.27 0 01-.582-.271 13.67 13.67 0 01-.55-.287 4.275 4.275 0 01-.567-.351 6.92 6.92 0 01-.455-.4c-.18-.17-.31-.34-.39-.51-.08-.17-.155-.37-.224-.598a2.553 2.553 0 01-.104-.742c0-.915.333-1.638.998-2.17.664-.532 1.523-.798 2.576-.798.968 0 1.793.17 2.473.51zm7.468 5.696v-.287c-.022-.607-.187-1.088-.495-1.444-.309-.357-.75-.535-1.324-.535-.532 0-.99.194-1.373.583-.382.388-.622.949-.717 1.683h3.909zm1.005 2.792v1.404c-.596.34-1.383.51-2.362.51-1.255 0-2.255-.377-3-1.132-.744-.755-1.116-1.744-1.116-2.968 0-1.297.34-2.316 1.021-3.055.68-.74 1.548-1.11 2.6-1.11 1.033 0 1.852.323 2.458.966.606.644.91 1.572.91 2.784 0 .33-.033.676-.096 1.038h-5.314c.107.702.405 1.239.894 1.611.49.372 1.106.558 1.85.558.862 0 1.58-.202 2.155-.606zm6.605-1.77h-1.212c-.596 0-1.045.116-1.349.35-.303.234-.454.532-.454.894 0 .372.117.664.35.877.235.213.575.32 1.022.32.51 0 .912-.142 1.204-.424.293-.281.44-.651.44-1.108v-.91zm-4.068-2.554V9.325c.627-.361 1.457-.542 2.489-.542 2.116 0 3.175 1.026 3.175 3.08V17h-1.548v-.957c-.415.68-1.143 1.02-2.186 1.02-.766 0-1.38-.22-1.843-.661-.462-.442-.694-1.003-.694-1.684 0-.776.293-1.38.878-1.81.585-.431 1.404-.647 2.457-.647h1.34V11.8c0-.554-.133-.971-.399-1.253-.266-.282-.707-.423-1.324-.423a4.07 4.07 0 00-2.345.718zm9.333-1.93v1.42c.394-1 1.101-1.5 2.123-1.5.148 0 .313.016.494.048v1.531a1.885 1.885 0 00-.75-.143c-.542 0-.989.24-1.34.718-.351.479-.527 1.048-.527 1.707V17h-1.563V8.91h1.563zm5.01 4.084c.022.82.272 1.492.75 2.019.479.526 1.15.79 2.01.79.639 0 1.235-.176 1.788-.527v1.404c-.521.319-1.186.479-1.995.479-1.265 0-2.276-.4-3.031-1.197-.755-.798-1.133-1.792-1.133-2.984 0-1.16.38-2.151 1.14-2.975.761-.825 1.79-1.237 3.088-1.237.702 0 1.346.149 1.93.447v1.436a3.242 3.242 0 00-1.77-.495c-.84 0-1.513.266-2.019.798-.505.532-.758 1.213-.758 2.042zM40.24 5.72v4.579c.458-1 1.293-1.5 2.505-1.5.787 0 1.42.245 1.899.734.479.49.718 1.17.718 2.042V17h-1.564v-5.106c0-.553-.14-.98-.422-1.284-.282-.303-.652-.455-1.11-.455-.531 0-1.002.202-1.411.606-.41.405-.615 1.022-.615 1.851V17h-1.563V5.72h1.563zm14.966 10.02c.596 0 1.096-.253 1.5-.758.404-.506.606-1.157.606-1.955 0-.915-.202-1.62-.606-2.114-.404-.495-.92-.742-1.548-.742-.553 0-1.05.224-1.491.67-.442.447-.662 1.133-.662 2.058 0 .958.212 1.67.638 2.138.425.469.946.703 1.563.703zM53.004 5.72v4.42c.574-.894 1.388-1.341 2.44-1.341 1.022 0 1.857.383 2.506 1.149.649.766.973 1.781.973 3.047 0 1.138-.309 2.109-.925 2.912-.617.803-1.463 1.205-2.537 1.205-1.075 0-1.894-.447-2.457-1.34V17h-1.58V5.72h1.58zm9.908 11.104l-3.223-7.913h1.739l1.005 2.632 1.26 3.415c.096-.32.48-1.458 1.15-3.415l.909-2.632h1.66l-2.92 7.866c-.777 2.074-1.963 3.11-3.559 3.11a2.92 2.92 0 01-.734-.079v-1.34c.17.042.351.064.543.064 1.032 0 1.755-.57 2.17-1.708z' fill='%235D6494'/%3E%3Cpath d='M89.632 5.967v-.772a.978.978 0 00-.978-.977h-2.28a.978.978 0 00-.978.977v.793c0 .088.082.15.171.13a7.127 7.127 0 011.984-.28c.65 0 1.295.088 1.917.259.082.02.164-.04.164-.13m-6.248 1.01l-.39-.389a.977.977 0 00-1.382 0l-.465.465a.973.973 0 000 1.38l.383.383c.062.061.15.047.205-.014.226-.307.472-.601.746-.874.281-.28.568-.526.883-.751.068-.042.075-.137.02-.2m4.16 2.453v3.341c0 .096.104.165.192.117l2.97-1.537c.068-.034.089-.117.055-.184a3.695 3.695 0 00-3.08-1.866c-.068 0-.136.054-.136.13m0 8.048a4.489 4.489 0 01-4.49-4.482 4.488 4.488 0 014.49-4.482 4.488 4.488 0 014.489 4.482 4.484 4.484 0 01-4.49 4.482m0-10.85a6.363 6.363 0 100 12.729 6.37 6.37 0 006.372-6.368 6.358 6.358 0 00-6.371-6.36' fill='%23FFF'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;background-position:50%;background-size:100%;overflow:hidden;text-indent:-9000px;padding:0!important;width:100%;height:100%;display:block}.dropdown-wrapper{cursor:pointer}.dropdown-wrapper .dropdown-title,.dropdown-wrapper .mobile-dropdown-title{display:block;font-size:.9rem;font-family:inherit;cursor:inherit;padding:inherit;line-height:1.4rem;background:transparent;border:none;font-weight:500;color:#333}.dropdown-wrapper .dropdown-title:hover,.dropdown-wrapper .mobile-dropdown-title:hover{border-color:transparent}.dropdown-wrapper .dropdown-title .arrow,.dropdown-wrapper .mobile-dropdown-title .arrow{vertical-align:middle;margin-top:-1px;margin-left:.4rem}.dropdown-wrapper .mobile-dropdown-title{display:none;font-weight:600}.dropdown-wrapper .mobile-dropdown-title font-size inherit:hover{color:#ff8000}.dropdown-wrapper .nav-dropdown .dropdown-item{color:inherit;line-height:1.7rem}.dropdown-wrapper .nav-dropdown .dropdown-item h4{margin:.45rem 0 0;border-top:1px solid #eee;padding:1rem 1.5rem .45rem 1.25rem}.dropdown-wrapper .nav-dropdown .dropdown-item .dropdown-subitem-wrapper{padding:0;list-style:none}.dropdown-wrapper .nav-dropdown .dropdown-item .dropdown-subitem-wrapper .dropdown-subitem{font-size:.9em}.dropdown-wrapper .nav-dropdown .dropdown-item a{display:block;line-height:1.7rem;position:relative;border-bottom:none;font-weight:400;margin-bottom:0;padding:0 1.5rem 0 1.25rem}.dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active,.dropdown-wrapper .nav-dropdown .dropdown-item a:hover{color:#ff8000}.dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active:after{content:"";width:0;height:0;border-left:5px solid #ff8000;border-top:3px solid transparent;border-bottom:3px solid transparent;position:absolute;top:calc(50% - 2px);left:9px}.dropdown-wrapper .nav-dropdown .dropdown-item:first-child h4{margin-top:0;padding-top:0;border-top:0}@media (max-width:719px){.dropdown-wrapper.open .dropdown-title{margin-bottom:.5rem}.dropdown-wrapper .dropdown-title{display:none}.dropdown-wrapper .mobile-dropdown-title{display:block}.dropdown-wrapper .nav-dropdown{transition:height .1s ease-out;overflow:hidden}.dropdown-wrapper .nav-dropdown .dropdown-item h4{border-top:0;margin-top:0;padding-top:0}.dropdown-wrapper .nav-dropdown .dropdown-item>a,.dropdown-wrapper .nav-dropdown .dropdown-item h4{font-size:15px;line-height:2rem}.dropdown-wrapper .nav-dropdown .dropdown-item .dropdown-subitem{font-size:14px;padding-left:1rem}}@media (min-width:719px){.dropdown-wrapper{height:1.8rem}.dropdown-wrapper.open .nav-dropdown,.dropdown-wrapper:hover .nav-dropdown{display:block!important}.dropdown-wrapper .nav-dropdown{display:none;height:auto!important;box-sizing:border-box;max-height:calc(100vh - 2.7rem);overflow-y:auto;position:absolute;top:100%;right:0;background-color:#fff;padding:.6rem 0;border:1px solid;border-color:#ddd #ddd #ccc;text-align:left;border-radius:.25rem;white-space:nowrap;margin:0}}.nav-links{display:inline-block}.nav-links a{line-height:1.4rem;color:inherit}.nav-links a.router-link-active,.nav-links a:hover{color:#ff8000}.nav-links .nav-item{position:relative;display:inline-block;margin-left:1.5rem;line-height:2rem}.nav-links .nav-item:first-child{margin-left:0}.nav-links .repo-link{margin-left:1.5rem}@media (max-width:719px){.nav-links .nav-item,.nav-links .repo-link{margin-left:0}}@media (min-width:719px){.nav-links a.router-link-active,.nav-links a:hover{color:#333}.nav-item>a:not(.external).router-link-active,.nav-item>a:not(.external):hover{margin-bottom:-2px;border-bottom:2px solid #ff8a14}}.navbar{padding:0 1.5rem;line-height:2.2rem}.navbar .repo-link{display:none}.navbar a,.navbar img,.navbar span{display:inline-block}.navbar .home-link{padding:.7rem 0}.navbar .logo{height:2.2rem;min-width:2.2rem;margin-right:.8rem;vertical-align:top;width:5.343rem}.navbar .site-name{font-size:1.3rem;font-weight:600;color:#333;position:relative}.navbar .search{position:absolute;left:19rem;top:.7rem}.navbar .search .search-box{flex:0 0 auto;vertical-align:top}.navbar .links{padding-left:1.5rem;box-sizing:border-box;background-color:transparent;white-space:nowrap;font-size:.9rem;position:absolute;right:1.5rem;top:0;height:100%;display:flex}.navbar .links .external span{display:none}.navbar .nav-links .nav-item{height:100%;line-height:3.5rem}.navbar .nav-links .nav-item a{font-size:1rem;color:#333;height:100%;line-height:3.5rem;border-top:2px solid #fff;transition:color .2s,border-color .2s}.navbar .nav-links .nav-item a.router-link-active,.navbar .nav-links .nav-item a:hover{border-bottom:none;border-top-color:#ff8000;color:#ff8000}.navbar .nav-links .nav-item a.router-link-active:hover{border-bottom:none;border-top-color:#ff4040;color:#ff4040}@media (max-width:719px){.sidebar-button{display:none}.navbar{width:100%;padding:0;border-bottom:none}.navbar .can-hide{display:none}.navbar .logo{width:4rem;margin-left:1rem}.navbar .links{padding-left:1.5rem}.navbar .links .nav-link{padding:0 .5rem;font-weight:600}.navbar .site-name{width:calc(100vw - 9.4rem);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.navbar .search{top:3.5rem;left:0;background-color:#fff;width:100%}.has-sidebar .navbar{padding-left:4rem}.has-sidebar .home-link{display:none}.has-sidebar .sidebar-button{display:block}}.page-edit{max-width:860px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.page-edit{padding:2rem}}@media (max-width:419px){.page-edit{padding:1.5rem}}.page-edit{padding-top:1rem;padding-bottom:1rem;overflow:auto}.page-edit .edit-link{display:inline-block}.page-edit .edit-link a{color:#666;margin-right:.25rem}.page-edit .last-updated{float:right;font-size:.9em}.page-edit .last-updated .prefix{font-weight:500;color:#666}.page-edit .last-updated .time{font-weight:400;color:#767676}@media (max-width:719px){.page-edit .edit-link{margin-bottom:.5rem}.page-edit .last-updated{font-size:.8em;float:none;text-align:left}}.page-nav{max-width:860px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.page-nav{padding:2rem}}@media (max-width:419px){.page-nav{padding:1.5rem}}.page-nav{padding-top:1rem;padding-bottom:0}.page-nav .inner{min-height:2rem;margin-top:0;border-top:1px solid #eaecef;padding-top:1rem;overflow:auto}.page-nav .next{float:right}.page{padding-bottom:2rem;display:block}.sidebar-group .sidebar-group{padding-left:.5em}.sidebar-group:not(.collapsable) .sidebar-heading:not(.clickable){cursor:auto;color:inherit}.sidebar-group.is-sub-group{padding-left:0}.sidebar-group.is-sub-group>.sidebar-heading{font-size:.95em;line-height:1.4;font-weight:400;padding-left:2rem}.sidebar-group.is-sub-group>.sidebar-heading:not(.clickable){opacity:.5}.sidebar-group.is-sub-group>.sidebar-group-items{padding-left:1rem}.sidebar-group.is-sub-group>.sidebar-group-items>li>.sidebar-link{font-size:.95em;border-left:none}.sidebar-group.depth-2>.sidebar-heading{border-left:none}.sidebar-heading{color:#333;transition:color .15s ease;cursor:pointer;font-size:1.1em;font-weight:700;padding:.35rem 1.5rem .35rem 1.25rem;width:100%;box-sizing:border-box;margin:0;border-left:.25rem solid transparent}.sidebar-heading.open,.sidebar-heading:hover{color:inherit}.sidebar-heading .arrow{position:relative;top:-.12em;left:.5em}.sidebar-heading.clickable.active{font-weight:600;color:#ff8000;border-left-color:#ff8000}.sidebar-heading.clickable:hover{color:#ff8000}.sidebar-group-items{transition:height .1s ease-out;font-size:.95em;overflow:hidden}.sidebar .sidebar-sub-headers{padding-left:1rem;font-size:.95em}a.sidebar-link{font-size:1em;font-weight:400;display:inline-block;color:#333;border-left:.25rem solid transparent;padding:.35rem 1rem .35rem 1.25rem;line-height:1.4;width:100%;box-sizing:border-box}a.sidebar-link:hover{color:#ff8000}a.sidebar-link.active{font-weight:600;color:#ff8000;border-left-color:#ff8000}.sidebar-group a.sidebar-link{padding-left:2rem}.sidebar-sub-headers a.sidebar-link{padding-top:.25rem;padding-bottom:.25rem;border-left:none}.sidebar-sub-headers a.sidebar-link.active{font-weight:500}.sidebar{transition:transform .35s ease-in-out}.sidebar .arrow,.sidebar .home-link{display:none}.sidebar ul{padding:0;margin:0;list-style-type:none}.sidebar .sidebar-heading{color:#555;font-size:1rem;transition:color .2s}.sidebar .sidebar-heading.open,.sidebar .sidebar-heading:hover{color:#ff8000}.sidebar .sidebar-heading.open:hover{color:#ff4040}.sidebar a{display:inline-block}.sidebar .nav-links{display:none;border-bottom:1px solid #eaecef;padding:.5rem 0 .75rem}.sidebar .nav-links a{font-weight:600;transition:color .2s}.sidebar .nav-links .nav-item,.sidebar .nav-links .repo-link{display:block;line-height:1.25rem;font-size:1.1em;padding:.5rem 0 .5rem 1.5rem}.sidebar>.sidebar-links{padding:1.5rem 0}.sidebar>.sidebar-links>li>a.sidebar-link{font-size:1.1em;line-height:1.7;font-weight:600;transition:color .2s}.sidebar>.sidebar-links>li:not(:first-child){margin-top:0}.sidebar a.sidebar-link{font-size:1em;line-height:1.7;font-weight:600;color:#555;transition:color .2s}.sidebar a.sidebar-link:hover{color:#ff8000;border-bottom:none}.sidebar a.sidebar-link.active{color:#ff8000;border-left-color:transparent;border-bottom:none;font-weight:600}.sidebar a.sidebar-link.active:hover{color:#ff4040}.sidebar-mask{transition:opacity .35s ease-in-out;background-color:rgba(0,0,0,.5);z-index:-1;opacity:0}@media (max-width:719px){.sidebar{padding-top:0;z-index:30}.sidebar .home-link{display:block;padding:1.1rem 1rem;border-bottom:1px solid #eee;line-height:1rem}.sidebar .home-link .logo{width:4rem}.sidebar .nav-links{display:block}.sidebar .nav-links .dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active:after{top:calc(1rem - 2px)}.sidebar>.sidebar-links{padding:1rem 0}.sidebar-open .sidebar-mask{opacity:1;z-index:25}} \ No newline at end of file diff --git a/assets/js/1.9aec36f3.js b/assets/js/1.9aec36f3.js new file mode 100644 index 000000000..9db25c64e --- /dev/null +++ b/assets/js/1.9aec36f3.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[1,3,12,14,21,24,28],{240:function(t,e,n){"use strict";n.d(e,"d",(function(){return i})),n.d(e,"a",(function(){return s})),n.d(e,"i",(function(){return a})),n.d(e,"f",(function(){return l})),n.d(e,"g",(function(){return u})),n.d(e,"h",(function(){return c})),n.d(e,"b",(function(){return p})),n.d(e,"e",(function(){return h})),n.d(e,"k",(function(){return d})),n.d(e,"l",(function(){return f})),n.d(e,"c",(function(){return m})),n.d(e,"j",(function(){return g}));n(45);const i=/#.*$/,r=/\.(md|html)$/,s=/\/$/,a=/^[a-z]+:/i;function o(t){return decodeURI(t).replace(i,"").replace(r,"")}function l(t){return a.test(t)}function u(t){return/^mailto:/.test(t)}function c(t){return/^tel:/.test(t)}function p(t){if(l(t))return t;const e=t.match(i),n=e?e[0]:"",r=o(t);return s.test(r)?t:r+".html"+n}function h(t,e){const n=decodeURIComponent(t.hash),r=function(t){const e=t.match(i);if(e)return e[0]}(e);if(r&&n!==r)return!1;return o(t.path)===o(e)}function d(t,e,n){if(l(e))return{type:"external",path:e};n&&(e=function(t,e,n){const i=t.charAt(0);if("/"===i)return t;if("?"===i||"#"===i)return e+t;const r=e.split("/");n&&r[r.length-1]||r.pop();const s=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(e,n,i,r=1){if("string"==typeof e)return d(n,e,i);if(Array.isArray(e))return Object.assign(d(n,e[0],i),{title:e[1]});{const s=e.children||[];return 0===s.length&&e.path?Object.assign(d(n,e.path,i),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:s.map(e=>t(e,n,i,r+1)),collapsable:!1!==e.collapsable}}}(t,r,n)):[]}return[]}function b(t){const e=m(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function m(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function g(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},241:function(t,e,n){},242:function(t,e,n){"use strict";n.r(e);var i=n(240),r={name:"NavLink",props:{item:{required:!0}},computed:{link(){return Object(i.b)(this.item.link)},exact(){return this.$site.locales?Object.keys(this.$site.locales).some(t=>t===this.link):"/"===this.link},isNonHttpURI(){return Object(i.g)(this.link)||Object(i.h)(this.link)},isBlankTarget(){return"_blank"===this.target},isInternal(){return!Object(i.f)(this.link)&&!this.isBlankTarget},target(){return this.isNonHttpURI?null:this.item.target?this.item.target:Object(i.f)(this.link)?"_blank":""},rel(){return this.isNonHttpURI||!1===this.item.rel?null:this.item.rel?this.item.rel:this.isBlankTarget?"noopener noreferrer":null}},methods:{focusoutAction(){this.$emit("focusout")}}},s=n(14),a=Object(s.a)(r,(function(){var t=this,e=t._self._c;return t.isInternal?e("RouterLink",{staticClass:"nav-link",attrs:{to:t.link,exact:t.exact},nativeOn:{focusout:function(e){return t.focusoutAction.apply(null,arguments)}}},[t._v("\n "+t._s(t.item.text)+"\n")]):e("a",{staticClass:"nav-link external",attrs:{href:t.link,target:t.target,rel:t.rel},on:{focusout:t.focusoutAction}},[t._v("\n "+t._s(t.item.text)+"\n "),t.isBlankTarget?e("OutboundLink"):t._e()],1)}),[],!1,null,null,null);e.default=a.exports},243:function(t,e,n){"use strict";n(241)},244:function(t,e,n){},245:function(t,e,n){"use strict";n.r(e);var i={name:"DropdownTransition",methods:{setHeight(t){t.style.height=t.scrollHeight+"px"},unsetHeight(t){t.style.height=""}}},r=(n(243),n(14)),s=Object(r.a)(i,(function(){return(0,this._self._c)("transition",{attrs:{name:"dropdown"},on:{enter:this.setHeight,"after-enter":this.unsetHeight,"before-leave":this.setHeight}},[this._t("default")],2)}),[],!1,null,null,null);e.default=s.exports},247:function(t,e,n){},251:function(t,e,n){},252:function(t,e,n){"use strict";n(244)},253:function(t,e,n){"use strict";n.r(e);var i=n(242),r=n(245),s=n(91),a=n.n(s),o={name:"DropdownLink",components:{NavLink:i.default,DropdownTransition:r.default},props:{item:{required:!0}},data:()=>({open:!1}),computed:{dropdownAriaLabel(){return this.item.ariaLabel||this.item.text}},watch:{$route(){this.open=!1}},methods:{setOpen(t){this.open=t},isLastItemOfArray:(t,e)=>a()(e)===t,handleDropdown(){0===event.detail&&this.setOpen(!this.open)}}},l=(n(252),n(14)),u=Object(l.a)(o,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"dropdown-wrapper",class:{open:t.open}},[e("button",{staticClass:"dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:t.handleDropdown}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow down"})]),t._v(" "),e("button",{staticClass:"mobile-dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:function(e){return t.setOpen(!t.open)}}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow",class:t.open?"down":"right"})]),t._v(" "),e("DropdownTransition",[e("ul",{directives:[{name:"show",rawName:"v-show",value:t.open,expression:"open"}],staticClass:"nav-dropdown"},t._l(t.item.items,(function(n,i){return e("li",{key:n.link||i,staticClass:"dropdown-item"},["links"===n.type?e("h4",[t._v("\n "+t._s(n.text)+"\n ")]):t._e(),t._v(" "),"links"===n.type?e("ul",{staticClass:"dropdown-subitem-wrapper"},t._l(n.items,(function(i){return e("li",{key:i.link,staticClass:"dropdown-subitem"},[e("NavLink",{attrs:{item:i},on:{focusout:function(e){t.isLastItemOfArray(i,n.items)&&t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0):e("NavLink",{attrs:{item:n},on:{focusout:function(e){t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0)])],1)}),[],!1,null,null,null);e.default=u.exports},254:function(t,e,n){"use strict";n.r(e);var i=n(253),r=n(240),s={name:"NavLinks",components:{NavLink:n(242).default,DropdownLink:i.default},computed:{userNav(){return this.$themeLocaleConfig.nav||this.$site.themeConfig.nav||[]},nav(){const{locales:t}=this.$site;if(t&&Object.keys(t).length>1){const e=this.$page.path,n=this.$router.options.routes,i=this.$site.themeConfig.locales||{},r={text:this.$themeLocaleConfig.selectText||"Languages",ariaLabel:this.$themeLocaleConfig.ariaLabel||"Select language",items:Object.keys(t).map(r=>{const s=t[r],a=i[r]&&i[r].label||s.lang;let o;return s.lang===this.$lang?o=e:(o=e.replace(this.$localeConfig.path,r),n.some(t=>t.path===o)||(o=r)),{text:a,link:o}})};return[...this.userNav,r]}return this.userNav},userLinks(){return(this.nav||[]).map(t=>Object.assign(Object(r.j)(t),{items:(t.items||[]).map(r.j)}))},repoLink(){const{repo:t}=this.$site.themeConfig;return t?/^https?:/.test(t)?t:"https://github.com/"+t:null},repoLabel(){if(!this.repoLink)return;if(this.$site.themeConfig.repoLabel)return this.$site.themeConfig.repoLabel;const t=this.repoLink.match(/^https?:\/\/[^/]+/)[0],e=["GitHub","GitLab","Bitbucket"];for(let n=0;n"group"===e.type?a(t,e):"page"===e.type&&Object(s.e)(t,e.path));return n||i}return!1}var o={name:"SidebarLinks",components:{SidebarGroup:i.default,SidebarLink:r.default},props:["items","depth","sidebarDepth","initialOpenGroupIndex"],data(){return{openGroupIndex:this.initialOpenGroupIndex||0}},watch:{$route(){this.refreshIndex()}},created(){this.refreshIndex()},methods:{refreshIndex(){const t=function(t,e){for(let n=0;n-1&&(this.openGroupIndex=t)},toggleGroup(t){this.openGroupIndex=t===this.openGroupIndex?-1:t},isActive(t){return Object(s.e)(this.$route,t.regularPath)}}},l=n(14),u=Object(l.a)(o,(function(){var t=this,e=t._self._c;return t.items.length?e("ul",{staticClass:"sidebar-links"},t._l(t.items,(function(n,i){return e("li",{key:i},["group"===n.type?e("SidebarGroup",{attrs:{item:n,open:i===t.openGroupIndex,collapsable:n.collapsable||n.collapsible,depth:t.depth},on:{toggle:function(e){return t.toggleGroup(i)}}}):e("SidebarLink",{attrs:{"sidebar-depth":t.sidebarDepth,item:n}})],1)})),0):t._e()}),[],!1,null,null,null);e.default=u.exports},271:function(t,e,n){"use strict";n.r(e);var i=n(240);function r(t,e,n,i,r){const s={props:{to:e,activeClass:"",exactActiveClass:""},class:{active:i,"sidebar-link":!0}};return r>2&&(s.style={"padding-left":r+"rem"}),t("RouterLink",s,n)}function s(t,e,n,a,o,l=1){return!e||l>o?null:t("ul",{class:"sidebar-sub-headers"},e.map(e=>{const u=Object(i.e)(a,n+"#"+e.slug);return t("li",{class:"sidebar-sub-header"},[r(t,n+"#"+e.slug,e.title,u,e.level-1),s(t,e.children,n,a,o,l+1)])}))}var a={functional:!0,props:["item","sidebarDepth"],render(t,{parent:{$page:e,$site:n,$route:a,$themeConfig:o,$themeLocaleConfig:l},props:{item:u,sidebarDepth:c}}){const p=Object(i.e)(a,u.path),h="auto"===u.type?p||u.children.some(t=>Object(i.e)(a,u.basePath+"#"+t.slug)):p,d="external"===u.type?function(t,e,n){return t("a",{attrs:{href:e,target:"_blank",rel:"noopener noreferrer"},class:{"sidebar-link":!0}},[n,t("OutboundLink")])}(t,u.path,u.title||u.path):r(t,u.path,u.title||u.path,h),f=[e.frontmatter.sidebarDepth,c,l.sidebarDepth,o.sidebarDepth,1].find(t=>void 0!==t),b=l.displayAllHeaders||o.displayAllHeaders;if("auto"===u.type)return[d,s(t,u.children,u.basePath,a,f)];if((h||b)&&u.headers&&!i.d.test(u.path)){return[d,s(t,Object(i.c)(u.headers),u.path,a,f)]}return d}},o=(n(265),n(14)),l=Object(o.a)(a,void 0,void 0,!1,null,null,null);e.default=l.exports},276:function(t,e,n){"use strict";n(264)},288:function(t,e,n){"use strict";n.r(e);var i=n(240),r={name:"SidebarGroup",components:{DropdownTransition:n(245).default},props:["item","open","collapsable","depth"],beforeCreate(){this.$options.components.SidebarLinks=n(267).default},methods:{isActive:i.e}},s=(n(276),n(14)),a=Object(s.a)(r,(function(){var t=this,e=t._self._c;return e("section",{staticClass:"sidebar-group",class:[{collapsable:t.collapsable,"is-sub-group":0!==t.depth},"depth-"+t.depth]},[t.item.path?e("RouterLink",{staticClass:"sidebar-heading clickable",class:{open:t.open,active:t.isActive(t.$route,t.item.path)},attrs:{to:t.item.path},nativeOn:{click:function(e){return t.$emit("toggle")}}},[e("span",[t._v(t._s(t.item.title))]),t._v(" "),t.collapsable?e("span",{staticClass:"arrow",class:t.open?"down":"right"}):t._e()]):e("p",{staticClass:"sidebar-heading",class:{open:t.open},on:{click:function(e){return t.$emit("toggle")}}},[e("span",[t._v(t._s(t.item.title))]),t._v(" "),t.collapsable?e("span",{staticClass:"arrow",class:t.open?"down":"right"}):t._e()]),t._v(" "),e("DropdownTransition",[t.open||!t.collapsable?e("SidebarLinks",{staticClass:"sidebar-group-items",attrs:{items:t.item.children,"sidebar-depth":t.item.sidebarDepth,"initial-open-group-index":t.item.initialOpenGroupIndex,depth:t.depth+1}}):t._e()],1)],1)}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/10.a83e37fd.js b/assets/js/10.a83e37fd.js new file mode 100644 index 000000000..eaca7675d --- /dev/null +++ b/assets/js/10.a83e37fd.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[10,12,14,24,25,28],{240:function(t,e,n){"use strict";n.d(e,"d",(function(){return s})),n.d(e,"a",(function(){return r})),n.d(e,"i",(function(){return a})),n.d(e,"f",(function(){return l})),n.d(e,"g",(function(){return u})),n.d(e,"h",(function(){return c})),n.d(e,"b",(function(){return h})),n.d(e,"e",(function(){return f})),n.d(e,"k",(function(){return p})),n.d(e,"l",(function(){return d})),n.d(e,"c",(function(){return m})),n.d(e,"j",(function(){return v}));n(45);const s=/#.*$/,i=/\.(md|html)$/,r=/\/$/,a=/^[a-z]+:/i;function o(t){return decodeURI(t).replace(s,"").replace(i,"")}function l(t){return a.test(t)}function u(t){return/^mailto:/.test(t)}function c(t){return/^tel:/.test(t)}function h(t){if(l(t))return t;const e=t.match(s),n=e?e[0]:"",i=o(t);return r.test(i)?t:i+".html"+n}function f(t,e){const n=decodeURIComponent(t.hash),i=function(t){const e=t.match(s);if(e)return e[0]}(e);if(i&&n!==i)return!1;return o(t.path)===o(e)}function p(t,e,n){if(l(e))return{type:"external",path:e};n&&(e=function(t,e,n){const s=t.charAt(0);if("/"===s)return t;if("?"===s||"#"===s)return e+t;const i=e.split("/");n&&i[i.length-1]||i.pop();const r=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(e,n,s,i=1){if("string"==typeof e)return p(n,e,s);if(Array.isArray(e))return Object.assign(p(n,e[0],s),{title:e[1]});{const r=e.children||[];return 0===r.length&&e.path?Object.assign(p(n,e.path,s),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:r.map(e=>t(e,n,s,i+1)),collapsable:!1!==e.collapsable}}}(t,i,n)):[]}return[]}function g(t){const e=m(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function m(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function v(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},241:function(t,e,n){},242:function(t,e,n){"use strict";n.r(e);var s=n(240),i={name:"NavLink",props:{item:{required:!0}},computed:{link(){return Object(s.b)(this.item.link)},exact(){return this.$site.locales?Object.keys(this.$site.locales).some(t=>t===this.link):"/"===this.link},isNonHttpURI(){return Object(s.g)(this.link)||Object(s.h)(this.link)},isBlankTarget(){return"_blank"===this.target},isInternal(){return!Object(s.f)(this.link)&&!this.isBlankTarget},target(){return this.isNonHttpURI?null:this.item.target?this.item.target:Object(s.f)(this.link)?"_blank":""},rel(){return this.isNonHttpURI||!1===this.item.rel?null:this.item.rel?this.item.rel:this.isBlankTarget?"noopener noreferrer":null}},methods:{focusoutAction(){this.$emit("focusout")}}},r=n(14),a=Object(r.a)(i,(function(){var t=this,e=t._self._c;return t.isInternal?e("RouterLink",{staticClass:"nav-link",attrs:{to:t.link,exact:t.exact},nativeOn:{focusout:function(e){return t.focusoutAction.apply(null,arguments)}}},[t._v("\n "+t._s(t.item.text)+"\n")]):e("a",{staticClass:"nav-link external",attrs:{href:t.link,target:t.target,rel:t.rel},on:{focusout:t.focusoutAction}},[t._v("\n "+t._s(t.item.text)+"\n "),t.isBlankTarget?e("OutboundLink"):t._e()],1)}),[],!1,null,null,null);e.default=a.exports},243:function(t,e,n){"use strict";n(241)},244:function(t,e,n){},245:function(t,e,n){"use strict";n.r(e);var s={name:"DropdownTransition",methods:{setHeight(t){t.style.height=t.scrollHeight+"px"},unsetHeight(t){t.style.height=""}}},i=(n(243),n(14)),r=Object(i.a)(s,(function(){return(0,this._self._c)("transition",{attrs:{name:"dropdown"},on:{enter:this.setHeight,"after-enter":this.unsetHeight,"before-leave":this.setHeight}},[this._t("default")],2)}),[],!1,null,null,null);e.default=r.exports},247:function(t,e,n){},248:function(t,e,n){},252:function(t,e,n){"use strict";n(244)},253:function(t,e,n){"use strict";n.r(e);var s=n(242),i=n(245),r=n(91),a=n.n(r),o={name:"DropdownLink",components:{NavLink:s.default,DropdownTransition:i.default},props:{item:{required:!0}},data:()=>({open:!1}),computed:{dropdownAriaLabel(){return this.item.ariaLabel||this.item.text}},watch:{$route(){this.open=!1}},methods:{setOpen(t){this.open=t},isLastItemOfArray:(t,e)=>a()(e)===t,handleDropdown(){0===event.detail&&this.setOpen(!this.open)}}},l=(n(252),n(14)),u=Object(l.a)(o,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"dropdown-wrapper",class:{open:t.open}},[e("button",{staticClass:"dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:t.handleDropdown}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow down"})]),t._v(" "),e("button",{staticClass:"mobile-dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:function(e){return t.setOpen(!t.open)}}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow",class:t.open?"down":"right"})]),t._v(" "),e("DropdownTransition",[e("ul",{directives:[{name:"show",rawName:"v-show",value:t.open,expression:"open"}],staticClass:"nav-dropdown"},t._l(t.item.items,(function(n,s){return e("li",{key:n.link||s,staticClass:"dropdown-item"},["links"===n.type?e("h4",[t._v("\n "+t._s(n.text)+"\n ")]):t._e(),t._v(" "),"links"===n.type?e("ul",{staticClass:"dropdown-subitem-wrapper"},t._l(n.items,(function(s){return e("li",{key:s.link,staticClass:"dropdown-subitem"},[e("NavLink",{attrs:{item:s},on:{focusout:function(e){t.isLastItemOfArray(s,n.items)&&t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0):e("NavLink",{attrs:{item:n},on:{focusout:function(e){t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0)])],1)}),[],!1,null,null,null);e.default=u.exports},254:function(t,e,n){"use strict";n.r(e);var s=n(253),i=n(240),r={name:"NavLinks",components:{NavLink:n(242).default,DropdownLink:s.default},computed:{userNav(){return this.$themeLocaleConfig.nav||this.$site.themeConfig.nav||[]},nav(){const{locales:t}=this.$site;if(t&&Object.keys(t).length>1){const e=this.$page.path,n=this.$router.options.routes,s=this.$site.themeConfig.locales||{},i={text:this.$themeLocaleConfig.selectText||"Languages",ariaLabel:this.$themeLocaleConfig.ariaLabel||"Select language",items:Object.keys(t).map(i=>{const r=t[i],a=s[i]&&s[i].label||r.lang;let o;return r.lang===this.$lang?o=e:(o=e.replace(this.$localeConfig.path,i),n.some(t=>t.path===o)||(o=i)),{text:a,link:o}})};return[...this.userNav,i]}return this.userNav},userLinks(){return(this.nav||[]).map(t=>Object.assign(Object(i.j)(t),{items:(t.items||[]).map(i.j)}))},repoLink(){const{repo:t}=this.$site.themeConfig;return t?/^https?:/.test(t)?t:"https://github.com/"+t:null},repoLabel(){if(!this.repoLink)return;if(this.$site.themeConfig.repoLabel)return this.$site.themeConfig.repoLabel;const t=this.repoLink.match(/^https?:\/\/[^/]+/)[0],e=["GitHub","GitLab","Bitbucket"];for(let n=0;n{let s=i()(e,"title","");return i()(e,"frontmatter.tags")&&(s+=" "+e.frontmatter.tags.join(" ")),n&&(s+=" "+n),a(t,s)};const a=(t,e)=>{const n=t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),s=new RegExp("[^\0-]"),i=t.split(/\s+/g).map(t=>t.trim()).filter(t=>!!t);if(s.test(t))return i.some(t=>e.toLowerCase().indexOf(t)>-1);{const s=t.endsWith(" ");return new RegExp(i.map((t,e)=>i.length!==e+1||s?`(?=.*\\b${n(t)}\\b)`:`(?=.*\\b${n(t)})`).join("")+".+","gi").test(e)}};var o={name:"SearchBox",data:()=>({query:"",focused:!1,focusIndex:0,placeholder:void 0,searchOpenClass:"search-open"}),computed:{showSuggestions(){return this.focused&&this.suggestions&&this.suggestions.length},suggestions(){const t=this.query.trim().toLowerCase();if(!t)return;const{pages:e}=this.$site,n=this.$site.themeConfig.searchMaxSuggestions||10,s=this.$localePath,i=[];for(let o=0;o=n);o++){const l=e[o];if(this.getPageLocalePath(l)===s&&this.isSearchable(l))if(r(t,l))i.push(l);else if(l.headers)for(let e=0;e=n);e++){const n=l.headers[e];if(n.title&&r(t,l,n.title)){var a=Object.assign({},l,{path:l.path+"#"+n.slug,header:n});n.title.startsWith("#")&&(a=this.formatTagSuggestion(a)),i.push(a)}}}return i},alignRight(){return(this.$site.themeConfig.nav||[]).length+(this.$site.repo?1:0)<=2}},mounted(){this.placeholder=this.$site.themeConfig.searchPlaceholder||"",document.addEventListener("keydown",this.onHotkey)},beforeDestroy(){document.removeEventListener("keydown",this.onHotkey)},methods:{getPageLocalePath(t){for(const e in this.$site.locales||{})if("/"!==e&&0===t.path.indexOf(e))return e;return"/"},isSearchable(t){let e=null;return null===e||(e=Array.isArray(e)?e:new Array(e),e.filter(e=>t.path.match(e)).length>0)},formatTagSuggestion(t){for(var e=null,n=0;n0?this.focusIndex--:this.focusIndex=this.suggestions.length-1)},onDown(){this.showSuggestions&&(this.focusIndex{}),this.query="",this.focusIndex=0,this.$refs.input.blur())},focus(t){this.focusIndex=t},unfocus(){this.focusIndex=-1}}},l=(n(273),n(14)),u=Object(l.a)(o,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"search-box"},[e("input",{ref:"input",class:{focused:t.focused},attrs:{"aria-label":"Search",placeholder:t.placeholder,autocomplete:"off",spellcheck:"false"},domProps:{value:t.query},on:{input:function(e){t.query=e.target.value},focus:t.onFocus,blur:t.onBlur,keyup:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.go(t.focusIndex)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:t.onUp.apply(null,arguments)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:t.onDown.apply(null,arguments)}]}}),t._v(" "),t.showSuggestions?e("ul",{staticClass:"suggestions",class:{"align-right":t.alignRight},on:{mouseleave:t.unfocus}},t._l(t.suggestions,(function(n,s){return e("li",{key:s,staticClass:"suggestion",class:{focused:s===t.focusIndex},on:{mousedown:function(e){return t.go(s)},mouseenter:function(e){return t.focus(s)}}},[e("a",{attrs:{href:n.path},on:{click:function(t){t.preventDefault()}}},[e("span",{staticClass:"page-title"},[t._v(t._s(n.title||n.path))]),t._v(" "),n.header?e("span",{staticClass:"header",class:{"is-tag":n.isTag}},[e("span",{staticClass:"chevron"},[t._v(">")]),t._v(" "+t._s(n.header.title))]):t._e()])])})),0):t._e()])}),[],!1,null,null,null).exports,c=n(270),h=n(254);function f(t,e){return t.ownerDocument.defaultView.getComputedStyle(t,null)[e]}var p={name:"Navbar",components:{SidebarButton:c.default,NavLinks:h.default,SearchBox:u},data:()=>({mobileDesktopBreakpoint:719,linksWrapMaxWidth:null}),computed:{algolia(){return this.$themeLocaleConfig.algolia||this.$site.themeConfig.algolia||{}},isAlgoliaSearch(){return this.algolia&&this.algolia.apiKey&&this.algolia.indexName},hasSidebar(){var t=this.$page.path.match(/\/.+?\//);return(t=t&&t.length?t[0]:t)in this.$site.themeConfig.sidebar&&this.$site.themeConfig.sidebar[t].length>0}},watch:{$route:function(t,e){setTimeout(this.handleSearchPosition,10)}},methods:{handleSearchPosition(){if(this.$refs.search||this.$refs.navLogo||this.refs.links)if(document.documentElement.clientWidth>this.mobileDesktopBreakpoint){var t=148,e=document.getElementsByClassName("theme-default-content")[0];e&&(t=e.offsetLeft+parseFloat(window.getComputedStyle(e,null).getPropertyValue("padding-left").replace("px",""))),(t+this.$refs.search.offsetWidth>this.$refs.links.offsetLeft+50||t{document.documentElement.clientWidthfunction t(e,n,r,i=1){if("string"==typeof e)return d(n,e,r);if(Array.isArray(e))return Object.assign(d(n,e[0],r),{title:e[1]});{const a=e.children||[];return 0===a.length&&e.path?Object.assign(d(n,e.path,r),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:a.map(e=>t(e,n,r,i+1)),collapsable:!1!==e.collapsable}}}(t,i,n)):[]}return[]}function g(t){const e=v(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function v(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function m(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},246:function(t,e){t.exports=function(t){return null==t}},249:function(t,e,n){},250:function(t,e,n){},260:function(t,e,n){"use strict";n(249)},261:function(t,e,n){var r=n(11),i=n(4),a=n(10);t.exports=function(t){return"string"==typeof t||!i(t)&&a(t)&&"[object String]"==r(t)}},262:function(t,e,n){"use strict";n(250)},263:function(t,e,n){},268:function(t,e,n){"use strict";n.r(e);var r=n(246),i=n.n(r),a=n(240),s={name:"PageEdit",computed:{lastUpdated(){return this.$page.lastUpdated},lastUpdatedText(){return"string"==typeof this.$themeLocaleConfig.lastUpdated?this.$themeLocaleConfig.lastUpdated:"string"==typeof this.$site.themeConfig.lastUpdated?this.$site.themeConfig.lastUpdated:"Last Updated"},editLink(){const t=i()(this.$page.frontmatter.editLink)?this.$site.themeConfig.editLinks:this.$page.frontmatter.editLink,{repo:e,docsDir:n="",docsBranch:r="master",docsRepo:a=e}=this.$site.themeConfig;return t&&a&&this.$page.relativePath?this.createEditLink(e,a,n,r,this.$page.relativePath):null},editLinkText(){return this.$themeLocaleConfig.editLinkText||this.$site.themeConfig.editLinkText||"Edit this page"}},methods:{createEditLink(t,e,n,r,i){if(/bitbucket.org/.test(e)){return e.replace(a.a,"")+"/src"+`/${r}/`+(n?n.replace(a.a,"")+"/":"")+i+`?mode=edit&spa=0&at=${r}&fileviewer=file-view-default`}if(/gitlab.com/.test(e)){return e.replace(a.a,"")+"/-/edit"+`/${r}/`+(n?n.replace(a.a,"")+"/":"")+i}return(a.i.test(e)?e:"https://github.com/"+e).replace(a.a,"")+"/edit"+`/${r}/`+(n?n.replace(a.a,"")+"/":"")+i}}},o=(n(260),n(14)),u=Object(o.a)(s,(function(){var t=this,e=t._self._c;return e("footer",{staticClass:"page-edit"},[t.editLink?e("div",{staticClass:"edit-link"},[e("a",{attrs:{href:t.editLink,target:"_blank",rel:"noopener noreferrer"}},[t._v(t._s(t.editLinkText))]),t._v(" "),e("OutboundLink")],1):t._e(),t._v(" "),t.lastUpdated?e("div",{staticClass:"last-updated"},[e("span",{staticClass:"prefix"},[t._v(t._s(t.lastUpdatedText)+":")]),t._v(" "),e("span",{staticClass:"time"},[t._v(t._s(t.lastUpdated))])]):t._e()])}),[],!1,null,null,null);e.default=u.exports},269:function(t,e,n){"use strict";n.r(e);n(45);var r=n(240),i=n(261),a=n.n(i),s=n(246),o=n.n(s),u={name:"PageNav",props:["sidebarItems"],computed:{prev(){return l(c.PREV,this)},next(){return l(c.NEXT,this)}}};const c={NEXT:{resolveLink:function(t,e){return p(t,e,1)},getThemeLinkConfig:({nextLinks:t})=>t,getPageLinkConfig:({frontmatter:t})=>t.next},PREV:{resolveLink:function(t,e){return p(t,e,-1)},getThemeLinkConfig:({prevLinks:t})=>t,getPageLinkConfig:({frontmatter:t})=>t.prev}};function l(t,{$themeConfig:e,$page:n,$route:i,$site:s,sidebarItems:u}){const{resolveLink:c,getThemeLinkConfig:l,getPageLinkConfig:p}=t,f=l(e),d=p(n),h=o()(d)?f:d;return!1===h?void 0:a()(h)?Object(r.k)(s.pages,h,i.path):c(n,u)}function p(t,e,n){const r=[];!function t(e,n){for(let r=0,i=e.length;rfunction t(e,n,i,r=1){if("string"==typeof e)return f(n,e,i);if(Array.isArray(e))return Object.assign(f(n,e[0],i),{title:e[1]});{const s=e.children||[];return 0===s.length&&e.path?Object.assign(f(n,e.path,i),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:s.map(e=>t(e,n,i,r+1)),collapsable:!1!==e.collapsable}}}(t,r,n)):[]}return[]}function m(t){const e=b(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function b(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function g(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},241:function(t,e,n){},242:function(t,e,n){"use strict";n.r(e);var i=n(240),r={name:"NavLink",props:{item:{required:!0}},computed:{link(){return Object(i.b)(this.item.link)},exact(){return this.$site.locales?Object.keys(this.$site.locales).some(t=>t===this.link):"/"===this.link},isNonHttpURI(){return Object(i.g)(this.link)||Object(i.h)(this.link)},isBlankTarget(){return"_blank"===this.target},isInternal(){return!Object(i.f)(this.link)&&!this.isBlankTarget},target(){return this.isNonHttpURI?null:this.item.target?this.item.target:Object(i.f)(this.link)?"_blank":""},rel(){return this.isNonHttpURI||!1===this.item.rel?null:this.item.rel?this.item.rel:this.isBlankTarget?"noopener noreferrer":null}},methods:{focusoutAction(){this.$emit("focusout")}}},s=n(14),a=Object(s.a)(r,(function(){var t=this,e=t._self._c;return t.isInternal?e("RouterLink",{staticClass:"nav-link",attrs:{to:t.link,exact:t.exact},nativeOn:{focusout:function(e){return t.focusoutAction.apply(null,arguments)}}},[t._v("\n "+t._s(t.item.text)+"\n")]):e("a",{staticClass:"nav-link external",attrs:{href:t.link,target:t.target,rel:t.rel},on:{focusout:t.focusoutAction}},[t._v("\n "+t._s(t.item.text)+"\n "),t.isBlankTarget?e("OutboundLink"):t._e()],1)}),[],!1,null,null,null);e.default=a.exports},243:function(t,e,n){"use strict";n(241)},244:function(t,e,n){},245:function(t,e,n){"use strict";n.r(e);var i={name:"DropdownTransition",methods:{setHeight(t){t.style.height=t.scrollHeight+"px"},unsetHeight(t){t.style.height=""}}},r=(n(243),n(14)),s=Object(r.a)(i,(function(){return(0,this._self._c)("transition",{attrs:{name:"dropdown"},on:{enter:this.setHeight,"after-enter":this.unsetHeight,"before-leave":this.setHeight}},[this._t("default")],2)}),[],!1,null,null,null);e.default=s.exports},247:function(t,e,n){},252:function(t,e,n){"use strict";n(244)},253:function(t,e,n){"use strict";n.r(e);var i=n(242),r=n(245),s=n(91),a=n.n(s),o={name:"DropdownLink",components:{NavLink:i.default,DropdownTransition:r.default},props:{item:{required:!0}},data:()=>({open:!1}),computed:{dropdownAriaLabel(){return this.item.ariaLabel||this.item.text}},watch:{$route(){this.open=!1}},methods:{setOpen(t){this.open=t},isLastItemOfArray:(t,e)=>a()(e)===t,handleDropdown(){0===event.detail&&this.setOpen(!this.open)}}},l=(n(252),n(14)),u=Object(l.a)(o,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"dropdown-wrapper",class:{open:t.open}},[e("button",{staticClass:"dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:t.handleDropdown}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow down"})]),t._v(" "),e("button",{staticClass:"mobile-dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:function(e){return t.setOpen(!t.open)}}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow",class:t.open?"down":"right"})]),t._v(" "),e("DropdownTransition",[e("ul",{directives:[{name:"show",rawName:"v-show",value:t.open,expression:"open"}],staticClass:"nav-dropdown"},t._l(t.item.items,(function(n,i){return e("li",{key:n.link||i,staticClass:"dropdown-item"},["links"===n.type?e("h4",[t._v("\n "+t._s(n.text)+"\n ")]):t._e(),t._v(" "),"links"===n.type?e("ul",{staticClass:"dropdown-subitem-wrapper"},t._l(n.items,(function(i){return e("li",{key:i.link,staticClass:"dropdown-subitem"},[e("NavLink",{attrs:{item:i},on:{focusout:function(e){t.isLastItemOfArray(i,n.items)&&t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0):e("NavLink",{attrs:{item:n},on:{focusout:function(e){t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0)])],1)}),[],!1,null,null,null);e.default=u.exports},254:function(t,e,n){"use strict";n.r(e);var i=n(253),r=n(240),s={name:"NavLinks",components:{NavLink:n(242).default,DropdownLink:i.default},computed:{userNav(){return this.$themeLocaleConfig.nav||this.$site.themeConfig.nav||[]},nav(){const{locales:t}=this.$site;if(t&&Object.keys(t).length>1){const e=this.$page.path,n=this.$router.options.routes,i=this.$site.themeConfig.locales||{},r={text:this.$themeLocaleConfig.selectText||"Languages",ariaLabel:this.$themeLocaleConfig.ariaLabel||"Select language",items:Object.keys(t).map(r=>{const s=t[r],a=i[r]&&i[r].label||s.lang;let o;return s.lang===this.$lang?o=e:(o=e.replace(this.$localeConfig.path,r),n.some(t=>t.path===o)||(o=r)),{text:a,link:o}})};return[...this.userNav,r]}return this.userNav},userLinks(){return(this.nav||[]).map(t=>Object.assign(Object(r.j)(t),{items:(t.items||[]).map(r.j)}))},repoLink(){const{repo:t}=this.$site.themeConfig;return t?/^https?:/.test(t)?t:"https://github.com/"+t:null},repoLabel(){if(!this.repoLink)return;if(this.$site.themeConfig.repoLabel)return this.$site.themeConfig.repoLabel;const t=this.repoLink.match(/^https?:\/\/[^/]+/)[0],e=["GitHub","GitLab","Bitbucket"];for(let n=0;n({placeholder:void 0}),watch:{$lang(e){this.update(this.options,e)},options(e){this.update(e,this.$lang)}},mounted(){this.initialize(this.options,this.$lang),this.placeholder=this.$site.themeConfig.searchPlaceholder||""},methods:{initialize(e,t){Promise.all([Promise.all([a.e(0),a.e(9)]).then(a.t.bind(null,324,7)),Promise.all([a.e(0),a.e(9)]).then(a.t.bind(null,325,7))]).then(([a])=>{a=a.default;const{algoliaOptions:i={}}=e;a(Object.assign({},e,{inputSelector:"#algolia-search-input",algoliaOptions:{...i,facetFilters:["lang:"+t].concat(i.facetFilters||[])},handleSelected:(e,t,a)=>{const{pathname:i,hash:n}=new URL(a.url),r=i.replace(this.$site.base,"/"),s=decodeURIComponent(n);this.$router.push(`${r}${s}`)}}))})},update(e,t){this.$el.innerHTML='',this.initialize(e,t)}}},n=(a(306),a(14)),r=Object(n.a)(i,(function(){var e=this._self._c;return e("form",{staticClass:"algolia-search-wrapper search-box",attrs:{id:"search-form",role:"search"}},[e("input",{staticClass:"search-query",attrs:{id:"algolia-search-input",placeholder:this.placeholder}})])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/14.f34f447e.js b/assets/js/14.f34f447e.js new file mode 100644 index 000000000..b61c38caf --- /dev/null +++ b/assets/js/14.f34f447e.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[14,24,28],{240:function(t,e,n){"use strict";n.d(e,"d",(function(){return i})),n.d(e,"a",(function(){return s})),n.d(e,"i",(function(){return o})),n.d(e,"f",(function(){return l})),n.d(e,"g",(function(){return u})),n.d(e,"h",(function(){return c})),n.d(e,"b",(function(){return p})),n.d(e,"e",(function(){return f})),n.d(e,"k",(function(){return h})),n.d(e,"l",(function(){return d})),n.d(e,"c",(function(){return b})),n.d(e,"j",(function(){return g}));n(45);const i=/#.*$/,r=/\.(md|html)$/,s=/\/$/,o=/^[a-z]+:/i;function a(t){return decodeURI(t).replace(i,"").replace(r,"")}function l(t){return o.test(t)}function u(t){return/^mailto:/.test(t)}function c(t){return/^tel:/.test(t)}function p(t){if(l(t))return t;const e=t.match(i),n=e?e[0]:"",r=a(t);return s.test(r)?t:r+".html"+n}function f(t,e){const n=decodeURIComponent(t.hash),r=function(t){const e=t.match(i);if(e)return e[0]}(e);if(r&&n!==r)return!1;return a(t.path)===a(e)}function h(t,e,n){if(l(e))return{type:"external",path:e};n&&(e=function(t,e,n){const i=t.charAt(0);if("/"===i)return t;if("?"===i||"#"===i)return e+t;const r=e.split("/");n&&r[r.length-1]||r.pop();const s=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(e,n,i,r=1){if("string"==typeof e)return h(n,e,i);if(Array.isArray(e))return Object.assign(h(n,e[0],i),{title:e[1]});{const s=e.children||[];return 0===s.length&&e.path?Object.assign(h(n,e.path,i),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:s.map(e=>t(e,n,i,r+1)),collapsable:!1!==e.collapsable}}}(t,r,n)):[]}return[]}function m(t){const e=b(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function b(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function g(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},241:function(t,e,n){},242:function(t,e,n){"use strict";n.r(e);var i=n(240),r={name:"NavLink",props:{item:{required:!0}},computed:{link(){return Object(i.b)(this.item.link)},exact(){return this.$site.locales?Object.keys(this.$site.locales).some(t=>t===this.link):"/"===this.link},isNonHttpURI(){return Object(i.g)(this.link)||Object(i.h)(this.link)},isBlankTarget(){return"_blank"===this.target},isInternal(){return!Object(i.f)(this.link)&&!this.isBlankTarget},target(){return this.isNonHttpURI?null:this.item.target?this.item.target:Object(i.f)(this.link)?"_blank":""},rel(){return this.isNonHttpURI||!1===this.item.rel?null:this.item.rel?this.item.rel:this.isBlankTarget?"noopener noreferrer":null}},methods:{focusoutAction(){this.$emit("focusout")}}},s=n(14),o=Object(s.a)(r,(function(){var t=this,e=t._self._c;return t.isInternal?e("RouterLink",{staticClass:"nav-link",attrs:{to:t.link,exact:t.exact},nativeOn:{focusout:function(e){return t.focusoutAction.apply(null,arguments)}}},[t._v("\n "+t._s(t.item.text)+"\n")]):e("a",{staticClass:"nav-link external",attrs:{href:t.link,target:t.target,rel:t.rel},on:{focusout:t.focusoutAction}},[t._v("\n "+t._s(t.item.text)+"\n "),t.isBlankTarget?e("OutboundLink"):t._e()],1)}),[],!1,null,null,null);e.default=o.exports},243:function(t,e,n){"use strict";n(241)},244:function(t,e,n){},245:function(t,e,n){"use strict";n.r(e);var i={name:"DropdownTransition",methods:{setHeight(t){t.style.height=t.scrollHeight+"px"},unsetHeight(t){t.style.height=""}}},r=(n(243),n(14)),s=Object(r.a)(i,(function(){return(0,this._self._c)("transition",{attrs:{name:"dropdown"},on:{enter:this.setHeight,"after-enter":this.unsetHeight,"before-leave":this.setHeight}},[this._t("default")],2)}),[],!1,null,null,null);e.default=s.exports},252:function(t,e,n){"use strict";n(244)},253:function(t,e,n){"use strict";n.r(e);var i=n(242),r=n(245),s=n(91),o=n.n(s),a={name:"DropdownLink",components:{NavLink:i.default,DropdownTransition:r.default},props:{item:{required:!0}},data:()=>({open:!1}),computed:{dropdownAriaLabel(){return this.item.ariaLabel||this.item.text}},watch:{$route(){this.open=!1}},methods:{setOpen(t){this.open=t},isLastItemOfArray:(t,e)=>o()(e)===t,handleDropdown(){0===event.detail&&this.setOpen(!this.open)}}},l=(n(252),n(14)),u=Object(l.a)(a,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"dropdown-wrapper",class:{open:t.open}},[e("button",{staticClass:"dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:t.handleDropdown}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow down"})]),t._v(" "),e("button",{staticClass:"mobile-dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:function(e){return t.setOpen(!t.open)}}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow",class:t.open?"down":"right"})]),t._v(" "),e("DropdownTransition",[e("ul",{directives:[{name:"show",rawName:"v-show",value:t.open,expression:"open"}],staticClass:"nav-dropdown"},t._l(t.item.items,(function(n,i){return e("li",{key:n.link||i,staticClass:"dropdown-item"},["links"===n.type?e("h4",[t._v("\n "+t._s(n.text)+"\n ")]):t._e(),t._v(" "),"links"===n.type?e("ul",{staticClass:"dropdown-subitem-wrapper"},t._l(n.items,(function(i){return e("li",{key:i.link,staticClass:"dropdown-subitem"},[e("NavLink",{attrs:{item:i},on:{focusout:function(e){t.isLastItemOfArray(i,n.items)&&t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0):e("NavLink",{attrs:{item:n},on:{focusout:function(e){t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0)])],1)}),[],!1,null,null,null);e.default=u.exports}}]); \ No newline at end of file diff --git a/assets/js/15.3fb3ddd1.js b/assets/js/15.3fb3ddd1.js new file mode 100644 index 000000000..9783289d9 --- /dev/null +++ b/assets/js/15.3fb3ddd1.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{240:function(t,n,e){"use strict";e.d(n,"d",(function(){return r})),e.d(n,"a",(function(){return o})),e.d(n,"i",(function(){return a})),e.d(n,"f",(function(){return u})),e.d(n,"g",(function(){return c})),e.d(n,"h",(function(){return p})),e.d(n,"b",(function(){return l})),e.d(n,"e",(function(){return f})),e.d(n,"k",(function(){return h})),e.d(n,"l",(function(){return d})),e.d(n,"c",(function(){return v})),e.d(n,"j",(function(){return b}));e(45);const r=/#.*$/,i=/\.(md|html)$/,o=/\/$/,a=/^[a-z]+:/i;function s(t){return decodeURI(t).replace(r,"").replace(i,"")}function u(t){return a.test(t)}function c(t){return/^mailto:/.test(t)}function p(t){return/^tel:/.test(t)}function l(t){if(u(t))return t;const n=t.match(r),e=n?n[0]:"",i=s(t);return o.test(i)?t:i+".html"+e}function f(t,n){const e=decodeURIComponent(t.hash),i=function(t){const n=t.match(r);if(n)return n[0]}(n);if(i&&e!==i)return!1;return s(t.path)===s(n)}function h(t,n,e){if(u(n))return{type:"external",path:n};e&&(n=function(t,n,e){const r=t.charAt(0);if("/"===r)return t;if("?"===r||"#"===r)return n+t;const i=n.split("/");e&&i[i.length-1]||i.pop();const o=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(n,e,r,i=1){if("string"==typeof n)return h(e,n,r);if(Array.isArray(n))return Object.assign(h(e,n[0],r),{title:n[1]});{const o=n.children||[];return 0===o.length&&n.path?Object.assign(h(e,n.path,r),{title:n.title}):{type:"group",path:n.path,title:n.title,sidebarDepth:n.sidebarDepth,initialOpenGroupIndex:n.initialOpenGroupIndex,children:o.map(n=>t(n,e,r,i+1)),collapsable:!1!==n.collapsable}}}(t,i,e)):[]}return[]}function g(t){const n=v(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:n.map(n=>({type:"auto",title:n.title,basePath:t.path,path:t.path+"#"+n.slug,children:n.children||[]}))}]}function v(t){let n;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?n=t:n&&(n.children||(n.children=[])).push(t)}),t.filter(t=>2===t.level)}function b(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},246:function(t,n){t.exports=function(t){return null==t}},250:function(t,n,e){},261:function(t,n,e){var r=e(11),i=e(4),o=e(10);t.exports=function(t){return"string"==typeof t||!i(t)&&o(t)&&"[object String]"==r(t)}},262:function(t,n,e){"use strict";e(250)},269:function(t,n,e){"use strict";e.r(n);e(45);var r=e(240),i=e(261),o=e.n(i),a=e(246),s=e.n(a),u={name:"PageNav",props:["sidebarItems"],computed:{prev(){return p(c.PREV,this)},next(){return p(c.NEXT,this)}}};const c={NEXT:{resolveLink:function(t,n){return l(t,n,1)},getThemeLinkConfig:({nextLinks:t})=>t,getPageLinkConfig:({frontmatter:t})=>t.next},PREV:{resolveLink:function(t,n){return l(t,n,-1)},getThemeLinkConfig:({prevLinks:t})=>t,getPageLinkConfig:({frontmatter:t})=>t.prev}};function p(t,{$themeConfig:n,$page:e,$route:i,$site:a,sidebarItems:u}){const{resolveLink:c,getThemeLinkConfig:p,getPageLinkConfig:l}=t,f=p(n),h=l(e),d=s()(h)?f:h;return!1===d?void 0:o()(d)?Object(r.k)(a.pages,d,i.path):c(e,u)}function l(t,n,e){const r=[];!function t(n,e){for(let r=0,i=n.length;r({platforms:["internet","codepen","codesandbox","glitch","jsfiddle","observable"],colors:["red","blue","yellow","green","orange","purple"]}),props:{title:String,href:String,src:String,tags:String},computed:{platform(){for(var t=0;t ${l.title}`,l.slug=""+e.slug,i.id=l.slug,this.$page.headers.push(l)}}}},296:function(t,e,r){},312:function(t,e,r){"use strict";r(296)},315:function(t,e,r){"use strict";r.d(e,"a",(function(){return s})),r.d(e,"b",(function(){return a}));var s=function(){var t=this,e=t._self._c;t._self._setupProxy;return e("div",{staticClass:"example"},[e("h2",{ref:"h2"},[t._v(t._s(t.title))]),t._v(" "),e("a",{staticClass:"cover",attrs:{href:t.href,target:"_blank",rel:"noopener noreferrer"}},[e("span",{staticClass:"thumb",style:{backgroundImage:`url(${t.src||"/images/thumbnail.svg"})`},attrs:{role:"img"}}),t._v(" "),e("div",{staticClass:"title"},[e("span",{staticClass:"type",class:t.platform}),t._v(" "+t._s(t.title)+"\n ")])]),t._v(" "),e("ul",{staticClass:"tags"},t._l(t.tagList,(function(r){return e("li",{key:r.id,staticClass:"tag",class:r.color},[t._v("\n "+t._s(r.name)+"\n ")])})),0)])},a=[]},320:function(t,e,r){"use strict";r.r(e);var s=r(315),a=r(280);for(var n in a)["default"].indexOf(n)<0&&function(t){r.d(e,t,(function(){return a[t]}))}(n);r(312);var i=r(14),l=Object(i.a)(a.default,s.a,s.b,!1,null,"66597b69",null);e.default=l.exports}}]); \ No newline at end of file diff --git a/assets/js/18.cd0254c1.js b/assets/js/18.cd0254c1.js new file mode 100644 index 000000000..f5d6522f9 --- /dev/null +++ b/assets/js/18.cd0254c1.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{286:function(n,t,r){"use strict";r.r(t);var e=r(287),i=r.n(e);for(var s in e)["default"].indexOf(s)<0&&function(n){r.d(t,n,(function(){return e[n]}))}(s);t.default=i.a},287:function(n,t){n.exports={name:"version-link",props:{v:String}}},297:function(n,t,r){},313:function(n,t,r){"use strict";r(297)},318:function(n,t,r){"use strict";r.d(t,"a",(function(){return e})),r.d(t,"b",(function(){return i}));var e=function(){var n=this._self._c;this._self._setupProxy;return n("a",{staticClass:"version",attrs:{target:"_blank",rel:"noopener noreferrer",href:"https://github.com/jonobr1/two.js/releases/tag/"+this.v}},[this._v(this._s(this.v)),n("OutboundLink")],1)},i=[]},323:function(n,t,r){"use strict";r.r(t);var e=r(318),i=r(286);for(var s in i)["default"].indexOf(s)<0&&function(n){r.d(t,n,(function(){return i[n]}))}(s);r(313);var u=r(14),o=Object(u.a)(i.default,e.a,e.b,!1,null,"24f72e98",null);t.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/19.1a7cfb2b.js b/assets/js/19.1a7cfb2b.js new file mode 100644 index 000000000..a08cc5d43 --- /dev/null +++ b/assets/js/19.1a7cfb2b.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[19,28],{240:function(t,e,n){"use strict";n.d(e,"d",(function(){return i})),n.d(e,"a",(function(){return a})),n.d(e,"i",(function(){return s})),n.d(e,"f",(function(){return l})),n.d(e,"g",(function(){return u})),n.d(e,"h",(function(){return c})),n.d(e,"b",(function(){return f})),n.d(e,"e",(function(){return h})),n.d(e,"k",(function(){return d})),n.d(e,"l",(function(){return p})),n.d(e,"c",(function(){return g})),n.d(e,"j",(function(){return b}));n(45);const i=/#.*$/,r=/\.(md|html)$/,a=/\/$/,s=/^[a-z]+:/i;function o(t){return decodeURI(t).replace(i,"").replace(r,"")}function l(t){return s.test(t)}function u(t){return/^mailto:/.test(t)}function c(t){return/^tel:/.test(t)}function f(t){if(l(t))return t;const e=t.match(i),n=e?e[0]:"",r=o(t);return a.test(r)?t:r+".html"+n}function h(t,e){const n=decodeURIComponent(t.hash),r=function(t){const e=t.match(i);if(e)return e[0]}(e);if(r&&n!==r)return!1;return o(t.path)===o(e)}function d(t,e,n){if(l(e))return{type:"external",path:e};n&&(e=function(t,e,n){const i=t.charAt(0);if("/"===i)return t;if("?"===i||"#"===i)return e+t;const r=e.split("/");n&&r[r.length-1]||r.pop();const a=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(e,n,i,r=1){if("string"==typeof e)return d(n,e,i);if(Array.isArray(e))return Object.assign(d(n,e[0],i),{title:e[1]});{const a=e.children||[];return 0===a.length&&e.path?Object.assign(d(n,e.path,i),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:a.map(e=>t(e,n,i,r+1)),collapsable:!1!==e.collapsable}}}(t,r,n)):[]}return[]}function m(t){const e=g(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function g(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function b(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},242:function(t,e,n){"use strict";n.r(e);var i=n(240),r={name:"NavLink",props:{item:{required:!0}},computed:{link(){return Object(i.b)(this.item.link)},exact(){return this.$site.locales?Object.keys(this.$site.locales).some(t=>t===this.link):"/"===this.link},isNonHttpURI(){return Object(i.g)(this.link)||Object(i.h)(this.link)},isBlankTarget(){return"_blank"===this.target},isInternal(){return!Object(i.f)(this.link)&&!this.isBlankTarget},target(){return this.isNonHttpURI?null:this.item.target?this.item.target:Object(i.f)(this.link)?"_blank":""},rel(){return this.isNonHttpURI||!1===this.item.rel?null:this.item.rel?this.item.rel:this.isBlankTarget?"noopener noreferrer":null}},methods:{focusoutAction(){this.$emit("focusout")}}},a=n(14),s=Object(a.a)(r,(function(){var t=this,e=t._self._c;return t.isInternal?e("RouterLink",{staticClass:"nav-link",attrs:{to:t.link,exact:t.exact},nativeOn:{focusout:function(e){return t.focusoutAction.apply(null,arguments)}}},[t._v("\n "+t._s(t.item.text)+"\n")]):e("a",{staticClass:"nav-link external",attrs:{href:t.link,target:t.target,rel:t.rel},on:{focusout:t.focusoutAction}},[t._v("\n "+t._s(t.item.text)+"\n "),t.isBlankTarget?e("OutboundLink"):t._e()],1)}),[],!1,null,null,null);e.default=s.exports},255:function(t,e,n){},272:function(t,e,n){"use strict";n(255)},299:function(t,e,n){"use strict";n.r(e);var i={name:"Home",components:{NavLink:n(242).default},computed:{data(){return this.$page.frontmatter},actionLink(){return{link:this.data.actionLink,text:this.data.actionText}}}},r=(n(272),n(14)),a=Object(r.a)(i,(function(){var t=this,e=t._self._c;return e("main",{staticClass:"home",attrs:{"aria-labelledby":null!==t.data.heroText?"main-title":null}},[e("header",{staticClass:"hero"},[t.data.heroImage?e("img",{attrs:{src:t.$withBase(t.data.heroImage),alt:t.data.heroAlt||"hero"}}):t._e(),t._v(" "),null!==t.data.heroText?e("h1",{attrs:{id:"main-title"}},[t._v("\n "+t._s(t.data.heroText||t.$title||"Hello")+"\n ")]):t._e(),t._v(" "),null!==t.data.tagline?e("p",{staticClass:"description"},[t._v("\n "+t._s(t.data.tagline||t.$description||"Welcome to your VuePress site")+"\n ")]):t._e(),t._v(" "),t.data.actionText&&t.data.actionLink?e("p",{staticClass:"action"},[e("NavLink",{staticClass:"action-button",attrs:{item:t.actionLink}})],1):t._e()]),t._v(" "),t.data.features&&t.data.features.length?e("div",{staticClass:"features"},t._l(t.data.features,(function(n,i){return e("div",{key:i,staticClass:"feature"},[e("h2",[t._v(t._s(n.title))]),t._v(" "),e("p",[t._v(t._s(n.details))])])})),0):t._e(),t._v(" "),e("Content",{staticClass:"theme-default-content custom"}),t._v(" "),t.data.footer?e("div",{staticClass:"footer"},[t._v("\n "+t._s(t.data.footer)+"\n ")]):e("Content",{staticClass:"footer",attrs:{"slot-key":"footer"}})],1)}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/2.66ef9554.js b/assets/js/2.66ef9554.js new file mode 100644 index 000000000..cb5f69a0f --- /dev/null +++ b/assets/js/2.66ef9554.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[2,25,27],{246:function(t,e){t.exports=function(t){return null==t}},248:function(t,e,s){},249:function(t,e,s){},250:function(t,e,s){},255:function(t,e,s){},257:function(t,e,s){},258:function(t,e,s){"use strict";s(248)},259:function(t,e,s){},260:function(t,e,s){"use strict";s(249)},261:function(t,e,s){var a=s(11),i=s(4),n=s(10);t.exports=function(t){return"string"==typeof t||!i(t)&&n(t)&&"[object String]"==a(t)}},262:function(t,e,s){"use strict";s(250)},263:function(t,e,s){},266:function(t,e,s){},268:function(t,e,s){"use strict";s.r(e);var a=s(246),i=s.n(a),n=s(240),o={name:"PageEdit",computed:{lastUpdated(){return this.$page.lastUpdated},lastUpdatedText(){return"string"==typeof this.$themeLocaleConfig.lastUpdated?this.$themeLocaleConfig.lastUpdated:"string"==typeof this.$site.themeConfig.lastUpdated?this.$site.themeConfig.lastUpdated:"Last Updated"},editLink(){const t=i()(this.$page.frontmatter.editLink)?this.$site.themeConfig.editLinks:this.$page.frontmatter.editLink,{repo:e,docsDir:s="",docsBranch:a="master",docsRepo:n=e}=this.$site.themeConfig;return t&&n&&this.$page.relativePath?this.createEditLink(e,n,s,a,this.$page.relativePath):null},editLinkText(){return this.$themeLocaleConfig.editLinkText||this.$site.themeConfig.editLinkText||"Edit this page"}},methods:{createEditLink(t,e,s,a,i){if(/bitbucket.org/.test(e)){return e.replace(n.a,"")+"/src"+`/${a}/`+(s?s.replace(n.a,"")+"/":"")+i+`?mode=edit&spa=0&at=${a}&fileviewer=file-view-default`}if(/gitlab.com/.test(e)){return e.replace(n.a,"")+"/-/edit"+`/${a}/`+(s?s.replace(n.a,"")+"/":"")+i}return(n.i.test(e)?e:"https://github.com/"+e).replace(n.a,"")+"/edit"+`/${a}/`+(s?s.replace(n.a,"")+"/":"")+i}}},r=(s(260),s(14)),l=Object(r.a)(o,(function(){var t=this,e=t._self._c;return e("footer",{staticClass:"page-edit"},[t.editLink?e("div",{staticClass:"edit-link"},[e("a",{attrs:{href:t.editLink,target:"_blank",rel:"noopener noreferrer"}},[t._v(t._s(t.editLinkText))]),t._v(" "),e("OutboundLink")],1):t._e(),t._v(" "),t.lastUpdated?e("div",{staticClass:"last-updated"},[e("span",{staticClass:"prefix"},[t._v(t._s(t.lastUpdatedText)+":")]),t._v(" "),e("span",{staticClass:"time"},[t._v(t._s(t.lastUpdated))])]):t._e()])}),[],!1,null,null,null);e.default=l.exports},269:function(t,e,s){"use strict";s.r(e);s(45);var a=s(240),i=s(261),n=s.n(i),o=s(246),r=s.n(o),l={name:"PageNav",props:["sidebarItems"],computed:{prev(){return u(h.PREV,this)},next(){return u(h.NEXT,this)}}};const h={NEXT:{resolveLink:function(t,e){return c(t,e,1)},getThemeLinkConfig:({nextLinks:t})=>t,getPageLinkConfig:({frontmatter:t})=>t.next},PREV:{resolveLink:function(t,e){return c(t,e,-1)},getThemeLinkConfig:({prevLinks:t})=>t,getPageLinkConfig:({frontmatter:t})=>t.prev}};function u(t,{$themeConfig:e,$page:s,$route:i,$site:o,sidebarItems:l}){const{resolveLink:h,getThemeLinkConfig:u,getPageLinkConfig:c}=t,d=u(e),f=c(s),g=r()(f)?d:f;return!1===g?void 0:n()(g)?Object(a.k)(o.pages,g,i.path):h(s,l)}function c(t,e,s){const a=[];!function t(e,s){for(let a=0,i=e.length;a{let a=i()(e,"title","");return i()(e,"frontmatter.tags")&&(a+=" "+e.frontmatter.tags.join(" ")),s&&(a+=" "+s),o(t,a)};const o=(t,e)=>{const s=t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),a=new RegExp("[^\0-]"),i=t.split(/\s+/g).map(t=>t.trim()).filter(t=>!!t);if(a.test(t))return i.some(t=>e.toLowerCase().indexOf(t)>-1);{const a=t.endsWith(" ");return new RegExp(i.map((t,e)=>i.length!==e+1||a?`(?=.*\\b${s(t)}\\b)`:`(?=.*\\b${s(t)})`).join("")+".+","gi").test(e)}};var r={name:"SearchBox",data:()=>({query:"",focused:!1,focusIndex:0,placeholder:void 0,searchOpenClass:"search-open"}),computed:{showSuggestions(){return this.focused&&this.suggestions&&this.suggestions.length},suggestions(){const t=this.query.trim().toLowerCase();if(!t)return;const{pages:e}=this.$site,s=this.$site.themeConfig.searchMaxSuggestions||10,a=this.$localePath,i=[];for(let r=0;r=s);r++){const l=e[r];if(this.getPageLocalePath(l)===a&&this.isSearchable(l))if(n(t,l))i.push(l);else if(l.headers)for(let e=0;e=s);e++){const s=l.headers[e];if(s.title&&n(t,l,s.title)){var o=Object.assign({},l,{path:l.path+"#"+s.slug,header:s});s.title.startsWith("#")&&(o=this.formatTagSuggestion(o)),i.push(o)}}}return i},alignRight(){return(this.$site.themeConfig.nav||[]).length+(this.$site.repo?1:0)<=2}},mounted(){this.placeholder=this.$site.themeConfig.searchPlaceholder||"",document.addEventListener("keydown",this.onHotkey)},beforeDestroy(){document.removeEventListener("keydown",this.onHotkey)},methods:{getPageLocalePath(t){for(const e in this.$site.locales||{})if("/"!==e&&0===t.path.indexOf(e))return e;return"/"},isSearchable(t){let e=null;return null===e||(e=Array.isArray(e)?e:new Array(e),e.filter(e=>t.path.match(e)).length>0)},formatTagSuggestion(t){for(var e=null,s=0;s0?this.focusIndex--:this.focusIndex=this.suggestions.length-1)},onDown(){this.showSuggestions&&(this.focusIndex{}),this.query="",this.focusIndex=0,this.$refs.input.blur())},focus(t){this.focusIndex=t},unfocus(){this.focusIndex=-1}}},l=(s(273),s(14)),h=Object(l.a)(r,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"search-box"},[e("input",{ref:"input",class:{focused:t.focused},attrs:{"aria-label":"Search",placeholder:t.placeholder,autocomplete:"off",spellcheck:"false"},domProps:{value:t.query},on:{input:function(e){t.query=e.target.value},focus:t.onFocus,blur:t.onBlur,keyup:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.go(t.focusIndex)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:t.onUp.apply(null,arguments)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:t.onDown.apply(null,arguments)}]}}),t._v(" "),t.showSuggestions?e("ul",{staticClass:"suggestions",class:{"align-right":t.alignRight},on:{mouseleave:t.unfocus}},t._l(t.suggestions,(function(s,a){return e("li",{key:a,staticClass:"suggestion",class:{focused:a===t.focusIndex},on:{mousedown:function(e){return t.go(a)},mouseenter:function(e){return t.focus(a)}}},[e("a",{attrs:{href:s.path},on:{click:function(t){t.preventDefault()}}},[e("span",{staticClass:"page-title"},[t._v(t._s(s.title||s.path))]),t._v(" "),s.header?e("span",{staticClass:"header",class:{"is-tag":s.isTag}},[e("span",{staticClass:"chevron"},[t._v(">")]),t._v(" "+t._s(s.header.title))]):t._e()])])})),0):t._e()])}),[],!1,null,null,null).exports,u=s(270),c=s(254);function d(t,e){return t.ownerDocument.defaultView.getComputedStyle(t,null)[e]}var f={name:"Navbar",components:{SidebarButton:u.default,NavLinks:c.default,SearchBox:h},data:()=>({mobileDesktopBreakpoint:719,linksWrapMaxWidth:null}),computed:{algolia(){return this.$themeLocaleConfig.algolia||this.$site.themeConfig.algolia||{}},isAlgoliaSearch(){return this.algolia&&this.algolia.apiKey&&this.algolia.indexName},hasSidebar(){var t=this.$page.path.match(/\/.+?\//);return(t=t&&t.length?t[0]:t)in this.$site.themeConfig.sidebar&&this.$site.themeConfig.sidebar[t].length>0}},watch:{$route:function(t,e){setTimeout(this.handleSearchPosition,10)}},methods:{handleSearchPosition(){if(this.$refs.search||this.$refs.navLogo||this.refs.links)if(document.documentElement.clientWidth>this.mobileDesktopBreakpoint){var t=148,e=document.getElementsByClassName("theme-default-content")[0];e&&(t=e.offsetLeft+parseFloat(window.getComputedStyle(e,null).getPropertyValue("padding-left").replace("px",""))),(t+this.$refs.search.offsetWidth>this.$refs.links.offsetLeft+50||t{document.documentElement.clientWidth({isSidebarOpen:!1}),computed:{shouldShowNavbar(){const{themeConfig:t}=this.$site,{frontmatter:e}=this.$page;return!1!==e.navbar&&!1!==t.navbar&&(this.$title||t.logo||t.repo||t.nav||this.$themeLocaleConfig.nav)},shouldShowSidebar(){const{frontmatter:t}=this.$page;return!t.home&&!1!==t.sidebar&&this.sidebarItems.length},sidebarItems(){return Object(r.l)(this.$page,this.$page.regularPath,this.$site,this.$localePath)},pageClasses(){const t=this.$page.frontmatter.pageClass;return[{"no-navbar":!this.shouldShowNavbar,"sidebar-open":this.isSidebarOpen,"no-sidebar":!this.shouldShowSidebar},t]}},mounted(){this.$router.afterEach(()=>{this.isSidebarOpen=!1})},methods:{toggleSidebar(t){this.isSidebarOpen="boolean"==typeof t?t:!this.isSidebarOpen,this.$emit("toggle-sidebar",this.isSidebarOpen)},onTouchStart(t){this.touchStart={x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}},onTouchEnd(t){const e=t.changedTouches[0].clientX-this.touchStart.x,s=t.changedTouches[0].clientY-this.touchStart.y;Math.abs(e)>Math.abs(s)&&Math.abs(e)>40&&(e>0&&this.touchStart.x<=80?this.toggleSidebar(!0):this.toggleSidebar(!1))}}},h=s(14),u=Object(h.a)(l,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"theme-container",class:t.pageClasses,on:{touchstart:t.onTouchStart,touchend:t.onTouchEnd}},[t.shouldShowNavbar?e("Navbar",{on:{"toggle-sidebar":t.toggleSidebar}}):t._e(),t._v(" "),e("div",{staticClass:"sidebar-mask",on:{click:function(e){return t.toggleSidebar(!1)}}}),t._v(" "),e("Sidebar",{attrs:{items:t.sidebarItems},on:{"toggle-sidebar":t.toggleSidebar},scopedSlots:t._u([{key:"top",fn:function(){return[t._t("sidebar-top")]},proxy:!0},{key:"bottom",fn:function(){return[t._t("sidebar-bottom")]},proxy:!0}],null,!0)}),t._v(" "),t.$page.frontmatter.home?e("Home"):e("Page",{attrs:{"sidebar-items":t.sidebarItems},scopedSlots:t._u([{key:"top",fn:function(){return[t._t("page-top")]},proxy:!0},{key:"bottom",fn:function(){return[t._t("page-bottom")]},proxy:!0}],null,!0)})],1)}),[],!1,null,null,null);e.default=u.exports}}]); \ No newline at end of file diff --git a/assets/js/20.bf494733.js b/assets/js/20.bf494733.js new file mode 100644 index 000000000..6068f5da6 --- /dev/null +++ b/assets/js/20.bf494733.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{240:function(t,e,n){"use strict";n.d(e,"d",(function(){return i})),n.d(e,"a",(function(){return a})),n.d(e,"i",(function(){return s})),n.d(e,"f",(function(){return c})),n.d(e,"g",(function(){return u})),n.d(e,"h",(function(){return l})),n.d(e,"b",(function(){return d})),n.d(e,"e",(function(){return p})),n.d(e,"k",(function(){return f})),n.d(e,"l",(function(){return h})),n.d(e,"c",(function(){return m})),n.d(e,"j",(function(){return b}));n(45);const i=/#.*$/,r=/\.(md|html)$/,a=/\/$/,s=/^[a-z]+:/i;function o(t){return decodeURI(t).replace(i,"").replace(r,"")}function c(t){return s.test(t)}function u(t){return/^mailto:/.test(t)}function l(t){return/^tel:/.test(t)}function d(t){if(c(t))return t;const e=t.match(i),n=e?e[0]:"",r=o(t);return a.test(r)?t:r+".html"+n}function p(t,e){const n=decodeURIComponent(t.hash),r=function(t){const e=t.match(i);if(e)return e[0]}(e);if(r&&n!==r)return!1;return o(t.path)===o(e)}function f(t,e,n){if(c(e))return{type:"external",path:e};n&&(e=function(t,e,n){const i=t.charAt(0);if("/"===i)return t;if("?"===i||"#"===i)return e+t;const r=e.split("/");n&&r[r.length-1]||r.pop();const a=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(e,n,i,r=1){if("string"==typeof e)return f(n,e,i);if(Array.isArray(e))return Object.assign(f(n,e[0],i),{title:e[1]});{const a=e.children||[];return 0===a.length&&e.path?Object.assign(f(n,e.path,i),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:a.map(e=>t(e,n,i,r+1)),collapsable:!1!==e.collapsable}}}(t,r,n)):[]}return[]}function g(t){const e=m(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function m(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function b(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},246:function(t,e){t.exports=function(t){return null==t}},249:function(t,e,n){},260:function(t,e,n){"use strict";n(249)},268:function(t,e,n){"use strict";n.r(e);var i=n(246),r=n.n(i),a=n(240),s={name:"PageEdit",computed:{lastUpdated(){return this.$page.lastUpdated},lastUpdatedText(){return"string"==typeof this.$themeLocaleConfig.lastUpdated?this.$themeLocaleConfig.lastUpdated:"string"==typeof this.$site.themeConfig.lastUpdated?this.$site.themeConfig.lastUpdated:"Last Updated"},editLink(){const t=r()(this.$page.frontmatter.editLink)?this.$site.themeConfig.editLinks:this.$page.frontmatter.editLink,{repo:e,docsDir:n="",docsBranch:i="master",docsRepo:a=e}=this.$site.themeConfig;return t&&a&&this.$page.relativePath?this.createEditLink(e,a,n,i,this.$page.relativePath):null},editLinkText(){return this.$themeLocaleConfig.editLinkText||this.$site.themeConfig.editLinkText||"Edit this page"}},methods:{createEditLink(t,e,n,i,r){if(/bitbucket.org/.test(e)){return e.replace(a.a,"")+"/src"+`/${i}/`+(n?n.replace(a.a,"")+"/":"")+r+`?mode=edit&spa=0&at=${i}&fileviewer=file-view-default`}if(/gitlab.com/.test(e)){return e.replace(a.a,"")+"/-/edit"+`/${i}/`+(n?n.replace(a.a,"")+"/":"")+r}return(a.i.test(e)?e:"https://github.com/"+e).replace(a.a,"")+"/edit"+`/${i}/`+(n?n.replace(a.a,"")+"/":"")+r}}},o=(n(260),n(14)),c=Object(o.a)(s,(function(){var t=this,e=t._self._c;return e("footer",{staticClass:"page-edit"},[t.editLink?e("div",{staticClass:"edit-link"},[e("a",{attrs:{href:t.editLink,target:"_blank",rel:"noopener noreferrer"}},[t._v(t._s(t.editLinkText))]),t._v(" "),e("OutboundLink")],1):t._e(),t._v(" "),t.lastUpdated?e("div",{staticClass:"last-updated"},[e("span",{staticClass:"prefix"},[t._v(t._s(t.lastUpdatedText)+":")]),t._v(" "),e("span",{staticClass:"time"},[t._v(t._s(t.lastUpdated))])]):t._e()])}),[],!1,null,null,null);e.default=c.exports}}]); \ No newline at end of file diff --git a/assets/js/21.26ae665e.js b/assets/js/21.26ae665e.js new file mode 100644 index 000000000..ae0fecbb0 --- /dev/null +++ b/assets/js/21.26ae665e.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{240:function(t,e,n){"use strict";n.d(e,"d",(function(){return r})),n.d(e,"a",(function(){return a})),n.d(e,"i",(function(){return s})),n.d(e,"f",(function(){return o})),n.d(e,"g",(function(){return c})),n.d(e,"h",(function(){return l})),n.d(e,"b",(function(){return p})),n.d(e,"e",(function(){return f})),n.d(e,"k",(function(){return d})),n.d(e,"l",(function(){return h})),n.d(e,"c",(function(){return g})),n.d(e,"j",(function(){return m}));n(45);const r=/#.*$/,i=/\.(md|html)$/,a=/\/$/,s=/^[a-z]+:/i;function u(t){return decodeURI(t).replace(r,"").replace(i,"")}function o(t){return s.test(t)}function c(t){return/^mailto:/.test(t)}function l(t){return/^tel:/.test(t)}function p(t){if(o(t))return t;const e=t.match(r),n=e?e[0]:"",i=u(t);return a.test(i)?t:i+".html"+n}function f(t,e){const n=decodeURIComponent(t.hash),i=function(t){const e=t.match(r);if(e)return e[0]}(e);if(i&&n!==i)return!1;return u(t.path)===u(e)}function d(t,e,n){if(o(e))return{type:"external",path:e};n&&(e=function(t,e,n){const r=t.charAt(0);if("/"===r)return t;if("?"===r||"#"===r)return e+t;const i=e.split("/");n&&i[i.length-1]||i.pop();const a=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(e,n,r,i=1){if("string"==typeof e)return d(n,e,r);if(Array.isArray(e))return Object.assign(d(n,e[0],r),{title:e[1]});{const a=e.children||[];return 0===a.length&&e.path?Object.assign(d(n,e.path,r),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:a.map(e=>t(e,n,r,i+1)),collapsable:!1!==e.collapsable}}}(t,i,n)):[]}return[]}function b(t){const e=g(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function g(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function m(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},251:function(t,e,n){},265:function(t,e,n){"use strict";n(251)},271:function(t,e,n){"use strict";n.r(e);var r=n(240);function i(t,e,n,r,i){const a={props:{to:e,activeClass:"",exactActiveClass:""},class:{active:r,"sidebar-link":!0}};return i>2&&(a.style={"padding-left":i+"rem"}),t("RouterLink",a,n)}function a(t,e,n,s,u,o=1){return!e||o>u?null:t("ul",{class:"sidebar-sub-headers"},e.map(e=>{const c=Object(r.e)(s,n+"#"+e.slug);return t("li",{class:"sidebar-sub-header"},[i(t,n+"#"+e.slug,e.title,c,e.level-1),a(t,e.children,n,s,u,o+1)])}))}var s={functional:!0,props:["item","sidebarDepth"],render(t,{parent:{$page:e,$site:n,$route:s,$themeConfig:u,$themeLocaleConfig:o},props:{item:c,sidebarDepth:l}}){const p=Object(r.e)(s,c.path),f="auto"===c.type?p||c.children.some(t=>Object(r.e)(s,c.basePath+"#"+t.slug)):p,d="external"===c.type?function(t,e,n){return t("a",{attrs:{href:e,target:"_blank",rel:"noopener noreferrer"},class:{"sidebar-link":!0}},[n,t("OutboundLink")])}(t,c.path,c.title||c.path):i(t,c.path,c.title||c.path,f),h=[e.frontmatter.sidebarDepth,l,o.sidebarDepth,u.sidebarDepth,1].find(t=>void 0!==t),b=o.displayAllHeaders||u.displayAllHeaders;if("auto"===c.type)return[d,a(t,c.children,c.basePath,s,h)];if((f||b)&&c.headers&&!r.d.test(c.path)){return[d,a(t,Object(r.c)(c.headers),c.path,s,h)]}return d}},u=(n(265),n(14)),o=Object(u.a)(s,void 0,void 0,!1,null,null,null);e.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/22.69c2ce40.js b/assets/js/22.69c2ce40.js new file mode 100644 index 000000000..125ab070e --- /dev/null +++ b/assets/js/22.69c2ce40.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{282:function(t,e,n){"use strict";n.r(e);var r=n(283),i=n.n(r);for(var s in r)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(s);e.default=i.a},283:function(t,e){var n={indent_size:2};t.exports={name:"inline-editor",computed:{prefill(){var t={},e=this._props;return e.title&&(t.title=e.title),e.description&&(t.description=e.description),e.tags&&(t.tags=e.tags.split(",")),e.scripts&&(t.scripts=e.scripts.split(",")),JSON.stringify(t)}},props:{scripts:String},mounted:function(){var t=function t(e){for(var r="",i=0;i0?(""!==r&&(r+="\n"),r+=t(s.children),r+="\n"):"string"==typeof s.text&&(r+=s.text)}return window.js_beautify?window.js_beautify(r,n):r}(this.$slots.default);this.$refs.pre.innerHTML=t;var e=document.createElement("script");e.type="text/javascript",e.className="codepen",e.async="",e.src="https://static.codepen.io/assets/embed/ei.js",document.body.appendChild(e)},beforeDestroyed:function(){}}},316:function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i}));var r=function(){var t=this._self._c;this._self._setupProxy;return t("div",{staticClass:"codepen",attrs:{"data-prefill":this.prefill,"data-default-tab":"js,result","data-editable":"true","data-theme-id":"40346","data-height":"500"}},[t("pre",{attrs:{"data-lang":"html"}}),this._v(" "),t("pre",{attrs:{"data-lang":"css","data-options-autoprefixer":"true"}}),this._v(" "),t("pre",{ref:"pre",attrs:{"data-lang":"js"}})])},i=[]},321:function(t,e,n){"use strict";n.r(e);var r=n(316),i=n(282);for(var s in i)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(s);var a=n(14),d=Object(a.a)(i.default,r.a,r.b,!1,null,null,null);e.default=d.exports}}]); \ No newline at end of file diff --git a/assets/js/23.afd3f865.js b/assets/js/23.afd3f865.js new file mode 100644 index 000000000..6fa52998d --- /dev/null +++ b/assets/js/23.afd3f865.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{284:function(t,n,r){"use strict";r.r(n);var e=r(285),i=r.n(e);for(var u in e)["default"].indexOf(u)<0&&function(t){r.d(n,t,(function(){return e[t]}))}(u);n.default=i.a},285:function(t,n){t.exports={name:"redirect-page",props:{src:String},mounted:function(){/^https:\/\//i.test(this._props.src)?window.location.href=this._props.src:this.$router.replace(this._props.src).catch(()=>{})}}},317:function(t,n,r){"use strict";r.d(n,"a",(function(){return e})),r.d(n,"b",(function(){return i}));var e=function(){var t=this._self._c;this._self._setupProxy;return t("div")},i=[]},322:function(t,n,r){"use strict";r.r(n);var e=r(317),i=r(284);for(var u in i)["default"].indexOf(u)<0&&function(t){r.d(n,t,(function(){return i[t]}))}(u);var o=r(14),s=Object(o.a)(i.default,e.a,e.b,!1,null,null,null);n.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/24.77124964.js b/assets/js/24.77124964.js new file mode 100644 index 000000000..5d3fc5345 --- /dev/null +++ b/assets/js/24.77124964.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[24],{241:function(t,e,n){},243:function(t,e,n){"use strict";n(241)},245:function(t,e,n){"use strict";n.r(e);var s={name:"DropdownTransition",methods:{setHeight(t){t.style.height=t.scrollHeight+"px"},unsetHeight(t){t.style.height=""}}},i=(n(243),n(14)),o=Object(i.a)(s,(function(){return(0,this._self._c)("transition",{attrs:{name:"dropdown"},on:{enter:this.setHeight,"after-enter":this.unsetHeight,"before-leave":this.setHeight}},[this._t("default")],2)}),[],!1,null,null,null);e.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/25.449a43ac.js b/assets/js/25.449a43ac.js new file mode 100644 index 000000000..f05df973c --- /dev/null +++ b/assets/js/25.449a43ac.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[25],{248:function(t,c,n){},258:function(t,c,n){"use strict";n(248)},270:function(t,c,n){"use strict";n.r(c);n(258);var i=n(14),s=Object(i.a)({},(function(){var t=this,c=t._self._c;return c("div",{staticClass:"sidebar-button",on:{click:function(c){return t.$emit("toggle-sidebar")}}},[c("svg",{staticClass:"icon",attrs:{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",viewBox:"0 0 448 512"}},[c("path",{attrs:{fill:"currentColor",d:"M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"}})])])}),[],!1,null,null,null);c.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/26.e37f88f0.js b/assets/js/26.e37f88f0.js new file mode 100644 index 000000000..40d7208a4 --- /dev/null +++ b/assets/js/26.e37f88f0.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[26],{294:function(e,n,t){},310:function(e,n,t){"use strict";t(294)},372:function(e,n,t){"use strict";t.r(n);var o={name:"carbon-ads",watch:{$route(e,n){e.path!==n.path&&this.$el.querySelector("#carbonads")&&(this.$el.innerHTML="",this.load())}},mounted(){this.load()},methods:{load(){const e=document.createElement("script");e.id="_carbonads_js",e.src="//cdn.carbonads.com/carbon.js?serve=CESI52JY&placement=twojsorg",this.$el.appendChild(e)}},render:e=>e("div",{class:"carbon-ads"})},s=(t(310),t(14)),a=Object(s.a)(o,void 0,void 0,!1,null,null,null);n.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/27.c95ae6c2.js b/assets/js/27.c95ae6c2.js new file mode 100644 index 000000000..808f417b9 --- /dev/null +++ b/assets/js/27.c95ae6c2.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[27],{266:function(t,e,s){},277:function(t,e,s){"use strict";s(266)},301:function(t,e,s){"use strict";s.r(e);var i=s(267),a=s(254),o={name:"Sidebar",components:{SidebarLinks:i.default,NavLinks:a.default},props:["items"]},n=(s(277),s(14)),l=Object(n.a)(o,(function(){var t=this,e=t._self._c;return e("aside",{staticClass:"sidebar"},[e("RouterLink",{staticClass:"home-link",attrs:{to:t.$localePath}},[t.$site.themeConfig.logo?e("img",{ref:"navLogo",staticClass:"logo",attrs:{src:t.$withBase(t.$site.themeConfig.logo),alt:t.$siteTitle}}):t._e(),t._v(" "),t.$siteTitle?e("span",{ref:"siteName",staticClass:"site-name",class:{"can-hide":t.$site.themeConfig.logo}},[t._v(t._s(t.$siteTitle))]):t._e()]),t._v(" "),t._t("top"),t._v(" "),e("SidebarLinks",{attrs:{depth:0,items:t.items}}),t._v(" "),t._t("bottom")],2)}),[],!1,null,null,null);e.default=l.exports}}]); \ No newline at end of file diff --git a/assets/js/28.bf48255c.js b/assets/js/28.bf48255c.js new file mode 100644 index 000000000..5ae2291a7 --- /dev/null +++ b/assets/js/28.bf48255c.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[28],{240:function(t,n,e){"use strict";e.d(n,"d",(function(){return r})),e.d(n,"a",(function(){return s})),e.d(n,"i",(function(){return u})),e.d(n,"f",(function(){return a})),e.d(n,"g",(function(){return l})),e.d(n,"h",(function(){return c})),e.d(n,"b",(function(){return f})),e.d(n,"e",(function(){return h})),e.d(n,"k",(function(){return p})),e.d(n,"l",(function(){return d})),e.d(n,"c",(function(){return b})),e.d(n,"j",(function(){return m}));e(45);const r=/#.*$/,i=/\.(md|html)$/,s=/\/$/,u=/^[a-z]+:/i;function o(t){return decodeURI(t).replace(r,"").replace(i,"")}function a(t){return u.test(t)}function l(t){return/^mailto:/.test(t)}function c(t){return/^tel:/.test(t)}function f(t){if(a(t))return t;const n=t.match(r),e=n?n[0]:"",i=o(t);return s.test(i)?t:i+".html"+e}function h(t,n){const e=decodeURIComponent(t.hash),i=function(t){const n=t.match(r);if(n)return n[0]}(n);if(i&&e!==i)return!1;return o(t.path)===o(n)}function p(t,n,e){if(a(n))return{type:"external",path:n};e&&(n=function(t,n,e){const r=t.charAt(0);if("/"===r)return t;if("?"===r||"#"===r)return n+t;const i=n.split("/");e&&i[i.length-1]||i.pop();const s=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(n,e,r,i=1){if("string"==typeof n)return p(e,n,r);if(Array.isArray(n))return Object.assign(p(e,n[0],r),{title:n[1]});{const s=n.children||[];return 0===s.length&&n.path?Object.assign(p(e,n.path,r),{title:n.title}):{type:"group",path:n.path,title:n.title,sidebarDepth:n.sidebarDepth,initialOpenGroupIndex:n.initialOpenGroupIndex,children:s.map(n=>t(n,e,r,i+1)),collapsable:!1!==n.collapsable}}}(t,i,e)):[]}return[]}function g(t){const n=b(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:n.map(n=>({type:"auto",title:n.title,basePath:t.path,path:t.path+"#"+n.slug,children:n.children||[]}))}]}function b(t){let n;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?n=t:n&&(n.children||(n.children=[])).push(t)}),t.filter(t=>2===t.level)}function m(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},242:function(t,n,e){"use strict";e.r(n);var r=e(240),i={name:"NavLink",props:{item:{required:!0}},computed:{link(){return Object(r.b)(this.item.link)},exact(){return this.$site.locales?Object.keys(this.$site.locales).some(t=>t===this.link):"/"===this.link},isNonHttpURI(){return Object(r.g)(this.link)||Object(r.h)(this.link)},isBlankTarget(){return"_blank"===this.target},isInternal(){return!Object(r.f)(this.link)&&!this.isBlankTarget},target(){return this.isNonHttpURI?null:this.item.target?this.item.target:Object(r.f)(this.link)?"_blank":""},rel(){return this.isNonHttpURI||!1===this.item.rel?null:this.item.rel?this.item.rel:this.isBlankTarget?"noopener noreferrer":null}},methods:{focusoutAction(){this.$emit("focusout")}}},s=e(14),u=Object(s.a)(i,(function(){var t=this,n=t._self._c;return t.isInternal?n("RouterLink",{staticClass:"nav-link",attrs:{to:t.link,exact:t.exact},nativeOn:{focusout:function(n){return t.focusoutAction.apply(null,arguments)}}},[t._v("\n "+t._s(t.item.text)+"\n")]):n("a",{staticClass:"nav-link external",attrs:{href:t.link,target:t.target,rel:t.rel},on:{focusout:t.focusoutAction}},[t._v("\n "+t._s(t.item.text)+"\n "),t.isBlankTarget?n("OutboundLink"):t._e()],1)}),[],!1,null,null,null);n.default=u.exports}}]); \ No newline at end of file diff --git a/assets/js/29.de58fa7a.js b/assets/js/29.de58fa7a.js new file mode 100644 index 000000000..24db9ecef --- /dev/null +++ b/assets/js/29.de58fa7a.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[29],{329:function(t,e,s){"use strict";s.r(e);const o=["There's nothing here.","How did we get here?","That's a Four-Oh-Four.","Looks like we've got some broken links."];var n={methods:{getMsg:()=>o[Math.floor(Math.random()*o.length)]}},h=s(14),i=Object(h.a)(n,(function(){var t=this._self._c;return t("div",{staticClass:"theme-container"},[t("div",{staticClass:"theme-default-content"},[t("h1",[this._v("404")]),this._v(" "),t("blockquote",[this._v(this._s(this.getMsg()))]),this._v(" "),t("RouterLink",{attrs:{to:"/"}},[this._v("\n Take me home.\n ")])],1)])}),[],!1,null,null,null);e.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/3.4746c138.js b/assets/js/3.4746c138.js new file mode 100644 index 000000000..4d1d3f885 --- /dev/null +++ b/assets/js/3.4746c138.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[3,21,24],{240:function(t,e,n){"use strict";n.d(e,"d",(function(){return r})),n.d(e,"a",(function(){return s})),n.d(e,"i",(function(){return a})),n.d(e,"f",(function(){return l})),n.d(e,"g",(function(){return u})),n.d(e,"h",(function(){return c})),n.d(e,"b",(function(){return p})),n.d(e,"e",(function(){return d})),n.d(e,"k",(function(){return h})),n.d(e,"l",(function(){return f})),n.d(e,"c",(function(){return g})),n.d(e,"j",(function(){return m}));n(45);const r=/#.*$/,i=/\.(md|html)$/,s=/\/$/,a=/^[a-z]+:/i;function o(t){return decodeURI(t).replace(r,"").replace(i,"")}function l(t){return a.test(t)}function u(t){return/^mailto:/.test(t)}function c(t){return/^tel:/.test(t)}function p(t){if(l(t))return t;const e=t.match(r),n=e?e[0]:"",i=o(t);return s.test(i)?t:i+".html"+n}function d(t,e){const n=decodeURIComponent(t.hash),i=function(t){const e=t.match(r);if(e)return e[0]}(e);if(i&&n!==i)return!1;return o(t.path)===o(e)}function h(t,e,n){if(l(e))return{type:"external",path:e};n&&(e=function(t,e,n){const r=t.charAt(0);if("/"===r)return t;if("?"===r||"#"===r)return e+t;const i=e.split("/");n&&i[i.length-1]||i.pop();const s=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(e,n,r,i=1){if("string"==typeof e)return h(n,e,r);if(Array.isArray(e))return Object.assign(h(n,e[0],r),{title:e[1]});{const s=e.children||[];return 0===s.length&&e.path?Object.assign(h(n,e.path,r),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:s.map(e=>t(e,n,r,i+1)),collapsable:!1!==e.collapsable}}}(t,i,n)):[]}return[]}function b(t){const e=g(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function g(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function m(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},241:function(t,e,n){},243:function(t,e,n){"use strict";n(241)},245:function(t,e,n){"use strict";n.r(e);var r={name:"DropdownTransition",methods:{setHeight(t){t.style.height=t.scrollHeight+"px"},unsetHeight(t){t.style.height=""}}},i=(n(243),n(14)),s=Object(i.a)(r,(function(){return(0,this._self._c)("transition",{attrs:{name:"dropdown"},on:{enter:this.setHeight,"after-enter":this.unsetHeight,"before-leave":this.setHeight}},[this._t("default")],2)}),[],!1,null,null,null);e.default=s.exports},251:function(t,e,n){},264:function(t,e,n){},265:function(t,e,n){"use strict";n(251)},267:function(t,e,n){"use strict";n.r(e);var r=n(288),i=n(271),s=n(240);function a(t,e){if("group"===e.type){const n=e.path&&Object(s.e)(t,e.path),r=e.children.some(e=>"group"===e.type?a(t,e):"page"===e.type&&Object(s.e)(t,e.path));return n||r}return!1}var o={name:"SidebarLinks",components:{SidebarGroup:r.default,SidebarLink:i.default},props:["items","depth","sidebarDepth","initialOpenGroupIndex"],data(){return{openGroupIndex:this.initialOpenGroupIndex||0}},watch:{$route(){this.refreshIndex()}},created(){this.refreshIndex()},methods:{refreshIndex(){const t=function(t,e){for(let n=0;n-1&&(this.openGroupIndex=t)},toggleGroup(t){this.openGroupIndex=t===this.openGroupIndex?-1:t},isActive(t){return Object(s.e)(this.$route,t.regularPath)}}},l=n(14),u=Object(l.a)(o,(function(){var t=this,e=t._self._c;return t.items.length?e("ul",{staticClass:"sidebar-links"},t._l(t.items,(function(n,r){return e("li",{key:r},["group"===n.type?e("SidebarGroup",{attrs:{item:n,open:r===t.openGroupIndex,collapsable:n.collapsable||n.collapsible,depth:t.depth},on:{toggle:function(e){return t.toggleGroup(r)}}}):e("SidebarLink",{attrs:{"sidebar-depth":t.sidebarDepth,item:n}})],1)})),0):t._e()}),[],!1,null,null,null);e.default=u.exports},271:function(t,e,n){"use strict";n.r(e);var r=n(240);function i(t,e,n,r,i){const s={props:{to:e,activeClass:"",exactActiveClass:""},class:{active:r,"sidebar-link":!0}};return i>2&&(s.style={"padding-left":i+"rem"}),t("RouterLink",s,n)}function s(t,e,n,a,o,l=1){return!e||l>o?null:t("ul",{class:"sidebar-sub-headers"},e.map(e=>{const u=Object(r.e)(a,n+"#"+e.slug);return t("li",{class:"sidebar-sub-header"},[i(t,n+"#"+e.slug,e.title,u,e.level-1),s(t,e.children,n,a,o,l+1)])}))}var a={functional:!0,props:["item","sidebarDepth"],render(t,{parent:{$page:e,$site:n,$route:a,$themeConfig:o,$themeLocaleConfig:l},props:{item:u,sidebarDepth:c}}){const p=Object(r.e)(a,u.path),d="auto"===u.type?p||u.children.some(t=>Object(r.e)(a,u.basePath+"#"+t.slug)):p,h="external"===u.type?function(t,e,n){return t("a",{attrs:{href:e,target:"_blank",rel:"noopener noreferrer"},class:{"sidebar-link":!0}},[n,t("OutboundLink")])}(t,u.path,u.title||u.path):i(t,u.path,u.title||u.path,d),f=[e.frontmatter.sidebarDepth,c,l.sidebarDepth,o.sidebarDepth,1].find(t=>void 0!==t),b=l.displayAllHeaders||o.displayAllHeaders;if("auto"===u.type)return[h,s(t,u.children,u.basePath,a,f)];if((d||b)&&u.headers&&!r.d.test(u.path)){return[h,s(t,Object(r.c)(u.headers),u.path,a,f)]}return h}},o=(n(265),n(14)),l=Object(o.a)(a,void 0,void 0,!1,null,null,null);e.default=l.exports},276:function(t,e,n){"use strict";n(264)},288:function(t,e,n){"use strict";n.r(e);var r=n(240),i={name:"SidebarGroup",components:{DropdownTransition:n(245).default},props:["item","open","collapsable","depth"],beforeCreate(){this.$options.components.SidebarLinks=n(267).default},methods:{isActive:r.e}},s=(n(276),n(14)),a=Object(s.a)(i,(function(){var t=this,e=t._self._c;return e("section",{staticClass:"sidebar-group",class:[{collapsable:t.collapsable,"is-sub-group":0!==t.depth},"depth-"+t.depth]},[t.item.path?e("RouterLink",{staticClass:"sidebar-heading clickable",class:{open:t.open,active:t.isActive(t.$route,t.item.path)},attrs:{to:t.item.path},nativeOn:{click:function(e){return t.$emit("toggle")}}},[e("span",[t._v(t._s(t.item.title))]),t._v(" "),t.collapsable?e("span",{staticClass:"arrow",class:t.open?"down":"right"}):t._e()]):e("p",{staticClass:"sidebar-heading",class:{open:t.open},on:{click:function(e){return t.$emit("toggle")}}},[e("span",[t._v(t._s(t.item.title))]),t._v(" "),t.collapsable?e("span",{staticClass:"arrow",class:t.open?"down":"right"}):t._e()]),t._v(" "),e("DropdownTransition",[t.open||!t.collapsable?e("SidebarLinks",{staticClass:"sidebar-group-items",attrs:{items:t.item.children,"sidebar-depth":t.item.sidebarDepth,"initial-open-group-index":t.item.initialOpenGroupIndex,depth:t.depth+1}}):t._e()],1)],1)}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/30.4679c41e.js b/assets/js/30.4679c41e.js new file mode 100644 index 000000000..59b39b001 --- /dev/null +++ b/assets/js/30.4679c41e.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[30],{333:function(e,t,a){"use strict";a.r(t);var o=a(14),r=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"two-js"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#two-js"}},[e._v("#")]),e._v(" Two.js")]),e._v(" "),t("p",[e._v("A two-dimensional drawing api geared towards modern web browsers. It is renderer agnostic enabling the same api to draw in multiple contexts: svg, canvas, and webgl.")]),e._v(" "),t("div",[t("custom-button",{attrs:{text:"Github",type:"github",href:"https://github.com/jonobr1/two.js"}}),e._v(" "),t("custom-button",{attrs:{text:"Sponsor",type:"sponsor",href:"https://github.com/sponsors/jonobr1"}})],1),e._v(" "),t("carbon-ads"),e._v(" "),t("h2",{attrs:{id:"download"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#download"}},[e._v("#")]),e._v(" Download")]),e._v(" "),t("h3",{staticClass:"visible"},[t("a",{attrs:{href:"#download"}},[e._v("Download")])]),e._v(" "),t("div",[t("custom-button",{attrs:{text:"Development",type:"download",href:"https://raw.githubusercontent.com/jonobr1/two.js/dev/build/two.js",size:e.$themeConfig.developmentSize}}),e._v(" "),t("custom-button",{attrs:{text:"Production",type:"download",href:"https://raw.githubusercontent.com/jonobr1/two.js/dev/build/two.min.js",size:e.$themeConfig.productionSize}})],1),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("TIP")]),e._v(" "),t("p",[e._v("Prior to v0.7.0-alpha.1 Two.js requires Underscore.js and Backbone.js Events. If you're already loading these files elsewhere then you can build the project yourself and get the file size even smaller. For more information on custom builds check out the source on github.")])]),e._v(" "),t("p",[e._v("Node.js Version with npm:")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("npm install --save two.js@latest\n")])])]),t("h2",{attrs:{id:"overview"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#overview"}},[e._v("#")]),e._v(" Overview")]),e._v(" "),t("h3",{staticClass:"visible"},[t("a",{attrs:{href:"#overview"}},[e._v("Overview")])]),e._v(" "),t("ul",[t("li",[t("h4",{attrs:{id:"focus-on-vector-shapes"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#focus-on-vector-shapes"}},[e._v("#")]),e._v(" Focus on Vector Shapes")]),e._v(" "),t("p",[e._v("Two.js is deeply inspired by flat "),t("a",{attrs:{href:"http://en.wikipedia.org/wiki/Motion_graphics",target:"_blank",rel:"noopener noreferrer"}},[e._v("motion graphics"),t("OutboundLink")],1),e._v(". As a result, two.js aims to make the creation and animation of flat shapes easier and more concise.")])]),e._v(" "),t("li",[t("h4",{attrs:{id:"scenegraph"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#scenegraph"}},[e._v("#")]),e._v(" Scenegraph")]),e._v(" "),t("p",[e._v("At its core two.js relies on a "),t("a",{attrs:{href:"http://en.wikipedia.org/wiki/Scene_graph",target:"_blank",rel:"noopener noreferrer"}},[e._v("scenegraph"),t("OutboundLink")],1),e._v(". This means that when you draw or create an object (a Two.Path or Two.Group), two actually stores and remembers that. After you make the object you can apply any number of operations to it — e.g: rotation, position, scale, etc..")])]),e._v(" "),t("li",[t("h4",{attrs:{id:"animation-loop"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#animation-loop"}},[e._v("#")]),e._v(" Animation Loop")]),e._v(" "),t("p",[e._v("Two.js has a built in animation loop. It is simple in nature and can be automated or paired with another animation library. For more information check out the "),t("RouterLink",{attrs:{to:"/examples/"}},[e._v("examples")]),e._v(".")],1)]),e._v(" "),t("li",[t("h4",{attrs:{id:"svg-interpreter"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#svg-interpreter"}},[e._v("#")]),e._v(" SVG Interpreter")]),e._v(" "),t("p",[e._v("Two.js features a "),t("a",{attrs:{href:"http://en.wikipedia.org/wiki/Scalable_Vector_Graphics",target:"_blank",rel:"noopener noreferrer"}},[e._v("Scalable Vector Graphics"),t("OutboundLink")],1),e._v(" Interpreter. This means developers and designers alike can create SVG elements in commercial applications like "),t("a",{attrs:{href:"http://www.adobe.com/products/illustrator",target:"_blank",rel:"noopener noreferrer"}},[e._v("Adobe Illustrator"),t("OutboundLink")],1),e._v(" and bring them into your two.js scene. For more information check out the "),t("RouterLink",{attrs:{to:"/examples/"}},[e._v("examples")]),e._v(".")],1)]),e._v(" "),t("li",[t("h4",{attrs:{id:"friends-with-bitmap-imagery"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#friends-with-bitmap-imagery"}},[e._v("#")]),e._v(" Friends with Bitmap Imagery")]),e._v(" "),t("p",[e._v("Despite its early focus on easing vector shape creation and animation, Two.js offers many easy-to-use features to handle and render bitmap images. Easily load single images, sprite sheets, and image sequences with just a few method calls.")])])]),e._v(" "),t("h2",{attrs:{id:"basic-usage"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#basic-usage"}},[e._v("#")]),e._v(" Basic Usage")]),e._v(" "),t("h3",{staticClass:"visible"},[t("a",{attrs:{href:"#basic-usage"}},[e._v("Basic Usage")])]),e._v(" "),t("p",[e._v("In order to start any of these demos you'll want to "),t("a",{attrs:{href:"#download"}},[e._v("download")]),e._v(" two.js and add it to your HTML document. Once downloaded add this tag to the "),t("code",[e._v("")]),e._v(" of your document: "),t("code",[e._v(' + + + + + + + + + + + + + + + + + + + + + diff --git a/changelog/index.html b/changelog/index.html new file mode 100644 index 000000000..230f7b7b0 --- /dev/null +++ b/changelog/index.html @@ -0,0 +1,40 @@ + + + + + + Two.js Changelog + + + + + + + + + + + + + + + + + + + + + +

# Changelog

All notable changes to this project will be documented in this file. The format is inspired by Keep a Changelog (opens new window), and this project adheres to Semantic Versioning (opens new window).

# Nightly

# October 16, 2023 v0.8.12

October 16, 2023

v0.8.12 (opens new window)
  • Added "no-referrer" policy to image requests
  • Updated extras to be compatible with Two.Matrix API changes
  • Two.Path.noFill() yields "none" instead of "transparent"
  • Two.Path.noStroke() yields "none" instead of "transparent"
  • Two.Text.noFill() yields "none" instead of "transparent"
  • Two.Text.noStroke() yields "none" instead of "transparent"
  • Two.Points.noFill() yields "none" instead of "transparent"
  • Two.Points.noStroke() yields "none" instead of "transparent"

# August 7, 2023 v0.8.11

August 7, 2023

v0.8.11 (opens new window)
  • Fixed getters on Two.Anchor.left and Two.Anchor.right @eatgrass (opens new window)
  • Improved Two.Path.getBoundingClientRect, Two.Group.getBoundingClientRect, and Two.Text.getBoundingClientRect to correctly handle projected points that are rotated by matrices
  • Improved types.d.ts for Two.Group
  • Two.Text rendered to SVG directly instead of <defs />
  • Two.SVGRenderer disposes of unused effects from <defs />
  • Override Two.Collection.map method to be more explicit
  • Improved types.d.ts for renderers and base Two class

# June 9, 2022 v0.8.10

June 9, 2022

v0.8.10 (opens new window)
  • Added Two.Arc to /extras directory
  • Made /extras/js/zui.js ES6 compliant
  • Removed /extras modules from generated documentation
  • Added method documentation to Two.ZUI
  • Improved types.d.ts
  • Fixed Commonjs imports from package.json

# May 9, 2022 v0.8.7

May 9, 2022

v0.8.7 (opens new window)
  • Fixed documentation links
  • Made Two.Group and Two.Text properties public in TypeScript types
  • Added overloaded methods to TypeScript types
  • Fixed Two.Path.ending discrepancies when Two.Path.curved = true

# Mar 29, 2022 v0.8.5

Mar 29, 2022

v0.8.5 (opens new window)
  • Added Two.Gradient parent parameter to Two.Stop.clone
  • Breaking: Added export maps so extras are imported like so import { ZUI } from 'two.js/extras/zui.js'

# Jan 29, 2022 v0.8.3

Jan 29, 2022

v0.8.3 (opens new window)
  • Improved Two.Element.className flagging and classList construction
  • Manually amended types.d.ts for better TypeScript developing

# Jan 19, 2022 v0.8.2

Jan 21, 2022

v0.8.2 (opens new window)
  • Removed # private declared variables for better EcmaScript compatibility
  • Fixed Two.Path.begining and Two.Path.ending interpolation when Two.Anchor.relative = false
  • Added Two.Utils.read.path(string) which allows for string interpretation of an SVG path's d attribute
  • Added Two.Shape.worldMatrix

# Jan 10, 2022 v0.8.0

Jan 10, 2022

v0.8.0 (opens new window)
  • Added Two.Element as an EcmaScript 6 class
  • Converted Two.ImageSequence to EcmaScript 6 class
  • Converted Two.Sprite to EcmaScript 6 class
  • Converted Two.Texture to EcmaScript 6 class
  • Converted Two.Stop to EcmaScript 6 class
  • Converted Two.RadialGradient to EcmaScript 6 class
  • Converted Two.LinearGradient to EcmaScript 6 class
  • Converted Two.Gradient to EcmaScript 6 class
  • Converted Two.Star to EcmaScript 6 class
  • Converted Two.RoundedRectangle to EcmaScript 6 class
  • Converted Two.Rectangle to EcmaScript 6 class
  • Converted Two.Polygon to EcmaScript 6 class
  • Converted Two.Points to EcmaScript 6 class
  • Converted Two.Line to EcmaScript 6 class
  • Converted Two.Ellipse to EcmaScript 6 class
  • Converted Two.Circle to EcmaScript 6 class
  • Converted Two.ArcSegment to EcmaScript 6 class
  • Converted Two.Path to EcmaScript 6 class
  • Converted Two.Group to EcmaScript 6 class
  • Converted Two.Text to EcmaScript 6 class
  • Converted Two.Shape to EcmaScript 6 class
  • Converted Two.Matrix to EcmaScript 6 class
  • Converted Two.Registry to EcmaScript 6 class
  • Converted Two.Children to EcmaScript 6 class
  • Converted Two.Collection to EcmaScript 6 class
  • Converted Two.Events to EcmaScript 6 class
  • Converted Two.Anchor to EcmaScript 6 class
  • Converted Two.Vector to EcmaScript 6 class
  • Two.interpret appropriately inherits classes to <g /> tags @elShiaLabeouf (opens new window)
  • Two.interpret inherits classes and data-* attributes @elShiaLabeouf (opens new window)

# Dec 15, 2021 v0.7.13

Dec 15, 2021

v0.7.13 (opens new window)
  • Improved SVG gradient interpretation
  • Two.interpret can properly unwrap CSS url() commands
  • Added Two.Gradient.units and respected in all renderers
  • Default units space for Two.Gradient is objectBoundingBox
  • Removed destructive attribute assignments in Two.interpret
  • Interpreted gradients are reused as <defs />

# Nov 24, 2021 v0.7.12

Nov 24, 2021

v0.7.12 (opens new window)
  • Made mask removal possible on Two.Groups, Two.Paths, and Two.Points'
  • Simplified Two.Points.vertices management for renderers improving adaptability

# Nov 20, 2021 v0.7.10

Nov 20, 2021

v0.7.10 (opens new window)
  • Fixed empty vertices issue on Two.Points

# Nov 11, 2021 v0.7.9

Nov 11, 2021

v0.7.9 (opens new window)
  • Made Two.load and Two.interpret consistently apply SVG viewBox
  • Made Two.Rectangle.origin act as inverse anchor positioning
  • Made Two.Path.toObject objectify fill and stroke attributes that are Two.Texture and Two.Gradient
  • Improved reassigned id selection on interpreted SVG elements
  • Improved Two.load group duplication
  • Added Two.Points and Two.makePoints to all renderers
  • Made Two.release mimic behavior of Two.remove

# Jul 13, 2021 v0.7.8

Jul 13, 2021

v0.7.8 (opens new window)
  • Made types.d.ts a shim of a module so that it can at least be loaded in TypeScript projects while the ES6 class declaration is still work-in-progress

# Jul 10, 2021 v0.7.6

Jul 10, 2021

v0.7.6 (opens new window)
  • Fixed id setting on all objects of Two.js
  • Fixed Two.ArcSegment.clone outer radius issue
  • Standardized vertex generation in higher order primitives
  • Type declaration improvements
  • Improved Two.Group.center, Two.Group.corner, Two.Path.center, Two.Path.corner
  • Improved SVG gradient interpretation
  • Added <defs /> interpretation
  • Added Two.Path.mask and Two.Text.mask properties
  • Standardized Texture.id to be compliant with other Two.Shape.id
  • Added ability to interpret <clipPath /> and <image /> SVG elements

# Apr 23, 2021 v0.7.5

Apr 23, 2021

v0.7.5 (opens new window)
  • Improved Two.Circle.beginning & Two.Circle.ending behavior
  • Improved fitted logic on instances of Two
  • Improved Two.Children and Two.Collection instantiation versatility
  • Improved Two.Group.getBoundingClientRect, Two.Path.getBoundingClientRect, and Two.Text.getBoundingClientRect
  • Improved higher level shapes', like Two.Circle, ability to handle zeroed out arguments

# Apr 2, 2021 v0.7.4

Apr 2, 2021

v0.7.4 (opens new window)
  • Improved Typescript type declarations
  • Successfully export extras/ directory in both JavaScript and JavaScript Module format
  • Added Two.Shape.skewX and Two.Shape.skewY @gburlet (opens new window)

# Mar 26, 2021 v0.7.3

Mar 26, 2021

v0.7.3 (opens new window)
  • Exposed Two.Shape.renderer for easier access to underlying SVG elements
  • Added Typescript declaration types to Two.js
  • Made Two.Group listen to Two.Shape.id changes through new observable property and flags
  • Improved Two.interpret performance and functionality through improved regular expressions @adroitwhiz (opens new window)
  • Two.Group.visible is a property held on the group and does not trickle down to children
  • Improved scientific notation interpretation in SVG elements
  • Two.load appends a hidden DOM element to the document's <head /> so that getComputedStyles works more consistently with Two.interpret

# Jan 12, 2021 v0.7.1

Jan 12, 2021

v0.7.1 (opens new window)
  • Added Two.AutoCalculateImportedMatrices to control different ways of importing SVG transformations
  • Fixed Two.Text.className application
  • Added basic text support in Two.interpret
  • Exposed Two.fit for external use
  • Added a fitted argument to the Two constructor to make instance adaptively match the size of its parent element
  • Simplified Two.release method
  • Added support for scientific notation in Two.interpret
  • Added Two.Text.decoration styling to Two.CanvasRenderer and Two.WebGLRenderer
  • Increased precision on Two.Utils.toFixed for Firefox transformation engine performance increase
  • Added support to import <use /> tags from SVG interpretation @eulertour (opens new window)
  • Removed extraneous underscore calls from Two.Utils @adroitwhiz (opens new window)
  • Ensured Two.interpret respects the add parameter to be added (or not) to the current instance
  • Modularized Two.js classes / files @adroitwhiz (opens new window)
  • Made Two.js compatible with import modules @adroitwhiz (opens new window)
  • Added wiki as VuePress (opens new window) project

# Jan 22, 2020 v0.7.0

Jan 22, 2020

v0.7.0 (opens new window)
  • Exposed resolution parameter in Two.makeCircle and Two.makeEllipse as the final parameter
  • Made Two.Circle and Two.Ellipse recalculate controls points on _update and made vertex amounts cyclical @adroitwhiz (opens new window)
  • Added ESLint (opens new window) scripts to development environment @adroitwhiz (opens new window)
  • Improve performance of WebGLRenderer by leveraging uniform to construct plane and removing duplicate render calls @adroitwhiz (opens new window)
  • Unpacked scale objects in WebGLRenderer @adroitwhiz (opens new window)
  • Removed unnecessary gl.colorMask calls @adroitwhiz (opens new window)
  • Removed Two.Utils.toFixed calls on Canvas and WebGLRenderers @adroitwhiz (opens new window)
  • Two.Shape.clone clones Two.Shape.matrix when Two.Shape.matrix.manual is set to true
  • Improved Two.Group.mask rendering in Two.WebGLRenderer
  • Fixed Two.WebGLRenderer.setSize recursive loop error
  • Connected Two.Shape.className to Two.Shape.classList for searching and class assignment in SVG elements
  • Performance improvements on canvas HTML5 styles @brandonheyer (opens new window)
  • Added trickle down styling to Two.Group.closed, Two.Group.curved, and Two.Group.automatic
  • Check for Duplicity on Two.Group.add
  • Accounted for offset positions in Two.Path.center and Two.Group.center methods
  • Exposed Two.Shape.matrix as a publicly accessible property
  • Removed Two.Utils.deltaTransformPoint and patched Two.Utils.decomposeMatrix to more accurately parse matrices
  • Added support for various position inclusion of gradients and other effects in Two.interpret
  • Improved Two.Utils.applySvgAttributes rotation from SVG interpretation
  • Added Two.makeArrow for Simple Triangular Tipped Arrows @mike168m (opens new window)
  • Improved Two.Matrix efficiency of calculations
  • Added Two.Path.dashes.offset and Two.Text.dashes.offset properties for animating dashed strokes in all renderers
  • Fixed Two.Path.corner method to not be additive on successive invocations
  • Split Two.Matrix.toArray into two different functions. One for 2D transforms and one for a plain object (JSON) representation
  • Added Two.Matrix.toTransformArray intended for 2D transformation use internally
  • WebGLRenderer more robustly supports displaying bitmap content
  • Added <g /> attributes to be inherited by children in SVG interpretation
  • Added offscreenElement as an option when constructing WebGL Renderers for WebWorker compatibility
  • Added Two.Shape.position accessor to Two.Shape.translation for ease of use with matter.js (opens new window)
  • Added Two.Path.dashes and Two.Text.dashes support to WebGL and Canvas Renderers

# Dec 8, 2018 v0.7.0-beta.3

Dec 8, 2018

v0.7.0-beta.3 (opens new window)
  • Canvas Renderer supports dashed and non dashed paths
  • Enforce Two.Rectangle has four vertices
  • Fixed Two.Path.closed on latest ending calculations

# Nov 18, 2018 v0.7.0-beta.2

Nov 18, 2018

v0.7.0-beta.2 (opens new window)
  • Updated Two.js compatibility with webpack and node-canvas 2.0.0+

# Nov 3, 2018 v0.7.0-beta.1

Nov 3, 2018

v0.7.0-beta-1 (opens new window)
  • Altered Two.Path.clone and Two.Text.clone to use references where possible and to _update() on return
  • Improved multi-decimal and arc SVG interpretation
  • Added Two.Commands.arc for better arc rendering across all renderers
  • Two.Path and Two.Text now have dashes property to define stroke dashing behavior @danvanorden (opens new window)
  • Two.Vector arithmetic methods made more consistent — still need to improve performance
  • Two.Path.vertices will not clone vectors, improving developer clarity
  • Two.js clone methods do not force adding to a parent
  • Two.ImageSequence, Two.Sprite, and Two.Rectangle have origin properties for offset rendering
  • Two.Group.getBoundingClientRect will pass-through on effects instead of break
  • Two.interpret apply SVG node style attributes to paths. Inherits from groups and infers SVG viewBox attribute against Two.js instance
  • Two.interpret improves multi-decimal formatted d attributes
  • Two.ZUI added through the new /extras folder
  • Two.Text.getBoundingClientRect now returns an estimated bounding box object
  • Two.interpret properly assigns back calculated Z coordinates
  • Two.load now immediately returns a Two.Group for use without callbacks if desired
  • Added Two.Group.length to return the calculated length of all child paths
  • Two.Group.beginning and Two.Group.ending calculate based on child Two.Paths for intuitive grouped animating
  • Added Two.Utils.shim to properly handle canvas and image element spoofing in headless environments
  • Improved conformance between primitive shapes
  • Two.Path.getBoundingClientRect considers control points from bezier curves
  • Two.Path.beginning and Two.Path.ending calculate based on distance increasing accuracy for animation, but also performance load
  • Moved Two.Path._vertices underlying to list of rendered points to Two.Path._renderer.vertices
  • Improved accuracy of Two.Path.ending and Two.Path.beginning on open paths
  • Added specific clone method to Two.ArcSegment, Two.Circle, Two.Ellipse, Two.Polygon, Two.Rectangle, Two.RoundedRectangle, and Two.Star primitives
  • Added ability to read viewBox property from root SVG node in Two.interpret
  • Added more reliable transform getter in Two.interpret
  • Added rx and ry property reading on Two.Utils.read.rect
  • Added Two.Utils.read['rounded-rect'] to interpret Rounded Rectangles
  • Added ability for Two.RoundedRectangle.radius to be a Two.Vector for x, y component styling
  • Added ES6 compatible ./build/two.module.js for importing library
  • Improved Q SVG interpretation
  • Two.Texture, Two.Sprite, and Two.ImageSequence implemented in WebGLRenderer
  • Added className property to Two.Shapes for easier CSS styling in SVGRenderer @fr0 (opens new window)
  • Two.Events.resize is now bound to a renderer's setSize function giving a more generic solution to change scenegraph items based on dimensions changing

# Dec 1, 2017 v0.7.0-alpha.1

Dec 1, 2017

v0.7.0-alpha-1 (opens new window)
  • Fixed closed Two.Path.getPointAt method to clamp properly
  • Added Two.Texture.repeat for describing pattern invocations
  • Added Two.Texture, Two.Sprite, and Two.ImageSequence
  • Removed Two.Shape inheritance for Two.Gradients
  • Added Two.Vector.rotate method @ferm10n (opens new window)
  • Objects clone to parent only if parent exists @ferm10n (opens new window)
  • Vendor agnostic requestAnimationFrame @ferm10n (opens new window)
  • Two.Utils.Events.listenTo and Two.Utils.Events.stopListening @ferm10n (opens new window)
  • Two.Utils.Events added to Two.Path.prototype for event inheritance @ferm10n (opens new window)
  • Enhanced Two.Shape.scale to allow both numbers and Two.Vector as property value
  • Made Two.interpret use latest primitives
  • Added Two.Circle primitive
  • Two.Shape.translation is now a getter/setter and can be replaced
  • Fixed translation interpretation to strip out 'px' strings
  • Removed Two.SineRing — make Two.Star.curved = true and it's the same effect
  • Enhanced Two.ArcSegment, Two.Ellipse, Two.Polygon, Two.Rectangle, Two.RoundedRectangle, Two.Star
  • Fixed Two.Anchor.relative interpretation in svg, canvas, and webgl renderers
  • Made Getters / Setters enumerable for iteration compatibility
  • Fixed Two.Utils.Collection.splice method and added additional test
  • Added compatibility with node.js (opens new window), browserify (opens new window), and node-canvas (opens new window)
  • Removed third party dependencies
  • Added remove method to Two.Text
  • Fixed ordering on same parent additions for Two.Group

# Feb 9, 2016 v0.6.0

Feb 9, 2016

v0.6.0 (opens new window)
  • Updated Two.CanvasRenderer.ctx.imageSmoothingEnabled to not use deprecated invocation, issue 178 (opens new window)
  • Fixed Two.Group.mask in SVGRenderer to append to DOM correctly
  • Updated require imports to be compatible with require.js (opens new window)
  • Added Two.Text for programmatically writing text in Two.js

# Oct 1, 2015 v0.5.0

Oct 1, 2015

v0.5.0 (opens new window)
  • Added support for two.interpret to import svg's gradients
  • Added Two.Utils.xhr and two.load methods to asynchronously load SVG files
  • Added Two.Gradient, Two.LinearGradient, and Two.RadialGradient
  • Added dependency check to ensure ASM loading in environments like NPM as well as in the browser
  • Properly deleted webgl textures on removal of Two.Path
  • Added support for two.interpret to import svg's Elliptical Arcs (opens new window)
  • Added Two.ArcSegment and Two.SineRing as new shapes invoked like Two.Path @chrisdelbuck (opens new window)
  • Added Two.Line, Two.Rectangle, Two.RoundedRectangle, Two.Ellipse, Two.Polygon, and Two.Star as new shapes invoked like Two.Path
  • Breaking: renamed Two.Polygon to Two.Path
  • Performance enhancements to webgl renderer
  • Performance enhancements to canvas renderer Leo Koppelkamm (opens new window)
  • Enabled render ordering in Two.Group.children based on previous augmentation
  • Augmented Two.Group.children to inherit from Two.Collection effectively making it an array instead of a map Leo Koppelkamm (opens new window)
    • The map can still be accessed at Two.Group.children.ids

# Jul 22, 2014 v0.4.0

Jul 22, 2014

v0.4.0 (opens new window)
  • Updated Two.interpret to handle polybezier path data
  • Added Two.Group.mask and Two.Polygon.clip in order to create clipping masks
  • Two.Group has own opacity property Leo Koppelkamm (opens new window)
  • Rendering optimizations Leo Koppelkamm (opens new window)
  • Two.noConflict non-destructive command internally to the library
  • Two.interpret decomposes transform attribute of source tag
  • Two.interpret handles item irregularities from Inkscape (opens new window)
  • Changed Two.Identifier to use underscores instead of hyphens for dot-notation access Leo Koppelkamm (opens new window)
  • Added Two.Group.getById and Two.Group.getByClassName methods for convenient selection Leo Koppelkamm (opens new window)
  • Added classList to all Two.Shapes Leo Koppelkamm (opens new window)
  • Enabled inference of applied styles on imported svgs Leo Koppelkamm (opens new window)
  • Added Two.Polygon.getPointAt method to get coordinates on a curve/line
  • Added Two.Polygon.length property and Two.Polygon._updateLength method to calculate length of curve/line
  • Updated Two.Group.prototype observable properties on Two.Polygon.Properties to ensure each property is considered unique
  • Two.Polygon.vertices first and last vertex create automated control points when Two.Polygon.curved = true
  • Updated Two.Polygon.subdivide method to accommodate Two.makeEllipse
  • Enabled id to be properly interpreted from SVG elements @chrisdelbuck (opens new window)
  • Updated webgl renderer getBoundingClientRect to accommodate relative anchors
  • Updated beginning and ending to clamp to each other
  • Reorganized Two.Polygon._update and Two.Polygon.plot in order to handle beginning and ending properties
  • Updated Two.getComputedMatrix and Two.Polygon.getBoundingClientRect to adhere to nested transformations
  • Updated Two.Anchor to change control points relatively by default through anchor.relative property
  • Updated Two.Polygon.subdivide method to accommodate curved = false circumstances
  • Updated svg, canvas, and webgl renderers to properly reflect holes in curved Two.Polygons
  • Updated Two.Group clone method
  • Added toObject method to Two.Group, Two.Polygon, Two.Anchor
  • Two.Polygon initializes polygon.cap = 'butt' and polygon.join = 'miter' based on Adobe Illustrator defaults
  • Two.Polygon.subdivide method now works with Two.Commands.move for noncontiguous polygons
  • Internally update matrices on getBoundingClientRect in order to remove the need to defer or wait for internal variables to be up-to-date
  • Refactor of renderers and scenegraph for performance optimization and lower memory footprint +
    • Relinquished internal events for flags
    • Prototypical declaration of Object.defineProperty
    • Added _update and flagReset methods to Two.Shape, Two.Group, and Two.Polygon
    • Decoupled canvas and webgl renderers and are now independent
    • Added _matrix.manual to override the default behavior of a Two.Polygon transformation
    • Localized variables per file as much as possible to reduce Garbage Collection on runtime

# Oct 25, 2013 v0.3.0

Oct 25, 2013

v0.3.0 (opens new window)
  • Can properly pass domElement on construction of new instance of two
  • Added overdraw boolean to webgl renderer @arodic (opens new window)
  • Added support for ie9 svg interpretation @tomconroy (opens new window)
  • Added subdivide method for Two.Polygon and Two.Group
  • Ensure sure that manual properly is set on construction of Two.Polygon that it binds Two.Anchor.controls change events
  • Added automatic High DPI support for webgl renderer
  • Updated two.interpret(svg) to handle compound paths
  • Added Two.Anchor (opens new window) which represents all anchor points drawn in two.js
  • Modified source to not have any instances of window for node use
  • Updated to underscore.js 1.5.1
  • Added Two.Utils.getReflection method to properly get reflection's in svg interpretation
  • Made Two.Vector inherently not broadcast events and now needs to be explicitly bound to in order to broadcast events, which two.js does internally for you
  • Created Two.Utils.Collection an observable array-like class that polygon.vertices inherit @fchasen (opens new window)
  • Added Two.Events.insert and Two.Events.remove for use with Two.Utils.Collection
  • Properly recurses getBoundingClientRect for both Two.Group and Two.Polygon
  • Added Two.Version to clarify forthcoming builds
  • Updated hierarchy ordering of group.children in canvas and webgl renderers
  • Updated shallow and bidirectional remove method for Two.Group and Two.Polygon
  • Added corner method to Two.Group and Two.Polygon allowing anchoring along the upper lefthand corner of the form
  • Modified center method of Two.Group and Two.Polygon to not affect the translation property to stay inline with corner method and any future orientation and anchoring logic
  • Added automatic High DPI support for canvas renderer
  • Added overdraw boolean to canvas renderer
  • Added AMD loader compatibility @thomasrudin (opens new window)
  • Deferred two.update(); to account for canvas and webgl
  • Added remove and clear methods to two instance
  • Updated svg interpretation for webgl context
  • Added matrix property to all Two.Shape's for advanced transformations
  • Added inverse method to Two.Matrix
  • Remove execution path dependency on utils/build.js @masonblier (opens new window)
  • Added timeDelta property to every two instance
  • Added gruntfile, package.json for more integration with npm, and dependency free build (build/two.clean.js) @iros (opens new window)
  • Crossbrowser compatibility with noStroke and noFill commands

# May 3, 2013 v0.2.0

May 3, 2013

v0.2.0 (opens new window)
  • First alpha release

# Jan 29, 2013 v0.1.0-alpha

Jan 29, 2013

v0.1.0-alpha (opens new window)
  • Proof of Concept built from Three.js
+ + + diff --git a/docs/anchor/index.html b/docs/anchor/index.html new file mode 100644 index 000000000..9bd7ad754 --- /dev/null +++ b/docs/anchor/index.html @@ -0,0 +1,59 @@ + + + + + + Two.Anchor + + + + + + + + + + + + + + + + + + + + + +

# Two.Anchor

Extends: Two.Vector

An object that holds 3 Two.Vectors, the anchor point and its corresponding handles: left and right. In order to properly describe the bezier curve about the point there is also a command property to describe what type of drawing should occur when Two.js renders the anchors.

# Constructor

Argument Description
x The x position of the root anchor point.
y The y position of the root anchor point.
lx The x position of the left handle point.
ly The y position of the left handle point.
rx The x position of the right handle point.
ry The y position of the right handle point.
command The command to describe how to render. Applicable commands are Two.Commands

# copy

Argument Description
v The anchor to apply values to.

Copy the properties of one Two.Anchor onto another.

# clone

Returns: Two.Anchor

Create a new Two.Anchor, set all its values to the current instance and return it for use.

# toObject

Returns: Object

  • An object with properties filled out to mirror Two.Anchor.

Create a JSON compatible plain object of the current instance. Intended for use with storing values in a database.

# toString

Returns: String

  • A String with comma-separated values reflecting the various values on the current instance.

Create a string form of the current instance. Intended for use with storing values in a database. This is lighter to store than the JSON compatible Two.Anchor.toObject.

+ + + diff --git a/docs/children/index.html b/docs/children/index.html new file mode 100644 index 000000000..13008ffb4 --- /dev/null +++ b/docs/children/index.html @@ -0,0 +1,57 @@ + + + + + + Two.Group.Children + + + + + + + + + + + + + + + + + + + + + +

# Two.Group.Children

A children collection which is accesible both by index and by object id.

# Children.ids

Map of all elements in the list keyed by ids.

# Children.attach

Argument Description
children The objects which extend Two.Shape to be added.

Adds elements to the ids map.

# Children.detach

Argument Description
children The objects which extend Two.Shape to be removed.

Removes elements to the ids map.

+ + + diff --git a/docs/collection/index.html b/docs/collection/index.html new file mode 100644 index 000000000..4d835dab8 --- /dev/null +++ b/docs/collection/index.html @@ -0,0 +1,51 @@ + + + + + + Two.Collection + + + + + + + + + + + + + + + + + + + + + +

# Two.Collection

Extends: Two.Events

An Array like object with additional event propagation on actions. pop, shift, and splice trigger removed events. push, unshift, and splice with more than 2 arguments trigger 'inserted'. Finally, sort and reverse trigger order events.

+ + + diff --git a/docs/effects/gradient/index.html b/docs/effects/gradient/index.html new file mode 100644 index 000000000..9af3ec7f6 --- /dev/null +++ b/docs/effects/gradient/index.html @@ -0,0 +1,69 @@ + + + + + + Two.Gradient + + + + + + + + + + + + + + + + + + + + + +

# Two.Gradient

Extends: Two.Element

This is the base class for constructing different types of gradients with Two.js. The two common gradients are Two.LinearGradient and Two.RadialGradient.

# Constructor

Argument Description
stops A list of Two.Stops that contain the gradient fill pattern for the gradient.

# Properties

A list of properties that are on every Two.Gradient.

# renderer

Object access to store relevant renderer specific variables. Warning: manipulating this object can create unintended consequences.

nota-bene

With the Two.SVGRenderer you can access the underlying SVG element created via shape.renderer.elem.

# id

Session specific unique identifier.

nota-bene

In the Two.SVGRenderer change this to change the underlying SVG element's id too.

# spread

Indicates what happens if the gradient starts or ends inside the bounds of the target rectangle. Possible values are 'pad', 'reflect', and 'repeat'.

# units

Indicates how coordinate values are interpreted by the renderer. Possible values are 'userSpaceOnUse' and 'objectBoundingBox'.

# stops

An ordered list of Two.Stops for rendering the gradient.

# clone

Returns: Two.Gradient

Argument Description
parent The parent group or scene to add the clone to.

Create a new instance of Two.Gradient with the same properties of the current path.

# toObject

Returns: Object

Return a JSON compatible plain object that represents the path.

+ + + diff --git a/docs/effects/image-sequence/index.html b/docs/effects/image-sequence/index.html new file mode 100644 index 000000000..208126d4b --- /dev/null +++ b/docs/effects/image-sequence/index.html @@ -0,0 +1,71 @@ + + + + + + Two.ImageSequence + + + + + + + + + + + + + + + + + + + + + +

# Two.ImageSequence

Extends: Two.Rectangle

A convenient package to display still or animated images organized as a series of still images.

# Constructor

Argument Description
paths A list of URLs or Two.Textures.
ox The initial x position of the Two.ImageSequence.
oy The initial y position of the Two.ImageSequence.
frameRate The frame rate at which the images should playback at.

# Properties

A list of properties that are on every Two.ImageSequence.

# DefaultFrameRate

default frame rate that Two.ImageSequence.frameRate is set to when instantiated.

# textures

A list of textures to be used as frames for animating the Two.ImageSequence.

# frameRate

The number of frames to animate against per second.

# index

The index of the current tile of the sprite to display. Defaults to 0.

# play

Argument Description
firstFrame The index of the frame to start the animation with.
lastFrame The index of the frame to end the animation with. Defaults to the last item in the Two.ImageSequence.textures.
onLastFrame Optional callback function to be triggered after playing the last frame. This fires multiple times when the image sequence is looped.

Initiate animation playback of a Two.ImageSequence.

# stop

Halt animation playback of a Two.ImageSequence and set the current frame back to the first frame.

# clone

Returns: Two.ImageSequence

Argument Description
parent The parent group or scene to add the clone to.

Create a new instance of Two.ImageSequence with the same properties of the current image sequence.

# toObject

Returns: Object

Return a JSON compatible plain object that represents the path.

+ + + diff --git a/docs/effects/linear-gradient/index.html b/docs/effects/linear-gradient/index.html new file mode 100644 index 000000000..78a59312c --- /dev/null +++ b/docs/effects/linear-gradient/index.html @@ -0,0 +1,61 @@ + + + + + + Two.LinearGradient + + + + + + + + + + + + + + + + + + + + + +

# Two.LinearGradient

Extends: Two.Gradient

# Constructor

Argument Description
x1 The x position of the first end point of the linear gradient.
y1 The y position of the first end point of the linear gradient.
x2 The x position of the second end point of the linear gradient.
y2 The y position of the second end point of the linear gradient.
stops A list of Two.Stops that contain the gradient fill pattern for the gradient.

# left

The x and y value for where the first end point is placed on the canvas.

The x and y value for where the second end point is placed on the canvas.

# clone

Returns: Two.Gradient

Argument Description
parent The parent group or scene to add the clone to.

Create a new instance of Two.LinearGradient with the same properties of the current path.

# toObject

Returns: Object

Return a JSON compatible plain object that represents the path.

+ + + diff --git a/docs/effects/radial-gradient/index.html b/docs/effects/radial-gradient/index.html new file mode 100644 index 000000000..a131412df --- /dev/null +++ b/docs/effects/radial-gradient/index.html @@ -0,0 +1,63 @@ + + + + + + Two.RadialGradient + + + + + + + + + + + + + + + + + + + + + +

# Two.RadialGradient

Extends: Two.Gradient

# Constructor

Argument Description
x The x position of the origin of the radial gradient.
y The y position of the origin of the radial gradient.
radius The radius of the radial gradient.
stops A list of Two.Stops that contain the gradient fill pattern for the gradient.
focalX The x position of the focal point on the radial gradient.
focalY The y position of the focal point on the radial gradient.

# Properties

A list of properties that are on every Two.RadialGradient.

# center

The x and y value for where the origin of the radial gradient is.

# focal

The x and y value for where the focal point of the radial gradient is.

nota-bene

This effects the spray or spread of the radial gradient.

# clone

Returns: Two.Gradient

Argument Description
parent The parent group or scene to add the clone to.

Create a new instance of Two.RadialGradient with the same properties of the current path.

# toObject

Returns: Object

Return a JSON compatible plain object that represents the path.

+ + + diff --git a/docs/effects/sprite/index.html b/docs/effects/sprite/index.html new file mode 100644 index 000000000..6097a898f --- /dev/null +++ b/docs/effects/sprite/index.html @@ -0,0 +1,73 @@ + + + + + + Two.Sprite + + + + + + + + + + + + + + + + + + + + + +

# Two.Sprite

Extends: Two.Rectangle

A convenient package to display still or animated images through a tiled image source. For more information on the principals of animated imagery through tiling see Texture Atlas (opens new window) on Wikipedia.

# Constructor

Argument Description
path The URL path or Two.Texture to be used as the bitmap data displayed on the sprite.
ox The initial x position of the Two.Sprite.
oy The initial y position of the Two.Sprite.
cols The number of columns the sprite contains.
rows The number of rows the sprite contains.
frameRate The frame rate at which the partitions of the image should playback at.

# Properties

A list of properties that are on every Two.Sprite.

# texture

The texture to be used as bitmap data to display image in the scene.

# columns

The number of columns to split the texture into. Defaults to 1.

# rows

The number of rows to split the texture into. Defaults to 1.

# frameRate

The number of frames to animate against per second. Defaults to 0 for non-animated sprites.

# index

The index of the current tile of the sprite to display. Defaults to 0.

# play

Argument Description
firstFrame The index of the frame to start the animation with.
lastFrame The index of the frame to end the animation with. Defaults to the last item in the Two.Sprite.textures.
onLastFrame Optional callback function to be triggered after playing the last frame. This fires multiple times when the sprite is looped.

Initiate animation playback of a Two.Sprite.

# pause

Halt animation playback of a Two.Sprite.

# stop

Halt animation playback of a Two.Sprite and set the current frame back to the first frame.

# clone

Returns: Two.Sprite

Argument Description
parent The parent group or scene to add the clone to.

Create a new instance of Two.Sprite with the same properties of the current sprite.

# toObject

Returns: Object

Return a JSON compatible plain object that represents the path.

+ + + diff --git a/docs/effects/stop/index.html b/docs/effects/stop/index.html new file mode 100644 index 000000000..365753e8f --- /dev/null +++ b/docs/effects/stop/index.html @@ -0,0 +1,65 @@ + + + + + + Two.Stop + + + + + + + + + + + + + + + + + + + + + +

# Two.Stop

Extends: Two.Element

# Constructor

Argument Description
offset The offset percentage of the stop represented as a zero-to-one value. Default value flip flops from zero-to-one as new stops are created.
color The color of the stop. Default value flip flops from white to black as new stops are created.
opacity The opacity value. Default value is 1, cannot be lower than 0.

# Index

The current index being referenced for calculating a stop's default offset value.

# Properties

A list of properties that are on every Two.Stop.

# offset

The offset percentage of the stop represented as a zero-to-one value.

# opacity

The alpha percentage of the stop represented as a zero-to-one value.

nota-bene

This is only supported on the Two.SVGRenderer. You can get the same effect by encoding opacity into rgba strings in the color.

# color

The color of the stop.

# clone

Returns: Two.Stop

Argument Description
parent The parent gradient to add the clone to.

Create a new instance of Two.Stop with the same properties of the current path.

# toObject

Returns: Object

Return a JSON compatible plain object that represents the path.

+ + + diff --git a/docs/effects/texture/index.html b/docs/effects/texture/index.html new file mode 100644 index 000000000..2cae4ff99 --- /dev/null +++ b/docs/effects/texture/index.html @@ -0,0 +1,87 @@ + + + + + + Two.Texture + + + + + + + + + + + + + + + + + + + + + +

# Two.Texture

Extends: Two.Element

Fundamental to work with bitmap data, a.k.a. pregenerated imagery, in Two.js. Supported formats include jpg, png, gif, and tiff. See Two.Texture.RegularExpressions for a full list of supported formats.

# Constructor

Argument Description
src The URL path to an image file or an <img /> element.
callback An optional callback function once the image has been loaded.

# Properties

A list of properties that are on every Two.Texture.

# RegularExpressions

A map of compatible DOM Elements categorized by media format.

# ImageRegistry

A canonical listing of image data used in a single session of Two.js.

nota-bene

This object is used to cache image data between different textures.

# getAbsoluteURL

Returns: String

  • The serialized absolute path.

Serializes a URL as an absolute path for canonical attribution in Two.ImageRegistry.

Argument Description
path

# loadHeadlessBuffer

Loads an image as a buffer in headless environments.

Argument Description
texture The Two.Texture to be loaded.
loaded The callback function to be triggered once the image is loaded.

nota-bene

  • This function uses node's fs.readFileSync to spoof the <img /> loading process in the browser.

# getTag

Returns: String

  • Returns the tag name of an image, video, or canvas node.

Retrieves the tag name of an image, video, or canvas node.

Argument Description
image The image to infer the tag name from.

# getImage

Returns: HTMLImageElement

Convenience function to set Two.Texture.image properties with canonical versions set in Two.Texture.ImageRegistry.

Argument Description
src The URL path of the image.

# Register

A collection of functions to register different types of textures. Used internally by a Two.Texture.

# load

Argument Description
texture The texture to load.
callback The function to be called once the texture is loaded.

# FlagOffset

Cached method to let renderers know offset has been updated on a Two.Texture.

# FlagScale

Cached method to let renderers know scale has been updated on a Two.Texture.

# loaded

Shorthand value to determine if image has been loaded into the texture.

# repeat

CSS style declaration to tile Two.Path. Valid values include: 'no-repeat', 'repeat', 'repeat-x', 'repeat-y'.

# offset

A two-component vector describing any pixel offset of the texture when applied to a Two.Path.

# src

The URL path to the image data.

nota-bene

This property is ultimately serialized in a Two.Registry to cache retrieval.

# image

The corresponding DOM Element of the texture. Can be a <img />, <canvas />, or <video /> element. See Two.Texture.RegularExpressions for a full list of supported elements.

nota-bene

In headless environments this is a Canvas.Image object. See https://github.com/Automattic/node-canvas (opens new window) for more information on headless image objects.

# clone

Returns: Two.Texture

Create a new instance of Two.Texture with the same properties of the current texture.

# toObject

Returns: Object

Return a JSON compatible plain object that represents the texture.

+ + + diff --git a/docs/element/index.html b/docs/element/index.html new file mode 100644 index 000000000..900646ffd --- /dev/null +++ b/docs/element/index.html @@ -0,0 +1,61 @@ + + + + + + Two.Element + + + + + + + + + + + + + + + + + + + + + +

# Two.Element

Extends: Two.Events

The foundational object for the Two.js scenegraph.

# renderer

Object access to store relevant renderer specific variables. Warning: manipulating this object can create unintended consequences.

nota-bene

With the Two.SVGRenderer you can access the underlying SVG element created via shape.renderer.elem.

# id

Session specific unique identifier.

nota-bene

In the Two.SVGRenderer change this to change the underlying SVG element's id too.

# className

A class to be applied to the element to be compatible with CSS styling.

nota-bene

Only available for the SVG renderer.

# classList

A list of class strings stored if imported / interpreted from an SVG element.

# flagReset

Called internally by Two.js's renderer to reset all flags. Ensures that only properties that change are updated before being sent to the renderer.

+ + + diff --git a/docs/events/index.html b/docs/events/index.html new file mode 100644 index 000000000..84f71d424 --- /dev/null +++ b/docs/events/index.html @@ -0,0 +1,67 @@ + + + + + + Two.Events + + + + + + + + + + + + + + + + + + + + + +

# Two.Events

Object inherited by many Two.js objects in order to facilitate custom events.

# Types

Object of different types of Two.js specific events.

# addEventListener

Argument Description
name The name of the event to bind a function to.
handler The function to be invoked when the event is dispatched.

Call to add a listener to a specific event name.

# removeEventListener

Argument Description
name The name of the event intended to be removed.
handler The handler intended to be removed.

Call to remove listeners from a specific event. If only name is passed then all the handlers attached to that name will be removed. If no arguments are passed then all handlers for every event on the obejct are removed.

# dispatchEvent

Argument Description
name The name of the event to dispatch.
args Anything can be passed after the name and those will be passed on to handlers attached to the event in the order they are passed.

Call to trigger a custom event. Any additional arguments passed after the name will be passed along to the attached handlers.

+ + + diff --git a/docs/extras/zui/index.html b/docs/extras/zui/index.html new file mode 100644 index 000000000..5f2f78ef5 --- /dev/null +++ b/docs/extras/zui/index.html @@ -0,0 +1,57 @@ + + + + + + Two.ZUI + + + + + + + + + + + + + + + + + + + + + +

# Two.ZUI

Two.ZUI is an extra class to turn your Two.js scene into a Google Maps or Adobe Illustrator style interface. See https://codepen.io/jonobr1/pen/PobMKwb (opens new window) for example usage.

# Constructor

Argument Description
group The scene or group to
domElement The HTML Element to attach event listeners to.

# addLimits

Argument Description
min The minimum scale the ZUI can zoom out to.
max The maximum scale teh ZUI can zoom in to.

# clientToSurface

Returns: Two.Vector

Argument Description
x The x position of the user's input.
y The y position of the user's input.

Convert an x, y coordinate in user space into projected space.

# surfaceToClient

Argument Description

Convert an x, y coordinate in projected space to the user's space.

# zoomBy

Argument Description
byF The factor to scale by.
clientX The x position of the user's input.
clientY The y position of the user's input.

A function to zoom by an incremental amount and a position. Typically used for pinch-and-zoom or mousewheel effects.

# zoomSet

Argument Description
zoom The level of the zoom.
clientX The x position of the user's input.
clientY The y position of the user's input.

A function to set the zoom amount and the origin position. This is used internally by {@Two.ZUI#zoomBy}.

# translateSurface

Argument Description
x The x amount to pan.
y The y amount to pan.

Set the position of the ZUI by an incremental translation amount.

# reset

Reset the zoom and scale factors to their original instantiated state.

+ + + diff --git a/docs/group/index.html b/docs/group/index.html new file mode 100644 index 000000000..d3cc33002 --- /dev/null +++ b/docs/group/index.html @@ -0,0 +1,121 @@ + + + + + + Two.Group + + + + + + + + + + + + + + + + + + + + + +

# Two.Group

Extends: Two.Shape

This is the primary class for grouping objects that are then drawn in Two.js. In Illustrator this is a group, in After Effects it would be a Null Object. Whichever the case, the Two.Group contains a transformation matrix and commands to style its children, but it by itself doesn't render to the screen.

# Constructor

Argument Description
children A list of objects that inherit Two.Shape. For instance, the array could be a Two.Path, Two.Text, and Two.RoundedRectangle.

# InsertChildren

Argument Description
children The objects to be inserted.

Cached method to let renderers know children have been added to a Two.Group.

# RemoveChildren

Argument Description
children The objects to be removed.

Cached method to let renderers know children have been removed from a Two.Group.

# OrderChildren

Cached method to let renderers know order has been updated on a Two.Group.

# Properties

A list of properties that are on every Two.Group.

# fill

The value of what all child shapes should be filled in with.

See: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value (opens new window) for more information on CSS's colors as String.

# stroke

The value of what all child shapes should be outlined in with.

See: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value (opens new window) for more information on CSS's colors as String.

# linewidth

The thickness in pixels of the stroke for all child shapes.

# opacity

The opaqueness of all child shapes.

nota-bene

Becomes multiplied by the individual child's opacity property.

# visible

Display the path or not.

nota-bene

For Two.CanvasRenderer and Two.WebGLRenderer when set to false all updating is disabled improving performance dramatically with many objects in the scene.

# closed

Determines whether a final line is drawn between the final point in the vertices array and the first point of all child shapes.

# curved

When the child's path is automatic = true this boolean determines whether the lines between the points are curved or not.

# automatic

Determines whether or not Two.js should calculate curves, lines, and commands automatically for you or to let the developer manipulate them for themselves.

# beginning

Number between zero and one to state the beginning of where the path is rendered.

Two.Group.beginning is a percentage value that represents at what percentage into all child shapes should the renderer start drawing.

nota-bene

This is great for animating in and out stroked paths in conjunction with Two.Group.ending.

# ending

Number between zero and one to state the ending of where the path is rendered.

Two.Group.ending is a percentage value that represents at what percentage into all child shapes should the renderer start drawing.

nota-bene

This is great for animating in and out stroked paths in conjunction with Two.Group.beginning.

# length

The sum of distances between all child lengths.

# mask

The Two.js object to clip from a group's rendering.

# additions

An automatically updated list of children that need to be appended to the renderer's scenegraph.

# subtractions

An automatically updated list of children that need to be removed from the renderer's scenegraph.

# children

A list of all the children in the scenegraph.

nota-bene

Ther order of this list indicates the order each element is rendered to the screen.

# clone

Returns: Two.Group

Argument Description
parent The parent group or scene to add the clone to.

Create a new instance of Two.Group with the same properties of the current group.

# toObject

Returns: Object

Return a JSON compatible plain object that represents the group.

# corner

Orient the children of the group to the upper left-hand corner of that group.

# center

Orient the children of the group to the center of that group.

# getById

Returns: Two.Shape

  • Or null if nothing is found.

Recursively search for id. Returns the first element found.

# getByClassName

Returns: Array.<Two.Shape>

  • Or empty array if nothing is found.

Recursively search for classes. Returns an array of matching elements.

# getByType

Returns: Array.<Two.Shape>

  • Empty array if nothing is found.

Recursively search for children of a specific type, e.g. Two.Path. Pass a reference to this type as the param. Returns an array of matching elements.

# add

Argument Description
objects An array of objects to be added. Can also be supplied as individual arguments.

Add objects to the group.

# remove

Argument Description
objects An array of objects to be removed. Can be also removed as individual arguments. If no arguments are passed, then it removes itself from its parent.

Remove objects from the group.

# getBoundingClientRect

Returns: Object

  • Returns object with top, left, right, bottom, width, height attributes.
Argument Description
shallow Describes whether to calculate off local matrix or world matrix.

Return an object with top, left, right, bottom, width, and height parameters of the group.

# noFill

Apply noFill method to all child shapes.

# noStroke

Apply noStroke method to all child shapes.

# subdivide

Apply subdivide method to all child shapes.

+ + + diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 000000000..3bbd72311 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,39 @@ + + + + + + VuePress + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/matrix/index.html b/docs/matrix/index.html new file mode 100644 index 000000000..391709054 --- /dev/null +++ b/docs/matrix/index.html @@ -0,0 +1,97 @@ + + + + + + Two.Matrix + + + + + + + + + + + + + + + + + + + + + +

# Two.Matrix

A class to store 3 x 3 transformation matrix information. In addition to storing data Two.Matrix has suped up methods for commonplace mathematical operations.

# Constructor

Argument Description
a The value for element at the first column and first row.
b The value for element at the second column and first row.
c The value for element at the third column and first row.
d The value for element at the first column and second row.
e The value for element at the second column and second row.
f The value for element at the third column and second row.
g The value for element at the first column and third row.
h The value for element at the second column and third row.
i The value for element at the third column and third row.

# Identity

A stored reference to the default value of a 3 x 3 matrix.

# Multiply

Returns: Array.

  • If an optional C matrix isn't passed then a new one is created and returned.
Argument Description
A
B
C An optional matrix to apply the multiplication to.

Multiply two matrices together and return the result.

# elements

The underlying data stored as an array.

# manual

Determines whether Two.js automatically calculates the values for the matrix or if the developer intends to manage the matrix.

nota-bene

# set

Argument Description
a The value for element at the first column and first row.
b The value for element at the second column and first row.
c The value for element at the third column and first row.
d The value for element at the first column and second row.
e The value for element at the second column and second row.
f The value for element at the third column and second row.
g The value for element at the first column and third row.
h The value for element at the second column and third row.
i The value for element at the third column and third row.

Set an array of values onto the matrix. Order described in Two.Matrix.

# set

Argument Description
a The array of elements to apply.

Set an array of values onto the matrix. Order described in Two.Matrix.

# copy

Copy the matrix of one to the current instance.

# identity

Turn matrix to the identity, like resetting.

# multiply

Overloaded

Argument Description
a The scalar to be multiplied.

Multiply all components of the matrix against a single scalar value.

# multiply

Overloaded

Argument Description
a The x component to be multiplied.
b The y component to be multiplied.
c The z component to be multiplied.

Multiply all components of a matrix against a 3 component vector.

# multiply

Overloaded

Argument Description
a The value at the first column and first row of the matrix to be multiplied.
b The value at the second column and first row of the matrix to be multiplied.
c The value at the third column and first row of the matrix to be multiplied.
d The value at the first column and second row of the matrix to be multiplied.
e The value at the second column and second row of the matrix to be multiplied.
f The value at the third column and second row of the matrix to be multiplied.
g The value at the first column and third row of the matrix to be multiplied.
h The value at the second column and third row of the matrix to be multiplied.
i The value at the third column and third row of the matrix to be multiplied.

Multiply all components of a matrix against another matrix.

# inverse

Argument Description
out The optional matrix to apply the inversion to.

Return an inverted version of the matrix. If no optional one is passed a new matrix is created and returned.

# scale

Argument Description
scale The one dimensional scale to apply to the matrix.

Uniformly scale the transformation matrix.

# scale

Argument Description
sx The horizontal scale factor.
sy The vertical scale factor

Scale the transformation matrix in two dimensions.

# rotate

Argument Description
Number The amount to rotate in Number.

Rotate the matrix.

# translate

Argument Description
x The horizontal translation value to apply.
y The vertical translation value to apply.

Translate the matrix.

# skewX

Argument Description
Number The amount to skew in Number.

Skew the matrix by an angle in the x axis direction.

# skewY

Argument Description
Number The amount to skew in Number.

Skew the matrix by an angle in the y axis direction.

# toString

Returns: String

  • The transformation matrix as a 6 component string separated by spaces.
Argument Description
fullMatrix Return the full 9 elements of the matrix or just 6 for 2D transformations.

Create a transform string. Used for the Two.js rendering APIs.

# toTransformArray

Argument Description
fullMatrix Return the full 9 elements of the matrix or just 6 in the format for 2D transformations.
output An array empty or otherwise to apply the values to.

Create a transform array. Used for the Two.js rendering APIs.

# toArray

Argument Description
fullMatrix Return the full 9 elements of the matrix or just 6 for 2D transformations.
output An array empty or otherwise to apply the values to.

Create a transform array. Used for the Two.js rendering APIs.

# toObject

Create a JSON compatible object that represents information of the matrix.

# clone

Clone the current matrix.

+ + + diff --git a/docs/path/index.html b/docs/path/index.html new file mode 100644 index 000000000..439868ef6 --- /dev/null +++ b/docs/path/index.html @@ -0,0 +1,113 @@ + + + + + + Two.Path + + + + + + + + + + + + + + + + + + + + + +

# Two.Path

Extends: Two.Shape

This is the primary primitive class for creating all drawable shapes in Two.js. Unless specified methods return their instance of Two.Path for the purpose of chaining.

# Constructor

Argument Description
vertices A list of Two.Anchors that represent the order and coordinates to construct the rendered shape.
closed Describes whether the shape is closed or open.
curved Describes whether the shape automatically calculates bezier handles for each vertex.
manual Describes whether the developer controls how vertices are plotted or if Two.js automatically plots coordinates based on closed and curved booleans.

# Properties

A list of properties that are on every Two.Path.

# closed

Determines whether a final line is drawn between the final point in the vertices array and the first point.

# curved

When the path is automatic = true this boolean determines whether the lines between the points are curved or not.

# beginning

Number between zero and one to state the beginning of where the path is rendered.

Two.Path.beginning is a percentage value that represents at what percentage into the path should the renderer start drawing.

nota-bene

This is great for animating in and out stroked paths in conjunction with Two.Path.ending.

# ending

Number between zero and one to state the ending of where the path is rendered.

Two.Path.ending is a percentage value that represents at what percentage into the path should the renderer start drawing.

nota-bene

This is great for animating in and out stroked paths in conjunction with Two.Path.beginning.

# fill

The value of what the path should be filled in with.

See: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value (opens new window) for more information on CSS's colors as String.

# stroke

The value of what the path should be outlined in with.

See: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value (opens new window) for more information on CSS's colors as String.

# linewidth

The thickness in pixels of the stroke.

# opacity

The opaqueness of the path.

nota-bene

Can be used in conjunction with CSS Colors that have an alpha value.

# className

A class to be applied to the element to be compatible with CSS styling.

nota-bene

Only available for the SVG renderer.

# visible

Display the path or not.

nota-bene

For Two.CanvasRenderer and Two.WebGLRenderer when set to false all updating is disabled improving performance dramatically with many objects in the scene.

# vertices

An ordered list of anchor points for rendering the path.

A list of Two.Anchor objects that consist of what form the path takes.

nota-bene

The array when manipulating is actually a Two.Collection.

# automatic

Determines whether or not Two.js should calculate curves, lines, and commands automatically for you or to let the developer manipulate them for themselves.

# dashes

Array of numbers. Odd indices represent dash length. Even indices represent dash space.

A list of numbers that represent the repeated dash length and dash space applied to the stroke of the text.

See: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray (opens new window) for more information on the SVG stroke-dasharray attribute.

# dashes.offset

A number in pixels to offset Two.Path.dashes display.

# clone

Returns: Two.Path

Argument Description
parent The parent group or scene to add the clone to.

Create a new instance of Two.Path with the same properties of the current path.

# toObject

Returns: Object

Return a JSON compatible plain object that represents the path.

# noFill

Short hand method to set fill to transparent.

# noStroke

Short hand method to set stroke to transparent.

# corner

Orient the vertices of the shape to the upper left-hand corner of the path.

# center

Orient the vertices of the shape to the center of the path.

# getBoundingClientRect

Returns: Object

  • Returns object with top, left, right, bottom, width, height attributes.
Argument Description
shallow Describes whether to calculate off local matrix or world matrix.

Return an object with top, left, right, bottom, width, and height parameters of the path.

# getPointAt

Returns: Object

Argument Description
t Percentage value describing where on the Two.Path to estimate and assign coordinate values.
obj Object to apply calculated x, y to. If none available returns new Object.

Given a float t from 0 to 1, return a point or assign a passed obj's coordinates to that percentage on this Two.Path's curve.

# plot

Based on closed / curved and sorting of vertices plot where all points should be and where the respective handles should be too.

nota-bene

While this method is public it is internally called by Two.Path._update when automatic = true.

# subdivide

Argument Description
limit How many times to recurse subdivisions.

Insert a Two.Anchor at the midpoint between every item in Two.Path.vertices.

# length

The sum of distances between all Two.Path.vertices.

# mask

The shape whose alpha property becomes a clipping area for the path.

nota-bene

This property is currently not working because of SVG spec issues found here {@link https://code.google.com/p/chromium/issues/detail?id=370951}.

# clip

Tells Two.js renderer if this object represents a mask for another object (or not).

+ + + diff --git a/docs/registry/index.html b/docs/registry/index.html new file mode 100644 index 000000000..2aad08ec8 --- /dev/null +++ b/docs/registry/index.html @@ -0,0 +1,59 @@ + + + + + + Two.Registry + + + + + + + + + + + + + + + + + + + + + +

# Two.Registry

An arbitrary class to manage a directory of things. Mainly used for keeping tabs of textures in Two.js.

# add

Argument Description
id A unique identifier.
obj Any type of variable to be registered to the directory.

Adds any value to the directory. Assigned by the id.

# remove

Argument Description
id A unique identifier.

Remove any value from the directory by its id.

# get

Returns: Object

The associated value. If unavailable then undefined is returned.

Argument Description
id A unique identifier.

Get a registered value by its id.

# contains

Returns: Boolean

Argument Description
id A unique identifier.

Convenience method to see if a value is registered to an id already.

+ + + diff --git a/docs/renderers/canvas/index.html b/docs/renderers/canvas/index.html new file mode 100644 index 000000000..83525dc0e --- /dev/null +++ b/docs/renderers/canvas/index.html @@ -0,0 +1,65 @@ + + + + + + Two.CanvasRenderer + + + + + + + + + + + + + + + + + + + + + +

# Two.CanvasRenderer

Extends: Two.Events

This class is used by Two when constructing with type of Two.Types.canvas. It takes Two.js' scenegraph and renders it to a <canvas />.

# Constructor

Argument Description
parameters This object is inherited when constructing a new instance of Two.
parameters.domElement The <canvas /> to draw to. If none given a new one will be constructed.
parameters.overdraw Determines whether the canvas should clear the background or not. Defaults to true.
parameters.smoothing Determines whether the canvas should antialias drawing. Set it to false when working with pixel art. false can lead to better performance, since it would use a cheaper interpolation algorithm.

# Utils

A massive object filled with utility functions and properties to render Two.js objects to a <canvas />.

# domElement

The <canvas /> associated with the Two.js scene.

# ctx

Associated two dimensional context to render on the <canvas />.

# overdraw

Determines whether the canvas clears the background each draw call.

# scene

The root group of the scenegraph.

# setSize

Triggers:

  • event:resize
Argument Description
width The new width of the renderer.
height The new height of the renderer.
ratio The new pixel ratio (pixel density) of the renderer. Defaults to calculate the pixel density of the user's screen.

Change the size of the renderer.

# render

Render the current scene to the <canvas />.

+ + + diff --git a/docs/renderers/svg/index.html b/docs/renderers/svg/index.html new file mode 100644 index 000000000..8e3804e34 --- /dev/null +++ b/docs/renderers/svg/index.html @@ -0,0 +1,63 @@ + + + + + + Two.SVGRenderer + + + + + + + + + + + + + + + + + + + + + +

# Two.SVGRenderer

Extends: Two.Events

This class is used by Two when constructing with type of Two.Types.svg (the default type). It takes Two.js' scenegraph and renders it to a <svg />.

# Constructor

Argument Description
parameters This object is inherited when constructing a new instance of Two.
parameters.domElement The <svg /> to draw to. If none given a new one will be constructed.

# Utils

A massive object filled with utility functions and properties to render Two.js objects to a <svg />.

# domElement

The <svg /> associated with the Two.js scene.

# scene

The root group of the scenegraph.

# defs

The <defs /> to apply gradients, patterns, and bitmap imagery.

# setSize

Argument Description
width The new width of the renderer.
height The new height of the renderer.

Change the size of the renderer.

nota-bene

Triggers a Two.Events.resize.

# render

Render the current scene to the <svg />.

+ + + diff --git a/docs/renderers/webgl/index.html b/docs/renderers/webgl/index.html new file mode 100644 index 000000000..30f0da28a --- /dev/null +++ b/docs/renderers/webgl/index.html @@ -0,0 +1,69 @@ + + + + + + Two.WebGLRenderer + + + + + + + + + + + + + + + + + + + + + +

# Two.WebGLRenderer

Extends: Two.Events

This class is used by Two when constructing with type of Two.Types.webgl. It takes Two.js' scenegraph and renders it to a <canvas /> through the WebGL api.

# Constructor

Argument Description
parameters This object is inherited when constructing a new instance of Two.
parameters.domElement The <canvas /> to draw to. If none given a new one will be constructed.
parameters.offscreenElement The offscreen two dimensional <canvas /> to render each element on WebGL texture updates.
parameters.antialias Determines whether the canvas should clear render with antialias on.

# Utils

A massive object filled with utility functions and properties to render Two.js objects to a <canvas /> through the WebGL API.

# domElement

The <canvas /> associated with the Two.js scene.

# scene

The root group of the scenegraph.

# overdraw

Determines whether the canvas clears the background each draw call.

# ctx

Associated two dimensional context to render on the <canvas />.

# programs

Associated WebGL programs to render all elements from the scenegraph.

# setSize

Triggers:

  • event:resize
Argument Description
width The new width of the renderer.
height The new height of the renderer.
ratio The new pixel ratio (pixel density) of the renderer. Defaults to calculate the pixel density of the user's screen.

Change the size of the renderer.

# render

Render the current scene to the <canvas />.

+ + + diff --git a/docs/shape/index.html b/docs/shape/index.html new file mode 100644 index 000000000..d2a4ee2dd --- /dev/null +++ b/docs/shape/index.html @@ -0,0 +1,77 @@ + + + + + + Two.Shape + + + + + + + + + + + + + + + + + + + + + +

# Two.Shape

Extends: Two.Element

The foundational transformation object for the Two.js scenegraph.

# renderer

Object access to store relevant renderer specific variables. Warning: manipulating this object can create unintended consequences.

nota-bene

With the Two.SVGRenderer you can access the underlying SVG element created via shape.renderer.elem.

# id

Session specific unique identifier.

nota-bene

In the Two.SVGRenderer change this to change the underlying SVG element's id too.

# matrix

The transformation matrix of the shape.

nota-bene

Two.Shape.position, Two.Shape.rotation, Two.Shape.scale, Two.Shape.skewX, and Two.Shape.skewY apply their values to the matrix when changed. The matrix is what is sent to the renderer to be drawn.

# worldMatrix

The transformation matrix of the shape in the scene.

# position

The x and y value for where the shape is placed relative to its parent.

# rotation

The value in Number for how much the shape is rotated relative to its parent.

# scale

The value for how much the shape is scaled relative to its parent.

nota-bene

This value can be replaced with a Two.Vector to do non-uniform scaling. e.g: shape.scale = new Two.Vector(2, 1);

# skewX

The value in Number for how much the shape is skewed relative to its parent.

Skew the shape by an angle in the x axis direction.

# skewY

The value in Number for how much the shape is skewed relative to its parent.

Skew the shape by an angle in the y axis direction.

# addTo

Argument Description
group The parent the shape adds itself to.

Convenience method to add itself to the scenegraph.

# remove

Remove self from the scene / parent.

# clone

Returns: Two.Shape

Argument Description
parent Optional argument to automatically add the shape to a scenegraph.

Create a new Two.Shape with the same values as the current shape.

+ + + diff --git a/docs/shapes/arc-segment/index.html b/docs/shapes/arc-segment/index.html new file mode 100644 index 000000000..c648b9fa7 --- /dev/null +++ b/docs/shapes/arc-segment/index.html @@ -0,0 +1,65 @@ + + + + + + Two.ArcSegment + + + + + + + + + + + + + + + + + + + + + +

# Two.ArcSegment

Extends: Two.Path

# Constructor

Argument Description
x The x position of the arc segment.
y The y position of the arc segment.
innerRadius The inner radius value of the arc segment.
outerRadius The outer radius value of the arc segment.
startAngle The start angle of the arc segment in Number.
endAngle The end angle of the arc segment in Number.
resolution The number of vertices used to construct the arc segment.

# Properties

A list of properties that are on every Two.ArcSegment.

# innerRadius

The size of the inner radius of the arc segment.

# outerRadius

The size of the outer radius of the arc segment.

# startAngle

The angle of one side for the arc segment.

# endAngle

The angle of the other side for the arc segment.

# clone

Returns: Two.ArcSegment

Argument Description
parent The parent group or scene to add the clone to.

Create a new instance of Two.ArcSegment with the same properties of the current path.

# toObject

Returns: Object

Return a JSON compatible plain object that represents the path.

+ + + diff --git a/docs/shapes/circle/index.html b/docs/shapes/circle/index.html new file mode 100644 index 000000000..026c5926f --- /dev/null +++ b/docs/shapes/circle/index.html @@ -0,0 +1,59 @@ + + + + + + Two.Circle + + + + + + + + + + + + + + + + + + + + + +

# Two.Circle

Extends: Two.Path

# Constructor

Argument Description
x The x position of the circle.
y The y position of the circle.
radius The radius value of the circle.
resolution The number of vertices used to construct the circle.

# Properties

A list of properties that are on every Two.Circle.

# radius

The size of the radius of the circle.

# clone

Returns: Two.Circle

Argument Description
parent The parent group or scene to add the clone to.

Create a new instance of Two.Circle with the same properties of the current path.

# toObject

Returns: Object

Return a JSON compatible plain object that represents the path.

+ + + diff --git a/docs/shapes/ellipse/index.html b/docs/shapes/ellipse/index.html new file mode 100644 index 000000000..4d6bd619a --- /dev/null +++ b/docs/shapes/ellipse/index.html @@ -0,0 +1,61 @@ + + + + + + Two.Ellipse + + + + + + + + + + + + + + + + + + + + + +

# Two.Ellipse

Extends: Two.Path

# Constructor

Argument Description
x The x position of the ellipse.
y The y position of the ellipse.
rx The radius value of the ellipse in the x direction.
ry The radius value of the ellipse in the y direction.
resolution The number of vertices used to construct the ellipse.

# Properties

A list of properties that are on every Two.Ellipse.

# width

The width of the ellipse.

# height

The height of the ellipse.

# clone

Returns: Two.Ellipse

Argument Description
parent The parent group or scene to add the clone to.

Create a new instance of Two.Ellipse with the same properties of the current path.

# toObject

Returns: Object

Return a JSON compatible plain object that represents the path.

+ + + diff --git a/docs/shapes/line/index.html b/docs/shapes/line/index.html new file mode 100644 index 000000000..4cabed059 --- /dev/null +++ b/docs/shapes/line/index.html @@ -0,0 +1,51 @@ + + + + + + Two.Line + + + + + + + + + + + + + + + + + + + + + +

# Two.Line

Extends: Two.Path

# Constructor

Argument Description
x1 The x position of the first vertex on the line.
y1 The y position of the first vertex on the line.
x2 The x position of the second vertex on the line.
y2 The y position of the second vertex on the line.
+ + + diff --git a/docs/shapes/points/index.html b/docs/shapes/points/index.html new file mode 100644 index 000000000..dec6236dc --- /dev/null +++ b/docs/shapes/points/index.html @@ -0,0 +1,89 @@ + + + + + + Two.Points + + + + + + + + + + + + + + + + + + + + + +

# Two.Points

Extends: Two.Shape

This is a primary primitive class for quickly and easily drawing points in Two.js. Unless specified methods return their instance of Two.Points for the purpose of chaining.

# Constructor

Argument Description
vertices A list of Two.Vectors that represent the order and coordinates to construct a rendered set of points.

# sizeAttenuation

Boolean dictating whether Two.js should scale the size of the points based on its matrix hierarchy.

Set to true if you'd like the size of the points to be relative to the scale of its parents; false to disregard. Default is false.

# beginning

Number between zero and one to state the beginning of where the path is rendered.

Two.Points.beginning is a percentage value that represents at what percentage into the path should the renderer start drawing.

# ending

Number between zero and one to state the ending of where the path is rendered.

Two.Points.ending is a percentage value that represents at what percentage into the path should the renderer start drawing.

# fill

The value of what the path should be filled in with.

See: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value (opens new window) for more information on CSS's colors as String.

# stroke

The value of what the path should be outlined in with.

See: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value (opens new window) for more information on CSS's colors as String.

# className

A class to be applied to the element to be compatible with CSS styling.

nota-bene

Only available for the SVG renderer.

# visible

Display the points or not.

nota-bene

For Two.CanvasRenderer and Two.WebGLRenderer when set to false all updating is disabled improving performance dramatically with many objects in the scene.

# vertices

An ordered list of vector points for rendering points.

A list of Two.Vector objects that consist of which coordinates to draw points at.

nota-bene

The array when manipulating is actually a Two.Collection.

# dashes

Array of numbers. Odd indices represent dash length. Even indices represent dash space.

A list of numbers that represent the repeated dash length and dash space applied to the stroke of the text.

See: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray (opens new window) for more information on the SVG stroke-dasharray attribute.

# dashes.offset

A number in pixels to offset Two.Points.dashes display.

# clone

Returns: Two.Points

Argument Description
parent The parent group or scene to add the clone to.

Create a new instance of Two.Points with the same properties of the current path.

# toObject

Returns: Object

Return a JSON compatible plain object that represents the points object.

# noFill

Short hand method to set fill to transparent.

# noStroke

Short hand method to set stroke to transparent.

# corner

Orient the vertices of the shape to the upper left-hand corner of the points object.

# center

Orient the vertices of the shape to the center of the points object.

# getBoundingClientRect

Returns: Object

  • Returns object with top, left, right, bottom, width, height attributes.
Argument Description
shallow Describes whether to calculate off local matrix or world matrix.

Return an object with top, left, right, bottom, width, and height parameters of the path.

# subdivide

Argument Description
limit How many times to recurse subdivisions.

Insert a Two.Vector at the midpoint between every item in Two.Points.vertices.

# length

The sum of distances between all Two.Points.vertices.

+ + + diff --git a/docs/shapes/polygon/index.html b/docs/shapes/polygon/index.html new file mode 100644 index 000000000..b227579e9 --- /dev/null +++ b/docs/shapes/polygon/index.html @@ -0,0 +1,65 @@ + + + + + + Two.Polygon + + + + + + + + + + + + + + + + + + + + + +

# Two.Polygon

Extends: Two.Path

# Constructor

Argument Description
x The x position of the polygon.
y The y position of the polygon.
radius The radius value of the polygon.
sides The number of vertices used to construct the polygon.

# Properties

A list of properties that are on every Two.Polygon.

# radius

The radius value of the polygon.

nota-bene

This property is tied to Two.Polygon.width and Two.Polygon.height. When you set radius, it affects width and height. Likewise, if you set width or height it will change the radius.

# width

The size of the width of the polygon.

nota-bene

This property is tied to Two.Polygon.radius. When you set radius, it affects the width. Likewise, if you set width it will change the radius.

# height

The size of the height of the polygon.

nota-bene

This property is tied to Two.Polygon.radius. When you set radius, it affects the height. Likewise, if you set height it will change the radius.

# sides

The amount of sides the polyogn has.

# clone

Returns: Two.Polygon

Argument Description
parent The parent group or scene to add the clone to.

Create a new instance of Two.Polygon with the same properties of the current path.

# toObject

Returns: Object

Return a JSON compatible plain object that represents the path.

+ + + diff --git a/docs/shapes/rectangle/index.html b/docs/shapes/rectangle/index.html new file mode 100644 index 000000000..85e2bf24f --- /dev/null +++ b/docs/shapes/rectangle/index.html @@ -0,0 +1,63 @@ + + + + + + Two.Rectangle + + + + + + + + + + + + + + + + + + + + + +

# Two.Rectangle

Extends: Two.Path

# Constructor

Argument Description
x The x position of the rectangle.
y The y position of the rectangle.
width The width value of the rectangle.
height The width value of the rectangle.

# Properties

A list of properties that are on every Two.Rectangle.

# width

The size of the width of the rectangle.

# height

The size of the height of the rectangle.

# origin

A two-component vector describing the origin offset to draw the rectangle. Default is 0, 0.

# clone

Returns: Two.Rectangle

Argument Description
parent The parent group or scene to add the clone to.

Create a new instance of Two.Rectangle with the same properties of the current path.

# toObject

Returns: Object

Return a JSON compatible plain object that represents the path.

+ + + diff --git a/docs/shapes/rounded-rectangle/index.html b/docs/shapes/rounded-rectangle/index.html new file mode 100644 index 000000000..faf7a3729 --- /dev/null +++ b/docs/shapes/rounded-rectangle/index.html @@ -0,0 +1,59 @@ + + + + + + Two.RoundedRectangle + + + + + + + + + + + + + + + + + + + + + +

# Two.RoundedRectangle

Extends: Two.Path

# Constructor

Argument Description
x The x position of the rounded rectangle.
y The y position of the rounded rectangle.
width The width value of the rounded rectangle.
height The width value of the rounded rectangle.
radius The radius value of the rounded rectangle.
resolution The number of vertices used to construct the rounded rectangle.

# width

The width of the rounded rectangle.

# height

The height of the rounded rectangle.

# radius

The size of the radius of the rounded rectangle.

# clone

Returns: Two.RoundedRectangle

Argument Description
parent The parent group or scene to add the clone to.

Create a new instance of Two.RoundedRectangle with the same properties of the current path.

# toObject

Returns: Object

Return a JSON compatible plain object that represents the path.

+ + + diff --git a/docs/shapes/star/index.html b/docs/shapes/star/index.html new file mode 100644 index 000000000..3fc0c6d93 --- /dev/null +++ b/docs/shapes/star/index.html @@ -0,0 +1,63 @@ + + + + + + Two.Star + + + + + + + + + + + + + + + + + + + + + +

# Two.Star

Extends: Two.Path

# Constructor

Argument Description
x The x position of the star.
y The y position of the star.
innerRadius The inner radius value of the star.
outerRadius The outer radius value of the star.
sides The number of sides used to construct the star.

# Properties

A list of properties that are on every Two.Star.

# innerRadius

The size of the inner radius of the star.

# outerRadius

The size of the outer radius of the star.

# sides

The amount of sides the star has.

# clone

Returns: Two.Star

Argument Description
parent The parent group or scene to add the clone to.

Create a new instance of Two.Star with the same properties of the current path.

# toObject

Returns: Object

Return a JSON compatible plain object that represents the path.

+ + + diff --git a/docs/text/index.html b/docs/text/index.html new file mode 100644 index 000000000..63ed658e2 --- /dev/null +++ b/docs/text/index.html @@ -0,0 +1,103 @@ + + + + + + Two.Text + + + + + + + + + + + + + + + + + + + + + +

# Two.Text

Extends: Two.Shape

This is a primitive class for creating drawable text that can be added to the scenegraph.

# Constructor

Argument Description
message The String to be rendered to the scene.
x The position in the x direction for the object.
y The position in the y direction for the object.
styles An object where styles are applied. Attribute must exist in Two.Text.Properties.

# Ratio

Approximate aspect ratio of a typeface's character width to height.

# Properties

A list of properties that are on every Two.Text.

# Measure

Returns: Object

  • The width and height of the Two.Text instance.
Argument Description
text The instance of Two.Text to measure.

# value

The characters to be rendered to the the screen. Referred to in the documentation sometimes as the message.

# family

The font family Two.js should attempt to register for rendering. The default value is 'sans-serif'. Comma separated font names can be supplied as a "stack", similar to the CSS implementation of font-family.

# size

The font size in Two.js point space. Defaults to 13.

# leading

The height between lines measured from base to base in Two.js point space. Defaults to 17.

# alignment

Alignment of text in relation to Two.Text.translation's coordinates. Possible values include 'left', 'center', 'right'. Defaults to 'center'.

# baseline

The vertical aligment of the text in relation to Two.Text.translation's coordinates. Possible values include 'top', 'middle', 'bottom', and 'baseline'. Defaults to 'baseline'.

nota-bene

In headless environments where the canvas is based on https://github.com/Automattic/node-canvas (opens new window), baseline seems to be the only valid property.

# style

The font's style. Possible values include 'normal', 'italic'. Defaults to 'normal'.

# weight

A number at intervals of 100 to describe the font's weight. This compatibility varies with the typeface's variant weights. Larger values are bolder. Smaller values are thinner. Defaults to '500'.

# decoration

String to delineate whether text should be decorated with for instance an 'underline'. Defaults to 'none'.

# fill

The value of what the text object should be filled in with.

See: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value (opens new window) for more information on CSS's colors as String.

# stroke

The value of what the text object should be filled in with.

See: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value (opens new window) for more information on CSS's colors as String.

# linewidth

The thickness in pixels of the stroke.

# opacity

The opaqueness of the text object.

nota-bene

Can be used in conjunction with CSS Colors that have an alpha value.

# visible

Display the text object or not.

nota-bene

For Two.CanvasRenderer and Two.WebGLRenderer when set to false all updating is disabled improving performance dramatically with many objects in the scene.

# mask

The shape whose alpha property becomes a clipping area for the text.

nota-bene

This property is currently not working because of SVG spec issues found here {@link https://code.google.com/p/chromium/issues/detail?id=370951}.

# clip

Object to define clipping area.

nota-bene

This property is currently not working because of SVG spec issues found here {@link https://code.google.com/p/chromium/issues/detail?id=370951}.

# dashes

Array of numbers. Odd indices represent dash length. Even indices represent dash space.

A list of numbers that represent the repeated dash length and dash space applied to the stroke of the text.

See: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray (opens new window) for more information on the SVG stroke-dasharray attribute.

# dashes.offset

A number in pixels to offset Two.Text.dashes display.

# clone

Returns: Two.Text

Argument Description
parent The parent group or scene to add the clone to.

Create a new instance of Two.Text with the same properties of the current text object.

# toObject

Returns: Object

Return a JSON compatible plain object that represents the text object.

# noFill

Short hand method to set fill to transparent.

# noStroke

Short hand method to set stroke to transparent.

# getBoundingClientRect

Returns: Object

  • Returns object with top, left, right, bottom, width, height attributes.
Argument Description
shallow Describes whether to calculate off local matrix or world matrix.

Return an object with top, left, right, bottom, width, and height parameters of the text object.

+ + + diff --git a/docs/two/index.html b/docs/two/index.html new file mode 100644 index 000000000..a9934d58c --- /dev/null +++ b/docs/two/index.html @@ -0,0 +1,145 @@ + + + + + + Two + + + + + + + + + + + + + + + + + + + + + +

# Two

Extends: Two.Events

The entrypoint for Two.js. Instantiate a new Two in order to setup a scene to render to. Two is also the publicly accessible namespace that all other sub-classes, functions, and utilities attach to.

# Constructor

Argument Description
options
options.fullscreen Set to true to automatically make the stage adapt to the width and height of the parent document. This parameter overrides width and height parameters if set to true. This overrides options.fitted as well.
options.fitted Set to true to automatically make the stage adapt to the width and height of the parent element. This parameter overrides width and height parameters if set to true.
options.width The width of the stage on construction. This can be set at a later time.
options.height The height of the stage on construction. This can be set at a later time.
options.type The type of renderer to setup drawing with. See Two.Types for available options.
options.autostart Set to true to add the instance to draw on requestAnimationFrame. This is a convenient substitute for Two.play.
options.domElement The canvas or SVG element to draw into. This overrides the options.type argument.

# Types

The different rendering types available in the library.

# Version

The current working version of the library, v0.8.11.

# PublishDate

The automatically generated publish date in the build process to verify version release candidates.

# Identifier

String prefix for all Two.js object's ids. This trickles down to SVG ids.

# Resolution

Default amount of vertices to be used for interpreting Arcs and ArcSegments.

# AutoCalculateImportedMatrices

When importing SVGs through the Two.interpret and Two.load, this boolean determines whether Two.js infers and then overrides the exact transformation matrix of the reference SVG.

nota-bene

false copies the exact transformation matrix values, but also sets the path's matrix.manual = true.

# Instances

Registered list of all Two.js instances in the current session.

# uniqueId

Returns: Number

Ever increasing Number.

Simple method to access an incrementing value. Used for id allocation on all Two.js objects.

# Commands

Map of possible path commands. Taken from the SVG specification. Commands include: move, line, curve, arc, and close.

# Utils

A massive object filled with utility functions and properties.

Two.Utils.read: A collection of SVG parsing functions indexed by element name.

Two.Utils.read.path: Parse SVG path element or d attribute string.

# type

A string representing which type of renderer the instance has instantiated.

# renderer

The instantiated rendering class for the instance. For a list of possible rendering types check out Two.Types.

# scene

The base level Two.Group which houses all objects for the instance. Because it is a Two.Group transformations can be applied to it that will affect all objects in the instance. This is handy as a makeshift inverted camera.

# width

The width of the instance's dom element.

# height

The height of the instance's dom element.

# frameCount

An integer representing how many frames have elapsed.

# timeDelta

A number representing how much time has elapsed since the last frame in milliseconds.

# playing

A boolean representing whether or not the instance is being updated through the automatic requestAnimationFrame.

# fit

If options.fullscreen or options.fitted in construction create this function. It sets the width and height of the instance to its respective parent window or element depending on the options passed.

# appendTo

Argument Description
elem The DOM element to append the Two.js stage to.

Shorthand method to append your instance of Two.js to the document.

# play

Triggers:

  • event:play

Call to start an internal animation loop.

nota-bene

This function initiates a requestAnimationFrame loop.

# pause

Triggers:

  • event:pause

Call to stop the internal animation loop for a specific instance of Two.js.

# release

Returns: Object

The object passed for event deallocation.

Argument Description
obj

Release an arbitrary class' events from the Two.js corpus and recurse through its children and or vertices.

# update

Triggers:

  • event:update

Update positions and calculations in one pass before rendering. Then render to the canvas.

nota-bene

This function is called automatically if using Two.play or the autostart parameter in construction.

# render

Triggers:

  • event:render

Render all drawable and visible objects of the scene.

# add

Argument Description
objects An array of Two.js objects. Alternatively can add objects as individual arguments.

A shorthand method to add specific Two.js objects to the scene.

# remove

Argument Description
objects An array of Two.js objects.

A shorthand method to remove specific Two.js objects from the scene.

# clear

Removes all objects from the instance's scene. If you intend to have the browser garbage collect this, don't forget to delete the references in your application as well.

# makeLine

Returns: Two.Line

Argument Description
x1
y1
x2
y2

Creates a Two.js line and adds it to the scene.

# makeArrow

Returns: Two.Path

Argument Description
x1
y1
x2
y2

Creates a Two.js arrow and adds it to the scene.

# makeRectangle

Returns: Two.Rectangle

Argument Description
x
y
width
height

Creates a Two.js rectangle and adds it to the scene.

# makeRoundedRectangle

Returns: Two.RoundedRectangle

Argument Description
x
y
width
height
sides

Creates a Two.js rounded rectangle and adds it to the scene.

# makeCircle

Returns: Two.Circle

Argument Description
x
y
radius
resolution

Creates a Two.js circle and adds it to the scene.

# makeEllipse

Returns: Two.Ellipse

Argument Description
x
y
rx
ry
resolution

Creates a Two.js ellipse and adds it to the scene.

# makeStar

Returns: Two.Star

Argument Description
x
y
outerRadius
innerRadius
sides

Creates a Two.js star and adds it to the scene.

# makeCurve

Returns: Two.Path

  • Where path.curved is set to true.
Argument Description
points An array of Two.Anchor points.
Alternatively you can pass alternating x / y coordinate values as individual arguments. These will be combined into Two.Anchors for use in the path.

Creates a Two.js path that is curved and adds it to the scene.

nota-bene

In either case of passing an array or passing numbered arguments the last argument is an optional Boolean that defines whether the path should be open or closed.

# makePolygon

Returns: Two.Polygon

Argument Description
x
y
radius
sides

Creates a Two.js polygon and adds it to the scene.

# makeArcSegment

Returns: Two.ArcSegment

Argument Description
x
y
innerRadius
outerRadius
startAngle
endAngle
resolution The number of vertices that should comprise the arc segment.

# makePoints

Returns: Two.Points

Argument Description
points An array of Two.Vector points
Alternatively you can pass alternating x / y coordinate values as individual agrguments. These will be combined into Two.Vectors for use in the points object.

Creates a Two.js points object and adds it to the current scene.

# makePath

Returns: Two.Path

Argument Description
points An array of Two.Anchor points
Alternatively you can pass alternating x / y coordinate values as individual arguments. These will be combined into Two.Anchors for use in the path.

Creates a Two.js path and adds it to the scene.

nota-bene

In either case of passing an array or passing numbered arguments the last argument is an optional Boolean that defines whether the path should be open or closed.

# makeText

Returns: Two.Text

Argument Description
message
x
y
styles An object to describe any of the Two.Text.Properties including fill, stroke, linewidth, family, alignment, leading, opacity, etc..

Creates a Two.js text object and adds it to the scene.

# makeLinearGradient

Returns: Two.LinearGradient

Argument Description
x1
y1
x2
y2
args Any number of color stops sometimes referred to as ramp stops. If none are supplied then the default black-to-white two stop gradient is applied.

Creates a Two.js linear gradient and adds it to the scene. In the case of an effect it's added to an invisible "definitions" group.

# makeRadialGradient

Returns: Two.RadialGradient

Argument Description
x1
y1
radius
args Any number of color stops sometimes referred to as ramp stops. If none are supplied then the default black-to-white two stop gradient is applied.

Creates a Two.js linear-gradient object and adds it to the scene. In the case of an effect it's added to an invisible "definitions" group.

# makeSprite

Returns: Two.Sprite

Argument Description
pathOrTexture The URL path to an image or an already created Two.Texture.
x
y
columns
rows
frameRate
autostart

Creates a Two.js sprite object and adds it to the scene. Sprites can be used for still images as well as animations.

# makeImageSequence

Returns: Two.ImageSequence

Argument Description
pathsOrTextures An array of paths or of Two.Textures.
x
y
frameRate
autostart

Creates a Two.js image sequence object and adds it to the scene.

# makeTexture

Returns: Two.Texture

Argument Description
pathOrSource The URL path to an image or a DOM image-like element.
callback Function to be invoked when the image is loaded.

Creates a Two.js texture object.

# makeGroup

Returns: Two.Group

Argument Description
objects Two.js objects to be added to the group in the form of an array or as individual arguments.

Creates a Two.js group object and adds it to the scene.

# interpret

Returns: Two.Group

Argument Description
svg The SVG node to be parsed.
shallow Don't create a top-most group but append all content directly.
add – Automatically add the reconstructed SVG node to scene.

Interpret an SVG Node and add it to this instance's scene. The distinction should be made that this doesn't import svg's, it solely interprets them into something compatible for Two.js - this is slightly different than a direct transcription.

# load

Returns: Two.Group

Argument Description
pathOrSVGContent The URL path of an SVG file or an SVG document as text.
callback Function to call once loading has completed.

Load an SVG file or SVG text and interpret it into Two.js legible objects.

+ + + diff --git a/docs/vector/index.html b/docs/vector/index.html new file mode 100644 index 000000000..4d521d89e --- /dev/null +++ b/docs/vector/index.html @@ -0,0 +1,153 @@ + + + + + + Two.Vector + + + + + + + + + + + + + + + + + + + + + +

# Two.Vector

Extends: Two.Events

A class to store x / y component vector data. In addition to storing data Two.Vector has suped up methods for commonplace mathematical operations.

# Constructor

Argument Description
x Any number to represent the horizontal x-component of the vector.
y Any number to represent the vertical y-component of the vector.

# zero

Handy reference to a vector with component values 0, 0 at all times.

# left

Handy reference to a vector with component values -1, 0 at all times.

Handy reference to a vector with component values 1, 0 at all times.

# up

Handy reference to a vector with component values 0, -1 at all times.

# down

Handy reference to a vector with component values 0, 1 at all times.

# add

Returns: Two.Vector

Argument Description
v1
v2

Add two vectors together.

# sub

Returns: Two.Vector

Argument Description
v1
v2

Subtract two vectors: v2 from v1.

# ratioBetween

Returns: Number

The ratio betwen two points v1 and v2.

Argument Description
v1
v2

# angleBetween

Returns: Number

The angle between points v1 and v2.

Argument Description
v1
v2

# distanceBetween

Returns: Number

The distance between points v1 and v2. Distance is always positive.

Argument Description
v1
v2

# distanceBetweenSquared

Returns: Number

The squared distance between points v1 and v2.

Argument Description
v1
v2

# x

The horizontal x-component of the vector.

# y

The vertical y-component of the vector.

# copy

Argument Description
v

Copy the x / y components of another object v.

# clear

Set the x / y component values of the vector to zero.

# clone

Create a new vector and copy the existing values onto the newly created instance.

# add

Overloaded

Argument Description
v

Add an object with x / y component values to the instance.

# add

Overloaded

Argument Description
v

Add the same number to both x / y component values of the instance.

# add

Overloaded

Argument Description
x
y

Add x / y values to their respective component value on the instance.

# sub

Overloaded

Argument Description
v

Subtract an object with x / y component values to the instance.

# sub

Overloaded

Argument Description
v

Subtract the same number to both x / y component values of the instance.

# sub

Overloaded

Argument Description
x
y

Subtract x / y values to their respective component value on the instance.

# multiply

Overloaded

Argument Description
v

Multiply an object with x / y component values to the instance.

# multiply

Overloaded

Argument Description
v

Multiply the same number to both x / y component values of the instance.

# multiply

Overloaded

Argument Description
x
y

Multiply x / y values to their respective component value on the instance.

# multiplyScalar

Argument Description
s The scalar to multiply by.

Mulitiply the vector by a single number. Shorthand to call Two.Vector.multiply directly.

# divide

Overloaded

Argument Description
v

Divide an object with x / y component values to the instance.

# divide

Overloaded

Argument Description
v

Divide the same number to both x / y component values of the instance.

# divide

Overloaded

Argument Description
x
y

Divide x / y values to their respective component value on the instance.

# divideScalar

Argument Description
s The scalar to divide by.

Divide the vector by a single number. Shorthand to call Two.Vector.divide directly.

# negate

Invert each component's sign value.

# dot

Returns: Number

Get the dot product (opens new window) of the vector.

# length

Returns: Number

Get the length of a vector.

# lengthSquared

Returns: Number

Get the length of the vector to the power of two. Widely used as less expensive than Two.Vector.length because it isn't square-rooting any numbers.

# normalize

Normalize the vector from negative one to one.

# distanceTo

Returns: Number

Get the distance between two vectors.

# distanceToSquared

Returns: Number

Get the distance between two vectors to the power of two. Widely used as less expensive than Two.Vector.distanceTo because it isn't square-rooting any numbers.

# setLength

Argument Description
l length to set vector to.

Set the length of a vector.

# equals

Returns: Boolean

Argument Description
v The vector to compare against.
eps An options epsilon for precision.

Qualify if one vector roughly equal another. With a margin of error defined by epsilon.

# lerp

Argument Description
v The destination vector to step towards.
t The zero to one value of how close the current vector gets to the destination vector.

Linear interpolate one vector to another by an amount t defined as a zero to one number.

See: Matt DesLauriers (opens new window) has a good thread about this.

# isZero

Returns: Boolean

Argument Description
eps Optional precision amount to check against.

Check to see if vector is roughly zero, based on the epsilon precision value.

# toString

Returns: String

Return a comma-separated string of x, y value. Great for storing in a database.

# toObject

Returns: Object

Return a JSON compatible plain object that represents the vector.

# rotate

Argument Description
radians The amount to rotate the vector by in radians.

Rotate a vector.

+ + + diff --git a/donate/index.html b/donate/index.html new file mode 100644 index 000000000..b1f160be0 --- /dev/null +++ b/donate/index.html @@ -0,0 +1,39 @@ + + + + + + VuePress + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/index.html b/examples/index.html new file mode 100644 index 000000000..64691ce30 --- /dev/null +++ b/examples/index.html @@ -0,0 +1,543 @@ + + + + + + Two.js Examples + + + + + + + + + + + + + + + + + + + + + +

# Examples

Various examples of how to use different features of Two.js with associated tags for convenient filtering through the global search bar up at the top. If you've made something with Two.js you'd like to share, then please submit (opens new window) it.

# Official Examples

Advanced Anchors

Advanced Anchors +
  • + import +
  • + interpret +
  • + mouse +
  • + points +
  • + vertices +
  • + ui +

Animate Strokes

Animate Strokes +
  • + import +
  • + interpret +
  • + mouse +
  • + beginning +
  • + ending +

Clipping Mask

Clipping Mask +
  • + import +
  • + mouse +
  • + shapes +
  • + grid +
  • + sine +

Depth via Groups

Depth via Groups +
  • + import +
  • + shapes +
  • + animated +
  • + non-interactive +

Dynamic Text

Dynamic Text +
  • + es6 +
  • + import +
  • + text +
  • + vector +
  • + keypress +

Dynamic Vertices

Dynamic Vertices +
  • + es6 +
  • + import +
  • + vector +
  • + mouse +
  • + path +

Get Point on Path

Get Point on Path +
  • + import +
  • + shapes +
  • + mouse +
  • + sine +

Gradients

Gradients +
  • + es6 +
  • + import +
  • + vector +
  • + mouse +
  • + radial-gradient +
  • + linear-gradent +

Interpret SVG's

Interpret SVG's +
  • + es6 +
  • + import +
  • + animated +
  • + non-interactive +
  • + vertices +
  • + scale +

Morphing Vertices

Morphing Vertices +
  • + import +
  • + animated +
  • + non-interactive +
  • + vertices +
  • + circle +

Particle Sandbox

Particle Sandbox +
  • + import +
  • + react +
  • + sandbox +
  • + vertices +
  • + position +
  • + rotation +
  • + scale +
  • + canvas +
  • + webgl +
  • + svg +
  • + test +
  • + renderers +
  • + memory +

Rendering Types

Rendering Types +
  • + import +
  • + animated +
  • + mouse +
  • + easing +

Rubber Ball

Rubber Ball +
  • + import +
  • + vector +
  • + mouse +
  • + circle +
  • + vertices +

Simple Pen Tool

Simple Pen Tool +
  • + import +
  • + vector +
  • + mouse +
  • + ui +
  • + vertices +
  • + points +
  • + layers +
  • + group +

Watch Face

Watch Face +
  • + line +
  • + dashes +
  • + group +
  • + cap +
  • + rotation +
  • + text +
  • + non-interactive +

With Tween.js

With Tween.js +
  • + import +
  • + third-party +
  • + animated +
  • + non-interactive +

Zoom & Pan UI

Zoom & Pan UI +
  • + mouse +
  • + drag +
  • + ui +
  • + zui +

# Community Examples

Folded Corner

Folded Corner +
  • + animated +
  • + interactive +
  • + geometry +
  • + mouse +

Video Texture

Video Texture +
  • + animated +
  • + video +
  • + texture +

Animated Spritesheet

Animated Spritesheet +
  • + sprite +
  • + animated +
  • + image +
  • + bitmap +

Luniland

Luniland +
  • + game +
  • + interactive +
  • + animated +
  • + gsap +
  • + physics +
  • + space +

Two.js as Three.js Texture

Two.js as Three.js Texture +
  • + animated +
  • + 3d +
  • + non-interactive +
  • + text +
  • + canvas +

Download Scene as SVG

Download Scene as SVG +
  • + interactive +
  • + button +
  • + export +

Animated Flag

Animated Flag +
  • + animated +
  • + logo +
  • + non-interactive +
  • + sine +
  • + svg +

Arrow

Arrow +
  • + static +
  • + simple +
  • + primitive +
  • + non-interactive +

Basic Angular Template

Basic Angular Template +
  • + angular +

Basic React Template

Basic React Template +
  • + react +

Basic GSAP Animation Setup

Basic GSAP Animation Setup +
  • + gsap +
  • + interactive +
  • + animated +
  • + rotation +
  • + interpret +

Dashes

Dashes +
  • + circle +
  • + animated +
  • + non-interactive +
  • + simple +

Fake Camera

Fake Camera +
  • + animated +
  • + group +
  • + position +
  • + non-interactive +

GM: Animated Sticker

GM: Animated Sticker +
  • + svg +
  • + interpret +
  • + getComputedMatrix +
  • + gradient +
  • + non-interactive +
  • + animated +

Haiku Generator

Haiku Generator +
  • + text +
  • + mouse +
  • + animated +

Handshake

Handshake +
  • + animated +
  • + non-interactive +
  • + load +
  • + image +

Insta Logo

Insta Logo +
  • + animated +
  • + mouse +
  • + logo +
  • + TweenMax +

Over Google Maps

Over Google Maps +
  • + text +
  • + interactive +
  • + ui +

Points

Points +
  • + static +
  • + simple +
  • + primitive +
  • + non-interactive +
  • + styles +

Rain

Rain +
  • + animated +
  • + mouse +
  • + line +
  • + stroke +

Rainbow

Rainbow +
  • + animated +
  • + non-interactive +
  • + beginning +
  • + ending +

South Tirol

South Tirol +
  • + map +
  • + third-party +
  • + outline +
  • + static +
  • + bw +

Sparks

Sparks +
  • + animated +
  • + mouse +
  • + line +
  • + stroke +

Spring Tree

Spring Tree +
  • + mouse +
  • + drag +
  • + physics +
  • + geometry +

Sprite Sheet: Circle

Sprite Sheet: Circle +
  • + static +
  • + non-interactive +
  • + canvas +
  • + grid +
  • + sprite +

Starfield

Starfield +
  • + animated +
  • + non-interactive +
  • + webgl +

Swash Sword

Swash Sword +
  • + mouse +
  • + drag +
  • + interpret +
  • + physics +

TV Jitter

TV Jitter +
  • + animated +
  • + non-interactive +
  • + logo +

Twisting Squares

Twisting Squares +
  • + animated +
  • + non-interactive +
  • + rectangle +
  • + rotation +

Animated Logo

Animated Logo +
  • + animated +
  • + non-interactive +
  • + logo +
  • + shapes +

USA

USA +
  • + animated +
  • + stop-motion +
  • + svg +
  • + interpret +

Wavy Road

Wavy Road +
  • + mouse +
  • + curve +
  • + line +
  • + dashes +
  • + group +

Word Stacks

Word Stacks +
  • + physics +
  • + mouse +
  • + drag +
  • + text +

# Even More References

There are many more examples that exist out on the internet. Some starting points are:

+ + + diff --git a/images/codepen.svg b/images/codepen.svg new file mode 100644 index 000000000..1774b9d9c --- /dev/null +++ b/images/codepen.svg @@ -0,0 +1,3 @@ + + + diff --git a/images/codesandbox.svg b/images/codesandbox.svg new file mode 100644 index 000000000..c34197d9e --- /dev/null +++ b/images/codesandbox.svg @@ -0,0 +1,4 @@ + + + + diff --git a/images/download.svg b/images/download.svg new file mode 100644 index 000000000..71381bf99 --- /dev/null +++ b/images/download.svg @@ -0,0 +1,3 @@ + + + diff --git a/images/favicon.gif b/images/favicon.gif new file mode 100644 index 000000000..fc7ba3abd Binary files /dev/null and b/images/favicon.gif differ diff --git a/images/github.svg b/images/github.svg new file mode 100644 index 000000000..ef2c589ba --- /dev/null +++ b/images/github.svg @@ -0,0 +1,3 @@ + + + diff --git a/images/glitch.svg b/images/glitch.svg new file mode 100644 index 000000000..f0564526e --- /dev/null +++ b/images/glitch.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/images/info.svg b/images/info.svg new file mode 100644 index 000000000..3b70d234f --- /dev/null +++ b/images/info.svg @@ -0,0 +1,3 @@ + + + diff --git a/images/internet.svg b/images/internet.svg new file mode 100644 index 000000000..f92012113 --- /dev/null +++ b/images/internet.svg @@ -0,0 +1,3 @@ + + + diff --git a/images/jsfiddle.svg b/images/jsfiddle.svg new file mode 100644 index 000000000..791fad478 --- /dev/null +++ b/images/jsfiddle.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/images/logo.svg b/images/logo.svg new file mode 100644 index 000000000..1cefe0f38 --- /dev/null +++ b/images/logo.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/images/observable.svg b/images/observable.svg new file mode 100644 index 000000000..893abc226 --- /dev/null +++ b/images/observable.svg @@ -0,0 +1,3 @@ + + + diff --git a/images/search.svg b/images/search.svg new file mode 100644 index 000000000..173b4961a --- /dev/null +++ b/images/search.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/images/source.svg b/images/source.svg new file mode 100644 index 000000000..19ca4aa9d --- /dev/null +++ b/images/source.svg @@ -0,0 +1,3 @@ + + + diff --git a/images/sponsor.svg b/images/sponsor.svg new file mode 100644 index 000000000..7fd9ec608 --- /dev/null +++ b/images/sponsor.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/images/thumbnail.jpg b/images/thumbnail.jpg new file mode 100644 index 000000000..c62725a5f Binary files /dev/null and b/images/thumbnail.jpg differ diff --git a/images/thumbnail.svg b/images/thumbnail.svg new file mode 100644 index 000000000..a2a4acabe --- /dev/null +++ b/images/thumbnail.svg @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/index.html b/index.html new file mode 100644 index 000000000..69dc09313 --- /dev/null +++ b/index.html @@ -0,0 +1,56 @@ + + + + + + Two.js • Homepage + + + + + + + + + + + + + + + + + + + + + +

# Two.js

A two-dimensional drawing api geared towards modern web browsers. It is renderer agnostic enabling the same api to draw in multiple contexts: svg, canvas, and webgl.

# Download

Download

TIP

Prior to v0.7.0-alpha.1 Two.js requires Underscore.js and Backbone.js Events. If you're already loading these files elsewhere then you can build the project yourself and get the file size even smaller. For more information on custom builds check out the source on github.

Node.js Version with npm:

npm install --save two.js@latest
+

# Overview

Overview

  • # Focus on Vector Shapes

    Two.js is deeply inspired by flat motion graphics (opens new window). As a result, two.js aims to make the creation and animation of flat shapes easier and more concise.

  • # Scenegraph

    At its core two.js relies on a scenegraph (opens new window). This means that when you draw or create an object (a Two.Path or Two.Group), two actually stores and remembers that. After you make the object you can apply any number of operations to it — e.g: rotation, position, scale, etc..

  • # Animation Loop

    Two.js has a built in animation loop. It is simple in nature and can be automated or paired with another animation library. For more information check out the examples.

  • # SVG Interpreter

    Two.js features a Scalable Vector Graphics (opens new window) Interpreter. This means developers and designers alike can create SVG elements in commercial applications like Adobe Illustrator (opens new window) and bring them into your two.js scene. For more information check out the examples.

  • # Friends with Bitmap Imagery

    Despite its early focus on easing vector shape creation and animation, Two.js offers many easy-to-use features to handle and render bitmap images. Easily load single images, sprite sheets, and image sequences with just a few method calls.

# Basic Usage

Basic Usage

In order to start any of these demos you'll want to download two.js and add it to your HTML document. Once downloaded add this tag to the <head> of your document: <script src="./path-to-two/two.js"></script>. When you visit the page, you should be able to open up the console and type Two. If this returns a function (and not an error) then you're ready to begin!

# Drawing Your First Shapes

Drawing Your First Shapes

Before we get into all the fancy animating it's good to get a feel for how to make shapes in two.js. In order to do this we need to have an instance of two. This sets up a dom element that contains either an svg or canvas element to add to the webpage. The two object has a scene which holds all shapes as well as methods for creating shapes.

TIP

For a list of all properties and construction parameters check out the documentation.

 
 

# Shapes and Groups

Shapes and Groups

Adding shapes to groups makes managing multiple shapes easier and more sane. Group's provide an easy way to move your content through position, rotation, and scale. These operations emit from the coordinate space (0, 0). In the example below we can see that the initial orientation of the circle and rectangle changed from the first example. These shapes are oriented around (0, 0), which allows us to transform the group around the centeroid of the shapes. In addition Group's styling operations trickle down and apply to each shape.

 
 

# Adding Motion

Adding Motion

Finally, let's add some motion to our shapes. So far the examples use two.update(); to draw content to the screen. The instance of two.js has two particular methods for animation. The first is two.play(); which calls two.update(); at 60 frames-per-second. This rate, however, will slowdown if there's too much content to render per frame.

The second method is two.bind(); This method takes a string as its first parameter indicating what event to listen to and a function as its second argument delineating what to do when the event described in the first parameter happens. To sync a function with the animation loop simply invoke two.bind('update', referenceToFunction); as outlined below:

 
 

# Next Steps

Now that you got a quick glimpse into some of the functionality two.js offers, check out the official and community examples to see what else you can do. These examples range from showing off specific features of the library to using the library in other environments, like React and Angular.

Looking for more information on a specific property? Then head over to the documentation which outlines all of the library's public features.

Haven't found what you're looking for? Then ask a question on our GitHub (opens new window) page.



# Project Credits

Two.js is dependency free, but its creation would not have been possible without these great contributions to the JavaScript ecosystem:

Two.js is a project by Jono (opens new window) and numerous contributors (opens new window)

Site design by Yuin (opens new window) • Site development in collaboration with Tonia (opens new window)

Published under the MIT License (opens new window) © 2012 – 2024


+ + + diff --git a/sitemap.xml b/sitemap.xml new file mode 100644 index 000000000..70081b19e --- /dev/null +++ b/sitemap.xml @@ -0,0 +1 @@ +https://two.js.org/2022-02-14T23:42:50.000Zdailyhttps://two.js.org/changelog/2023-10-16T18:04:45.000Zdailyhttps://two.js.org/docs/2024-01-29T19:02:24.000Zdailyhttps://two.js.org/docs/anchor/2022-12-22T23:52:36.000Zdailyhttps://two.js.org/docs/children/2022-02-11T23:15:35.000Zdailyhttps://two.js.org/docs/collection/2022-02-11T23:15:35.000Zdailyhttps://two.js.org/change-log/2022-02-11T23:14:33.000Zdailyhttps://two.js.org/docs/effects/gradient/2022-12-22T23:52:36.000Zdailyhttps://two.js.org/docs/effects/linear-gradient/2022-02-11T23:15:35.000Zdailyhttps://two.js.org/docs/effects/sprite/2022-02-11T23:15:35.000Zdailyhttps://two.js.org/docs/effects/image-sequence/2022-02-11T23:15:35.000Zdailyhttps://two.js.org/docs/effects/texture/2023-08-07T18:10:10.000Zdailyhttps://two.js.org/docs/effects/stop/2022-06-15T18:34:32.000Zdailyhttps://two.js.org/docs/effects/radial-gradient/2022-02-11T23:15:35.000Zdailyhttps://two.js.org/docs/element/2022-12-22T23:52:36.000Zdailyhttps://two.js.org/docs/registry/2022-03-30T01:55:37.000Zdailyhttps://two.js.org/docs/renderers/canvas/2023-08-07T18:10:10.000Zdailyhttps://two.js.org/docs/events/2023-04-23T02:50:14.000Zdailyhttps://two.js.org/docs/extras/zui/2022-05-20T23:04:35.000Zdailyhttps://two.js.org/docs/renderers/svg/2023-08-07T18:10:10.000Zdailyhttps://two.js.org/docs/matrix/2023-08-07T18:10:10.000Zdailyhttps://two.js.org/docs/group/2023-08-07T18:10:10.000Zdailyhttps://two.js.org/docs/shape/2022-12-22T23:52:36.000Zdailyhttps://two.js.org/docs/renderers/webgl/2022-02-11T23:15:35.000Zdailyhttps://two.js.org/docs/shapes/arc-segment/2022-02-11T23:15:35.000Zdailyhttps://two.js.org/docs/shapes/ellipse/2022-03-30T01:55:37.000Zdailyhttps://two.js.org/docs/shapes/circle/2022-02-11T23:15:35.000Zdailyhttps://two.js.org/docs/shapes/polygon/2022-07-23T03:54:53.000Zdailyhttps://two.js.org/docs/shapes/points/2023-04-23T02:50:14.000Zdailyhttps://two.js.org/docs/shapes/rectangle/2022-03-30T01:55:37.000Zdailyhttps://two.js.org/docs/path/2023-08-07T18:10:10.000Zdailyhttps://two.js.org/docs/shapes/rounded-rectangle/2022-03-30T01:55:37.000Zdailyhttps://two.js.org/docs/shapes/line/2022-02-11T23:15:35.000Zdailyhttps://two.js.org/docs/text/2023-08-07T18:10:10.000Zdailyhttps://two.js.org/docs/shapes/star/2022-02-11T23:15:35.000Zdailyhttps://two.js.org/docs/two/2023-08-07T18:10:10.000Zdailyhttps://two.js.org/donate/2021-12-19T04:09:03.000Zdailyhttps://two.js.org/examples/2024-01-29T19:02:31.000Zdailyhttps://two.js.org/docs/vector/2022-03-30T01:55:37.000Zdaily \ No newline at end of file