Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- // Let's convert the SVG requests into Base64 so we can load them as text with the inital request, greatly reducing the request number
- function SVGtoBase64($url) {
- return 'data:image/svg+xml;base64,'.base64_encode(file_get_contents(__DIR__.$url));
- }
- // Check if already loaded once
- if(isset($_SESSION["loaded"])){
- $loaded = true;
- }else{
- $loaded = false;
- $_SESSION["loaded"] = true;
- }
- // Calcualte the right settings
- if(isset($_GET['shape'])){
- $shape = $_GET['shape'];
- }else{
- $shape = 'rec';
- }
- if(isset($_GET['edge'])){
- $edge = $_GET['edge'];
- }else{
- $edge = '10';
- }
- if(isset($_GET['horizontal'])){
- $horizontal = $_GET['horizontal'];
- }else{
- $horizontal = 10;
- }
- if(isset($_GET['vertical'])){
- $vertical = $_GET['vertical'];
- }else{
- $vertical = 4;
- }
- if(isset($_GET['pitch'])){
- $jigumi = $_GET['pitch'];
- }else{
- $jigumi = 50;
- }
- if(isset($_GET['mitsuke'])){
- $mitsuke = $_GET['mitsuke'];
- }else{
- $mitsuke = 3;
- }
- // Colors
- if(isset($_GET['framecolor'])){
- $framecolor = $_GET['framecolor'];
- }else{
- $framecolor = '543e30';
- }
- if(isset($_GET['jigumicolor'])){
- $jigumicolor = $_GET['jigumicolor'];
- }else{
- $jigumicolor = 'f3e4bd';
- }
- if(isset($_GET['rotation'])){
- $panelrotation = $_GET['rotation'];
- }else{
- $panelrotation = 90;
- }
- // Include tsukeko, if defined
- if(isset($_GET['tsukeko'])){
- $tsukeko = $_GET['tsukeko'];
- }else{
- $tsukeko = 3; // $mitsuke;
- }
- if($shape == 'tri'){
- $horizontal = $horizontal + 2;
- }else if($shape == 'kite' || $shape == 'hex' || $shape == 'rec' || $shape == 'coaster'){
- $horizontal = $horizontal + 1;
- }
- $pxwidth = 100;
- $pxheight = ceil($pxwidth*sqrt(3)/2);
- $pxscale = $pxwidth/$jigumi;
- $pxmitsuke = ceil($pxscale*$mitsuke);
- $pxmitsukeh = ceil($pxscale*$mitsuke*sqrt(3)/2);
- $pxtsukeko = ceil($pxscale*$tsukeko);
- $pxtsukekoh = ceil($pxscale*$tsukeko*sqrt(3)/2);
- // Adjust edge dimension to scale
- $pxedge = ceil($pxscale*$edge);
- // Width and height of panel (including invisible triangles!)
- // Accuracy is not very important, it mainly creates the dimensions at high zoom levels
- $panelheight = ceil($pxheight*$vertical + 2*$pxedge +2*$pxtsukeko);
- $panelwidth = ceil($pxwidth*$horizontal + 4*$pxedge + 4*$pxtsukeko);
- ?>
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta property="og:url" content="https://www.kumikodesigner.com" />
- <meta property="og:title" content="Interactive kumiko designer" />
- <meta property="og:description" content="A little digital help in creating traditional Japanese kumiko art" />
- <meta property="og:image" content="https://www.kumikodesigner.com/images/banner.jpg" />
- <script src="jquery-3.7.1.min.js"></script>
- <script src="jquery.mousewheel.js"></script>
- <script language="javascript" src="lz-string.js"></script>
- <script src="vanilla-picker-master/dist/vanilla-picker.js?123456"></script>
- <script type="text/javascript" src="functions.js?v=<?php include('version.php'); echo $version; ?>"></script>
- <script type="text/javascript">
- var panel_height = <?= $panelheight; ?>;
- var panel_width = <?= $panelwidth; ?>;
- var px_height = <?= $pxheight; ?>;
- var px_width = <?= $pxwidth; ?>;
- var jigumipitch = <?= $jigumi; ?>;
- var jigumimitsuke = <?= $mitsuke; ?>;
- var loadrotation = <?= $panelrotation; ?>;
- var panel_vert = false;
- var panel_flip = 1; // 1 for normal -1 for mirror
- var panel_scale = 1.0;
- var panel_edge = <?= $edge; ?>;
- var autoselect_EN = true;
- var infoscreen = false;
- var printscreen = false;
- var dimsscreen = false;
- var urlscreen = false;
- var bgcolor = <?= '\''.$jigumicolor.'\''; ?>;
- <?php
- if(isset($_SESSION['designname'])){
- echo "var designname = '".$_SESSION['designname']."';\n";
- echo "\t\twindow.localStorage.setItem('designname','".$_SESSION['designname']."');\n"; // Also store the name in localStorage
- }else{
- echo "var designname = null;\n";
- }?>
- var username = <?php
- if(isset($_SESSION['username'])){
- echo "'".$_SESSION['username']."'";
- }else{
- echo 'null';
- }
- ?>;
- // Create timer to save changes
- var saveTimer = null; //in ms
- function unfade(element) {
- var op = 0.1; // initial opacity
- element.style.display = 'block';
- var timer = setInterval(function () {
- if (op >= 1){
- clearInterval(timer);
- }
- element.style.opacity = op;
- element.style.filter = 'alpha(opacity=' + op * 100 + ")";
- op += op * 0.05;
- }, 25);
- }
- <?php if(!$loaded){
- echo "$(window).on('load',function() {unfade($('#content')[0]); $('#loading').css('display','none'); });";
- }
- ?>
- </script>
- <meta charset="utf-8">
- <title>Kumiko designer</title>
- <link rel="stylesheet" href="style/userbar.css?v=<?php include('version.php'); echo $version; ?>">
- <link rel="stylesheet" href="style/panel.css?v=<?php include('version.php'); echo $version; ?>">
- <style type="text/css">
- #content{
- <?php if(!$loaded){ echo 'opacity: 0;';} ?>
- }
- #panel {
- margin: auto;
- width: <?= $panelwidth; ?>px;
- height: <?= $panelheight; ?>px;
- display: flex;
- justify-content: center;
- align-items: center;
- min-height: 100%;
- }
- .center {
- transform-origin: 50% 50%;
- transform: scale(1,1);
- width: <?= $panelwidth; ?>px;
- float:left;
- opacity: 0; /* was 0 TODO */
- }
- #up {
- width: 0;
- height: 0;
- border-left: <?= $pxwidth/2; ?>px solid transparent;
- border-right: <?= $pxwidth/2; ?>px solid transparent;
- border-bottom: <?= $pxheight; ?>px solid transparent;
- float:left;
- margin-left: -<?= $pxwidth/2; ?>px;
- transform: translateZ(0);
- }
- #down {
- width: 0;
- height: 0;
- border-left: <?= $pxwidth/2; ?>px solid transparent;
- border-right: <?= $pxwidth/2; ?>px solid transparent;
- border-top: <?= $pxheight; ?>px solid transparent;
- float:left;
- margin-left: -<?= $pxwidth/2; ?>px;
- margin-bottom: -<?= $pxmitsuke; ?>px;
- transform: translateZ(0);
- }
- #outline{
- width:<?= round($pxwidth*($horizontal-1)); ?>px;
- padding-right: <?= ($pxwidth/2 + $pxedge*2 + $pxtsukeko*2); ?>px;
- padding-left: <?= ($pxwidth/2 + $pxedge*2 + $pxtsukeko*2); ?>px;
- }
- #clip{
- margin-right:-<?= ($pxwidth); ?>px;
- margin-left:-<?= ($pxwidth/2); ?>px;
- float:left;
- }
- #triangle {
- float:left;
- width: <?= $pxwidth; ?>px;
- height: <?= $pxheight; ?>px;
- margin-top:-<?= $pxheight; ?>px;
- margin-left:-<?= $pxwidth/2; ?>px;
- background-image:url('kumiko.php?jigumi=<?= $jigumi; ?>&scale=4&flip=0&mitsuke=2&rot=0&shape=asanoha&bg2color=333333&color=<?= $jigumicolor; ?>&bgcolor=<?= $jigumicolor; ?>&grid=<?= $mitsuke; ?>');
- background-size: <?= $pxwidth; ?>px;
- background-repeat:no-repeat;
- }
- #triangleu {
- float:left;
- width: <?= $pxwidth; ?>px;
- height: <?= $pxheight; ?>px;
- margin-top:0px;
- margin-left:-<?= $pxwidth/2; ?>px;
- background-image: url('kumiko.php?jigumi=<?= $jigumi; ?>&scale=4&flip=1&mitsuke=2&rot=0&shape=asanoha&bg2color=333333&color=<?= $jigumicolor; ?>&bgcolor=<?= $jigumicolor; ?>&grid=<?= $mitsuke; ?>');
- background-size: <?= $pxwidth; ?>px;
- background-repeat:no-repeat;
- }
- #up.first{
- margin-right:<?= ($pxwidth/2); ?>px;
- }
- #down.first{
- margin-left:-<?= $pxwidth; ?>px;
- }
- </style>
- </head>
- <body ondragstart="return false;" onmousedown="return false;" onload="load();">
- <div id="loading" style="position: absolute; z-index:20; background: #000; top: 50%; left: 50%; width:200px; height: 120px; margin-left:-100px; margin-top: -100px;" align="center">
- <div class="lds-default">
- <div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
- </div><p style="margin-top:10px; color: #f3e4bd;">Loading design</p></div>
- <div id="edtpattern">
- <h2 style="margin-left: 30px; margin-top:30px; color: #ccc;">Edit individual pattern piece</h2>
- <p style="margin-left:30px; color: #ccc; ">Left click to change color, right click to remove pieces.</p>
- <div id="patterne" style="float:left; margin-left:65px; margin-top: 20px;">
- </div>
- <p style="float:left; margin-left: 70px; margin-top:38px; color: #ccc;">Second color</p>
- <div style="float:left; position:absolute; right: 65px; top: 180px; z-index:9;">
- <div id="color"></div>
- <div id="colorpicker"><?php include('colors.php'); ?></div>
- </div>
- <div id="cancel" style="left: 95px;">Cancel</div>
- <div id="insert" style="right: 95px;">Insert</div>
- </div>
- <div id="content">
- <div id="hotkeys">
- <p>Hotkeys (h = hide)</p>
- <table>
- <tr><td>a </td><td>= select all</td></tr>
- <tr><td>c </td><td>= clear selection</td></tr>
- <tr><td>f </td><td>= full screen</td></tr>
- <tr><td>r </td><td>= rotate pattern piece</td></tr>
- <tr><td>s </td><td>= auto-deslect on/off</td></tr>
- <tr><td>i </td><td>= info</td></tr>
- <tr><td>+ </td><td>= zoom in</td></tr>
- <tr><td>- </td><td>= zoom out</td></tr>
- <tr><td>e </td><td>= zoom to extents</td></tr>
- <!--<tr><td>1-8</td><td>= color pattern piece</td></tr>-->
- </table>
- </div>
- <div id="container">
- <div id="panel">
- <?php
- // Calculate vertical size of edge including tsukeko
- if($shape == 'tri'){
- $vedget = $pxedge*2 + $pxtsukeko*2 - $pxmitsuke;
- $vedgeb = $pxedge + $pxtsukeko - $pxmitsuke/2;
- }else if($shape == 'kite'){
- $vedget = $pxedge*2 + $pxtsukeko*2 - $pxmitsuke;
- $vedgeb = $pxedge*2 + $pxtsukeko*2 - $pxmitsuke;
- }else{
- $vedget = $pxedge + $pxtsukeko - $pxmitsuke/2;
- $vedgeb = $pxedge + $pxtsukeko - $pxmitsuke/2;
- }
- $bordercolor = $framecolor;
- $fillcolor = $jigumicolor;
- $pwidth = ($horizontal)*$pxwidth + $pxedge*4 + $pxtsukeko*4; // Add some margin, this is enough for all types of panels
- echo '<div class="center" style="padding-top: '.$vedget.'px; padding-bottom:'.$vedgeb.'px; background-image: url(\'border.php?shape='.$shape.'&edge='.$edge.'&vertical='.$vertical.'&horizontal='.$horizontal.'&pitch='.$jigumi.'&grid='.$mitsuke.'&framecolor='.$bordercolor.'&bgcolor='.$fillcolor.'&scale=4&tsukeko='.$tsukeko.'\'); background-size: '.$pwidth.'px; background-repeat: no-repeat;">';
- ?>
- <div id="our_table">
- <div id="outline">
- <div id="kumikoborder">
- <div id="clip">
- <?php
- // Style for the selected pattern pieces
- $selectiond = '<img src="images/seld.svg" width="'.$pxwidth.'" height="'.$pxheight.'" class="nh">';
- $selectionu = '<img src="images/selu.svg" width="'.$pxwidth.'" height="'.$pxheight.'" class="nh">';
- $t = 1; // Define whether the first half triangle is pointed up or down
- if(isset($_GET['halfor'])){
- $t = $_GET['halfor'];
- }
- //echo $shape."\n";
- if($shape == 'rec'){
- // Rectangle
- for ($y=1; $y<=$vertical;$y++){
- $x = 0;
- if($y%2 == $t){
- echo '<div id="up" style="clear:both;"><p id="triangleu" style="opacity:0;">'.$selectionu.'</p></div>';
- }else{
- echo '<div id="down" style="clear:both;"><p id="triangle" style="opacity:0;">'.$selectiond.'</p></div>';
- }
- for ($x=1; $x<$horizontal*2;$x++){
- $style = "";
- if(($x+$y)%2==$t){
- echo '<div id="up"><p id="triangleu" style="'.$style.'">'.$selectionu.'</p></div>';
- }else{
- echo '<div id="down"><p id="triangle" style="'.$style.'">'.$selectiond.'</p></div>';
- }
- }
- if($y%2 == 1-$t){
- echo "\n".'<div id="down"><p id="triangle" style="opacity:0;">'.$selectiond.'</p></div>';
- }else{
- echo "\n".'<div id="up"><p id="triangleu" style="opacity:0;">'.$selectionu.'</p></div>';
- }
- }
- }
- if($shape == 'hex' || $shape == 'kite' || $shape == 'coaster'){
- $oddeven = ($vertical/2)%2;
- if($horizontal+1 > $vertical){
- $visible = ($vertical/2)-1;
- }else{
- $visible = 1+$oddeven;
- if($shape == 'kite'){
- $visible = $horizontal-2;
- }
- }
- if($shape == 'hex' && $vertical == $horizontal-1){
- $visible = $vertical/2-1;
- }
- for ($y=1; $y<=$vertical;$y++){
- $x = 0;
- if($y%2 == $oddeven){
- echo '<div id="up" style="clear:both;"><p id="triangleu" style="opacity:0;">'.$selectionu.'</p></div>';
- }else{
- echo '<div id="down" style="clear:both;"><p id="triangle" style="opacity:0;">'.$selectiond.'</p></div>';
- }
- for ($x=1; $x<$horizontal*2;$x++){
- if($x < $vertical-$visible || $x > 2*$horizontal - $vertical+$visible){
- $style = "opacity:0;";
- }else{
- $style = "";
- }
- if(($x+$y)%2==$oddeven){
- if(strlen($style) > 3){
- echo '<div id="up"><p id="triangleu" style="'.$style.'">'.$selectionu.'</p></div>';
- }else{
- echo '<div id="up"><p id="triangleu">'.$selectionu.'</p></div>';
- }
- }else{
- if(strlen($style) > 3){
- echo '<div id="down"><p id="triangle" style="'.$style.'">'.$selectiond.'</p></div>';
- }else{
- echo '<div id="down"><p id="triangle">'.$selectiond.'</p></div>';
- }
- }
- }
- if($y%2 == 1-$oddeven){
- echo "\n".'<div id="down"><p id="triangle" style="opacity:0;">'.$selectiond.'</p></div>';
- }else{
- echo "\n".'<div id="up"><p id="triangleu" style="opacity:0;">'.$selectionu.'</p></div>';
- }
- if($y>$vertical/2){
- $visible = $visible - 1;
- }else if($y<$vertical/2){
- $visible = $visible + 1;
- }
- }
- }
- if($shape == 'tri'){
- $visible = -2;
- for ($y=1; $y<=$vertical;$y++){
- $x = 0;
- if($y%2 != $horizontal%2){
- echo '<div id="up" style="clear:both;"><p id="triangleu" style="opacity:0;">'.$selectionu.'</p></div>';
- }else{
- echo '<div id="down" style="clear:both;"><p id="triangle" style="opacity:0;">'.$selectiond.'</p></div>';
- }
- for ($x=1; $x<$horizontal*2;$x++){
- if($x < $vertical-$visible || $x > 2*$horizontal - $vertical+$visible){
- $style = "opacity:0;";
- }else{
- $style = "";
- }
- if(($x+$y)%2!=$horizontal%2){
- echo '<div id="up"><p id="triangleu" style="'.$style.'">'.$selectionu.'</p></div>';
- }else{
- echo '<div id="down"><p id="triangle" style="'.$style.'">'.$selectiond.'</p></div>';
- }
- }
- if($y%2 == $horizontal%2){
- echo "\n".'<div id="down"><p id="triangle" style="opacity:0;">'.$selectiond.'</p></div>';
- }else{
- echo "\n".'<div id="up"><p id="triangleu" style="opacity:0;">'.$selectionu.'</p></div>';
- }
- $visible = $visible + 1;
- }
- }
- ?>
- </div></div></div></div></div></div></div>
- <div id="tools">
- <div id="collapse"></div>
- <div id="toolpadding">
- <div id="colpick" style="display: none; position: absolute; top:-321px;border:16px solid black; width: 250px; height: 321px;background-color: black;"></div>
- <div id="colors">
- <div style="background:#f3e4bd;" onclick="changecolor('f3e4bd')"></div>
- <div style="background:#dcbc83;" onclick="changecolor('dcbc83')"></div>
- <div style="background:#d1a468;" onclick="changecolor('d1a468')"></div>
- <div style="background:#b57a52;" onclick="changecolor('b57a52')"></div>
- <div style="background:#543e30;" onclick="changecolor('543e30')"></div>
- <div style="background:#9e492c;" onclick="changecolor('9e492c')"></div>
- <div style="background:#985a6e;" onclick="changecolor('985a6e')"></div>
- <div style="background:#856b53;" onclick="changecolor('856b53')"></div>
- <span style="float:left; width: 140px; background-color: #543e30; color:#f3e4bd; font-size: 15px;line-height:30px;text-align: center;border-top:2px solid #f3e4bd;">Infill color</span>
- </div>
- <div id="bgcolors">
- <div style="background:#ffffff;" onclick="changebgcolor('ffffff')"></div>
- <div style="background:#ffffee;" onclick="changebgcolor('ffffee')"></div>
- <div style="background:#fff3df;" onclick="changebgcolor('fff3df')"></div>
- <div style="background:#9c6c48;" onclick="changebgcolor('9c6c48')"></div>
- <div style="background:#707645;" onclick="changebgcolor('707645')"></div>
- <div style="background:#969696;" onclick="changebgcolor('969696')"></div>
- <div style="background:#6f6c65;" onclick="changebgcolor('6f6c65')"></div>
- <div style="background:#333333;" onclick="changebgcolor('333333')"></div>
- <span style="float:left; width: 140px; background-color: #543e30; color:#f3e4bd; font-size: 15px;line-height:30px;text-align: center;border-top:2px solid #f3e4bd;">Background color</span>
- </div>
- <div id="adjustbuttons">
- <img src="images/rotate.png" onclick="rotate_pattern()" title="Rotate infill piece" />
- <img src="images/mirror.png" onclick="mirror_pattern()" title="Mirror infill piece" />
- <img src="images/patternedtn.png" onclick="edtpattern()" title="Edit pattern" />
- <img src="images/lup.png" onclick="increase_mitsuke()" title="Increase mitsuke (0.5 mm)" />
- <img src="images/foreground.png" onclick="changelayer()" title="Foreground / background" />
- <img src="images/flower.png" onclick="" title="not implemented" />
- <img src="images/bulb_on.png" onclick="togglebacklight()" title="Backlit on/off" id="backlit" />
- <img src="images/ldown.png" onclick="decrease_mitsuke()" title="Decrease mitsuke (0.5 mm)"/>
- </div>
- <div id="patternscontainer">
- <div id="patternsscroll">
- <div id="patterns">
- <img src="kumiko.php?jigumi=50&scale=5&flip=0&shape=empty&color=543e30&bgcolor=f3e4bd&grid=6" alt="lastedited" name="Last edited infill piece" id="lastedited" />
- <img src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=" style="visibility: hidden;" />
- <img src="<?= SVGtoBase64('images/svg/empty.svg'); ?>" alt="empty" name="Empty" />
- <img src="<?= SVGtoBase64('images/svg/tsanugi.svg'); ?>" alt="tsanugi" name="Rindō tsanugi" />
- <img src="<?= SVGtoBase64('images/svg/rindoasanoha.svg'); ?>" alt="rindoasanoha" name="Rindō asa-no-ha" />
- <img src="<?= SVGtoBase64('images/svg/kasane.svg'); ?>" alt="kasane" name="Kasane rindō" />
- <img src="<?= SVGtoBase64('images/svg/tsumiishi.svg'); ?>" alt="tsumiishi" name="Tsumi-ishi kikkō" />
- <img src="<?= SVGtoBase64('images/svg/bishamonkikko.svg'); ?>" alt="bishamonkikko" name="Bishamon kikkō" />
- <img src="<?= SVGtoBase64('images/svg/asanoha.svg'); ?>" alt="asanoha" name="Asa-no-ha" />
- <img src="<?= SVGtoBase64('images/svg/asanohavariant.svg'); ?>" alt="asanohavariant" name="Asa-no-ha variant" />
- <img src="<?= SVGtoBase64('images/svg/tsuno.svg'); ?>" alt="tsuno" name="Tsuno asa-no-ha" />
- <img src="<?= SVGtoBase64('images/svg/futaezakura.svg'); ?>" alt="futaezakura" name="Futae-zakura kikkō" />
- <img src="<?= SVGtoBase64('images/svg/sakura.svg'); ?>" alt="sakura" name="Sakura kikkō" />
- <img src="<?= SVGtoBase64('images/svg/kazaguruma.svg'); ?>" alt="kazaguruma" name="Kaza-guruma" />
- <img src="<?= SVGtoBase64('images/svg/gomagara.svg'); ?>" alt="gomagara" name="Goma-gara kikkō" />
- <img src="<?= SVGtoBase64('images/svg/kuruma.svg'); ?>" alt="kuruma" name="Kuruma kikkō #1" />
- <img src="<?= SVGtoBase64('images/svg/kurumakikko.svg'); ?>" alt="kurumakikko" name="Kuruma kikkō #2" />
- <img src="<?= SVGtoBase64('images/svg/kawaristar.svg'); ?>" alt="kawaristar" name="Kawari variant" />
- <img src="<?= SVGtoBase64('images/svg/futae.svg'); ?>" alt="futae" name="Futae asa-no-ha" />
- <img src="<?= SVGtoBase64('images/svg/kawari.svg'); ?>" alt="kawari" name="Kawari asa-no-ha" />
- <img src="<?= SVGtoBase64('images/svg/yae.svg'); ?>" alt="yae" name="Yae asa-no-ha" />
- <img src="<?= SVGtoBase64('images/svg/ryuso.svg'); ?>" alt="ryuso" name="Ryūsō kikkō" />
- <img src="<?= SVGtoBase64('images/svg/ryusoasanoha.svg'); ?>" alt="ryusoasanoha" name="Ryūsō asa-no-ha" />
- <img src="<?= SVGtoBase64('images/svg/kawariyae.svg'); ?>" alt="kawariyae" name="Kawari yae-zakura" />
- <img src="<?= SVGtoBase64('images/svg/yaezakura.svg'); ?>" alt="yaezakura" name="Yae-zakura kikkō" />
- <img src="<?= SVGtoBase64('images/svg/benten.svg'); ?>" alt="benten" name="Benten kikkō" />
- <img src="<?= SVGtoBase64('images/svg/bentena.svg'); ?>" alt="bentena" name="Bentena asa-no-ha" />
- <img src="<?= SVGtoBase64('images/svg/bententawara.svg'); ?>" alt="bententawara" name="Benten tawara kikkō" />
- <img src="<?= SVGtoBase64('images/svg/bentenmie.svg'); ?>" alt="bentenmie" name="Benten mie kikkō" />
- <img src="<?= SVGtoBase64('images/svg/yaekikyo.svg'); ?>" alt="yaekikyo" name="Yae kikyō Asa-no-ha" />
- <img src="<?= SVGtoBase64('images/svg/yaewatsunagi.svg'); ?>" alt="yaewatsunagi" name="Yae wa-tsunagi" />
- <img src="<?= SVGtoBase64('images/svg/tawara.svg'); ?>" alt="tawara" name="Tawara kikkō" />
- <img src="<?= SVGtoBase64('images/svg/urahana.svg'); ?>" alt="urahana" name="Urahana kikkō" />
- <img src="<?= SVGtoBase64('images/svg/yaeurahana.svg'); ?>" alt="yaeurahana" name="Yae urahana kikkō" />
- <img src="<?= SVGtoBase64('images/svg/kawaraurahana.svg'); ?>" alt="kawaraurahana" name="Kawara urahana kikkõ" />
- <img src="<?= SVGtoBase64('images/svg/karahanakikko.svg'); ?>" alt="karahanakikko" name="Karahana kikkō" />
- <img src="<?= SVGtoBase64('images/svg/curved.svg'); ?>" alt="curved" name="Unknown" />
- <img src="<?= SVGtoBase64('images/svg/curved2.svg'); ?>" alt="curved2" name="Unknown" />
- <img src="<?= SVGtoBase64('images/svg/shippo.svg'); ?>" alt="shippo" name="Shippo kikkō" />
- <img src="<?= SVGtoBase64('images/svg/asanohamaroc.svg'); ?>" alt="asanohamaroc" name="Asa-no-ha variant" />
- <img src="<?= SVGtoBase64('images/svg/dahlia.svg'); ?>" alt="dahlia" name="Dahlia" />
- <img src="<?= SVGtoBase64('images/svg/hakkakugara.svg'); ?>" alt="hakkakugara" name="Hakkaku gara" />
- <img src="<?= SVGtoBase64('images/svg/mikado.svg'); ?>" alt="mikado" name="Mikado" />
- <img src="<?= SVGtoBase64('images/svg/kurumastar.svg'); ?>" alt="kurumastar" name="Kuruma variant" />
- <img src="<?= SVGtoBase64('images/svg/kawari3.svg'); ?>" alt="kawari3" name="Kawari variant" />
- <img src="<?= SVGtoBase64('images/svg/tsumiishivar.svg'); ?>" alt="tsumiishivar" name="Tsumi-ishi variant" />
- </div>
- </div>
- </div>
- <span id="patternname" style="position:absolute; left:50%; bottom:0px; z-index: 10; width: 200px; margin-left: -100px; color:#f3e4bd; font-size: 15px;line-height:20px;text-align: center; display:none;">Yae-Zakura Kikko</span>
- <div id="buttons">
- <img src="images/rotate.png" title="rotate panel" onclick="rotate()"/>
- <img src="images/zoomin.png" title="zoom in" onclick="zoomin()" />
- <img src="images/extents.png" title="zoom to fit screen" onclick="zoomext()" />
- <img src="images/zoomout.png" title="zoom out" onclick="zoomout()" />
- <img src="images/save.png" title="save design" onclick="saveas()" />
- <img src="images/share.png" title="share design" onclick="sharemenu()" />
- <img src="images/info2.png" title="info/help" onclick="info()" />
- <img src="images/groupsel.png" title="group selection on/off" onclick="selsame_enable()" id="selsame" />
- <img src="images/autodeselect.png" title="automatic deselect on/off" onclick="autodeselect()" id="autodeselect" />
- <img src="images/deselect.png" title="deselect all" onclick="deselect(1)" />
- <img src="images/print.png" title="export printable design" onclick="printmenu()" />
- <img src="images/ruler.png" title="export dimensional drawing" onclick="dimsmenu()" />
- <img src="images/settings.png" title="settings" onclick="settings()" />
- <img src="images/home.png" title="home" onclick="home()" />
- <span style="float:left; width: 252px; background-color: #543e30; color:#f3e4bd; font-size: 15px;line-height:30px;text-align: center;">www.kumikodesigner.com
- </span>
- </div>
- </div></div></div>
- <div id="info"><p>Watch <a href="https://www.kumikodesigner.com/video.php" target="blank" />this video</a> to learn how to use the application.<br /><br />If you have ideas to improve it, please let me know by sending an email via <a href="https://www.kumikodesigner.com/contact.php" target="blank">my contact form</a>.</p>
- <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
- <input type="hidden" name="cmd" value="_s-xclick" />
- <input type="hidden" name="hosted_button_id" value="WX3R8FSAK8728" />
- <input type="image" src="images/donate_small.png" border="0" name="submit" title="Please consider a donation so I can keep improving the tool!" alt="Donate with PayPal button" />
- </form>
- <div id="break"></div>
- <div id="icons">
- <img src="images/rotate.png" /> <p>Rotate the kumiko panel</p>
- <img src="images/zoomin.png" /> <p>Zoom in</p>
- <img src="images/extents.png" /> <p>Zoom to fit screen</p>
- <img src="images/zoomout.png" /> <p>Zoom out</p>
- <img src="images/save.png" /> <p>Save project</p>
- <img src="images/share.png" /> <p>Create link to share design</p>
- </div>
- <div id="icons" style="">
- <img src="images/groupsel.png" /> <p>Select equal patterns (on/off)</p>
- <img src="images/select.png" /> <p>Automatic deselect (on/off)</p>
- <img src="images/deselect.png" /> <p>Deselect all</p>
- <img src="images/print.png" /> <p>Export pdf for printing</p>
- <img src="images/ruler.png" /> <p>Export pdf with dimensions</p>
- <img src="images/settings.png" /> <p>Settings</p>
- </div>
- </div>
- <div id="print_menu">
- <h2>Choose print style</h2>
- <p>Click your prefered style to export a 1:1 scale pdf of your design.</p>
- <img src="images/style2.png" onClick="printversion(0);">
- <img src="images/style3.png" onClick="printversion(1);">
- <img src="images/style1.png" onClick="printversion(2);">
- </div>
- <div id="dims_menu">
- <h2>Choose dimensional drawing style</h2>
- <p style="color: #600">Please note this is a beta feature, it can still contain errors!<!--Click your prefered style to generate a pdf with pattern information.--></p>
- <img src="images/scaledrawing.png" onClick="printversion(34);">
- <span class="menu_info">Scale 1:1 pdf with occurance count</span>
- <img src="images/dimdrawing.png" onClick="printversion(33);">
- <span class="menu_info" style="left: 242px;">Scale 2:1 pdf with angles and dimensions</span>
- <img src="images/svg.png" onClick="printversion(35);">
- <span class="menu_info" style="left: 455px;">Scale 1:1 SVG file for laser cutting</span>
- </div>
- <div id="share">
- <h2>Share your design with others</h2>
- <p>The link below is a quick link to your design. <br />
- Others can only view, not edit.</p>
- <p>People with the link can see the name of your design, not your username. If you make changes to the design, it will also be reflected immediately to the link.</p>
- <?php
- if(isset($_SESSION['durl'])){
- echo '<a href="https://www.kumikodesigner.com/d/'.$_SESSION['durl'].'" style="color: #543e30; font-weight: bold;">www.kumikodesigner.com/d/'.$_SESSION['durl'].'</a>'."<br />\n";
- echo '<button id="urlbutton" onclick="copyToClipboard(\''.$_SESSION['durl'].'\')" style="margin-top: 20px; height: 30px; width: 100%; border: 2px solid #543e30; font-weight: bold; font-size: 16px;">Copy Link</button>';
- }else{
- echo '<p style="font-weight: bold; font-style: italic; ">Only registered users can share their designs. Register <a href="https://www.kumikodesigner.com/users/register.php">here</a></p>';
- }
- ?>
- </div>
- <div id="saving" style="position: absolute; top: 0px; left:50%; margin-left:-150px; color: #ccc;text-align:center; background-color:#000; height: 40px; width: 300px; line-height: 40px; display:none; z-index: 12; color: #f3e4bd;">Saving design...</div>
- <?php include 'user_bar.php'; ?>
- </body>
- <script>
- pickerFixed = new Picker({
- parent: document.querySelector('#colpick'),
- popup: false,
- alpha: false,
- cancelButton: true,
- editor: false,
- color: '#cef6',
- onChange: function(color) {},
- onDone: function(color){
- change_preset(color);
- }
- });
- </script>
- </html>
Add Comment
Please, Sign In to add comment