-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbundle.js.map
1 lines (1 loc) · 4.04 KB
/
bundle.js.map
1
{"version":3,"sources":["webpack:///webpack/bootstrap 7f5bdea21084d717277c","webpack:///./src.js","webpack:///./test.js","webpack:///./tools.js"],"names":[],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;;;AC7Da;AACb,mG;;;;;;;;;ACDiB;;AAEjB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,iBAAiB,gBAAgB;AACjC,mBAAmB,iBAAiB;;AAEpC;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,C;;;;;;;;ACzBA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,C","file":"bundle.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 7f5bdea21084d717277c","import {test} from \"./test\"\r\ndocument.addEventListener(\"DOMContentLoaded\", test);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src.js\n// module id = 0\n// module chunks = 0","import {setPixel} from \"./tools\"\r\n\r\nexport function test() {\r\n let canvas = document.getElementById('canvas');\r\n let ctx = canvas.getContext('2d');\r\n let cw = canvas.width;\r\n let ch = canvas.height;\r\n\r\n let data = ctx.createImageData(cw, ch);\r\n\r\n// обходим в цикле каждый пиксель\r\n let t0 = new Date().getTime();\r\n for (let x = 0; x < data.width; x++) {\r\n for (let y = 0; y < data.height; y++) {\r\n\r\n let val = 0;\r\n\r\n setPixel(data, x, y, val, val ,val, 255)\r\n\r\n }\r\n }\r\n let t1 = new Date().getTime();\r\n console.log('time: ' + (t1 - t0), 'points: ' + cw * ch);\r\n// устанавливаем данные обратно\r\n ctx.putImageData(data, 0, 0);\r\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./test.js\n// module id = 1\n// module chunks = 0","export function setPixel(imageData, x, y, r, g, b, a) {\r\n\r\n let index = (x + y * imageData.width) * 4;\r\n imageData.data[index+0] = r;\r\n imageData.data[index+1] = g;\r\n imageData.data[index+2] = b;\r\n imageData.data[index+3] = a;\r\n\r\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./tools.js\n// module id = 2\n// module chunks = 0"],"sourceRoot":""}