Skip to content

Instantly share code, notes, and snippets.

@fernandojsg
Created November 7, 2019 10:49
Show Gist options
  • Save fernandojsg/215d5f1613f3cda410810f21073f9289 to your computer and use it in GitHub Desktop.
Save fernandojsg/215d5f1613f3cda410810f21073f9289 to your computer and use it in GitHub Desktop.
ECSY devtools
setInterval(() => window.dispatchEvent(new CustomEvent('refreshData', { 'detail':
{
"world": {
"enabled": true
},
"lastExecutedSystem": "RendererSystem",
"numEntities": 18,
"systems": [
{
"name": "EnvironmentSystem",
"enabled": true,
"executeTime": Math.random() * 20,
"priority": 0,
"queries": {
"moving": {
"key": "gltfmodel",
"mandatory": true,
"reactive": true,
"listen": {
"added": {
"entities": 0
},
"removed": {
"entities": 0
},
"changed": {
"entities": 600
}
},
"numEntities": 600,
"components": {
"included": [
"GLTFModel",
],
"not": []
}
}
}
},
{
"name": "GLTFLoaderSystem",
"enabled": true,
"executeTime": Math.random() * 20,
"priority": 0,
"queries": {
"entities": {
"key": "gltfmodel",
"mandatory": false,
"numEntities": 0,
"components": {
"included": [
"GLTFModel"
],
"not": []
}
},
"threeContext": {
"key": "threecontext",
"mandatory": false,
"numEntities": 1,
"components": {
"included": [
"ThreeContext"
],
"not": []
}
}
}
},
{
"name": "LevelManager",
"enabled": true,
"executeTime": 0.0050000089686363935,
"priority": 0,
"queries": {
"levels": {
"key": "level",
"mandatory": false,
"numEntities": 1,
"components": {
"included": [
"Level"
],
"not": []
}
},
"levelItems": {
"key": "levelitem",
"mandatory": false,
"numEntities": 10,
"components": {
"included": [
"LevelItem"
],
"not": []
}
}
}
},
{
"name": "DissolveSystem",
"enabled": true,
"executeTime": 0.00999998883344233,
"priority": 0,
"queries": {
"entities": {
"reactive": true,
"key": "ball-dissolve-object3d",
"mandatory": false,
"numEntities": 1,
"components": {
"included": [
"Ball",
"Dissolve",
"Object3D"
],
"not": []
}
}
}
},
{
"name": "ElementSystem",
"enabled": true,
"executeTime": Math.random() * 20,
"priority": 0,
"queries": {
"entities": {
"key": "element",
"mandatory": false,
"numEntities": 5,
"components": {
"included": [
"Element"
],
"not": []
}
}
}
},
{
"name": "GeometrySystem",
"enabled": true,
"executeTime": Math.random() * 20,
"priority": 0,
"queries": {
"entities": {
"key": "geometry",
"mandatory": false,
"numEntities": 10,
"components": {
"included": [
"Geometry"
],
"not": []
}
},
"threeContext": {
"key": "threecontext",
"mandatory": false,
"numEntities": 1,
"components": {
"included": [
"ThreeContext"
],
"not": []
}
}
}
},
{
"name": "CameraRigSystem",
"enabled": true,
"executeTime": Math.random() * 20,
"priority": 0,
"queries": {
"entities": {
"key": "camerarig",
"mandatory": false,
"numEntities": 1,
"components": {
"included": [
"CameraRig"
],
"not": []
}
},
"threeContext": {
"key": "threecontext",
"mandatory": false,
"numEntities": 1,
"components": {
"included": [
"ThreeContext"
],
"not": []
}
}
}
},
{
"name": "BallGeneratorSystem",
"enabled": true,
"executeTime": 0.0050000089686363935,
"priority": 0,
"queries": {
"entities": {
"key": "active-ballgenerator",
"mandatory": false,
"numEntities": 0,
"components": {
"included": [
"BallGenerator",
"Active"
],
"not": []
}
}
}
},
{
"name": "BallSystem",
"enabled": true,
"executeTime": Math.random() * 20,
"priority": 0,
"queries": {
"entities": {
"key": "ball",
"mandatory": false,
"numEntities": 2,
"components": {
"included": [
"Ball"
],
"not": []
}
}
}
},
{
"name": "VRControllerSystem",
"enabled": true,
"executeTime": 0.04499999340623617,
"priority": 0,
"queries": {
"controllers": {
"key": "vrcontroller",
"mandatory": false,
"numEntities": 2,
"components": {
"included": [
"VRController"
],
"not": []
}
},
"objects": {
"key": "draggable-object3d",
"mandatory": false,
"numEntities": 4,
"components": {
"included": [
"Draggable",
"Object3D"
],
"not": []
}
},
"dragging": {
"key": "dragging",
"mandatory": false,
"numEntities": 0,
"components": {
"included": [
"Dragging"
],
"not": []
}
},
"threeContext": {
"key": "threecontext",
"mandatory": false,
"numEntities": 1,
"components": {
"included": [
"ThreeContext"
],
"not": []
}
}
}
},
{
"name": "GameStateSystem",
"enabled": true,
"executeTime": Math.random() * 20,
"priority": 0,
"queries": {
"entities": {
"key": "ballgenerator",
"mandatory": false,
"numEntities": 1,
"components": {
"included": [
"BallGenerator"
],
"not": []
}
},
"gameState": {
"key": "gamestate",
"mandatory": false,
"numEntities": 1,
"components": {
"included": [
"GameState"
],
"not": []
}
},
"threeContext": {
"key": "threecontext",
"mandatory": false,
"numEntities": 1,
"components": {
"included": [
"ThreeContext"
],
"not": []
}
},
"ballFloorCollided": {
"key": "ball-floorcollided",
"mandatory": false,
"numEntities": 0,
"components": {
"included": [
"Ball",
"FloorCollided"
],
"not": []
}
},
"targetCleared": {
"key": "cleared-target",
"mandatory": false,
"numEntities": 0,
"components": {
"included": [
"Target",
"Cleared"
],
"not": []
}
}
}
},
{
"name": "PhysicsSystem",
"enabled": true,
"executeTime": 0.10000000474974513,
"priority": 0,
"queries": {
"entities": {
"key": "object3d-rigidbody-shape",
"mandatory": false,
"numEntities": 8,
"components": {
"included": [
"RigidBody",
"Shape",
"Object3D"
],
"not": []
}
}
}
},
{
"name": "VisibilitySystem",
"enabled": true,
"executeTime": Math.random() * 20,
"priority": 0,
"queries": {
"entities": {
"key": "object3d-visible",
"mandatory": false,
"numEntities": 1,
"components": {
"included": [
"Visible",
"Object3D"
],
"not": []
}
}
}
},
{
"name": "FloorCollisionSystem",
"enabled": true,
"executeTime": 0.0050000089686363935,
"priority": 0,
"queries": {
"balls": {
"key": "active-ball-object3d",
"mandatory": false,
"numEntities": 1,
"components": {
"included": [
"Ball",
"Active",
"Object3D"
],
"not": []
}
},
"ballsCollided": {
"key": "ball-floorcollided",
"mandatory": false,
"numEntities": 0,
"components": {
"included": [
"Ball",
"FloorCollided"
],
"not": []
}
},
"gameState": {
"key": "gamestate",
"mandatory": false,
"numEntities": 1,
"components": {
"included": [
"GameState"
],
"not": []
}
}
}
},
{
"name": "TargetSystem",
"enabled": true,
"executeTime": 0.0050000089686363935,
"priority": 0,
"queries": {
"targets": {
"key": "object3d-target",
"mandatory": false,
"numEntities": 1,
"components": {
"included": [
"Target",
"Object3D"
],
"not": []
}
},
"balls": {
"key": "active-ball-object3d",
"mandatory": false,
"numEntities": 1,
"components": {
"included": [
"Ball",
"Active",
"Object3D"
],
"not": []
}
}
}
},
{
"name": "SkySystem",
"enabled": true,
"executeTime": 0.004999979864805937,
"priority": 0,
"queries": {
"entities": {
"key": "sky",
"mandatory": false,
"numEntities": 1,
"components": {
"included": [
"Sky"
],
"not": []
}
}
}
},
{
"name": "RotatingSystem",
"enabled": true,
"executeTime": Math.random() * 20,
"priority": 0,
"queries": {
"entities": {
"key": "object3d-rotating",
"mandatory": false,
"numEntities": 0,
"components": {
"included": [
"Object3D",
"Rotating"
],
"not": []
}
}
}
},
{
"name": "OutputSystem",
"enabled": true,
"executeTime": Math.random() * 20,
"priority": 0,
"queries": {
"entities": {
"key": "element",
"mandatory": false,
"numEntities": 5,
"components": {
"included": [
"Element"
],
"not": []
}
}
}
},
{
"name": "TextGeometrySystem",
"enabled": true,
"executeTime": 0.0050000089686363935,
"priority": 0,
"queries": {
"entities": {
"key": "textgeometry",
"mandatory": false,
"numEntities": 2,
"components": {
"included": [
"TextGeometry"
],
"not": []
}
},
"threeContext": {
"key": "threecontext",
"mandatory": false,
"numEntities": 1,
"components": {
"included": [
"ThreeContext"
],
"not": []
}
}
}
},
{
"name": "TransformSystem",
"enabled": true,
"executeTime": 0.00999998883344233,
"priority": 0,
"queries": {
"entities": {
"key": "object3d-transform",
"mandatory": false,
"numEntities": 12,
"components": {
"included": [
"Object3D",
"Transform"
],
"not": []
}
}
}
},
{
"name": "RendererSystem",
"enabled": true,
"executeTime": 0.3700000233948231,
"priority": 0,
"queries": {
"activeCamera": {
"key": "camerarig",
"mandatory": false,
"numEntities": 1,
"components": {
"included": [
"CameraRig"
],
"not": []
}
},
"threeContext": {
"key": "threecontext",
"mandatory": false,
"numEntities": 1,
"components": {
"included": [
"ThreeContext"
],
"not": []
}
}
}
}
],
"queries": [
{
"key": "threecontext",
"reactive": true,
"components": {
"included": [
"ThreeContext"
],
"not": []
},
"numEntities": parseInt(Math.random()*10)
},
{
"key": "gltfmodel",
"components": {
"included": [
"GLTFModel"
],
"not": []
},
"numEntities": parseInt(Math.random()*20)
},
{
"key": "level",
"components": {
"included": [
"Level"
],
"not": []
},
"numEntities": parseInt(Math.random()*10)
},
{
"key": "levelitem",
"components": {
"included": [
"LevelItem"
],
"not": []
},
"numEntities": parseInt(Math.random()*30)
},
{
"key": "ball-dissolve-object3d",
"reactive": true,
"components": {
"included": [
"Ball",
"Dissolve",
"Object3D"
],
"not": []
},
"numEntities": 0
},
{
"key": "element",
"components": {
"included": [
"Element"
],
"not": []
},
"numEntities": 5
},
{
"key": "geometry",
"components": {
"included": [
"Geometry"
],
"not": []
},
"numEntities": 9
},
{
"key": "camerarig",
"components": {
"included": [
"CameraRig"
],
"not": []
},
"numEntities": 1
},
{
"key": "active-ballgenerator",
"components": {
"included": [
"BallGenerator",
"Active"
],
"not": []
},
"numEntities": 0
},
{
"key": "ball",
"components": {
"included": [
"Ball"
],
"not": []
},
"numEntities": 1
},
{
"key": "vrcontroller",
"components": {
"included": [
"VRController"
],
"not": []
},
"numEntities": 2
},
{
"key": "draggable-object3d",
"components": {
"included": [
"Draggable",
"Object3D"
],
"not": []
},
"numEntities": 4
},
{
"key": "dragging",
"components": {
"included": [
"Dragging"
],
"not": []
},
"numEntities": 0
},
{
"key": "ballgenerator",
"components": {
"included": [
"BallGenerator"
],
"not": []
},
"numEntities": 1
},
{
"key": "gamestate",
"components": {
"included": [
"GameState"
],
"not": []
},
"numEntities": 1
},
{
"key": "ball-floorcollided",
"components": {
"included": [
"Ball",
"FloorCollided"
],
"not": []
},
"numEntities": 0
},
{
"key": "cleared-target",
"components": {
"included": [
"Target",
"Cleared"
],
"not": []
},
"numEntities": 0
},
{
"key": "object3d-rigidbody-shape",
"components": {
"included": [
"RigidBody",
"Shape",
"Object3D"
],
"not": []
},
"numEntities": 7
},
{
"key": "object3d-visible",
"components": {
"included": [
"Visible",
"Object3D"
],
"not": []
},
"numEntities": 1
},
{
"key": "active-ball-object3d",
"components": {
"included": [
"Ball",
"Active",
"Object3D"
],
"not": []
},
"numEntities": 1
},
{
"key": "object3d-target",
"components": {
"included": [
"Target",
"Object3D"
],
"not": []
},
"numEntities": 1
},
{
"key": "sky",
"components": {
"included": [
"Sky"
],
"not": []
},
"numEntities": 1
},
{
"key": "object3d-rotating",
"components": {
"included": [
"Object3D",
"Rotating"
],
"not": []
},
"numEntities": 0
},
{
"key": "textgeometry",
"components": {
"included": [
"TextGeometry"
],
"not": []
},
"numEntities": 2
},
{
"key": "object3d-transform",
"components": {
"included": [
"Object3D",
"Transform"
],
"not": []
},
"numEntities": 11
}
],
"components": {
"Environment": parseInt(Math.random() * 10),
"ThreeContext": parseInt(Math.random() * 30),
"GameState": parseInt(Math.random() * 5),
"CameraRig": parseInt(Math.random() * 5),
"Level": parseInt(Math.random() * 15),
"Sky": parseInt(Math.random() * 50),
"Geometry": 9,
"Shape": 7,
"Visible": parseInt(Math.random() * 10),
"Transform": 11,
"RigidBody": 7,
"TextGeometry": 2,
"BallGenerator": 1,
"Active": 1,
"LevelItem": 9,
"Target": 1,
"Element": 5,
"Draggable": 4,
"Object3D": 14,
"VRController": 2,
"Parent": 2,
"Ball": 1,
"FloorCollided": 0,
"Dissolve": 0
},
"componentsPools": {
"Environment": {
"used": 1,
"free": null,
"size": 1
},
"ThreeContext": {
"used": 1,
"free": null,
"size": 1
},
"GameState": {
"used": 1,
"free": null,
"size": 1
},
"CameraRig": {
"used": 1,
"free": null,
"size": 1
},
"Level": {
"used": 1,
"free": null,
"size": 1
},
"Sky": {
"used": 1,
"free": null,
"size": 1
},
"Geometry": {
"used": 9,
"free": null,
"size": 26
},
"Shape": {
"used": 7,
"free": null,
"size": 24
},
"Visible": {
"valid": true,
"used": 1,
"free": 0,
"size": 1
},
"Transform": {
"valid": true,
"used": 11,
"free": 1,
"size": 12
},
"RigidBody": {
"used": 7,
"free": null,
"size": 24
},
"TextGeometry": {
"used": 2,
"free": null,
"size": 2
},
"BallGenerator": {
"used": 1,
"free": null,
"size": 1
},
"Active": {
"used": 1,
"free": null,
"size": 36
},
"LevelItem": {
"used": 9,
"free": null,
"size": 26
},
"Target": {
"valid": true,
"used": 1,
"free": 0,
"size": 1
},
"Element": {
"used": 5,
"free": null,
"size": 5
},
"Draggable": {
"used": 4,
"free": null,
"size": 4
},
"Object3D": {
"valid": true,
"used": 14,
"free": 1,
"size": 15
},
"VRController": {
"used": 2,
"free": null,
"size": 2
},
"Parent": {
"valid": true,
"used": 2,
"free": 0,
"size": 2
},
"Ball": {
"valid": true,
"used": 1,
"free": 1,
"size": 2
},
"FloorCollided": {
"valid": true,
"used": 0,
"free": 1,
"size": 1
},
"Dissolve": {
"used": 0,
"free": null,
"size": 17
}
},
"nextSystemToExecute": "EnvironmentSystem"
}
})), 16)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment