UNPKG

vue-slot-machine-gen

Version:

Create an extremely biased, web-based slot machine game.

70 lines (68 loc) 1.63 kB
/** * Vue Slot Machine * Create an extremely biased, web-based slot machine game. * * Copyright 2021-2025, Marc S. Brooks (https://mbrooks.info) * Licensed under the MIT license: * http://www.opensource.org/licenses/mit-license.php */ 'use strict'; exports.__esModule = true; exports["default"] = void 0; var _vue = require("vue"); var _slotMachineGen = _interopRequireDefault(require("slot-machine-gen")); require("slot-machine-gen/dist/slot-machine.min.css"); function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } /** * Provides Vue Component wrapper. */ var _default2 = exports["default"] = { setup: function setup() { var elRef = (0, _vue.ref)(null); return { elRef: elRef }; }, mounted: function mounted() { this.slot = new _slotMachineGen["default"](this.$el, this.reels, this.callback, this.options); }, data: function data() { return { slot: null }; }, watch: { play: function play(newVal, oldVal) { if (newVal !== oldVal) { this.slot.play(); } } }, props: { id: { "default": 'slot-machine', type: String }, play: { "default": false, type: Boolean }, reels: { "default": function _default() { return []; }, type: Array }, options: { "default": function _default() { return {}; }, type: Object }, callback: { type: Function } }, template: "\n <div v-bind:id=\"id\" class=\"slot-machine\" ref=\"wrapper\"></div>\n " }; //# sourceMappingURL=vue-slot-machine.js.map