animate/webGl/my-threejs-test/node_modules/@parcel/workers/lib/bus.js

31 lines
829 B
JavaScript
Raw Normal View History

2024-06-24 09:24:00 +00:00
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
function _events() {
const data = _interopRequireDefault(require("events"));
_events = function () {
return data;
};
return data;
}
var _childState = require("./childState");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
class Bus extends _events().default {
emit(event, ...args) {
if (_childState.child) {
_childState.child.workerApi.callMaster({
// $FlowFixMe
location: process.browser ? '@parcel/workers/src/bus.js' : __filename,
method: 'emit',
args: [event, ...args]
}, false);
return true;
} else {
return super.emit(event, ...args);
}
}
}
var _default = exports.default = new Bus();