@woosh/meep-engine 2.60.1 → 2.62.0
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/build/meep.cjs +20244 -20262
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +20244 -20262
- package/package.json +1 -1
- package/src/core/binary/BitSet.js +1 -1
- package/src/core/bvh2/BinaryNode.js +16 -13
- package/src/core/bvh2/LeafNode.js +6 -3
- package/src/core/bvh2/bvh3/query/bvh_query_user_data_overlaps_sphere.js +81 -0
- package/src/core/geom/3d/aabb/AABB3.js +24 -36
- package/src/core/geom/3d/aabb/aabb3_array_compute_from_sphere.js +22 -0
- package/src/core/geom/3d/aabb/aabb3_array_intersects_sphere.js +22 -0
- package/src/core/geom/3d/aabb/aabb3_array_intersects_sphere_array.js +11 -0
- package/src/core/geom/3d/aabb/aabb3_signed_distance_to_aabb3.js +28 -0
- package/src/core/geom/3d/aabb/serializeAABB3Quantized16Uint.js +19 -10
- package/src/core/geom/3d/sphere/harmonics/sh3_dering_optimize_positive.js +30 -182
- package/src/core/geom/3d/sphere/harmonics/sh3_dering_optimize_positive.spec.js +27 -1
- package/src/core/geom/3d/tetrahedra/delaunay/Cavity.js +3 -4
- package/src/core/geom/ConicRay.js +16 -21
- package/src/core/geom/ConicRay.spec.js +24 -0
- package/src/core/geom/packing/miniball/Miniball.js +68 -117
- package/src/core/geom/packing/miniball/Miniball.spec.js +3 -3
- package/src/core/geom/packing/miniball/Subspan.js +47 -34
- package/src/core/geom/packing/miniball/miniball_compute_quality.js +64 -0
- package/src/core/math/bessel_3.js +1 -0
- package/src/core/math/random/randomBytes.js +2 -2
- package/src/core/math/sqr.js +8 -0
- package/src/core/model/node-graph/Connection.js +21 -23
- package/src/core/model/node-graph/DataType.js +16 -17
- package/src/core/model/node-graph/NodeGraph.js +49 -50
- package/src/core/model/node-graph/node/NodeDescription.js +42 -44
- package/src/core/model/node-graph/node/NodeInstance.js +59 -60
- package/src/core/model/node-graph/node/NodeInstancePortReference.js +27 -29
- package/src/core/model/node-graph/node/NodeRegistry.js +16 -18
- package/src/core/model/node-graph/node/Port.js +35 -37
- package/src/core/model/node-graph/node/parameter/NodeParameterDescription.js +27 -13
- package/src/core/path/computePathDirectory.spec.js +8 -0
- package/src/core/process/BaseProcess.d.ts +5 -0
- package/src/core/process/WatchDog.js +76 -75
- package/src/core/process/action/AsynchronousAction.js +24 -22
- package/src/core/process/executor/profile/Profile.js +34 -24
- package/src/core/process/executor/profile/TraceEvent.js +75 -75
- package/src/core/process/worker/OnDemandWorkerManager.js +27 -30
- package/src/core/process/worker/WorkerBuilder.js +149 -149
- package/src/core/process/worker/WorkerProxy.js +25 -21
- package/src/core/process/worker/extractTransferables.js +2 -2
- package/src/engine/Engine.js +58 -53
- package/src/engine/EngineConfiguration.d.ts +4 -4
- package/src/engine/ecs/EntityManager.js +517 -614
- package/src/engine/ecs/System.js +2 -2
- package/src/engine/ecs/foliage/ecs/Foliage2System.js +3 -0
- package/src/engine/ecs/foliage/ecs/InstancedMeshComponent.js +4 -1
- package/src/engine/ecs/foliage/ecs/convertInstancedMeshComponents2Entities.js +64 -0
- package/src/engine/ecs/foliage/ecs/{InstancedMeshUtils.js → optimizeIndividualMeshesEntitiesToInstances.js} +11 -70
- package/src/engine/ecs/transform/Transform.d.ts +7 -5
- package/src/engine/ecs/transform/Transform.js +30 -16
- package/src/engine/ecs/validateSystem.js +89 -0
- package/src/engine/graphics/GraphicsEngine.js +433 -483
- package/src/engine/graphics/camera/testClippingPlaneComputation.js +42 -46
- package/src/engine/graphics/ecs/decal/v2/FPDecalSystem.js +2 -2
- package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.js +2 -2
- package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMeshSystem.js +2 -2
- package/src/engine/graphics/ecs/path/testPathDisplaySystem.js +49 -52
- package/src/engine/graphics/ecs/path/tube/prototypeAnimatedPathMask.js +52 -56
- package/src/engine/graphics/ecs/water2/shader/testWaterShader.js +20 -22
- package/src/engine/graphics/particles/ecs/ParticleEmitterSystem.js +43 -25
- package/src/engine/graphics/particles/particular/engine/ParticularEngine.js +160 -180
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.js +37 -41
- package/src/engine/graphics/particles/particular/engine/utils/volume/prototypeParticleVolume.js +63 -67
- package/src/engine/graphics/render/buffer/buffers/prototypeNormalFrameBuffer.js +46 -50
- package/src/engine/graphics/render/forward_plus/plugin/ptototypeFPPlugin.js +61 -65
- package/src/engine/graphics/render/visibility/hiz/prototypeHiZ.js +48 -52
- package/src/engine/graphics/shadows/testShadowMapRendering.js +28 -32
- package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_lanczos.spec.js +22 -20
- package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_linear.js +10 -13
- package/src/engine/graphics/texture/virtual/VirtualTexture.spec.js +1 -1
- package/src/engine/plugin/EnginePluginManager.d.ts +6 -1
- package/src/engine/sound/dB2Volume.js +8 -0
- package/src/engine/sound/ecs/emitter/SoundEmitter.js +125 -99
- package/src/engine/sound/ecs/emitter/SoundEmitterComponentContext.js +4 -42
- package/src/engine/sound/ecs/emitter/SoundEmitterSystem.js +31 -121
- package/src/engine/sound/volume2dB.js +8 -0
- package/src/generation/theme/ThemeEngine.js +19 -53
- package/src/engine/ecs/components/ClingToHeightMap.js +0 -19
- package/src/engine/ecs/components/SynchronizePosition.js +0 -15
- package/src/engine/ecs/systems/ClingToHeightMapSystem.js +0 -170
- package/src/engine/ecs/systems/SynchronizePositionSystem.js +0 -43
- package/src/engine/graphics/geometry/bvh/buffered/BVHFromBufferGeometry.js +0 -133
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import {assert} from "../../../assert.js";
|
|
2
|
+
import {computeHashIntegerArray} from "../../../collection/array/computeHashIntegerArray.js";
|
|
3
|
+
import {computeStringHash} from "../../../primitives/strings/computeStringHash.js";
|
|
4
|
+
import {objectKeyByValue} from "../../object/objectKeyByValue.js";
|
|
5
|
+
import {DataType} from "../DataType.js";
|
|
6
|
+
import {PortDirection} from "./PortDirection.js";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @type {number}
|
|
@@ -11,37 +11,35 @@ import { assert } from "../../../assert.js";
|
|
|
11
11
|
let id_counter = 0;
|
|
12
12
|
|
|
13
13
|
export class Port {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
this.metadata = {};
|
|
44
|
-
}
|
|
14
|
+
/**
|
|
15
|
+
* Human-readable label
|
|
16
|
+
* @type {String}
|
|
17
|
+
*/
|
|
18
|
+
name = "";
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* ID uniquely identifies object within some context. Ids are assumed to be immutable
|
|
22
|
+
* @type {number}
|
|
23
|
+
*/
|
|
24
|
+
id = id_counter++;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @type {PortDirection|number}
|
|
29
|
+
*/
|
|
30
|
+
direction = PortDirection.Unspecified;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @type {DataType}
|
|
35
|
+
*/
|
|
36
|
+
dataType = null;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Unstructured user data
|
|
40
|
+
* @type {object}
|
|
41
|
+
*/
|
|
42
|
+
metadata = {};
|
|
45
43
|
|
|
46
44
|
hash() {
|
|
47
45
|
const dataType = this.dataType;
|
|
@@ -1,18 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import {noop} from "../../../../function/Functions.js";
|
|
2
|
+
import {NodeParameterDataType} from "./NodeParameterDataType.js";
|
|
3
3
|
|
|
4
4
|
export class NodeParameterDescription {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Human-readable label
|
|
8
|
+
* @type {string}
|
|
9
|
+
*/
|
|
10
|
+
name = "";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Unique integer identifier
|
|
14
|
+
* @type {number}
|
|
15
|
+
*/
|
|
16
|
+
id = 0;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {NodeParameterDataType|number}
|
|
21
|
+
*/
|
|
22
|
+
type = NodeParameterDataType.Number;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string|number|boolean}
|
|
27
|
+
*/
|
|
28
|
+
defaultValue = undefined;
|
|
29
|
+
|
|
16
30
|
|
|
17
31
|
/**
|
|
18
32
|
*
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import {computePathDirectory} from "./computePathDirectory.js";
|
|
2
|
+
|
|
3
|
+
test("basics", () => {
|
|
4
|
+
expect(computePathDirectory('')).toBe("");
|
|
5
|
+
expect(computePathDirectory('/')).toBe("");
|
|
6
|
+
expect(computePathDirectory('/hello')).toBe("");
|
|
7
|
+
expect(computePathDirectory('/hello/world')).toBe("/hello");
|
|
8
|
+
});
|
|
@@ -1,96 +1,97 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
* @param {function} action
|
|
4
|
-
* @param {*} [actionContext]
|
|
5
|
-
* @constructor
|
|
6
|
-
*/
|
|
7
|
-
function WatchDog(action, actionContext) {
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
10
|
-
* @type {Function}
|
|
11
|
-
*/
|
|
12
|
-
this.action = action;
|
|
1
|
+
export class WatchDog {
|
|
13
2
|
|
|
14
|
-
|
|
15
|
-
*
|
|
16
|
-
* @type {*}
|
|
17
|
-
*/
|
|
18
|
-
this.actionContext = actionContext;
|
|
3
|
+
timeoutId = -1;
|
|
19
4
|
|
|
20
|
-
|
|
5
|
+
timeout = 0;
|
|
21
6
|
|
|
22
|
-
|
|
7
|
+
__timeLastKicked = 0;
|
|
23
8
|
|
|
24
|
-
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
* @param {function} action
|
|
12
|
+
* @param {*} [actionContext]
|
|
13
|
+
* @constructor
|
|
14
|
+
*/
|
|
15
|
+
constructor(action, actionContext) {
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @type {Function}
|
|
19
|
+
*/
|
|
20
|
+
this.action = action;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {*}
|
|
25
|
+
*/
|
|
26
|
+
this.actionContext = actionContext;
|
|
27
|
+
}
|
|
25
28
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
bark() {
|
|
30
|
+
//
|
|
31
|
+
console.warn('WatchDog.bark');
|
|
29
32
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
33
|
+
this.action.call(this.actionContext);
|
|
34
|
+
//
|
|
35
|
+
this.timeoutId = -1;
|
|
36
|
+
}
|
|
35
37
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
start() {
|
|
39
|
+
//console.warn(`WatchDog.start`);
|
|
38
40
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
if (this.isActive()) {
|
|
42
|
+
//do nothing
|
|
43
|
+
} else {
|
|
44
|
+
this.timeoutId = setTimeout(this.bark, this.timeout);
|
|
45
|
+
this.__timeLastKicked = Date.now();
|
|
46
|
+
}
|
|
44
47
|
}
|
|
45
|
-
};
|
|
46
48
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
stop() {
|
|
50
|
+
//console.warn(`WatchDog.stop`);
|
|
49
51
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
if (this.isActive()) {
|
|
53
|
+
clearTimeout(this.timeoutId);
|
|
54
|
+
this.timeoutId = -1;
|
|
55
|
+
} else {
|
|
56
|
+
//do nothing, no active timeout
|
|
57
|
+
}
|
|
55
58
|
}
|
|
56
|
-
};
|
|
57
59
|
|
|
58
|
-
/**
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @returns {boolean}
|
|
63
|
+
*/
|
|
64
|
+
isActive() {
|
|
65
|
+
return this.timeoutId !== -1;
|
|
66
|
+
}
|
|
65
67
|
|
|
66
|
-
/**
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
/**
|
|
69
|
+
*
|
|
70
|
+
*/
|
|
71
|
+
kick() {
|
|
72
|
+
// const timeLastKicked = this.__timeLastKicked;
|
|
71
73
|
|
|
72
|
-
|
|
74
|
+
this.__timeLastKicked = Date.now();
|
|
73
75
|
|
|
74
|
-
|
|
76
|
+
// const delta = timeNow - timeLastKicked;
|
|
75
77
|
|
|
76
|
-
|
|
78
|
+
//TODO: remember callstack
|
|
77
79
|
|
|
78
|
-
|
|
80
|
+
// console.warn(`WatchDog.kick. ${delta}ms since last`);
|
|
79
81
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
if (this.isActive()) {
|
|
83
|
+
clearTimeout(this.timeoutId);
|
|
84
|
+
this.timeoutId = setTimeout(this.bark, this.timeout);
|
|
85
|
+
} else {
|
|
86
|
+
throw new Error(`WatchDog is not active`);
|
|
87
|
+
}
|
|
85
88
|
}
|
|
86
|
-
};
|
|
87
89
|
|
|
88
|
-
/**
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
export { WatchDog };
|
|
90
|
+
/**
|
|
91
|
+
*
|
|
92
|
+
* @param {number} delay in milliseconds
|
|
93
|
+
*/
|
|
94
|
+
setTimeout(delay) {
|
|
95
|
+
this.timeout = delay;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
import Signal from "../../events/signal/Signal.js";
|
|
2
|
-
import {
|
|
2
|
+
import {IllegalStateException} from "../../fsm/exceptions/IllegalStateException.js";
|
|
3
3
|
import TaskState from "../task/TaskState.js";
|
|
4
4
|
|
|
5
5
|
export class AsynchronousAction {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @readonly
|
|
9
|
+
*/
|
|
10
|
+
on = {
|
|
11
|
+
finished: new Signal(),
|
|
12
|
+
failed: new Signal(),
|
|
13
|
+
cancelled: new Signal()
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @protected
|
|
18
|
+
* @type {TaskState|number}
|
|
19
|
+
*/
|
|
20
|
+
status = TaskState.INITIAL;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {*}
|
|
25
|
+
* @private
|
|
26
|
+
*/
|
|
27
|
+
__failureReason = null;
|
|
28
|
+
|
|
27
29
|
|
|
28
30
|
isRunning() {
|
|
29
31
|
return this.status === TaskState.RUNNING;
|
|
@@ -1,28 +1,38 @@
|
|
|
1
1
|
export class Profile {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @type {TraceEvent[]}
|
|
6
|
+
*/
|
|
7
|
+
traceEvents = [];
|
|
8
|
+
/**
|
|
9
|
+
* If provided displayTimeUnit is a string that specifies in which unit timestamps should be displayed. This supports values of “ms” or “ns”. By default this is value is “ms”
|
|
10
|
+
* @type {string}
|
|
11
|
+
*/
|
|
12
|
+
displayTimeUnit = "ms";
|
|
13
|
+
/**
|
|
14
|
+
* If provided systemTraceEvents is a string of Linux ftrace data or Windows ETW trace data. This data must start with # tracer: and adhere to the Linux ftrace format or adhere to Windows ETW format.
|
|
15
|
+
* @type {string}
|
|
16
|
+
*/
|
|
17
|
+
systemTraceEvents = "SystemTraceData";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {{version: string}}
|
|
22
|
+
*/
|
|
23
|
+
otherData = {version: "Meep Profile v1.0"};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* If provided, the stackFrames field is a dictionary of stack frames, their ids, and their parents that allows compact representation of stack traces throughout the rest of the trace file. It is optional but sometimes very useful in shrinking file sizes.
|
|
27
|
+
* @type {Object}
|
|
28
|
+
*/
|
|
29
|
+
stackFrames = {};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {[]}
|
|
34
|
+
*/
|
|
35
|
+
samples = [];
|
|
26
36
|
|
|
27
37
|
toJSON() {
|
|
28
38
|
return {
|
|
@@ -1,85 +1,85 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Event type | Event phases
|
|
3
|
+
=====================================================
|
|
4
|
+
Duration Events | B (begin), E (end)
|
|
5
|
+
-----------------------------------------------------
|
|
6
|
+
Complete Events | X
|
|
7
|
+
-----------------------------------------------------
|
|
8
|
+
Instant Events | i
|
|
9
|
+
| Deprecated: I
|
|
10
|
+
-----------------------------------------------------
|
|
11
|
+
Counter Events | C
|
|
12
|
+
-----------------------------------------------------
|
|
13
|
+
Async Events | b (nestable start), n (nestable instant), e (nestable end)
|
|
14
|
+
| Deprecated: S (start), T (step into), p (step past), F (end)
|
|
15
|
+
-----------------------------------------------------
|
|
16
|
+
Flow Events | s (start), t (step), f (end)
|
|
17
|
+
-----------------------------------------------------
|
|
18
|
+
Sample Events | P
|
|
19
|
+
-----------------------------------------------------
|
|
20
|
+
Object Events | N (created), O (snapshot), D (destroyed)
|
|
21
|
+
-----------------------------------------------------
|
|
22
|
+
Metadata Events | M
|
|
23
|
+
-----------------------------------------------------
|
|
24
|
+
Memory Dump Events | V (global), v (process)
|
|
25
|
+
-----------------------------------------------------
|
|
26
|
+
Mark Events | R
|
|
27
|
+
-----------------------------------------------------
|
|
28
|
+
Clock Sync Events | c
|
|
29
|
+
-----------------------------------------------------
|
|
30
|
+
Context Events | (, )
|
|
31
|
+
*/
|
|
32
|
+
|
|
1
33
|
export class TraceEvent {
|
|
2
|
-
constructor() {
|
|
3
|
-
/**
|
|
4
|
-
* The name of the event, as displayed in Trace Viewer
|
|
5
|
-
* @type {string}
|
|
6
|
-
*/
|
|
7
|
-
this.name = "";
|
|
8
34
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
35
|
+
/**
|
|
36
|
+
* The name of the event, as displayed in Trace Viewer
|
|
37
|
+
* @type {string}
|
|
38
|
+
*/
|
|
39
|
+
name = "";
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The event categories. This is a comma separated list of categories for the event. The categories can be used to hide events in the Trace Viewer UI.
|
|
43
|
+
* @type {string|undefined}
|
|
44
|
+
*/
|
|
45
|
+
cat = undefined;
|
|
14
46
|
|
|
15
|
-
/*
|
|
16
|
-
Event type | Event phases
|
|
17
|
-
=====================================================
|
|
18
|
-
Duration Events | B (begin), E (end)
|
|
19
|
-
-----------------------------------------------------
|
|
20
|
-
Complete Events | X
|
|
21
|
-
-----------------------------------------------------
|
|
22
|
-
Instant Events | i
|
|
23
|
-
| Deprecated: I
|
|
24
|
-
-----------------------------------------------------
|
|
25
|
-
Counter Events | C
|
|
26
|
-
-----------------------------------------------------
|
|
27
|
-
Async Events | b (nestable start), n (nestable instant), e (nestable end)
|
|
28
|
-
| Deprecated: S (start), T (step into), p (step past), F (end)
|
|
29
|
-
-----------------------------------------------------
|
|
30
|
-
Flow Events | s (start), t (step), f (end)
|
|
31
|
-
-----------------------------------------------------
|
|
32
|
-
Sample Events | P
|
|
33
|
-
-----------------------------------------------------
|
|
34
|
-
Object Events | N (created), O (snapshot), D (destroyed)
|
|
35
|
-
-----------------------------------------------------
|
|
36
|
-
Metadata Events | M
|
|
37
|
-
-----------------------------------------------------
|
|
38
|
-
Memory Dump Events | V (global), v (process)
|
|
39
|
-
-----------------------------------------------------
|
|
40
|
-
Mark Events | R
|
|
41
|
-
-----------------------------------------------------
|
|
42
|
-
Clock Sync Events | c
|
|
43
|
-
-----------------------------------------------------
|
|
44
|
-
Context Events | (, )
|
|
45
|
-
*/
|
|
46
47
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
/**
|
|
49
|
+
* The event type. This is a single character which changes depending on the type of event being output.
|
|
50
|
+
* The valid values are listed in the table above. We will discuss each phase type below.
|
|
51
|
+
*
|
|
52
|
+
* @type {string}
|
|
53
|
+
*/
|
|
54
|
+
ph = "";
|
|
54
55
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
/**
|
|
57
|
+
* The tracing clock timestamp of the event. The timestamps are provided at microsecond granularity.
|
|
58
|
+
* @type {number}
|
|
59
|
+
*/
|
|
60
|
+
ts = 0;
|
|
60
61
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
/**
|
|
63
|
+
* Optional. The thread clock timestamp of the event. The timestamps are provided at microsecond granularity.
|
|
64
|
+
* @type {string|undefined}
|
|
65
|
+
*/
|
|
66
|
+
tts = undefined;
|
|
66
67
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
/**
|
|
69
|
+
* The process ID for the process that output this event.
|
|
70
|
+
* @type {number}
|
|
71
|
+
*/
|
|
72
|
+
pid = 0;
|
|
72
73
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
/**
|
|
75
|
+
* The thread ID for the thread that output this event.
|
|
76
|
+
* @type {number}
|
|
77
|
+
*/
|
|
78
|
+
tid = 0;
|
|
78
79
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
80
|
+
/**
|
|
81
|
+
* Any arguments provided for the event. Some of the event types have required argument fields, otherwise, you can put any information you wish in here. The arguments are displayed in Trace Viewer when you view an event in the analysis section.
|
|
82
|
+
* @type {Object}
|
|
83
|
+
*/
|
|
84
|
+
args = {};
|
|
85
85
|
}
|