@casual-simulation/aux-runtime 3.2.7-alpha.6226622763
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +21 -0
- package/README.md +82 -0
- package/index.d.ts +26 -0
- package/index.js +26 -0
- package/index.js.map +1 -0
- package/package.json +79 -0
- package/runtime/AuxCompiler.d.ts +258 -0
- package/runtime/AuxCompiler.js +722 -0
- package/runtime/AuxCompiler.js.map +1 -0
- package/runtime/AuxDevice.d.ts +28 -0
- package/runtime/AuxDevice.js +2 -0
- package/runtime/AuxDevice.js.map +1 -0
- package/runtime/AuxGlobalContext.d.ts +572 -0
- package/runtime/AuxGlobalContext.js +606 -0
- package/runtime/AuxGlobalContext.js.map +1 -0
- package/runtime/AuxLibrary.d.ts +2566 -0
- package/runtime/AuxLibrary.js +10210 -0
- package/runtime/AuxLibrary.js.map +1 -0
- package/runtime/AuxLibraryDefinitions.def +12288 -0
- package/runtime/AuxPartitionRealtimeEditModeProvider.d.ts +9 -0
- package/runtime/AuxPartitionRealtimeEditModeProvider.js +21 -0
- package/runtime/AuxPartitionRealtimeEditModeProvider.js.map +1 -0
- package/runtime/AuxRealtimeEditModeProvider.d.ts +35 -0
- package/runtime/AuxRealtimeEditModeProvider.js +34 -0
- package/runtime/AuxRealtimeEditModeProvider.js.map +1 -0
- package/runtime/AuxResults.d.ts +77 -0
- package/runtime/AuxResults.js +6 -0
- package/runtime/AuxResults.js.map +1 -0
- package/runtime/AuxRuntime.d.ts +252 -0
- package/runtime/AuxRuntime.js +2688 -0
- package/runtime/AuxRuntime.js.map +1 -0
- package/runtime/AuxRuntimeDynamicImports.d.ts +14 -0
- package/runtime/AuxRuntimeDynamicImports.js +24 -0
- package/runtime/AuxRuntimeDynamicImports.js.map +1 -0
- package/runtime/AuxVersion.d.ts +39 -0
- package/runtime/AuxVersion.js +2 -0
- package/runtime/AuxVersion.js.map +1 -0
- package/runtime/CasualOSError.d.ts +37 -0
- package/runtime/CasualOSError.js +25 -0
- package/runtime/CasualOSError.js.map +1 -0
- package/runtime/CompiledBot.d.ts +107 -0
- package/runtime/CompiledBot.js +44 -0
- package/runtime/CompiledBot.js.map +1 -0
- package/runtime/PerformanceNowPolyfill.d.ts +1 -0
- package/runtime/PerformanceNowPolyfill.js +8 -0
- package/runtime/PerformanceNowPolyfill.js.map +1 -0
- package/runtime/RecordsEvents.d.ts +1025 -0
- package/runtime/RecordsEvents.js +449 -0
- package/runtime/RecordsEvents.js.map +1 -0
- package/runtime/RuntimeBot.d.ts +177 -0
- package/runtime/RuntimeBot.js +732 -0
- package/runtime/RuntimeBot.js.map +1 -0
- package/runtime/RuntimeEvents.d.ts +126 -0
- package/runtime/RuntimeEvents.js +29 -0
- package/runtime/RuntimeEvents.js.map +1 -0
- package/runtime/RuntimeStateVersion.d.ts +23 -0
- package/runtime/RuntimeStateVersion.js +22 -0
- package/runtime/RuntimeStateVersion.js.map +1 -0
- package/runtime/Transpiler.d.ts +174 -0
- package/runtime/Transpiler.js +611 -0
- package/runtime/Transpiler.js.map +1 -0
- package/runtime/Utils.d.ts +44 -0
- package/runtime/Utils.js +253 -0
- package/runtime/Utils.js.map +1 -0
- package/runtime/index.d.ts +13 -0
- package/runtime/index.js +13 -0
- package/runtime/index.js.map +1 -0
- package/runtime/test/TestScriptBotFactory.d.ts +16 -0
- package/runtime/test/TestScriptBotFactory.js +107 -0
- package/runtime/test/TestScriptBotFactory.js.map +1 -0
|
@@ -0,0 +1,606 @@
|
|
|
1
|
+
import { isBot, botAdded, botRemoved, DEFAULT_ENERGY, getOriginalObject, ORIGINAL_OBJECT, } from '@casual-simulation/aux-common/bots';
|
|
2
|
+
import { RealtimeEditMode, } from './RuntimeBot';
|
|
3
|
+
import { RanOutOfEnergyError } from './AuxResults';
|
|
4
|
+
import { sortBy, sortedIndex, sortedIndexOf, sortedIndexBy, transform, } from 'lodash';
|
|
5
|
+
import './PerformanceNowPolyfill';
|
|
6
|
+
import { Observable, Subscription } from 'rxjs';
|
|
7
|
+
import { tap } from 'rxjs/operators';
|
|
8
|
+
import TWEEN from '@tweenjs/tween.js';
|
|
9
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
10
|
+
import stableStringify from '@casual-simulation/fast-json-stable-stringify';
|
|
11
|
+
import { ensureBotIsSerializable } from '@casual-simulation/aux-common/partitions/PartitionUtils';
|
|
12
|
+
import { isGenerator } from '@casual-simulation/js-interpreter/InterpreterUtils';
|
|
13
|
+
/**
|
|
14
|
+
* The interval between animation frames in miliseconds when using setInterval().
|
|
15
|
+
*/
|
|
16
|
+
export const SET_INTERVAL_ANIMATION_FRAME_TIME = 16;
|
|
17
|
+
/**
|
|
18
|
+
* A symbol that can be specified on objects to influence how they are stringified
|
|
19
|
+
* when printed for debug/mock/error purposes.
|
|
20
|
+
*/
|
|
21
|
+
export const DEBUG_STRING = Symbol('debug_string');
|
|
22
|
+
/**
|
|
23
|
+
* Gets the index of the bot in the given context.
|
|
24
|
+
* Returns a negative number if the bot is not in the list.
|
|
25
|
+
* @param context The context.
|
|
26
|
+
* @param bot The bot.
|
|
27
|
+
*/
|
|
28
|
+
function indexInContext(context, bot) {
|
|
29
|
+
const index = sortedIndexBy(context.bots, bot, (sb) => sb.id);
|
|
30
|
+
const expected = context.bots.length > index ? context.bots[index] : null;
|
|
31
|
+
if (!!expected && expected.id === bot.id) {
|
|
32
|
+
return index;
|
|
33
|
+
}
|
|
34
|
+
return -1;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Inserts the given bot into the global context.
|
|
38
|
+
* @param context The context.
|
|
39
|
+
* @param bot The bot.
|
|
40
|
+
*/
|
|
41
|
+
export function addToContext(context, ...bots) {
|
|
42
|
+
for (let bot of bots) {
|
|
43
|
+
if (!!context.state[bot.id]) {
|
|
44
|
+
throw new Error('Bot already exists in the context!');
|
|
45
|
+
}
|
|
46
|
+
const index = sortedIndexBy(context.bots, bot, (sb) => sb.id);
|
|
47
|
+
context.bots.splice(index, 0, bot);
|
|
48
|
+
context.state[bot.id] = bot;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Removes the given bots from the given context.
|
|
53
|
+
* @param context The context that the bots should be removed from.
|
|
54
|
+
* @param bots The bots that should be removed.
|
|
55
|
+
*/
|
|
56
|
+
export function removeFromContext(context, bots, cancelTimers = true) {
|
|
57
|
+
for (let bot of bots) {
|
|
58
|
+
const index = indexInContext(context, bot);
|
|
59
|
+
if (index < 0) {
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
context.bots.splice(index, 1);
|
|
63
|
+
delete context.state[bot.id];
|
|
64
|
+
if (cancelTimers) {
|
|
65
|
+
context.cancelBotTimers(bot.id);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Gets whether a bot with the given ID is in the given context.
|
|
71
|
+
* @param context The context.
|
|
72
|
+
* @param bot The bot.
|
|
73
|
+
*/
|
|
74
|
+
export function isInContext(context, bot) {
|
|
75
|
+
return indexInContext(context, bot) >= 0;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Defines a global context that stores all information in memory.
|
|
79
|
+
*/
|
|
80
|
+
export class MemoryGlobalContext {
|
|
81
|
+
get localTime() {
|
|
82
|
+
return Date.now() - this._startTime;
|
|
83
|
+
}
|
|
84
|
+
get startTime() {
|
|
85
|
+
return this._startTime;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Creates a new global context.
|
|
89
|
+
* @param version The version number.
|
|
90
|
+
* @param device The device that we're running on.
|
|
91
|
+
* @param scriptFactory The factory that should be used to create new script bots.
|
|
92
|
+
* @param batcher The batcher that should be used to batch changes.
|
|
93
|
+
* @param generatorProcessor The processor that should be used to process generators created from bot timer handlers.
|
|
94
|
+
*/
|
|
95
|
+
constructor(version, device, scriptFactory, batcher, generatorProcessor) {
|
|
96
|
+
/**
|
|
97
|
+
* The ordered list of script bots.
|
|
98
|
+
*/
|
|
99
|
+
this.bots = [];
|
|
100
|
+
/**
|
|
101
|
+
* The state that the runtime bots occupy.
|
|
102
|
+
*/
|
|
103
|
+
this.state = {};
|
|
104
|
+
/**
|
|
105
|
+
* The list of actions that have been queued.
|
|
106
|
+
*/
|
|
107
|
+
this.actions = [];
|
|
108
|
+
/**
|
|
109
|
+
* The list of errors that have been queued.
|
|
110
|
+
*/
|
|
111
|
+
this.errors = [];
|
|
112
|
+
/**
|
|
113
|
+
* The map of task IDs to tasks.
|
|
114
|
+
*/
|
|
115
|
+
this.tasks = new Map();
|
|
116
|
+
/**
|
|
117
|
+
* The player bot.
|
|
118
|
+
*/
|
|
119
|
+
this.playerBot = null;
|
|
120
|
+
/**
|
|
121
|
+
* The current energy that the context has.
|
|
122
|
+
*/
|
|
123
|
+
this.energy = DEFAULT_ENERGY;
|
|
124
|
+
this.global = {};
|
|
125
|
+
this.uuid = uuidv4;
|
|
126
|
+
this.instLatency = NaN;
|
|
127
|
+
this.instTimeOffset = NaN;
|
|
128
|
+
this.instTimeOffsetSpread = NaN;
|
|
129
|
+
this.forceUnguessableTaskIds = false;
|
|
130
|
+
this._taskCounter = 0;
|
|
131
|
+
this._shoutTimers = {};
|
|
132
|
+
this._numberOfTimers = 0;
|
|
133
|
+
this._loadTimes = {};
|
|
134
|
+
this.version = version;
|
|
135
|
+
this.device = device;
|
|
136
|
+
this._scriptFactory = scriptFactory;
|
|
137
|
+
this._batcher = batcher;
|
|
138
|
+
this._generatorProcessor = generatorProcessor;
|
|
139
|
+
this._listenerMap = new Map();
|
|
140
|
+
this._botTimerMap = new Map();
|
|
141
|
+
this._botWatcherMap = new Map();
|
|
142
|
+
this._portalWatcherMap = new Map();
|
|
143
|
+
this._mocks = new Map();
|
|
144
|
+
this._startTime = Date.now();
|
|
145
|
+
this.pseudoRandomNumberGenerator = null;
|
|
146
|
+
}
|
|
147
|
+
getBotIdsWithListener(tag) {
|
|
148
|
+
const set = this._listenerMap.get(tag);
|
|
149
|
+
if (!set) {
|
|
150
|
+
return [];
|
|
151
|
+
}
|
|
152
|
+
return set.slice();
|
|
153
|
+
}
|
|
154
|
+
recordListenerPresense(id, tag, hasListener) {
|
|
155
|
+
let set = this._listenerMap.get(tag);
|
|
156
|
+
if (!hasListener && !set) {
|
|
157
|
+
// we don't have a listener to record
|
|
158
|
+
// and there is no list for the tag
|
|
159
|
+
// so there is nothing to do.
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
if (!set) {
|
|
163
|
+
set = [];
|
|
164
|
+
this._listenerMap.set(tag, set);
|
|
165
|
+
}
|
|
166
|
+
if (hasListener) {
|
|
167
|
+
const index = sortedIndex(set, id);
|
|
168
|
+
// ensure that our indexing is in bounds
|
|
169
|
+
// to prevent the array from being put into slow-mode
|
|
170
|
+
// see https://stackoverflow.com/a/26737403/1832856
|
|
171
|
+
if (index < set.length && index >= 0) {
|
|
172
|
+
const current = set[index];
|
|
173
|
+
if (current !== id) {
|
|
174
|
+
set.splice(index, 0, id);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
set.splice(index, 0, id);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
const index = sortedIndexOf(set, id);
|
|
183
|
+
if (index >= 0) {
|
|
184
|
+
set.splice(index, 1);
|
|
185
|
+
}
|
|
186
|
+
// Delete the tag from the list if there are no more IDs
|
|
187
|
+
if (set.length <= 0) {
|
|
188
|
+
this._listenerMap.delete(tag);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
recordBotTimer(id, info) {
|
|
193
|
+
let list = this._botTimerMap.get(id);
|
|
194
|
+
if (!list) {
|
|
195
|
+
list = [];
|
|
196
|
+
this._botTimerMap.set(id, list);
|
|
197
|
+
}
|
|
198
|
+
list.push(info);
|
|
199
|
+
this._numberOfTimers += 1;
|
|
200
|
+
if (info.type === 'watch_bot') {
|
|
201
|
+
let watchers = this._botWatcherMap.get(info.botId);
|
|
202
|
+
if (!watchers) {
|
|
203
|
+
watchers = [];
|
|
204
|
+
this._botWatcherMap.set(info.botId, watchers);
|
|
205
|
+
}
|
|
206
|
+
watchers.push(info);
|
|
207
|
+
}
|
|
208
|
+
else if (info.type === 'watch_portal') {
|
|
209
|
+
let watchers = this._portalWatcherMap.get(info.portalId);
|
|
210
|
+
if (!watchers) {
|
|
211
|
+
watchers = [];
|
|
212
|
+
this._portalWatcherMap.set(info.portalId, watchers);
|
|
213
|
+
}
|
|
214
|
+
watchers.push(info);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
removeBotTimer(id, type, timer) {
|
|
218
|
+
let list = this._botTimerMap.get(id);
|
|
219
|
+
if (list) {
|
|
220
|
+
let index = list.findIndex((t) => t.type === type && t.timerId === timer);
|
|
221
|
+
if (index >= 0) {
|
|
222
|
+
list.splice(index, 1);
|
|
223
|
+
this._numberOfTimers = Math.max(0, this._numberOfTimers - 1);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
processBotTimerResult(result) {
|
|
228
|
+
if (isGenerator(result)) {
|
|
229
|
+
this._generatorProcessor.processGenerator(result);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
getBotTimers(id) {
|
|
233
|
+
let timers = this._botTimerMap.get(id);
|
|
234
|
+
if (timers) {
|
|
235
|
+
return timers.slice();
|
|
236
|
+
}
|
|
237
|
+
return [];
|
|
238
|
+
}
|
|
239
|
+
getWatchersForBot(id) {
|
|
240
|
+
let watchers = this._botWatcherMap.get(id);
|
|
241
|
+
if (watchers) {
|
|
242
|
+
return watchers.slice();
|
|
243
|
+
}
|
|
244
|
+
return [];
|
|
245
|
+
}
|
|
246
|
+
getWatchersForPortal(id) {
|
|
247
|
+
let watchers = this._portalWatcherMap.get(id);
|
|
248
|
+
if (watchers) {
|
|
249
|
+
return watchers.slice();
|
|
250
|
+
}
|
|
251
|
+
return [];
|
|
252
|
+
}
|
|
253
|
+
getWatchedPortals() {
|
|
254
|
+
return new Set(this._portalWatcherMap.keys());
|
|
255
|
+
}
|
|
256
|
+
cancelAndRemoveBotTimer(id, type, timerId) {
|
|
257
|
+
let timers = this._botTimerMap.get(id);
|
|
258
|
+
if (!timers) {
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
for (let i = 0; i < timers.length; i++) {
|
|
262
|
+
let timer = timers[i];
|
|
263
|
+
if (timer.timerId === timerId && timer.type === type) {
|
|
264
|
+
timers.splice(i, 1);
|
|
265
|
+
this._clearTimer(timer);
|
|
266
|
+
i -= 1;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
cancelBotTimers(id) {
|
|
271
|
+
let list = this._botTimerMap.get(id);
|
|
272
|
+
if (list) {
|
|
273
|
+
this._clearTimers(list);
|
|
274
|
+
}
|
|
275
|
+
this._botTimerMap.delete(id);
|
|
276
|
+
}
|
|
277
|
+
cancelAllBotTimers() {
|
|
278
|
+
for (let list of this._botTimerMap.values()) {
|
|
279
|
+
this._clearTimers(list);
|
|
280
|
+
}
|
|
281
|
+
this._botTimerMap.clear();
|
|
282
|
+
}
|
|
283
|
+
cancelAndRemoveTimers(timerId, type) {
|
|
284
|
+
for (let list of this._botTimerMap.values()) {
|
|
285
|
+
for (let i = 0; i < list.length; i++) {
|
|
286
|
+
const timer = list[i];
|
|
287
|
+
if (timer.timerId === timerId &&
|
|
288
|
+
(!type || timer.type === type)) {
|
|
289
|
+
this._clearTimer(timer);
|
|
290
|
+
list.splice(i, 1);
|
|
291
|
+
i -= 1;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
getNumberOfActiveTimers() {
|
|
297
|
+
return this._numberOfTimers;
|
|
298
|
+
}
|
|
299
|
+
_clearTimers(list) {
|
|
300
|
+
for (let timer of list) {
|
|
301
|
+
this._clearTimer(timer);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
_clearTimer(timer) {
|
|
305
|
+
this._numberOfTimers = Math.max(0, this._numberOfTimers - 1);
|
|
306
|
+
if (timer.type === 'timeout') {
|
|
307
|
+
clearTimeout(timer.timerId);
|
|
308
|
+
}
|
|
309
|
+
else if (timer.type === 'interval') {
|
|
310
|
+
clearInterval(timer.timerId);
|
|
311
|
+
}
|
|
312
|
+
else if (timer.type === 'animation') {
|
|
313
|
+
timer.cancel();
|
|
314
|
+
}
|
|
315
|
+
else if (timer.type === 'watch_bot') {
|
|
316
|
+
let watchers = this._botWatcherMap.get(timer.botId);
|
|
317
|
+
if (watchers) {
|
|
318
|
+
let index = watchers.findIndex((w) => w.timerId === timer.timerId);
|
|
319
|
+
if (index >= 0) {
|
|
320
|
+
watchers.splice(index, 1);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
else if (timer.type === 'watch_portal') {
|
|
325
|
+
let watchers = this._portalWatcherMap.get(timer.portalId);
|
|
326
|
+
if (watchers) {
|
|
327
|
+
let index = watchers.findIndex((w) => w.timerId === timer.timerId);
|
|
328
|
+
if (index >= 0) {
|
|
329
|
+
watchers.splice(index, 1);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Enqueues the given action.
|
|
336
|
+
* @param action The action to enqueue.
|
|
337
|
+
*/
|
|
338
|
+
enqueueAction(action) {
|
|
339
|
+
if (action.type === 'remote') {
|
|
340
|
+
const index = this.actions.indexOf(action.event);
|
|
341
|
+
if (index >= 0) {
|
|
342
|
+
this.actions[index] = action;
|
|
343
|
+
}
|
|
344
|
+
else {
|
|
345
|
+
this.actions.push(action);
|
|
346
|
+
this._batcher.notifyActionEnqueued(action);
|
|
347
|
+
this._batcher.notifyChange();
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
else {
|
|
351
|
+
this.actions.push(action);
|
|
352
|
+
this._batcher.notifyActionEnqueued(action);
|
|
353
|
+
this._batcher.notifyChange();
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
dequeueActions() {
|
|
357
|
+
let actions = this.actions;
|
|
358
|
+
this.actions = [];
|
|
359
|
+
return actions;
|
|
360
|
+
}
|
|
361
|
+
// TODO: Improve to correctly handle when a non ScriptError object is added
|
|
362
|
+
// but contains symbol properties that reference the throwing bot and tag.
|
|
363
|
+
// The AuxRuntime should look for these error objects and create ScriptErrors for them.
|
|
364
|
+
enqueueError(error) {
|
|
365
|
+
if (error instanceof RanOutOfEnergyError) {
|
|
366
|
+
throw error;
|
|
367
|
+
}
|
|
368
|
+
this.errors.push(error);
|
|
369
|
+
this._batcher.notifyChange();
|
|
370
|
+
}
|
|
371
|
+
dequeueErrors() {
|
|
372
|
+
let errors = this.errors;
|
|
373
|
+
this.errors = [];
|
|
374
|
+
return errors;
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* Converts the given bot into a non-script enabled version.
|
|
378
|
+
* @param bot The bot.
|
|
379
|
+
*/
|
|
380
|
+
unwrapBot(bot) {
|
|
381
|
+
if (isBot(bot)) {
|
|
382
|
+
return {
|
|
383
|
+
id: bot.id,
|
|
384
|
+
space: bot.space,
|
|
385
|
+
// TODO: Fix for proxy objects
|
|
386
|
+
tags: transform(bot.tags, (result, value, key) => {
|
|
387
|
+
result[key] = getOriginalObject(value);
|
|
388
|
+
}, {}),
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
return bot;
|
|
392
|
+
}
|
|
393
|
+
createBot(bot) {
|
|
394
|
+
const newBot = ensureBotIsSerializable(bot);
|
|
395
|
+
const script = this._scriptFactory.createRuntimeBot(newBot) || null;
|
|
396
|
+
if (script) {
|
|
397
|
+
addToContext(this, script);
|
|
398
|
+
if (script.listeners) {
|
|
399
|
+
for (let key in script.listeners) {
|
|
400
|
+
if (typeof script.listeners[key] === 'function') {
|
|
401
|
+
this.recordListenerPresense(script.id, key, true);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
this.enqueueAction(botAdded(newBot));
|
|
407
|
+
return script;
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Destroys the given bot.
|
|
411
|
+
* @param bot The bot to destroy.
|
|
412
|
+
*/
|
|
413
|
+
destroyBot(bot) {
|
|
414
|
+
const index = indexInContext(this, bot);
|
|
415
|
+
if (index < 0) {
|
|
416
|
+
return;
|
|
417
|
+
}
|
|
418
|
+
const mode = this._scriptFactory.destroyScriptBot(bot);
|
|
419
|
+
if (mode === RealtimeEditMode.Immediate) {
|
|
420
|
+
this.bots.splice(index, 1);
|
|
421
|
+
delete this.state[bot.id];
|
|
422
|
+
this.cancelBotTimers(bot.id);
|
|
423
|
+
if (bot.listeners) {
|
|
424
|
+
for (let key in bot.listeners) {
|
|
425
|
+
if (typeof bot.listeners[key] === 'function') {
|
|
426
|
+
this.recordListenerPresense(bot.id, key, false);
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
this.enqueueAction(botRemoved(bot.id));
|
|
432
|
+
}
|
|
433
|
+
createTask(unguessableId, allowRemoteResolution) {
|
|
434
|
+
let resolve;
|
|
435
|
+
let reject;
|
|
436
|
+
let promise = new Promise((res, rej) => {
|
|
437
|
+
resolve = res;
|
|
438
|
+
reject = rej;
|
|
439
|
+
});
|
|
440
|
+
const task = {
|
|
441
|
+
taskId: !unguessableId && !this.forceUnguessableTaskIds
|
|
442
|
+
? (this._taskCounter += 1)
|
|
443
|
+
: !this.forceUnguessableTaskIds
|
|
444
|
+
? this.uuid()
|
|
445
|
+
: uuidv4(),
|
|
446
|
+
allowRemoteResolution: allowRemoteResolution || false,
|
|
447
|
+
resolve: resolve,
|
|
448
|
+
reject: reject,
|
|
449
|
+
promise,
|
|
450
|
+
};
|
|
451
|
+
this.tasks.set(task.taskId, task);
|
|
452
|
+
return task;
|
|
453
|
+
}
|
|
454
|
+
resolveTask(taskId, result, remote) {
|
|
455
|
+
const task = this.tasks.get(taskId);
|
|
456
|
+
if (task && (task.allowRemoteResolution || remote === false)) {
|
|
457
|
+
this.tasks.delete(taskId);
|
|
458
|
+
task.resolve(result);
|
|
459
|
+
return true;
|
|
460
|
+
}
|
|
461
|
+
return false;
|
|
462
|
+
}
|
|
463
|
+
rejectTask(taskId, error, remote) {
|
|
464
|
+
const task = this.tasks.get(taskId);
|
|
465
|
+
if (task && (task.allowRemoteResolution || remote === false)) {
|
|
466
|
+
this.tasks.delete(taskId);
|
|
467
|
+
task.reject(error);
|
|
468
|
+
return true;
|
|
469
|
+
}
|
|
470
|
+
return false;
|
|
471
|
+
}
|
|
472
|
+
getShoutTimers() {
|
|
473
|
+
const keys = Object.keys(this._shoutTimers);
|
|
474
|
+
const list = keys.map((k) => ({
|
|
475
|
+
tag: k,
|
|
476
|
+
timeMs: this._shoutTimers[k],
|
|
477
|
+
}));
|
|
478
|
+
return sortBy(list, (timer) => -timer.timeMs);
|
|
479
|
+
}
|
|
480
|
+
addShoutTime(shout, ms) {
|
|
481
|
+
if (ms < 0) {
|
|
482
|
+
throw new Error('Cannot add negative time to a shout timer.');
|
|
483
|
+
}
|
|
484
|
+
if (!(shout in this._shoutTimers)) {
|
|
485
|
+
this._shoutTimers[shout] = 0;
|
|
486
|
+
}
|
|
487
|
+
this._shoutTimers[shout] += ms;
|
|
488
|
+
}
|
|
489
|
+
getLoadTimes() {
|
|
490
|
+
return Object.assign({}, this._loadTimes);
|
|
491
|
+
}
|
|
492
|
+
setLoadTime(key, ms) {
|
|
493
|
+
this._loadTimes[key] = ms;
|
|
494
|
+
}
|
|
495
|
+
startAnimationLoop() {
|
|
496
|
+
if (!this._animationLoop) {
|
|
497
|
+
const sub = animationLoop()
|
|
498
|
+
.pipe(tap(() => this._updateAnimationLoop()))
|
|
499
|
+
.subscribe();
|
|
500
|
+
this._animationLoop = new Subscription(() => {
|
|
501
|
+
sub.unsubscribe();
|
|
502
|
+
this._animationLoop = null;
|
|
503
|
+
});
|
|
504
|
+
}
|
|
505
|
+
return this._animationLoop;
|
|
506
|
+
}
|
|
507
|
+
/**
|
|
508
|
+
* Sets the data that should be used to mock the given function.
|
|
509
|
+
* @param func The function that the return values should be set for.
|
|
510
|
+
* @param returnValues The list of return values that should be used for the mock.
|
|
511
|
+
*/
|
|
512
|
+
setMockReturns(func, returnValues) {
|
|
513
|
+
if (ORIGINAL_OBJECT in func) {
|
|
514
|
+
func = func[ORIGINAL_OBJECT];
|
|
515
|
+
}
|
|
516
|
+
this._mocks.set(func, returnValues.slice());
|
|
517
|
+
}
|
|
518
|
+
/**
|
|
519
|
+
* Sets the data that should be used to mock the given function for the given arguments.
|
|
520
|
+
* @param func The function.
|
|
521
|
+
* @param args The arguments that should be matched against.
|
|
522
|
+
* @param returnValue The return value that should be used for the mock.
|
|
523
|
+
*/
|
|
524
|
+
setMockReturn(func, args, returnValue) {
|
|
525
|
+
if (ORIGINAL_OBJECT in func) {
|
|
526
|
+
func = func[ORIGINAL_OBJECT];
|
|
527
|
+
}
|
|
528
|
+
let mocks = this._mocks.get(func);
|
|
529
|
+
let map;
|
|
530
|
+
if (mocks instanceof Map) {
|
|
531
|
+
map = mocks;
|
|
532
|
+
}
|
|
533
|
+
else {
|
|
534
|
+
map = new Map();
|
|
535
|
+
this._mocks.set(func, map);
|
|
536
|
+
}
|
|
537
|
+
const argJson = stableStringify(args, { space: 2 });
|
|
538
|
+
map.set(argJson, returnValue);
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* Gets the data that should be used as the function's return value.
|
|
542
|
+
* @param func The function.
|
|
543
|
+
*/
|
|
544
|
+
getNextMockReturn(func, functionName, args) {
|
|
545
|
+
if (ORIGINAL_OBJECT in func) {
|
|
546
|
+
func = func[ORIGINAL_OBJECT];
|
|
547
|
+
}
|
|
548
|
+
if (!this._mocks.has(func)) {
|
|
549
|
+
throw new Error(`No mask data for function: ${debugStringifyFunction(functionName, args)}`);
|
|
550
|
+
}
|
|
551
|
+
let arrayOrMap = this._mocks.get(func);
|
|
552
|
+
if (arrayOrMap instanceof Map) {
|
|
553
|
+
const argJson = stableStringify(args, { space: 2 });
|
|
554
|
+
if (arrayOrMap.has(argJson)) {
|
|
555
|
+
return arrayOrMap.get(argJson);
|
|
556
|
+
}
|
|
557
|
+
else {
|
|
558
|
+
throw new Error(`No mask data for function (no matching input): ${debugStringifyFunction(functionName, args)}`);
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
else {
|
|
562
|
+
if (arrayOrMap.length > 0) {
|
|
563
|
+
return arrayOrMap.shift();
|
|
564
|
+
}
|
|
565
|
+
else {
|
|
566
|
+
throw new Error(`No mask data for function (out of return values): ${debugStringifyFunction(functionName, args)}`);
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
_updateAnimationLoop() {
|
|
571
|
+
TWEEN.update(this.localTime);
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* Creates a debug string that is useful for visualizing a function call.
|
|
576
|
+
* @param functionName The name of the function.
|
|
577
|
+
* @param args The arguments that were passed to the function.
|
|
578
|
+
* @returns
|
|
579
|
+
*/
|
|
580
|
+
export function debugStringifyFunction(functionName, args) {
|
|
581
|
+
const argList = args.map((a) => debugStringify(a)).join(', ');
|
|
582
|
+
return `${functionName}(${argList})`;
|
|
583
|
+
}
|
|
584
|
+
/**
|
|
585
|
+
* Creates a debug string from the given value.
|
|
586
|
+
* @param value
|
|
587
|
+
* @returns
|
|
588
|
+
*/
|
|
589
|
+
export function debugStringify(value) {
|
|
590
|
+
if ((typeof value === 'object' || typeof value === 'function') &&
|
|
591
|
+
DEBUG_STRING in value) {
|
|
592
|
+
return value[DEBUG_STRING];
|
|
593
|
+
}
|
|
594
|
+
return stableStringify(value, { space: 2 });
|
|
595
|
+
}
|
|
596
|
+
function animationLoop() {
|
|
597
|
+
return new Observable((observer) => {
|
|
598
|
+
let interval = setInterval(() => {
|
|
599
|
+
observer.next();
|
|
600
|
+
}, SET_INTERVAL_ANIMATION_FRAME_TIME);
|
|
601
|
+
return () => {
|
|
602
|
+
clearInterval(interval);
|
|
603
|
+
};
|
|
604
|
+
});
|
|
605
|
+
}
|
|
606
|
+
//# sourceMappingURL=AuxGlobalContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuxGlobalContext.js","sourceRoot":"","sources":["AuxGlobalContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,KAAK,EAEL,QAAQ,EACR,UAAU,EACV,cAAc,EAEd,iBAAiB,EACjB,eAAe,GAClB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAGH,gBAAgB,GAGnB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAe,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EACH,MAAM,EACN,WAAW,EACX,aAAa,EACb,aAAa,EACb,SAAS,GACZ,MAAM,QAAQ,CAAC;AAChB,OAAO,0BAA0B,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAoB,MAAM,MAAM,CAAC;AAClE,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,KAAK,MAAM,mBAAmB,CAAC;AACtC,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,eAAe,MAAM,+CAA+C,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,yDAAyD,CAAC;AAKlG,OAAO,EAAE,WAAW,EAAE,MAAM,oDAAoD,CAAC;AAGjF;;GAEG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAW,EAAE,CAAC;AAE5D;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;AAydnD;;;;;GAKG;AACH,SAAS,cAAc,CAAC,OAAyB,EAAE,GAAQ;IACvD,MAAM,KAAK,GAAG,aAAa,CAAC,OAAO,CAAC,IAAI,EAAc,GAAG,EAAE,CAAC,EAAE,EA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