eligius 1.0.6 → 1.0.7
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/README.md +2 -0
- package/dist/eligius.cjs.development.js +23 -4
- package/dist/eligius.cjs.development.js.map +1 -1
- package/dist/eligius.cjs.production.min.js +1 -1
- package/dist/eligius.cjs.production.min.js.map +1 -1
- package/dist/eligius.esm.js +23 -4
- package/dist/eligius.esm.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@ A Javascript engine that allows arbitrary functionality to be triggered accordin
|
|
|
4
4
|
|
|
5
5
|
The engine can be the basis for video annotations, presentation software or interactive infographics, for example.
|
|
6
6
|
|
|
7
|
+
Eligius is NOT a game or animation engine.
|
|
8
|
+
|
|
7
9
|
## description
|
|
8
10
|
|
|
9
11
|
The main concepts in Eligius are timelines, actions and operations. A timeline can be played, paused, stopped and scrubbed through.
|
|
@@ -21,6 +21,8 @@ var hotkeys__default = /*#__PURE__*/_interopDefaultLegacy(hotkeys);
|
|
|
21
21
|
function prepareValueForSerialization(value) {
|
|
22
22
|
if (Array.isArray(value)) {
|
|
23
23
|
return value.map(prepareValueForSerialization);
|
|
24
|
+
} else if (value instanceof jQuery) {
|
|
25
|
+
return 'jQuery object';
|
|
24
26
|
} else if (typeof value === 'object') {
|
|
25
27
|
return Object.fromEntries(Object.entries(value).map(function (_ref) {
|
|
26
28
|
var name = _ref[0],
|
|
@@ -28,7 +30,8 @@ function prepareValueForSerialization(value) {
|
|
|
28
30
|
return [name, prepareValueForSerialization(value)];
|
|
29
31
|
}));
|
|
30
32
|
} else if (typeof value === 'function') {
|
|
31
|
-
|
|
33
|
+
var funcString = value.toString();
|
|
34
|
+
return funcString.substring(0, funcString.indexOf('{') + 1);
|
|
32
35
|
}
|
|
33
36
|
|
|
34
37
|
return value;
|
|
@@ -43,11 +46,19 @@ var DevToolEventListener = /*#__PURE__*/function () {
|
|
|
43
46
|
var _proto = DevToolEventListener.prototype;
|
|
44
47
|
|
|
45
48
|
_proto.handleEvent = function handleEvent(eventName, eventTopic, args) {
|
|
46
|
-
|
|
49
|
+
var message = {
|
|
47
50
|
eventName: eventName,
|
|
48
51
|
eventTopic: eventTopic,
|
|
49
52
|
args: prepareValueForSerialization(args)
|
|
50
|
-
}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
try {
|
|
56
|
+
this.agent.postMessage('eligius-diagnostics-event', message);
|
|
57
|
+
} catch (e) {
|
|
58
|
+
console.error('postmessage failed');
|
|
59
|
+
console.error(e);
|
|
60
|
+
console.log('message', message);
|
|
61
|
+
}
|
|
51
62
|
};
|
|
52
63
|
|
|
53
64
|
return DevToolEventListener;
|
|
@@ -2924,7 +2935,15 @@ var EngineFactory = /*#__PURE__*/function () {
|
|
|
2924
2935
|
eventbus.registerEventlistener(eventbusListener);
|
|
2925
2936
|
|
|
2926
2937
|
Diagnostics.send = function (name, data) {
|
|
2927
|
-
|
|
2938
|
+
var message = prepareValueForSerialization(data);
|
|
2939
|
+
|
|
2940
|
+
try {
|
|
2941
|
+
agent.postMessage(name, message);
|
|
2942
|
+
} catch (e) {
|
|
2943
|
+
console.error('postmessage failed');
|
|
2944
|
+
console.error(e);
|
|
2945
|
+
console.log('message', message);
|
|
2946
|
+
}
|
|
2928
2947
|
};
|
|
2929
2948
|
|
|
2930
2949
|
Diagnostics.send('eligius-diagnostics-factory', 'Diagnostics initialized');
|