{"id":3798,"date":"2024-10-08T19:28:40","date_gmt":"2024-10-08T18:28:40","guid":{"rendered":"https:\/\/beams-experiments.com\/?page_id=3798"},"modified":"2024-11-01T16:14:56","modified_gmt":"2024-11-01T16:14:56","slug":"toy-design-c1","status":"publish","type":"page","link":"https:\/\/beams-experiments.com\/index.php\/toy-design-c1\/","title":{"rendered":"Toy Design-C1-NOT USED"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>E1 Task &#8211; We Choose, Use as Many<\/title>\n    <script src=\"https:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/3.5.1\/jquery.min.js\"><\/script>\n    <style>\n        body {\n            margin: 0;\n            padding: 0;\n            display: flex;\n            flex-direction: column;\n            align-items: center;\n            justify-content: center;\n            background-color: #f0f0f0;\n        }\n\n        #taskInstructions {\n            width: 90%;\n            max-width: 90%;\n            height: 55vh;\n            overflow-y: auto;\n            border: 1px solid #ddd;\n            padding: 15px;\n            background-color: #f8f8f8;\n        }\n\n        #assignedShapes {\n            display: flex;\n            flex-direction: row;\n            gap: 10px;\n            margin-top: 10px;\n        }\n\n        .shape-img {\n            width: 120px;  \/* Increased size *\/\n            height: 120px; \/* Increased size *\/\n            border: 1px solid #000;\n            padding: 5px;\n        }\n\n        #canvasWrapper {\n            width: 90vw;\n            height: 70vh;\n            overflow-y: scroll;\n            border: 1px solid black;\n            margin-top: 20px;\n            display: flex;\n            justify-content: center;\n            align-items: center;\n        }\n\n        #drawingCanvas {\n            background-color: white; \/* White background for drawing *\/\n        }\n\n        \/* Submit button styling *\/\n        #submitDrawingButton {\n            margin-top: 20px;\n            background-color: #007BFF; \/* Blue color *\/\n            color: white;\n            border: none;\n            padding: 15px 30px;\n            font-size: 18px;\n            cursor: not-allowed; \/* Disabled state cursor *\/\n            opacity: 0.5; \/* Faded appearance when disabled *\/\n            border-radius: 5px;\n        }\n\/* Enabled state for the button *\/\n#submitDrawingButton:enabled {\n    cursor: pointer; \/* Enable pointer cursor *\/\n    opacity: 1; \/* Full opacity when enabled *\/\n}\n        #submitDrawingButton:hover {\n            background-color: #0056b3;\n        }\n\n        \/* Center the submit button *\/\n        #submitButtonContainer {\n            display: flex;\n            justify-content: center;\n            align-items: center;\n            width: 100%;\n        }\n    <\/style>\n<\/head>\n<body>\n    <div id=\"taskInstructions\">\n        <h3>Task Instructions<\/h3>\n        <p>You are tasked with designing a toy that can be used by a child aged 5-11. Five shapes have been randomly selected for you from a set of 20 available shapes. You may <b>use as many or as few<\/b> of the selected five shapes as you wish to create your toy design, but each shape can be used <b>only once<\/B>. You may arrange and draw your idea on the provided digital canvas. Please note that there is no function to erase your drawing, and <b>refreshing your browser is not allowed<\/b>, ensuring that your progress is preserved. You can scroll down and use more space if you want. There\u2019s <b>no minimum time limit<\/b>, but we expect you to engage <b>meaningfully<\/b> with the task. Please note, the <b>maximum time<\/b> allowed is <b>50 minutes<\/b>.<\/p>\n    <\/div>\n\n    <div id=\"assignedShapes\">\n        <!-- The assigned shapes will be displayed here -->\n    <\/div>\n\n    <div id=\"canvasWrapper\">\n        <canvas id=\"drawingCanvas\"><\/canvas>\n    <\/div>\n\n    <!-- Submit button container to center the button -->\n    <div id=\"submitButtonContainer\">\n        <button id=\"submitDrawingButton\" disabled>Submit Drawing<\/button>\n    <\/div>\n\n   <script>\n    \/\/ Store the time when the page is loaded\n    const startTime = Date.now();\n   let hasDrawn = false;  \/\/ Tracks whether the user has drawn something\nvar reDo = localStorage.getItem('hasDrawn');\nif (reDo == 1) {\nalert('You are not allowed to redo your task. Your participation will be discontinued');\nwindow.location.href = 'https:\/\/beams-experiments.com\/index.php\/thanks-for-your-participation-toys-discontinued\/';\n}\n\/\/ Function to enable the submit button only if both conditions are met\n    function checkIfCanSubmit() {\n        if (hasDrawn) {\n            document.getElementById(\"submitDrawingButton\").disabled = false;\n        }\n    }\n    const totalShapes = 20; \/\/ We have 20 images\n    const assignedShapes = []; \/\/ To hold the 5 randomly selected shapes\n    const sourceDirectory = \"https:\/\/beams-experiments.com\/toyDesign\/drawing images\/\"; \/\/ Path to the folder where images are stored\n    const shapeContainer = document.getElementById(\"assignedShapes\");\n\n    \/\/ Randomly assign 5 shapes from the available 20\n    function assignShapes() {\n        const selectedIndexes = new Set();\n        while (selectedIndexes.size < 5) {\n            const randomIndex = Math.floor(Math.random() * totalShapes) + 1;\n            selectedIndexes.add(randomIndex);\n        }\n        return Array.from(selectedIndexes);\n    }\n\n    \/\/ Display the assigned shapes\n    function displayAssignedShapes() {\n        const selectedShapes = assignShapes();\n        selectedShapes.forEach(index => {\n            const img = document.createElement('img');\n            img.src = sourceDirectory + index + \".png\";\n            img.alt = \"Shape \" + index;\n            img.classList.add(\"shape-img\");\n            shapeContainer.appendChild(img);\n            assignedShapes.push(index);\n        });\n    }\n\n    \/\/ Call function to display assigned shapes\n    displayAssignedShapes();\n\n    \/\/ Drawing functionality\n    const canvas = document.getElementById(\"drawingCanvas\");\n    const ctx = canvas.getContext(\"2d\");\n    let drawing = false;\n\n    \/\/ Set canvas dimensions programmatically\n    const desiredWidth = 1200; \/\/ Adjust this value as needed\n    const desiredHeight = 2500; \/\/ Adjust this value as needed\n\n    canvas.width = desiredWidth;\n    canvas.height = desiredHeight;\n\n    \/\/ Ensure the canvas displays at its actual size\n    canvas.style.width = desiredWidth + 'px';\n    canvas.style.height = desiredHeight + 'px';\n\n    \/\/ Fill the canvas background with white\n    ctx.fillStyle = 'white';\n    ctx.fillRect(0, 0, canvas.width, canvas.height);\n\n    \/\/ Set line properties for drawing\n    ctx.lineWidth = 3;\n    ctx.lineCap = 'round';\n\n    \/\/ Function to get mouse position relative to the canvas, accounting for scaling\n    function getMousePos(event) {\n        const rect = canvas.getBoundingClientRect();\n        const scaleX = canvas.width \/ rect.width;    \/\/ Scale factor in the X direction\n        const scaleY = canvas.height \/ rect.height;  \/\/ Scale factor in the Y direction\n\n        return {\n            x: (event.clientX - rect.left) * scaleX,\n            y: (event.clientY - rect.top) * scaleY\n        };\n    }\n\n    \/\/ Start drawing when mouse is clicked\n    canvas.addEventListener(\"mousedown\", (event) => {\n        drawing = true;\n        hasDrawn = true;\n        const pos = getMousePos(event);\n        ctx.moveTo(pos.x, pos.y);\n    });\n\n    \/\/ Draw while mouse is moving\n    canvas.addEventListener(\"mousemove\", (event) => {\n        if (drawing) {\n            const pos = getMousePos(event);\n            ctx.lineTo(pos.x, pos.y);\n            ctx.stroke();\n        }\n    });\n\n    \/\/ Stop drawing when mouse is released\n    canvas.addEventListener(\"mouseup\", () => {\n        drawing = false;\n        ctx.beginPath();\n        hasDrawn = true;  \/\/ User has drawn on the canvas\n            localStorage.setItem('hasDrawn', 1);\n        document.getElementById(\"submitDrawingButton\").disabled = false;\n    });\n\n    \/\/ Prevent default behavior of right-click (if needed)\n    canvas.addEventListener(\"contextmenu\", (event) => {\n        event.preventDefault();\n    });\n\n    \/\/ Submit drawing button\n    const submitDrawingButton = document.getElementById(\"submitDrawingButton\");\n    submitDrawingButton.addEventListener('click', () => {\n        \/\/ Disable the button to prevent multiple submissions\n        submitDrawingButton.disabled = true;\n\n        \/\/ Calculate the time spent on the drawing in seconds\n        const endTime = Date.now();\n        const drawingTime = Math.floor((endTime - startTime) \/ 1000); \/\/ Time in seconds\n\n        \/\/ Save the drawing time to localStorage\n        localStorage.setItem('drawingTime', drawingTime);\n\n        \/\/ Get the dataURL of the canvas\n        const dataURL = canvas.toDataURL('image\/png');\n\n        \/\/ Save the image data URL in localStorage\n        localStorage.setItem('canvasImage', dataURL);\n\n        \/\/ Redirect to the next page\n        window.location.href = 'https:\/\/beams-experiments.com\/index.php\/post-task-questionnaire-toy-c\/';\n    });\n<\/script>\n\n<\/body>\n<\/html>\n","protected":false},"excerpt":{"rendered":"<p>E1 Task &#8211; We Choose, Use as Many Task Instructions You are tasked with designing a toy that can be used by a child aged 5-11. Five shapes have been randomly selected for you from a set of 20 available shapes. You may use as many or as few of the selected five shapes as [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"om_disable_all_campaigns":false,"footnotes":""},"class_list":["post-3798","page","type-page","status-publish","hentry"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.9 - aioseo.com -->\n\t<meta name=\"description\" content=\"E1 Task - We Choose, Use as Many Task Instructions You are tasked with designing a toy that can be used by a child aged 5-11. Five shapes have been randomly selected for you from a set of 20 available shapes. You may use as many or as few of the selected five shapes as\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/beams-experiments.com\/index.php\/toy-design-c1\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.9\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"beams-experiments.com -\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Toy Design-C1-NOT USED - beams-experiments.com\" \/>\n\t\t<meta property=\"og:description\" content=\"E1 Task - We Choose, Use as Many Task Instructions You are tasked with designing a toy that can be used by a child aged 5-11. Five shapes have been randomly selected for you from a set of 20 available shapes. You may use as many or as few of the selected five shapes as\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/beams-experiments.com\/index.php\/toy-design-c1\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2024-10-08T18:28:40+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2024-11-01T16:14:56+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Toy Design-C1-NOT USED - beams-experiments.com\" \/>\n\t\t<meta name=\"twitter:description\" content=\"E1 Task - We Choose, Use as Many Task Instructions You are tasked with designing a toy that can be used by a child aged 5-11. Five shapes have been randomly selected for you from a set of 20 available shapes. You may use as many or as few of the selected five shapes as\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/beams-experiments.com\\\/index.php\\\/toy-design-c1\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/beams-experiments.com#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/beams-experiments.com\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/beams-experiments.com\\\/index.php\\\/toy-design-c1\\\/#listItem\",\"name\":\"Toy Design-C1-NOT USED\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/beams-experiments.com\\\/index.php\\\/toy-design-c1\\\/#listItem\",\"position\":2,\"name\":\"Toy Design-C1-NOT USED\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/beams-experiments.com#listItem\",\"name\":\"Home\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/beams-experiments.com\\\/#organization\",\"name\":\"beams-experiments.com\",\"url\":\"https:\\\/\\\/beams-experiments.com\\\/\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/beams-experiments.com\\\/index.php\\\/toy-design-c1\\\/#webpage\",\"url\":\"https:\\\/\\\/beams-experiments.com\\\/index.php\\\/toy-design-c1\\\/\",\"name\":\"Toy Design-C1-NOT USED - beams-experiments.com\",\"description\":\"E1 Task - We Choose, Use as Many Task Instructions You are tasked with designing a toy that can be used by a child aged 5-11. Five shapes have been randomly selected for you from a set of 20 available shapes. You may use as many or as few of the selected five shapes as\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/beams-experiments.com\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/beams-experiments.com\\\/index.php\\\/toy-design-c1\\\/#breadcrumblist\"},\"datePublished\":\"2024-10-08T19:28:40+01:00\",\"dateModified\":\"2024-11-01T16:14:56+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/beams-experiments.com\\\/#website\",\"url\":\"https:\\\/\\\/beams-experiments.com\\\/\",\"name\":\"beams-experiments.com\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/beams-experiments.com\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Toy Design-C1-NOT USED - beams-experiments.com","description":"E1 Task - We Choose, Use as Many Task Instructions You are tasked with designing a toy that can be used by a child aged 5-11. Five shapes have been randomly selected for you from a set of 20 available shapes. You may use as many or as few of the selected five shapes as","canonical_url":"https:\/\/beams-experiments.com\/index.php\/toy-design-c1\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/beams-experiments.com\/index.php\/toy-design-c1\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/beams-experiments.com#listItem","position":1,"name":"Home","item":"https:\/\/beams-experiments.com","nextItem":{"@type":"ListItem","@id":"https:\/\/beams-experiments.com\/index.php\/toy-design-c1\/#listItem","name":"Toy Design-C1-NOT USED"}},{"@type":"ListItem","@id":"https:\/\/beams-experiments.com\/index.php\/toy-design-c1\/#listItem","position":2,"name":"Toy Design-C1-NOT USED","previousItem":{"@type":"ListItem","@id":"https:\/\/beams-experiments.com#listItem","name":"Home"}}]},{"@type":"Organization","@id":"https:\/\/beams-experiments.com\/#organization","name":"beams-experiments.com","url":"https:\/\/beams-experiments.com\/"},{"@type":"WebPage","@id":"https:\/\/beams-experiments.com\/index.php\/toy-design-c1\/#webpage","url":"https:\/\/beams-experiments.com\/index.php\/toy-design-c1\/","name":"Toy Design-C1-NOT USED - beams-experiments.com","description":"E1 Task - We Choose, Use as Many Task Instructions You are tasked with designing a toy that can be used by a child aged 5-11. Five shapes have been randomly selected for you from a set of 20 available shapes. You may use as many or as few of the selected five shapes as","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/beams-experiments.com\/#website"},"breadcrumb":{"@id":"https:\/\/beams-experiments.com\/index.php\/toy-design-c1\/#breadcrumblist"},"datePublished":"2024-10-08T19:28:40+01:00","dateModified":"2024-11-01T16:14:56+00:00"},{"@type":"WebSite","@id":"https:\/\/beams-experiments.com\/#website","url":"https:\/\/beams-experiments.com\/","name":"beams-experiments.com","inLanguage":"en-US","publisher":{"@id":"https:\/\/beams-experiments.com\/#organization"}}]},"og:locale":"en_US","og:site_name":"beams-experiments.com -","og:type":"article","og:title":"Toy Design-C1-NOT USED - beams-experiments.com","og:description":"E1 Task - We Choose, Use as Many Task Instructions You are tasked with designing a toy that can be used by a child aged 5-11. Five shapes have been randomly selected for you from a set of 20 available shapes. You may use as many or as few of the selected five shapes as","og:url":"https:\/\/beams-experiments.com\/index.php\/toy-design-c1\/","article:published_time":"2024-10-08T18:28:40+00:00","article:modified_time":"2024-11-01T16:14:56+00:00","twitter:card":"summary_large_image","twitter:title":"Toy Design-C1-NOT USED - beams-experiments.com","twitter:description":"E1 Task - We Choose, Use as Many Task Instructions You are tasked with designing a toy that can be used by a child aged 5-11. Five shapes have been randomly selected for you from a set of 20 available shapes. You may use as many or as few of the selected five shapes as"},"aioseo_meta_data":{"post_id":"3798","title":null,"description":null,"keywords":[],"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"WebPage","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2024-10-08 18:28:40","updated":"2025-06-07 03:18:31","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/beams-experiments.com\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tToy Design-C1-NOT USED\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/beams-experiments.com"},{"label":"Toy Design-C1-NOT USED","link":"https:\/\/beams-experiments.com\/index.php\/toy-design-c1\/"}],"_links":{"self":[{"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/pages\/3798","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/comments?post=3798"}],"version-history":[{"count":37,"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/pages\/3798\/revisions"}],"predecessor-version":[{"id":4761,"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/pages\/3798\/revisions\/4761"}],"wp:attachment":[{"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/media?parent=3798"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}