{"id":604,"date":"2021-11-16T09:26:34","date_gmt":"2021-11-16T08:26:34","guid":{"rendered":"https:\/\/dragons-diamond.com\/?page_id=604"},"modified":"2021-11-16T10:38:09","modified_gmt":"2021-11-16T09:38:09","slug":"wirtualna-przymierzalnia","status":"publish","type":"page","link":"https:\/\/dragons-diamond.com\/en\/wirtualna-przymierzalnia\/","title":{"rendered":"Wirtualna Przymierzalnia"},"content":{"rendered":"\n<div class=\"modal fade\" id=\"myModal2\" role=\"dialog\">\n    <div class=\"modal-dialog\">\n    \n      <!-- Modal content-->\n      <div class=\"modal-content\">\n        <div class=\"modal-header\">\n          <button type=\"button\" class=\"close\" data-dismiss=\"modal\">&times;<\/button>\n          <h4 class=\"modal-title\">Modal Header<\/h4>\n        <\/div>\n        <div class=\"modal-body\">\n          <p>Some text in the modal.<\/p>\n        <\/div>\n        <div class=\"modal-footer\">\n          <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Close<\/button>\n        <\/div>\n      <\/div>\n      \n    <\/div>\n  <\/div>\n  \n<\/div>\n\n\n\n\n \r\n        <script>\r\n            jQuery( document ).ready(function() {\r\n                jQuery('.wirtualna_przymierzalnia').show();\r\n                let html = '<div align=\\\"center\\\"><div>\\n        \\n\\t<video id=\\\"videoInput\\\" width=\\\"800\\\" height=\\\"600\\\" style=\\\"display: none\\\" ><\\\/video>\\n\\t<canvas id=\\\"canvasOutput\\\"><\\\/canvas>\\n\\t<canvas id=\\\"imageInput\\\" style=\\\"display: none\\\"><\\\/canvas>\\n\\t<script src=\\\"https:\\\/\\\/dragons-diamond.com\\\/wp-content\\\/plugins\\\/lamers\\\/includes\\\/..\\\/opencv\\\/opencv.js\\\" async><\\\/script>\\n    <script type=\\\"text\\\/javascript\\\">\\n\\t\\tjQuery(function($) {\\n\\t\\t\\t$( document ).ready(function() {\\n                    $( \\\".close2\\\" ).click(function() {\\n                        StopVR();\\n                    });\\n                    $( \\\"#myModal2\\\" ).click(function(event) {\\n                        if (event.target === $( \\\"#myModal2\\\" ).get(0))\\n                            StopVR();\\n                    });\\n\\t\\t\\t\\tlet video = document.getElementById(\\\"videoInput\\\"); \\\/\\\/ video is the id of video tag\\n\\t\\t\\t\\tlet canvasOutput = document.getElementById(\\\"canvasOutput\\\"); \\\/\\\/ canvasOutput is the id of canvas tag\\n        \\n\\t\\t\\t\\tcanvasOutput.width = video.width;\\n\\t\\t\\t\\tcanvasOutput.height = video.height;\\n        \\n\\t\\t\\t\\tcanvasOutput.getContext(\\\"2d\\\").font = \\\"30px Comic Sans MS\\\";\\n\\t\\t\\t\\tcanvasOutput.getContext(\\\"2d\\\").textAlign = \\\"center\\\"; canvasOutput.getContext(\\\"2d\\\").fillText(\\\"[DEBUG] Loading...\\\", canvasOutput.width\\\/2, canvasOutput.height\\\/2); let clothImg = new Image();\\n\\t\\t\\t\\tclothImg.onload = function () {\\n\\t\\t\\t\\t\\tlet clothCanvas = document.getElementById(\\\"imageInput\\\");\\n        \\n\\t\\t\\t\\t\\tclothCanvas.width = clothImg.width;\\n\\t\\t\\t\\t\\tclothCanvas.height = clothImg.height;\\n\\t\\t\\t\\t\\tclothCanvas.getContext(\\\"2d\\\").drawImage(clothImg, 0, 0, clothImg.width, clothImg.height);\\n        \\n\\t\\t\\t\\t\\tDoCameraVR(0.5, true, 0, video, clothCanvas, canvasOutput.id, \\\"\\\");\\n\\t\\t\\t\\t\\t    \\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tclothImg.src = \\\"https:\\\/\\\/dragons-diamond.com\\\/wp-content\\\/plugins\\\/lamers\\\/includes\\\/..\\\/resources\\\/t-shirt.png\\\";\\n\\t\\t\\t});\\n\\t\\t});\\n\\t<\\\/script>\\n\\t<\\\/div><br><\\\/div>';\r\n                let element = jQuery('#myModal2');\r\n                if (!element[0])\r\n                     console.log('Could not resolve virtual changing room view. Missing popup class \\'myModal2\\'');\r\n                else\r\n                {\r\n                    if (element.children('.modal-content')[0])\r\n                    {\r\n                        element = element.children('.modal-content');\r\n                        if (element.children('.modal-body')[0])\r\n                            element = element.children('.modal-body');\r\n                    }\r\n                    element.html(html);\r\n                }\r\n            });\r\n        <\/script>\n","protected":false},"excerpt":{"rendered":"<p>&times; Modal Header Some text in the modal. Close<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"ngg_post_thumbnail":0,"footnotes":""},"class_list":["post-604","page","type-page","status-publish","hentry"],"translation":{"provider":"WPGlobus","version":"3.0.0","language":"en","enabled_languages":["pl","en"],"languages":{"pl":{"title":true,"content":true,"excerpt":false},"en":{"title":false,"content":false,"excerpt":false}}},"_links":{"self":[{"href":"https:\/\/dragons-diamond.com\/en\/wp-json\/wp\/v2\/pages\/604","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dragons-diamond.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/dragons-diamond.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/dragons-diamond.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dragons-diamond.com\/en\/wp-json\/wp\/v2\/comments?post=604"}],"version-history":[{"count":8,"href":"https:\/\/dragons-diamond.com\/en\/wp-json\/wp\/v2\/pages\/604\/revisions"}],"predecessor-version":[{"id":615,"href":"https:\/\/dragons-diamond.com\/en\/wp-json\/wp\/v2\/pages\/604\/revisions\/615"}],"wp:attachment":[{"href":"https:\/\/dragons-diamond.com\/en\/wp-json\/wp\/v2\/media?parent=604"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}