A web-based drawing app
git clone git://soophie.de/outline
1
*{margin:0;padding:0;font-family:Roboto,sans-serif;box-sizing:border-box}:focus,:hover{outline:0}html{position:relative;overflow-x:hidden;min-height:100vh}body{width:100%;font-size:14px;min-height:100vh}img{pointer-events:none;user-select:none}input{-webkit-appearance:none}button{user-select:none;cursor:pointer}.hidden{display:none!important}.ico{font-family:'Material Icons';font-weight:400;font-style:normal;font-size:24px;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:'liga';user-select:none;pointer-events:none}*{-webkit-tap-highlight-color:transparent}body,html{overflow:hidden}.wrapper{position:fixed;top:0;left:0;right:0;bottom:0;background:#fff;z-index:999}#canvas,#overlay,.controls{position:fixed;top:0;left:0;right:0;bottom:0}#overlay{pointer-events:none}.badge{display:inline-block;margin-top:-1px;margin-left:5px;padding:2px 4px;border-radius:2px;font-weight:500;font-size:12px;color:#fff!important}.badge.prime{background:#0372EF}.badge.beta{background:#388E3C}.button{display:block;height:44px;padding:0 22px;border:none;border-radius:4px;background:#F5F5F5;color:#24292E;font-size:16px}.button:hover.ripple-active{background:#f0f0f0}.button.outline{border:1px solid #F1F1F1;background:0 0}.button.outline:hover.ripple-active{background:#fafafa}.button.prime{background:#0372EF;color:#fff}.button.prime:hover.ripple-active{background:#036de5}.button.danger{background:#E53935;color:#fff}.button.danger:hover.ripple-active{background:#e4302c}.controls{pointer-events:none}.controls .notification{top:30px;position:fixed;display:flex;justify-content:center;width:100%;opacity:0}.controls .notification p{display:inline-block;padding:10px 24px;border-radius:999px;background:#24292E;color:#fff;opacity:.95;user-select:none;pointer-events:none}.controls .hotbar{display:flex;position:fixed;left:calc(50% - 216px);bottom:30px;z-index:-1}.controls .hotbar.inactive .color{pointer-events:none!important}.controls .hotbar .color{margin:6px;width:60px;height:60px;border-radius:30px;background:#EEE;cursor:pointer;transition:transform .2s;transform:scale(.9);pointer-events:all}.controls .hotbar .color:not(.active):hover{transform:scale(1)}.controls .hotbar .color.focus{transform:scale(1)}.controls .hotbar .color.active{transform:scale(1.1)}.controls .pencil-modal{top:75px;left:130px}.controls .scale-modal{top:40px;left:calc(50% - 200px);width:400px;height:60px}.controls .scale-modal input[type=range]{-webkit-appearance:none;width:calc(400px - 54px);margin-top:21px;margin-left:27px;height:6px;background:#EEE;border:none;border-radius:4px}.controls .scale-modal input[type=range]::-webkit-slider-runnable-track{-webkit-appearance:none}.controls .scale-modal input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;height:20px;width:20px;margin-top:0;background:#9E9E9E;border-radius:10px;cursor:pointer}.controls .scale-modal input[type=range]::-webkit-slider-thumb:hover{background:#757575}.controls .clear-modal{top:calc(50% - 75.5px);left:calc(50% - 200px);width:400px;padding:25px;display:flex;flex-direction:column}.controls .clear-modal .info{width:100%;font-size:20px;text-align:center;margin-bottom:25px;color:#24292E;user-select:none}.controls .clear-modal .align{display:flex;gap:25px}.controls .clear-modal .align .btn-cancel{width:185px;height:50px;border:none;border-radius:3px;font-size:17px}.controls .clear-modal .align .btn-apply{width:185px;height:50px;border:none;border-radius:3px;border-color:grey;font-size:17px}.controls .capture-modal{top:calc(50% - 213px);left:calc(50% - 200px);width:400px;display:flex;flex-direction:column;padding:25px}.controls .capture-modal .info{font-size:20px;width:100%;text-align:center;margin-bottom:25px;color:#24292E;user-select:none}.controls .capture-modal .preview{height:250px;background:#F5F5F5;border:1px solid #f1f1f1;border-radius:3px;margin-bottom:25px}.controls .capture-modal .align{display:flex;gap:25px}.controls .capture-modal .align .btn-cancel{width:185px;height:50px;border:none;border-radius:3px;font-size:17px}.controls .capture-modal .align .btn-apply{width:185px;height:50px;border:none;border-radius:3px;border-color:grey;font-size:17px}.controls .toolbar{top:20px;left:20px}.controls .actionbar{top:20px;right:20px}.controls .actionbar,.controls .toolbar{display:flex;position:fixed}.controls .actionbar.inactive .action,.controls .actionbar.inactive .tool,.controls .toolbar.inactive .action,.controls .toolbar.inactive .tool{pointer-events:none!important}.controls .actionbar .action,.controls .actionbar .tool,.controls .toolbar .action,.controls .toolbar .tool{width:44px;height:44px;padding:10px;margin-left:8px;border-radius:22px;cursor:pointer;pointer-events:all}.controls .actionbar .action:hover,.controls .actionbar .tool:hover,.controls .toolbar .action:hover,.controls .toolbar .tool:hover{background:rgba(250,250,250,.95)}.controls .actionbar .action:hover.ripple:not(.active).ripple-active,.controls .actionbar .tool:hover.ripple:not(.active).ripple-active,.controls .toolbar .action:hover.ripple:not(.active).ripple-active,.controls .toolbar .tool:hover.ripple:not(.active).ripple-active{background:rgba(245,245,245,.95)}.controls .actionbar .action:hover.ripple.active.ripple-active,.controls .actionbar .tool:hover.ripple.active.ripple-active,.controls .toolbar .action:hover.ripple.active.ripple-active,.controls .toolbar .tool:hover.ripple.active.ripple-active{background:rgba(233,233,233,.95)}.controls .actionbar .action.active,.controls .actionbar .tool.active,.controls .toolbar .action.active,.controls .toolbar .tool.active{background:rgba(238,238,238,.95)}.controls .actionbar .action i.ico,.controls .actionbar .tool i.ico,.controls .toolbar .action i.ico,.controls .toolbar .tool i.ico{color:#424242}.colors-modal{flex-wrap:wrap;min-width:410px;width:410px;max-width:410px;padding:30px!important;top:calc(50% - 421px);left:calc(50% - 205px);display:flex;gap:12px}.colors-modal .color{width:60px;height:60px;border-radius:30px;background:#EEE;cursor:pointer;transition:transform .2s;transform:scale(.9)}.colors-modal .color:not(.active):hover{transform:scale(1)}.colors-modal .color.active{transform:scale(1.1)}.colors-modal .color.focus{transform:scale(1)}.multiplayer-modal{top:75px;right:120px}.account-modal{top:75px;right:70px}.settings-modal{top:75px;right:20px}.modal{width:250px;position:fixed;background:#fff;border:1px solid #F1F1F1;border-radius:4px;padding:6px 0;pointer-events:all;overflow:hidden;z-index:-1;display:flex}.modal .main{width:248px;min-width:248px;7max-width:248px}.modal ul.tab-list{width:248px;min-width:248px;max-width:248px}.modal .header{display:flex;margin-bottom:3px}.modal .header .back{margin:10px;margin-top:15px;margin-right:3px;width:36px;height:36px;border-radius:18px;padding:6px;padding-left:5px;cursor:pointer}.modal .header .back i.ico{color:#424242}.modal .header .back:hover{background:#FAFAFA}.modal .header .back.ripple.ripple-active{background:#f5f5f5}.modal .header .info{display:flex;flex-direction:column;margin-top:15px}.modal .header .info p{display:flex;align-items:center;font-weight:500;color:#616161;user-select:none;pointer-events:none}.modal .header .info span{display:block;margin-top:3px;font-size:12px;color:#9E9E9E;user-select:none;pointer-events:none}.modal ul.item-list .separator{margin:6px 0;width:100%;height:1px;background:#F1F1F1}.modal ul.item-list li.caption{padding:2px 15px;padding-top:12px;list-style:none}.modal ul.item-list li.caption p{color:#9E9E9E;user-select:none;pointer-events:none}.modal ul.item-list li.item{display:flex;align-items:center;padding:15px;cursor:pointer}.modal ul.item-list li.item.empty p{display:block;width:100%;color:#9E9E9E;text-align:center;user-select:none;pointer-events:none}.modal ul.item-list li.item:not(.active):not(.inactive):hover{background:#FAFAFA}.modal ul.item-list li.item:not(.active):not(.inactive).ripple.ripple-active{background:#f5f5f5}.modal ul.item-list li.item i.ico{color:#424242;user-select:none;pointer-events:none}.modal ul.item-list li.item i.lang{display:flex;justify-content:center;align-items:center;font-style:normal;font-weight:600;width:24px;height:24px;color:#424242;user-select:none;pointer-events:none}.modal ul.item-list li.item .info{display:flex;flex-direction:column;margin-left:10px;max-width:calc(100% - 24px - 10px)}.modal ul.item-list li.item .info p{display:flex;align-items:center;font-weight:500;color:#616161;user-select:none;pointer-events:none}.modal ul.item-list li.item .info span{display:block;margin-top:3px;font-size:12px;color:#9E9E9E;user-select:none;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.modal ul.item-list li.item.active{background:#EEE}.modal ul.item-list li.item.active.ripple.ripple-active{background:#e9e9e9}.modal ul.item-list li.item.inactive i.ico{color:#9E9E9E}.modal ul.item-list li.item.inactive .info p{color:#9E9E9E}.tooltip{position:relative;display:flex;justify-content:center;align-items:center}.tooltip:hover::before{opacity:.95;transition-delay:.6s}.tooltip:hover::after{opacity:.95;transition-delay:.6s}.tooltip::after{display:flex;opacity:0;content:attr(data-title);justify-content:center;align-items:center;position:absolute;background:#24292E;color:#fff;min-height:24px;padding:0 12px;border-radius:999px;font-size:12px;top:auto;bottom:-70%;white-space:nowrap;z-index:9999;pointer-events:none}.tooltip.up::before{top:calc(-90% + 26px);bottom:auto;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #24292E;border-bottom:none}.tooltip.up::after{top:-60%;bottom:auto}.tooltip.down::before{top:auto;bottom:calc(-90% + 26px);border-left:6px solid transparent;border-right:6px solid transparent;border-top:none;border-bottom:6px solid #24292E}.tooltip.down::after{top:auto;bottom:-60%}1
\ No newline at end of file1
*{margin:0;padding:0;font-family:Roboto,sans-serif;box-sizing:border-box}:focus,:hover{outline:0}html{position:relative;overflow-x:hidden;min-height:100vh}body{width:100%;font-size:14px;min-height:100vh}img{pointer-events:none;user-select:none}input{-webkit-appearance:none}button{user-select:none;cursor:pointer}.hidden{display:none!important}.ico{font-family:'Material Icons';font-weight:400;font-style:normal;font-size:24px;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:'liga';user-select:none;pointer-events:none}*{-webkit-tap-highlight-color:transparent}body,html{overflow:hidden}.wrapper{position:fixed;top:0;left:0;right:0;bottom:0;background:#fff;z-index:999}.header-list{width:100%;height:60px;background:#fff;border-bottom:1px solid #F1F1F1;display:flex;justify-content:space-between;padding:8px 14px;pointer-events:all}.header-list .action ul,.header-list .option ul,.header-list .tool ul{list-style-type:none;display:flex;gap:10px}.header-list .action ul li,.header-list .option ul li,.header-list .tool ul li{width:44px;height:44px;padding:10px;border-radius:22px;cursor:pointer;pointer-events:all}.header-list .action ul li:not(.inactive):not(.active):hover,.header-list .option ul li:not(.inactive):not(.active):hover,.header-list .tool ul li:not(.inactive):not(.active):hover{background:rgba(250,250,250,.95)}.header-list .action ul li:not(.inactive):not(.active):hover.ripple.ripple-active,.header-list .option ul li:not(.inactive):not(.active):hover.ripple.ripple-active,.header-list .tool ul li:not(.inactive):not(.active):hover.ripple.ripple-active{background:rgba(245,245,245,.95)}.header-list .action ul li.active,.header-list .option ul li.active,.header-list .tool ul li.active{background:rgba(238,238,238,.95)}.header-list .action ul li.active.ripple.ripple-active,.header-list .option ul li.active.ripple.ripple-active,.header-list .tool ul li.active.ripple.ripple-active{background:rgba(233,233,233,.95)}.header-list .action ul li.inactive i.ico,.header-list .option ul li.inactive i.ico,.header-list .tool ul li.inactive i.ico{color:#E0E0E0}.header-list .action ul li i.ico,.header-list .option ul li i.ico,.header-list .tool ul li i.ico{color:#555}.header-list .action ul li.upgrade i.ico,.header-list .option ul li.upgrade i.ico,.header-list .tool ul li.upgrade i.ico{transform:rotate(-90deg)}#canvas,#overlay,.controls{position:fixed;top:0;left:0;right:0;bottom:0}#overlay{pointer-events:none}.badge{display:inline-block;margin-top:-1px;margin-left:5px;padding:2px 4px;border-radius:2px;font-weight:500;font-size:12px;color:#fff!important}.badge.prime{background:#0372EF}.badge.beta{background:#388E3C}.button{display:block;height:44px;padding:0 22px;border:none;border-radius:4px;background:#F5F5F5;color:#24292E;font-size:16px}.button:hover.ripple-active{background:#f0f0f0}.button.outline{border:1px solid #F1F1F1;background:0 0}.button.outline:hover.ripple-active{background:#fafafa}.button.prime{background:#0372EF;color:#fff}.button.prime:hover.ripple-active{background:#036de5}.button.danger{background:#E53935;color:#fff}.button.danger:hover.ripple-active{background:#e4302c}.controls{pointer-events:none}.controls .notification{top:30px;position:fixed;display:flex;justify-content:center;width:100%;opacity:0}.controls .notification p{display:inline-block;padding:10px 24px;border-radius:999px;background:#24292E;color:#fff;opacity:.95;user-select:none;pointer-events:none}.controls .hotbar{display:flex;position:fixed;left:calc(50% - 216px);bottom:30px;z-index:-1}.controls .hotbar.inactive .color{pointer-events:none!important}.controls .hotbar .color{margin:6px;width:60px;height:60px;border-radius:30px;background:#EEE;cursor:pointer;transition:transform .2s;transform:scale(.9);pointer-events:all}.controls .hotbar .color:not(.active):hover{transform:scale(1)}.controls .hotbar .color.focus{transform:scale(1)}.controls .hotbar .color.active{transform:scale(1.1)}.controls .pencil-modal{top:75px;left:120px}.controls .scale-modal{top:40px;left:calc(50% - 200px);width:400px;height:60px}.controls .scale-modal input[type=range]{-webkit-appearance:none;width:calc(400px - 54px);margin-top:21px;margin-left:27px;height:6px;background:#EEE;border:none;border-radius:4px}.controls .scale-modal input[type=range]::-webkit-slider-runnable-track{-webkit-appearance:none}.controls .scale-modal input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;height:20px;width:20px;margin-top:0;background:#9E9E9E;border-radius:10px;cursor:pointer}.controls .scale-modal input[type=range]::-webkit-slider-thumb:hover{background:#757575}.controls .clear-modal{top:calc(50% - 75.5px);left:calc(50% - 200px);width:400px;padding:25px;display:flex;flex-direction:column}.controls .clear-modal .info{width:100%;font-size:20px;text-align:center;margin-bottom:25px;color:#24292E;user-select:none}.controls .clear-modal .align{display:flex;gap:25px}.controls .clear-modal .align .btn-cancel{width:185px;height:50px;border:none;border-radius:3px;font-size:17px}.controls .clear-modal .align .btn-apply{width:185px;height:50px;border:none;border-radius:3px;border-color:grey;font-size:17px}.controls .capture-modal{top:calc(50% - 213px);left:calc(50% - 200px);width:400px;display:flex;flex-direction:column;padding:25px}.controls .capture-modal .info{font-size:20px;width:100%;text-align:center;margin-bottom:25px;color:#24292E;user-select:none}.controls .capture-modal .preview{height:250px;background:#F5F5F5;border:1px solid #f1f1f1;border-radius:3px;margin-bottom:25px}.controls .capture-modal .align{display:flex;gap:25px}.controls .capture-modal .align .btn-cancel{width:185px;height:50px;border:none;border-radius:3px;font-size:17px}.controls .capture-modal .align .btn-apply{width:185px;height:50px;border:none;border-radius:3px;border-color:grey;font-size:17px}.controls .toolbar{top:20px;left:20px}.controls .actionbar{top:20px;right:20px}.controls .actionbar,.controls .toolbar{display:flex;position:fixed}.controls .actionbar.inactive .action,.controls .actionbar.inactive .tool,.controls .toolbar.inactive .action,.controls .toolbar.inactive .tool{pointer-events:none!important}.controls .actionbar .action,.controls .actionbar .tool,.controls .toolbar .action,.controls .toolbar .tool{width:44px;height:44px;padding:10px;margin-left:8px;border-radius:22px;cursor:pointer;pointer-events:all}.controls .actionbar .action:hover,.controls .actionbar .tool:hover,.controls .toolbar .action:hover,.controls .toolbar .tool:hover{background:rgba(250,250,250,.95)}.controls .actionbar .action:hover.ripple:not(.active).ripple-active,.controls .actionbar .tool:hover.ripple:not(.active).ripple-active,.controls .toolbar .action:hover.ripple:not(.active).ripple-active,.controls .toolbar .tool:hover.ripple:not(.active).ripple-active{background:rgba(245,245,245,.95)}.controls .actionbar .action:hover.ripple.active.ripple-active,.controls .actionbar .tool:hover.ripple.active.ripple-active,.controls .toolbar .action:hover.ripple.active.ripple-active,.controls .toolbar .tool:hover.ripple.active.ripple-active{background:rgba(233,233,233,.95)}.controls .actionbar .action.active,.controls .actionbar .tool.active,.controls .toolbar .action.active,.controls .toolbar .tool.active{background:rgba(238,238,238,.95)}.controls .actionbar .action i.ico,.controls .actionbar .tool i.ico,.controls .toolbar .action i.ico,.controls .toolbar .tool i.ico{color:#424242}.colors-modal{flex-wrap:wrap;min-width:410px;width:410px;max-width:410px;padding:30px!important;top:calc(50% - 421px);left:calc(50% - 205px);display:flex;gap:12px}.colors-modal .color{width:60px;height:60px;border-radius:30px;background:#EEE;cursor:pointer;transition:transform .2s;transform:scale(.9)}.colors-modal .color:not(.active):hover{transform:scale(1)}.colors-modal .color.active{transform:scale(1.1)}.colors-modal .color.focus{transform:scale(1)}.multiplayer-modal{top:75px;right:120px}.account-modal{top:75px;right:70px}.settings-modal{top:75px;right:20px}.modal{width:250px;position:fixed;background:#fff;border:1px solid #F1F1F1;border-radius:4px;padding:6px 0;pointer-events:all;overflow:hidden;z-index:-1;display:flex}.modal .main{width:248px;min-width:248px;7max-width:248px}.modal ul.tab-list{width:248px;min-width:248px;max-width:248px}.modal .header{display:flex;margin-bottom:3px}.modal .header .back{margin:10px;margin-top:15px;margin-right:3px;width:36px;height:36px;border-radius:18px;padding:6px;padding-left:5px;cursor:pointer}.modal .header .back i.ico{color:#424242}.modal .header .back:hover{background:#FAFAFA}.modal .header .back.ripple.ripple-active{background:#f5f5f5}.modal .header .info{display:flex;flex-direction:column;margin-top:15px}.modal .header .info p{display:flex;align-items:center;font-weight:500;color:#555;user-select:none;pointer-events:none}.modal .header .info span{display:block;margin-top:3px;font-size:12px;color:#9E9E9E;user-select:none;pointer-events:none}.modal ul.item-list .separator{margin:6px 0;width:100%;height:1px;background:#F1F1F1}.modal ul.item-list li.caption{padding:2px 15px;padding-top:12px;list-style:none}.modal ul.item-list li.caption p{color:#9E9E9E;user-select:none;pointer-events:none}.modal ul.item-list li.item{display:flex;align-items:center;padding:15px;cursor:pointer}.modal ul.item-list li.item.empty p{display:block;width:100%;color:#9E9E9E;text-align:center;user-select:none;pointer-events:none}.modal ul.item-list li.item:not(.active):not(.inactive):hover{background:#FAFAFA}.modal ul.item-list li.item:not(.active):not(.inactive).ripple.ripple-active{background:#f5f5f5}.modal ul.item-list li.item i.ico{color:#424242;user-select:none;pointer-events:none}.modal ul.item-list li.item i.lang{display:flex;justify-content:center;align-items:center;font-style:normal;font-weight:600;width:24px;height:24px;color:#424242;user-select:none;pointer-events:none}.modal ul.item-list li.item .info{display:flex;flex-direction:column;margin-left:10px;max-width:calc(100% - 24px - 10px)}.modal ul.item-list li.item .info p{display:flex;align-items:center;font-weight:500;color:#555;user-select:none;pointer-events:none}.modal ul.item-list li.item .info span{display:block;margin-top:3px;font-size:12px;color:#9E9E9E;user-select:none;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.modal ul.item-list li.item.active{background:#EEE}.modal ul.item-list li.item.active.ripple.ripple-active{background:#e9e9e9}.modal ul.item-list li.item.inactive i.ico{color:#9E9E9E}.modal ul.item-list li.item.inactive .info p{color:#9E9E9E}.tooltip{position:relative;display:flex;justify-content:center;align-items:center}.tooltip:hover::before{opacity:.95;transition-delay:.6s}.tooltip:hover::after{opacity:.95;transition-delay:.6s}.tooltip::after{display:flex;opacity:0;content:attr(data-title);justify-content:center;align-items:center;position:absolute;background:#24292E;color:#fff;min-height:24px;padding:0 12px;border-radius:999px;font-size:12px;top:auto;bottom:-64%;white-space:nowrap;z-index:9999;pointer-events:none}1
\ No newline at end of file
5
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no">6
<meta name="author" content="typable">7
<meta name="keywords" content="outline, typable, drawing, multiplayer">8
<meta name="description" content="Draw with your friends together.">8
<meta name="description" content="Draw with friends together.">9
<meta name="robots" content="noindex, nofollow">10
<meta name="google" content="notranslate">11
<title>Outline</title>
23
<div class="notification">24
<p class="content"></p>25
</div>26
<div class="header-list">27
<div class="tool">28
<ul class="tool-list">29
<li class="tool-item ripple tooltip" data-lang="tool.colors" data-type="tooltip" data-title="Colors" data-event="toggle.modal" data-code="colors">30
<i class="ico">palette</i>31
</li>32
<li class="tool-item ripple tooltip" data-lang="tool.scale" data-type="tooltip" data-title="Scale" data-event="toggle.modal" data-code="scale">33
<i class="ico">bubble_chart</i>34
</li>35
<li class="tool-item ripple tooltip" data-lang="tool.pencil" data-type="tooltip" data-title="Pencil" data-event="toggle.modal" data-code="pencil">36
<i class="ico">edit</i>37
</li>38
<ul>39
</div>40
<div class="action">41
<ul class="action-list">42
<li class="action-item ripple tooltip inactive" data-lang="tool.undo" data-type="tooltip" data-title="Undo">43
<i class="ico">undo</i>44
</li>45
<li class="tool-item ripple tooltip inactive" data-lang="tool.redo" data-type="tooltip" data-title="Redo">46
<i class="ico">redo</i>47
</li>48
<li class="tool-item ripple tooltip" data-lang="tool.clear" data-type="tooltip" data-title="Clear" data-event="toggle.modal" data-code="clear">49
<i class="ico">clear</i>50
</li>51
<ul>52
</div>53
<div class="option">54
<ul class="option-list">55
<li class="option-item upgrade ripple tooltip" data-lang="action.multiplayer" data-type="tooltip" data-title="Upgrade">56
<i class="ico">forward</i>57
</li>58
<li class="tool-item ripple tooltip" data-lang="action.account" data-type="tooltip" data-title="Account" data-event="toggle.modal" data-code="account">59
<i class="ico">person</i>60
</li>61
<li class="tool-item ripple tooltip" data-lang="action.settings" data-type="tooltip" data-title="More" data-event="toggle.modal" data-code="settings">62
<i class="ico">more_vert</i>63
</li>64
<ul>65
</div>66
</div>67
<!--68
<div class="toolbar">69
<div class="tool ripple tooltip" data-lang="tool.colors" data-type="tooltip" data-title="Colors" data-event="toggle.modal" data-code="colors">70
<i class="ico">palette</i>
99
<i class="ico">settings</i>100
</div>101
</div>102
-->103
<div class="hotbar">104
<div class="color"></div>105
<div class="color"></div>
168
<div class="modal pencil-modal hidden">169
<div class="main">170
<ul class="item-list">128
<li class="item ripple active" data-event="change.pencil" data-code="mouse">171
<li class="item ripple active" data-event="change.pencil" data-code="pen">172
<i class="ico">edit</i>173
<div class="info">174
<p data-lang="pencil.pen">Pen</p>175
<span data-lang="pencil.pen.info">Default pen</span>176
</div>177
</li>135
<li class="item ripple" data-event="change.pencil" data-code="touch">178
<li class="item ripple" data-event="change.pencil" data-code="marker">179
<i class="ico">180
<svg style="width: 24px; height: 24px;" viewBox="0 0 24 24">138
<path fill="#424242" d="M18.62,1.5C18.11,1.5 17.6,1.69 17.21,2.09L10.75,8.55L14.95,12.74L21.41,6.29C22.2,5.5 22.2,4.24 21.41,3.46L20.04,2.09C19.65,1.69 19.14,1.5 18.62,1.5M9.8,9.5L3.23,16.07L3.93,16.77C3.4,17.24 2.89,17.78 2.38,18.29C1.6,19.08 1.6,20.34 2.38,21.12C3.16,21.9 4.42,21.9 5.21,21.12C5.72,20.63 6.25,20.08 6.73,19.58L7.43,20.27L14,13.7" />181
<path fill="#555555" d="M18.62,1.5C18.11,1.5 17.6,1.69 17.21,2.09L10.75,8.55L14.95,12.74L21.41,6.29C22.2,5.5 22.2,4.24 21.41,3.46L20.04,2.09C19.65,1.69 19.14,1.5 18.62,1.5M9.8,9.5L3.23,16.07L3.93,16.77C3.4,17.24 2.89,17.78 2.38,18.29C1.6,19.08 1.6,20.34 2.38,21.12C3.16,21.9 4.42,21.9 5.21,21.12C5.72,20.63 6.25,20.08 6.73,19.58L7.43,20.27L14,13.7" />182
</svg>183
</i>184
<div class="info">185
<p data-lang="pencil.marker">Marker</p>186
</div>187
</li>145
<li class="item ripple" data-event="change.pencil" data-code="pen">188
<li class="item ripple" data-event="change.pencil" data-code="eraser">189
<i class="ico">190
<svg style="width: 24px; height: 24px;" viewBox="0 0 24 24">148
<path fill="#424242" d="M15.14,3C14.63,3 14.12,3.2 13.73,3.59L2.59,14.73C1.81,15.5 1.81,16.77 2.59,17.56L5.03,20H12.69L21.41,11.27C22.2,10.5 22.2,9.23 21.41,8.44L16.56,3.59C16.17,3.2 15.65,3 15.14,3M17,18L15,20H22V18" />191
<path fill="#555555" d="M15.14,3C14.63,3 14.12,3.2 13.73,3.59L2.59,14.73C1.81,15.5 1.81,16.77 2.59,17.56L5.03,20H12.69L21.41,11.27C22.2,10.5 22.2,9.23 21.41,8.44L16.56,3.59C16.17,3.2 15.65,3 15.14,3M17,18L15,20H22V18" />192
</svg>193
</i>194
<div class="info">
117
}119
function draw_curve(state) {120
g.lineJoin = 'round';120
if(state.pencil === 'pen') {121
g.strokeStyle = COLORS[state.color];122
}123
if(state.pencil === 'marker') {124
g.strokeStyle = COLORS[state.color] + '88';125
}126
if(state.pencil === 'eraser') {127
g.strokeStyle = 'white';128
}129
g.lineCap = 'round';130
g.lineJoin = 'round';131
g.lineWidth = 2 * state.radius;123
g.strokeStyle = COLORS[state.color] + '';132
if(point_list.length < 3) {125
g.fillStyle = COLORS[state.color] + '';133
g.fillStyle = COLORS[state.color];134
g.beginPath();135
g.arc(point_list[0].x, point_list[0].y, g.lineWidth / 2, 0, Math.PI * 2, !0);136
g.closePath();
152
function draw_cursor(state) {153
o.clearRect(0, 0, size, size);154
o.lineWidth = 2;155
if(state.point) {147
if(!active) {148
o.fillStyle = COLORS[state.color] + '';149
o.beginPath();150
o.arc(state.point.x, state.point.y, 2 * state.radius / 2, 0, Math.PI * 2, !0);151
o.closePath();152
o.fill();156
if(state.pencil === 'pen') {157
o.fillStyle = COLORS[state.color];158
}159
if(state.pencil === 'marker') {160
o.fillStyle = COLORS[state.color] + '88';161
}162
if(state.pencil === 'eraser') {163
o.fillStyle = '#E28787';164
}165
o.beginPath();166
o.arc(state.point.x, state.point.y, 2 * state.radius / 2, 0, Math.PI * 2, !0);167
o.closePath();168
o.fill();169
o.strokeStyle = 'white';170
o.beginPath();171
o.arc(state.point.x, state.point.y, 2 * state.radius / 2, 0, Math.PI * 2, !0);172
o.closePath();173
o.stroke();174
if(state.pencil === 'eraser') {175
o.strokeStyle = 'white';176
o.beginPath();177
o.moveTo(state.point.x - state.radius * 0.5, state.point.y);178
o.lineTo(state.point.x + state.radius * 0.5, state.point.y);179
o.stroke();180
o.beginPath();181
o.moveTo(state.point.x, state.point.y - state.radius * 0.5);182
o.lineTo(state.point.x, state.point.y + state.radius * 0.5);183
o.stroke();184
}185
}186
}
21
pen: false,22
gamepad: false23
},24
pencil_list: [25
'pen',26
'marker',27
'eraser'28
],29
pencil: 'pen',30
timestamp: null,31
modal: null,32
tab: null,
56
modal_color_list: { query: '.colors-modal .color', all: true },57
language_list: { query: '.settings-modal .language-tab .item[data-event="change.language"]', all: true },58
device_list: { query: '.settings-modal .device-tab .item[data-event="change.device"]', all: true },59
pencil_list: { query: '.pencil-modal .item[data-event="change.pencil"]', all: true },60
modal_event_list: { query: '[data-event*=".modal"]', all: true },61
tab_event_list: { query: '[data-event*=".tab"]', all: true },62
tool_list: { query: '.tool', all: true },
64
notification: '.notification',65
scale_input: 'input.scale[type="range"]',66
clear: 'button.btn-apply[data-event="clear"]',67
pencil_tool: '.tool-item[data-code="pencil"]',68
option_event_fullscreen: '[data-event="toggle.fullscreen"]',69
option_event_view_mode: '[data-event="toggle.view-mode"]'70
});
129
}130
});131
}132
for(let item of node.pencil_list) {133
item.addEventListener('click', function(event) {134
state.pencil = item.dataset.code;135
update_pencil_list();136
});137
}138
for(let item of node.modal_event_list) {139
item.addEventListener('click', function(event) {140
let code = item.dataset.code;
235
}236
}238
function update_pencil_list() {239
for(let item of node.pencil_list) {240
let code = item.dataset.code;241
item.classList[code === state.pencil ? 'add' : 'remove']('active');242
if(code === state.pencil) {243
node.pencil_tool.querySelector('i.ico').innerHTML = item.querySelector('i.ico').innerHTML;244
}245
}246
}248
function update_hotbar() {249
canvas.on_release(event);250
for(let item of node.hotbar_list) {
268
for(let item of node.modal_list) {269
item.classList.add('hidden');270
}247
for(let item of node.tool_list) {248
item.classList.remove('active');249
}250
for(let item of node.action_list) {271
for(let item of node.modal_event_list) {272
item.classList.remove('active');273
}274
state.tab = null;
487
}488
}489
if(!event.ctrlKey && !event.shiftKey && !event.altKey) {469
if(!state.option.view_mode && !lock) {470
if(event.code.startsWith('Digit')) {471
let i = parseInt(event.code.substr(5)) - 1;472
if(state.index !== i) {473
if(i >= 0 && i < state.color_list.length) {474
state.color = state.color_list[i];475
state.index = i;476
canvas.draw_cursor(state);477
update_hotbar();490
if(!state.option.view_mode) {491
if(!lock) {492
if(event.code.startsWith('Digit')) {493
let i = parseInt(event.code.substr(5)) - 1;494
if(state.index !== i) {495
if(i >= 0 && i < state.color_list.length) {496
state.color = state.color_list[i];497
state.index = i;498
canvas.draw_cursor(state);499
update_hotbar();500
}501
}502
}503
}481
}482
if(event.code === 'KeyC') {483
state.modal = state.modal !== 'colors' ? 'colors' : null;484
update_modal_list();485
}486
if(event.code === 'KeyS') {487
state.modal = state.modal !== 'scale' ? 'scale' : null;488
update_modal_list();489
}490
if(event.code === 'KeyE') {491
state.modal = state.modal !== 'pencil' ? 'pencil' : null;492
update_modal_list();493
}494
if(event.code === 'KeyD') {495
state.modal = state.modal !== 'clear' ? 'clear' : null;496
update_modal_list();497
}498
if(event.code === 'KeyQ') {499
state.modal = state.modal !== 'capture' ? 'capture' : null;500
update_modal_list();504
if(event.code === 'KeyC') {505
state.modal = state.modal !== 'colors' ? 'colors' : null;506
update_modal_list();507
}508
if(event.code === 'KeyS') {509
state.modal = state.modal !== 'scale' ? 'scale' : null;510
update_modal_list();511
}512
if(event.code === 'KeyE') {513
state.modal = state.modal !== 'pencil' ? 'pencil' : null;514
update_modal_list();515
}516
if(event.code === 'KeyD') {517
state.modal = state.modal !== 'clear' ? 'clear' : null;518
update_modal_list();519
}520
if(event.code === 'KeyQ') {521
state.modal = state.modal !== 'capture' ? 'capture' : null;522
update_modal_list();523
}524
}525
if(event.code === 'KeyV') {526
state.option.view_mode = !state.option.view_mode;
529
}530
// alt531
if(event.altKey && !event.ctrlKey && !event.shiftKey) {509
if(event.code === 'KeyM') {510
state.modal = state.modal !== 'multiplayer' ? 'multiplayer' : null;511
update_modal_list();512
}513
if(event.code === 'KeyP') {514
state.modal = state.modal !== 'account' ? 'account' : null;515
update_modal_list();516
}517
if(event.code === 'KeyS') {518
state.modal = state.modal !== 'settings' ? 'settings' : null;519
update_modal_list();520
}521
if(event.code === 'KeyH') {522
if(state.tab !== 'help') {523
state.modal = 'settings';524
update_modal_list();525
state.tab = 'help';526
update_tab_list();532
if(!state.option.view_mode) {533
if(!lock) {534
if(event.code.startsWith('Digit')) {535
let i = parseInt(event.code.substr(5)) - 1;536
if(i >= 0 && i < state.pencil_list.length) {537
state.pencil = state.pencil_list[i];538
canvas.on_release(event);539
canvas.draw_cursor(state);540
update_pencil_list();541
}542
}543
}528
else {529
state.modal = null;544
if(event.code === 'KeyM') {545
state.modal = state.modal !== 'multiplayer' ? 'multiplayer' : null;546
update_modal_list();547
}532
}533
if(event.code === 'KeyL') {534
if(state.tab !== 'language') {535
state.modal = 'settings';548
if(event.code === 'KeyP') {549
state.modal = state.modal !== 'account' ? 'account' : null;550
update_modal_list();537
state.tab = 'language';538
update_tab_list();551
}540
else {541
state.modal = null;552
if(event.code === 'KeyS') {553
state.modal = state.modal !== 'settings' ? 'settings' : null;554
update_modal_list();555
}544
}545
if(event.code === 'KeyI') {546
if(state.tab !== 'device') {547
state.modal = 'settings';548
update_modal_list();549
state.tab = 'device';550
update_tab_list();556
if(event.code === 'KeyH') {557
if(state.tab !== 'help') {558
state.modal = 'settings';559
update_modal_list();560
state.tab = 'help';561
update_tab_list();562
}563
else {564
state.modal = null;565
update_modal_list();566
}567
}552
else {553
state.modal = null;554
update_modal_list();568
if(event.code === 'KeyL') {569
if(state.tab !== 'language') {570
state.modal = 'settings';571
update_modal_list();572
state.tab = 'language';573
update_tab_list();574
}575
else {576
state.modal = null;577
update_modal_list();578
}579
}556
}557
if(event.code === 'KeyA') {558
if(state.tab !== 'appearance') {559
state.modal = 'settings';560
update_modal_list();561
state.tab = 'appearance';562
update_tab_list();580
if(event.code === 'KeyI') {581
if(state.tab !== 'device') {582
state.modal = 'settings';583
update_modal_list();584
state.tab = 'device';585
update_tab_list();586
}587
else {588
state.modal = null;589
update_modal_list();590
}591
}564
else {565
state.modal = null;566
update_modal_list();592
if(event.code === 'KeyA') {593
if(state.tab !== 'appearance') {594
state.modal = 'settings';595
update_modal_list();596
state.tab = 'appearance';597
update_tab_list();598
}599
else {600
state.modal = null;601
update_modal_list();602
}603
}604
}605
}
17
z-index: 999;18
}20
.header-list {21
width: 100%;22
height: 60px;23
background: white;24
border-bottom: 1px solid @brand-grey-5;25
display: flex;26
justify-content: space-between;27
padding: 8px 14px;28
pointer-events: all;30
.tool,31
.action,32
.option {34
ul {35
list-style-type: none;36
display: flex;37
gap: 10px;39
li {40
width: 44px;41
height: 44px;42
padding: 10px;43
border-radius: 22px;44
cursor: pointer;45
pointer-events: all;47
&:not(.inactive):not(.active):hover {48
background: rgba(@brand-grey-7, 0.95);50
&.ripple {52
&.ripple-active {53
background: lighten(rgba(@brand-grey-7, 0.95), -2%);54
}55
}56
}58
&.active {59
background: rgba(#EEEEEE, 0.95);61
&.ripple {63
&.ripple-active {64
background: lighten(rgba(#EEEEEE, 0.95), -2%);65
}66
}67
}69
&.inactive {71
i.ico {72
color: @brand-grey-4;73
}74
}76
i.ico {77
color: @brand-grey-1;78
}80
&.upgrade {82
i.ico {83
transform: rotate(-90deg);84
}85
}86
}87
}88
}89
}91
#canvas,92
#overlay,93
.controls {
240
.pencil-modal {241
top: 75px;171
left: 130px;242
left: 120px;243
}245
.scale-modal {
4
@brand-black: #24292E;6
@brand-grey-0: #424242;7
@brand-grey-1: #616161;7
@brand-grey-1: #555555;8
@brand-grey-2: #757575;9
@brand-grey-3: #9E9E9E;10
@brand-grey-4: #E0E0E0;
31
border-radius: 999px;32
font-size: 12px;33
top: auto;34
bottom: -70%;34
bottom: -64%;35
white-space: nowrap;36
z-index: 9999;37
pointer-events: none;38
}40
&.up {42
&::before {43
top: ~'calc(-90% + 26px)';44
bottom: auto;45
border-left: 6px solid transparent;46
border-right: 6px solid transparent;47
border-top: 6px solid @brand-black;48
border-bottom: none;49
}51
&::after {52
top: -60%;53
bottom: auto;54
}55
}57
&.down {59
&::before {60
top: auto;61
bottom: ~'calc(-90% + 26px)';62
border-left: 6px solid transparent;63
border-right: 6px solid transparent;64
border-top: none;65
border-bottom: 6px solid @brand-black;66
}68
&::after {69
top: auto;70
bottom: -60%;71
}72
}39
}