mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-05-11 21:37:16 +00:00
38 lines
8.8 KiB
JavaScript
38 lines
8.8 KiB
JavaScript
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[1],{
|
|
|
|
/***/ "./pkg/index.js":
|
|
/*!**********************!*\
|
|
!*** ./pkg/index.js ***!
|
|
\**********************/
|
|
/*! exports provided: draw, __wbg_newwithu8clampedarrayandsh_e53f440c9ae68467, __wbg_putImageData_b290181a4e24024c, __wbindgen_object_drop_ref, __wbindgen_throw, __wbindgen_rethrow */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_bg_wasm__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index_bg.wasm */ \"./pkg/index_bg.wasm\");\n/* harmony import */ var _index_bg_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index_bg.js */ \"./pkg/index_bg.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"draw\", function() { return _index_bg_js__WEBPACK_IMPORTED_MODULE_1__[\"draw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"__wbg_newwithu8clampedarrayandsh_e53f440c9ae68467\", function() { return _index_bg_js__WEBPACK_IMPORTED_MODULE_1__[\"__wbg_newwithu8clampedarrayandsh_e53f440c9ae68467\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"__wbg_putImageData_b290181a4e24024c\", function() { return _index_bg_js__WEBPACK_IMPORTED_MODULE_1__[\"__wbg_putImageData_b290181a4e24024c\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"__wbindgen_object_drop_ref\", function() { return _index_bg_js__WEBPACK_IMPORTED_MODULE_1__[\"__wbindgen_object_drop_ref\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"__wbindgen_throw\", function() { return _index_bg_js__WEBPACK_IMPORTED_MODULE_1__[\"__wbindgen_throw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"__wbindgen_rethrow\", function() { return _index_bg_js__WEBPACK_IMPORTED_MODULE_1__[\"__wbindgen_rethrow\"]; });\n\n\n\n\n//# sourceURL=webpack:///./pkg/index.js?");
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./pkg/index_bg.js":
|
|
/*!*************************!*\
|
|
!*** ./pkg/index_bg.js ***!
|
|
\*************************/
|
|
/*! exports provided: draw, __wbg_newwithu8clampedarrayandsh_e53f440c9ae68467, __wbg_putImageData_b290181a4e24024c, __wbindgen_object_drop_ref, __wbindgen_throw, __wbindgen_rethrow */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(TextDecoder, module) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"draw\", function() { return draw; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__wbg_newwithu8clampedarrayandsh_e53f440c9ae68467\", function() { return __wbg_newwithu8clampedarrayandsh_e53f440c9ae68467; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__wbg_putImageData_b290181a4e24024c\", function() { return __wbg_putImageData_b290181a4e24024c; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__wbindgen_object_drop_ref\", function() { return __wbindgen_object_drop_ref; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__wbindgen_throw\", function() { return __wbindgen_throw; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__wbindgen_rethrow\", function() { return __wbindgen_rethrow; });\n/* harmony import */ var _index_bg_wasm__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index_bg.wasm */ \"./pkg/index_bg.wasm\");\n\n\nconst heap = new Array(32).fill(undefined);\n\nheap.push(undefined, null, true, false);\n\nfunction getObject(idx) { return heap[idx]; }\n\nlet heap_next = heap.length;\n\nfunction dropObject(idx) {\n if (idx < 36) return;\n heap[idx] = heap_next;\n heap_next = idx;\n}\n\nfunction takeObject(idx) {\n const ret = getObject(idx);\n dropObject(idx);\n return ret;\n}\n\nconst lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;\n\nlet cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });\n\ncachedTextDecoder.decode();\n\nlet cachegetUint8Memory0 = null;\nfunction getUint8Memory0() {\n if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== _index_bg_wasm__WEBPACK_IMPORTED_MODULE_0__[\"memory\"].buffer) {\n cachegetUint8Memory0 = new Uint8Array(_index_bg_wasm__WEBPACK_IMPORTED_MODULE_0__[\"memory\"].buffer);\n }\n return cachegetUint8Memory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));\n}\n\nlet stack_pointer = 32;\n\nfunction addBorrowedObject(obj) {\n if (stack_pointer == 1) throw new Error('out of js stack');\n heap[--stack_pointer] = obj;\n return stack_pointer;\n}\n\nfunction _assertNum(n) {\n if (typeof(n) !== 'number') throw new Error('expected a number argument');\n}\n/**\n* @param {CanvasRenderingContext2D} ctx\n* @param {number} width\n* @param {number} height\n* @param {number} real\n* @param {number} imaginary\n*/\nfunction draw(ctx, width, height, real, imaginary) {\n try {\n _assertNum(width);\n _assertNum(height);\n _index_bg_wasm__WEBPACK_IMPORTED_MODULE_0__[\"draw\"](addBorrowedObject(ctx), width, height, real, imaginary);\n } finally {\n heap[stack_pointer++] = undefined;\n }\n}\n\nlet cachegetUint8ClampedMemory0 = null;\nfunction getUint8ClampedMemory0() {\n if (cachegetUint8ClampedMemory0 === null || cachegetUint8ClampedMemory0.buffer !== _index_bg_wasm__WEBPACK_IMPORTED_MODULE_0__[\"memory\"].buffer) {\n cachegetUint8ClampedMemory0 = new Uint8ClampedArray(_index_bg_wasm__WEBPACK_IMPORTED_MODULE_0__[\"memory\"].buffer);\n }\n return cachegetUint8ClampedMemory0;\n}\n\nfunction getClampedArrayU8FromWasm0(ptr, len) {\n return getUint8ClampedMemory0().subarray(ptr / 1, ptr / 1 + len);\n}\n\nfunction addHeapObject(obj) {\n if (heap_next === heap.length) heap.push(heap.length + 1);\n const idx = heap_next;\n heap_next = heap[idx];\n\n if (typeof(heap_next) !== 'number') throw new Error('corrupt heap');\n\n heap[idx] = obj;\n return idx;\n}\n\nfunction handleError(f) {\n return function () {\n try {\n return f.apply(this, arguments);\n\n } catch (e) {\n _index_bg_wasm__WEBPACK_IMPORTED_MODULE_0__[\"__wbindgen_exn_store\"](addHeapObject(e));\n }\n };\n}\n\nfunction logError(f) {\n return function () {\n try {\n return f.apply(this, arguments);\n\n } catch (e) {\n let error = (function () {\n try {\n return e instanceof Error ? `${e.message}\\n\\nStack:\\n${e.stack}` : e.toString();\n } catch(_) {\n return \"<failed to stringify thrown value>\";\n }\n }());\n console.error(\"wasm-bindgen: imported JS function that was not marked as `catch` threw an error:\", error);\n throw e;\n }\n };\n}\n\nconst __wbg_newwithu8clampedarrayandsh_e53f440c9ae68467 = handleError(function(arg0, arg1, arg2, arg3) {\n var ret = new ImageData(getClampedArrayU8FromWasm0(arg0, arg1), arg2 >>> 0, arg3 >>> 0);\n return addHeapObject(ret);\n});\n\nconst __wbg_putImageData_b290181a4e24024c = handleError(function(arg0, arg1, arg2, arg3) {\n getObject(arg0).putImageData(getObject(arg1), arg2, arg3);\n});\n\nconst __wbindgen_object_drop_ref = function(arg0) {\n takeObject(arg0);\n};\n\nconst __wbindgen_throw = function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n};\n\nconst __wbindgen_rethrow = function(arg0) {\n throw takeObject(arg0);\n};\n\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! text-encoding */ \"../../node_modules/text-encoding/index.js\")[\"TextDecoder\"], __webpack_require__(/*! ./../../../node_modules/webpack/buildin/harmony-module.js */ \"../../node_modules/webpack/buildin/harmony-module.js\")(module)))\n\n//# sourceURL=webpack:///./pkg/index_bg.js?");
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./pkg/index_bg.wasm":
|
|
/*!***************************!*\
|
|
!*** ./pkg/index_bg.wasm ***!
|
|
\***************************/
|
|
/*! exports provided: memory, draw, __wbindgen_exn_store */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
eval("\"use strict\";\n// Instantiate WebAssembly module\nvar wasmExports = __webpack_require__.w[module.i];\n__webpack_require__.r(exports);\n// export exports from WebAssembly module\nfor(var name in wasmExports) if(name != \"__webpack_init__\") exports[name] = wasmExports[name];\n// exec imports from WebAssembly module (for esm order)\n/* harmony import */ var m0 = __webpack_require__(/*! ./index_bg.js */ \"./pkg/index_bg.js\");\n\n\n// exec wasm module\nwasmExports[\"__webpack_init__\"]()\n\n//# sourceURL=webpack:///./pkg/index_bg.wasm?");
|
|
|
|
/***/ })
|
|
|
|
}]); |