custom code activated

beta.r3js.org
cybafelo 2019-10-27 08:48:18 +01:00
parent b9c87ca33f
commit 1535237170
22 changed files with 695 additions and 233 deletions

View File

@ -38,6 +38,7 @@ foreach ($files as $file) {
$file = str_replace('api.y.', '', $file);
$file = str_replace('api.z.', '', $file);
$file = str_replace('api', 'API', $file);
$file = str_replace('sql', 'SQL', $file);
$file = str_replace('.vr.', '.VR.', $file);
$file = str_replace('vpn', 'VPN', $file);
$file = str_replace('gui', 'GUI', $file);

View File

@ -15,192 +15,194 @@ R3.COMPONENT_RENDERER_D3_CANVAS = 0xe;
R3.COMPONENT_RENDERER_D3 = 0xf;
R3.COMPONENT_RENDERER_D2 = 0x10;
R3.COMPONENT_RENDERER = 0x11;
R3.COMPONENT_QUERY_USERDEVICES = 0x12;
R3.COMPONENT_QUERY_LOGINS_VPN = 0x13;
R3.COMPONENT_QUERY_LOGINS_DEVICES = 0x14;
R3.COMPONENT_QUERY_LOGINS_APPLICATIONS = 0x15;
R3.COMPONENT_QUERY_LOGINS = 0x16;
R3.COMPONENT_QUERY_DEVICES_UNKNOWN = 0x17;
R3.COMPONENT_QUERY_DEVICES_KNOWN = 0x18;
R3.COMPONENT_QUERY_DEVICES = 0x19;
R3.COMPONENT_QUERY_ALERTS_TIMESERIES = 0x1a;
R3.COMPONENT_QUERY_ALERTS_SUMMARY = 0x1b;
R3.COMPONENT_QUERY_ALERTS_LIST = 0x1c;
R3.COMPONENT_QUERY_ALERTS_FIRSTTIMELOGIN_VPN = 0x1d;
R3.COMPONENT_QUERY_ALERTS_FIRSTTIMELOGIN_DEVICES = 0x1e;
R3.COMPONENT_QUERY_ALERTS_FIRSTTIMELOGIN_APPLICATIONS = 0x1f;
R3.COMPONENT_QUERY_ALERTS_FIRSTTIMELOGIN = 0x20;
R3.COMPONENT_QUERY_ALERTS_BUCKETS = 0x21;
R3.COMPONENT_QUERY_ALERTS = 0x22;
R3.COMPONENT_QUERY = 0x23;
R3.COMPONENT_QUATERNION_POINTS = 0x24;
R3.COMPONENT_QUATERNION = 0x25;
R3.COMPONENT_PROJECT_D3_VR = 0x26;
R3.COMPONENT_PROJECT_D3 = 0x27;
R3.COMPONENT_PROJECT_D2 = 0x28;
R3.COMPONENT_PROJECT = 0x29;
R3.COMPONENT_PLANE = 0x2a;
R3.COMPONENT_MOUSE = 0x2b;
R3.COMPONENT_MATRIX4 = 0x2c;
R3.COMPONENT_IMAGE = 0x2d;
R3.COMPONENT_GROUP = 0x2e;
R3.COMPONENT_GRAPH_TABLE = 0x2f;
R3.COMPONENT_GRAPH_METRIC = 0x30;
R3.COMPONENT_GRAPH_BARCHART_STACKED = 0x31;
R3.COMPONENT_GRAPH_BARCHART = 0x32;
R3.COMPONENT_GRAPH = 0x33;
R3.COMPONENT_FONT = 0x34;
R3.COMPONENT_ENTITY = 0x35;
R3.COMPONENT_DRAWRANGE = 0x36;
R3.COMPONENT_DOMELEMENT = 0x37;
R3.COMPONENT_D3_VIEWPORT_ZOOMEDASPECT = 0x38;
R3.COMPONENT_D3_VIEWPORT_FIXEDASPECT_VR = 0x39;
R3.COMPONENT_D3_VIEWPORT_FIXEDASPECT = 0x3a;
R3.COMPONENT_D3_VIEWPORT = 0x3b;
R3.COMPONENT_D3_VERTEX = 0x3c;
R3.COMPONENT_D3_TEXTURE_IMAGE = 0x3d;
R3.COMPONENT_D3_TEXTURE_CUBE = 0x3e;
R3.COMPONENT_D3_TEXTURE_CANVAS = 0x3f;
R3.COMPONENT_D3_TEXTURE = 0x40;
R3.COMPONENT_D3_TEXT = 0x41;
R3.COMPONENT_D3_SPLINE = 0x42;
R3.COMPONENT_D3_SOLVER = 0x43;
R3.COMPONENT_D3_SKELETON = 0x44;
R3.COMPONENT_D3_SHAPE_TRIMESH = 0x45;
R3.COMPONENT_D3_SHAPE_SPHERE = 0x46;
R3.COMPONENT_D3_SHAPE_PLANE = 0x47;
R3.COMPONENT_D3_SHAPE_HEIGHTMAP = 0x48;
R3.COMPONENT_D3_SHAPE_CONVEXHULL_CYLINDER = 0x49;
R3.COMPONENT_D3_SHAPE_CONVEXHULL = 0x4a;
R3.COMPONENT_D3_SHAPE_BOX = 0x4b;
R3.COMPONENT_D3_SHAPE = 0x4c;
R3.COMPONENT_D3_SHADOW_SPOT = 0x4d;
R3.COMPONENT_D3_SHADOW_DIRECTIONAL = 0x4e;
R3.COMPONENT_D3_SHADOW = 0x4f;
R3.COMPONENT_D3_SHADER_VERTEX = 0x50;
R3.COMPONENT_D3_SHADER_FRAGMENT = 0x51;
R3.COMPONENT_D3_SHADER = 0x52;
R3.COMPONENT_D3_SCENE = 0x53;
R3.COMPONENT_D3_RIGIDBODY = 0x54;
R3.COMPONENT_D3_RENDERTARGET_CUBE = 0x55;
R3.COMPONENT_D3_RENDERTARGET = 0x56;
R3.COMPONENT_D3_RAYCASTER = 0x57;
R3.COMPONENT_D3_RAYCASTWHEEL = 0x58;
R3.COMPONENT_D3_RAYCASTVEHICLE = 0x59;
R3.COMPONENT_D3_PHYSICSWORLD = 0x5a;
R3.COMPONENT_D3_PASS_RENDER_SSAO = 0x5b;
R3.COMPONENT_D3_PASS_RENDER = 0x5c;
R3.COMPONENT_D3_PASS_FXAA = 0x5d;
R3.COMPONENT_D3_PASS_COPY = 0x5e;
R3.COMPONENT_D3_PASS_BLOOM = 0x5f;
R3.COMPONENT_D3_PASS = 0x60;
R3.COMPONENT_D3_MESH_SKELETON = 0x61;
R3.COMPONENT_D3_MESH_PARTICLE_ENGINE = 0x62;
R3.COMPONENT_D3_MESH_PARTICLE = 0x63;
R3.COMPONENT_D3_MESH = 0x64;
R3.COMPONENT_D3_MATERIAL_STANDARD = 0x65;
R3.COMPONENT_D3_MATERIAL_SHADER_RAW = 0x66;
R3.COMPONENT_D3_MATERIAL_SHADER = 0x67;
R3.COMPONENT_D3_MATERIAL_POINTS = 0x68;
R3.COMPONENT_D3_MATERIAL_PHONG = 0x69;
R3.COMPONENT_D3_MATERIAL_BASIC = 0x6a;
R3.COMPONENT_D3_MATERIAL = 0x6b;
R3.COMPONENT_D3_LIGHT_SPOT = 0x6c;
R3.COMPONENT_D3_LIGHT_RECTAREA = 0x6d;
R3.COMPONENT_D3_LIGHT_POINT = 0x6e;
R3.COMPONENT_D3_LIGHT_HEMISPHERE = 0x6f;
R3.COMPONENT_D3_LIGHT_DIRECTIONAL = 0x70;
R3.COMPONENT_D3_LIGHT_AMBIENT = 0x71;
R3.COMPONENT_D3_LIGHT = 0x72;
R3.COMPONENT_D3_HELPER = 0x73;
R3.COMPONENT_D3_GEOMETRY_NORMAL_WIREFRAME = 0x74;
R3.COMPONENT_D3_GEOMETRY_NORMAL_TUBE = 0x75;
R3.COMPONENT_D3_GEOMETRY_NORMAL_TORUSKNOT = 0x76;
R3.COMPONENT_D3_GEOMETRY_NORMAL_TORUS = 0x77;
R3.COMPONENT_D3_GEOMETRY_NORMAL_TEXT = 0x78;
R3.COMPONENT_D3_GEOMETRY_NORMAL_TETRAHEDRON = 0x79;
R3.COMPONENT_D3_GEOMETRY_NORMAL_SPHERE = 0x7a;
R3.COMPONENT_D3_GEOMETRY_NORMAL_SHAPE = 0x7b;
R3.COMPONENT_D3_GEOMETRY_NORMAL_RING = 0x7c;
R3.COMPONENT_D3_GEOMETRY_NORMAL_POLYHEDRON = 0x7d;
R3.COMPONENT_D3_GEOMETRY_NORMAL_PLANE = 0x7e;
R3.COMPONENT_D3_GEOMETRY_NORMAL_PARAMETRIC = 0x7f;
R3.COMPONENT_D3_GEOMETRY_NORMAL_OCTAHEDRON = 0x80;
R3.COMPONENT_D3_GEOMETRY_NORMAL_LATHE = 0x81;
R3.COMPONENT_D3_GEOMETRY_NORMAL_ICOSAHEDRON = 0x82;
R3.COMPONENT_D3_GEOMETRY_NORMAL_EXTRUDE = 0x83;
R3.COMPONENT_D3_GEOMETRY_NORMAL_EDGES = 0x84;
R3.COMPONENT_D3_GEOMETRY_NORMAL_DODECAHEDRON = 0x85;
R3.COMPONENT_D3_GEOMETRY_NORMAL_CYLINDER = 0x86;
R3.COMPONENT_D3_GEOMETRY_NORMAL_CONE = 0x87;
R3.COMPONENT_D3_GEOMETRY_NORMAL_CIRCLE = 0x88;
R3.COMPONENT_D3_GEOMETRY_NORMAL_BOX = 0x89;
R3.COMPONENT_D3_GEOMETRY_NORMAL = 0x8a;
R3.COMPONENT_D3_GEOMETRY_BUFFER_TUBE = 0x8b;
R3.COMPONENT_D3_GEOMETRY_BUFFER_TORUSKNOT = 0x8c;
R3.COMPONENT_D3_GEOMETRY_BUFFER_TORUS = 0x8d;
R3.COMPONENT_D3_GEOMETRY_BUFFER_TEXT = 0x8e;
R3.COMPONENT_D3_GEOMETRY_BUFFER_TETRAHEDRON = 0x8f;
R3.COMPONENT_D3_GEOMETRY_BUFFER_SPHERE = 0x90;
R3.COMPONENT_D3_GEOMETRY_BUFFER_SHAPE = 0x91;
R3.COMPONENT_D3_GEOMETRY_BUFFER_RING = 0x92;
R3.COMPONENT_D3_GEOMETRY_BUFFER_POLYHEDRON = 0x93;
R3.COMPONENT_D3_GEOMETRY_BUFFER_PLANE = 0x94;
R3.COMPONENT_D3_GEOMETRY_BUFFER_PARAMETRIC = 0x95;
R3.COMPONENT_D3_GEOMETRY_BUFFER_OCTAHEDRON = 0x96;
R3.COMPONENT_D3_GEOMETRY_BUFFER_LATHE = 0x97;
R3.COMPONENT_D3_GEOMETRY_BUFFER_INSTANCED = 0x98;
R3.COMPONENT_D3_GEOMETRY_BUFFER_ICOSAHEDRON = 0x99;
R3.COMPONENT_D3_GEOMETRY_BUFFER_EXTRUDE = 0x9a;
R3.COMPONENT_D3_GEOMETRY_BUFFER_DODECAHEDRON = 0x9b;
R3.COMPONENT_D3_GEOMETRY_BUFFER_CYLINDER = 0x9c;
R3.COMPONENT_D3_GEOMETRY_BUFFER_CONE = 0x9d;
R3.COMPONENT_D3_GEOMETRY_BUFFER_CIRCLE = 0x9e;
R3.COMPONENT_D3_GEOMETRY_BUFFER_BOX = 0x9f;
R3.COMPONENT_D3_GEOMETRY_BUFFER = 0xa0;
R3.COMPONENT_D3_GEOMETRY = 0xa1;
R3.COMPONENT_D3_FRICTIONMATERIAL = 0xa2;
R3.COMPONENT_D3_FRICTIONCONTACTMATERIAL = 0xa3;
R3.COMPONENT_D3_FOG_NORMAL = 0xa4;
R3.COMPONENT_D3_FOG_EXP = 0xa5;
R3.COMPONENT_D3_FOG = 0xa6;
R3.COMPONENT_D3_FACE_GRAPHICS = 0xa7;
R3.COMPONENT_D3_FACE = 0xa8;
R3.COMPONENT_D3_EFFECT_STEREO = 0xa9;
R3.COMPONENT_D3_EFFECT_PARALLAX = 0xaa;
R3.COMPONENT_D3_EFFECT_ANAGLYPH = 0xab;
R3.COMPONENT_D3_EFFECT = 0xac;
R3.COMPONENT_D3_COMPOSER = 0xad;
R3.COMPONENT_D3_CAMERA_PERSPECTIVE_STEREO = 0xae;
R3.COMPONENT_D3_CAMERA_PERSPECTIVE = 0xaf;
R3.COMPONENT_D3_CAMERA_ORTHOGRAPHIC_SCALEDASPECT = 0xb0;
R3.COMPONENT_D3_CAMERA_ORTHOGRAPHIC_FIXEDASPECT = 0xb1;
R3.COMPONENT_D3_CAMERA_ORTHOGRAPHIC = 0xb2;
R3.COMPONENT_D3_CAMERA_CUBE = 0xb3;
R3.COMPONENT_D3_CAMERA = 0xb4;
R3.COMPONENT_D3_BROADPHASE = 0xb5;
R3.COMPONENT_D3_BONEWEIGHT = 0xb6;
R3.COMPONENT_D3_BONE = 0xb7;
R3.COMPONENT_D3_AUDIO = 0xb8;
R3.COMPONENT_D3_ANIMATION = 0xb9;
R3.COMPONENT_D3_OBJECT = 0xba;
R3.COMPONENT_CUSTOMCODE = 0xbb;
R3.COMPONENT_CURVE_PATH_D2_SHAPE = 0xbc;
R3.COMPONENT_CURVE_PATH_D2 = 0xbd;
R3.COMPONENT_CURVE_PATH = 0xbe;
R3.COMPONENT_CURVE = 0xbf;
R3.COMPONENT_CONTROLS_TOUCH = 0xc0;
R3.COMPONENT_CONTROLS_MOUSE = 0xc1;
R3.COMPONENT_CONTROLS_KEYBOARD = 0xc2;
R3.COMPONENT_CONTROLS_D3_ORBIT = 0xc3;
R3.COMPONENT_CONTROLS_D3_FIRSTPERSON = 0xc4;
R3.COMPONENT_CONTROLS_D3 = 0xc5;
R3.COMPONENT_CONTROLS = 0xc6;
R3.COMPONENT_COLOR = 0xc7;
R3.COMPONENT_CLOCK = 0xc8;
R3.COMPONENT_CANVAS = 0xc9;
R3.COMPONENT_BOX3 = 0xca;
R3.MAX_COMPONENTS = 0xcb;
R3.COMPONENT_QUERY_USERS = 0x12;
R3.COMPONENT_QUERY_USERDEVICES = 0x13;
R3.COMPONENT_QUERY_LOGINS_VPN = 0x14;
R3.COMPONENT_QUERY_LOGINS_DEVICES = 0x15;
R3.COMPONENT_QUERY_LOGINS_APPLICATIONS = 0x16;
R3.COMPONENT_QUERY_LOGINS = 0x17;
R3.COMPONENT_QUERY_DEVICES_UNKNOWN = 0x18;
R3.COMPONENT_QUERY_DEVICES_SQL = 0x19;
R3.COMPONENT_QUERY_DEVICES_KNOWN = 0x1a;
R3.COMPONENT_QUERY_DEVICES = 0x1b;
R3.COMPONENT_QUERY_ALERTS_TIMESERIES = 0x1c;
R3.COMPONENT_QUERY_ALERTS_SUMMARY = 0x1d;
R3.COMPONENT_QUERY_ALERTS_LIST = 0x1e;
R3.COMPONENT_QUERY_ALERTS_FIRSTTIMELOGIN_VPN = 0x1f;
R3.COMPONENT_QUERY_ALERTS_FIRSTTIMELOGIN_DEVICES = 0x20;
R3.COMPONENT_QUERY_ALERTS_FIRSTTIMELOGIN_APPLICATIONS = 0x21;
R3.COMPONENT_QUERY_ALERTS_FIRSTTIMELOGIN = 0x22;
R3.COMPONENT_QUERY_ALERTS_BUCKETS = 0x23;
R3.COMPONENT_QUERY_ALERTS = 0x24;
R3.COMPONENT_QUERY = 0x25;
R3.COMPONENT_QUATERNION_POINTS = 0x26;
R3.COMPONENT_QUATERNION = 0x27;
R3.COMPONENT_PROJECT_D3_VR = 0x28;
R3.COMPONENT_PROJECT_D3 = 0x29;
R3.COMPONENT_PROJECT_D2 = 0x2a;
R3.COMPONENT_PROJECT = 0x2b;
R3.COMPONENT_PLANE = 0x2c;
R3.COMPONENT_MOUSE = 0x2d;
R3.COMPONENT_MATRIX4 = 0x2e;
R3.COMPONENT_IMAGE = 0x2f;
R3.COMPONENT_GROUP = 0x30;
R3.COMPONENT_GRAPH_TABLE = 0x31;
R3.COMPONENT_GRAPH_METRIC = 0x32;
R3.COMPONENT_GRAPH_BARCHART_STACKED = 0x33;
R3.COMPONENT_GRAPH_BARCHART = 0x34;
R3.COMPONENT_GRAPH = 0x35;
R3.COMPONENT_FONT = 0x36;
R3.COMPONENT_ENTITY = 0x37;
R3.COMPONENT_DRAWRANGE = 0x38;
R3.COMPONENT_DOMELEMENT = 0x39;
R3.COMPONENT_D3_VIEWPORT_ZOOMEDASPECT = 0x3a;
R3.COMPONENT_D3_VIEWPORT_FIXEDASPECT_VR = 0x3b;
R3.COMPONENT_D3_VIEWPORT_FIXEDASPECT = 0x3c;
R3.COMPONENT_D3_VIEWPORT = 0x3d;
R3.COMPONENT_D3_VERTEX = 0x3e;
R3.COMPONENT_D3_TEXTURE_IMAGE = 0x3f;
R3.COMPONENT_D3_TEXTURE_CUBE = 0x40;
R3.COMPONENT_D3_TEXTURE_CANVAS = 0x41;
R3.COMPONENT_D3_TEXTURE = 0x42;
R3.COMPONENT_D3_TEXT = 0x43;
R3.COMPONENT_D3_SPLINE = 0x44;
R3.COMPONENT_D3_SOLVER = 0x45;
R3.COMPONENT_D3_SKELETON = 0x46;
R3.COMPONENT_D3_SHAPE_TRIMESH = 0x47;
R3.COMPONENT_D3_SHAPE_SPHERE = 0x48;
R3.COMPONENT_D3_SHAPE_PLANE = 0x49;
R3.COMPONENT_D3_SHAPE_HEIGHTMAP = 0x4a;
R3.COMPONENT_D3_SHAPE_CONVEXHULL_CYLINDER = 0x4b;
R3.COMPONENT_D3_SHAPE_CONVEXHULL = 0x4c;
R3.COMPONENT_D3_SHAPE_BOX = 0x4d;
R3.COMPONENT_D3_SHAPE = 0x4e;
R3.COMPONENT_D3_SHADOW_SPOT = 0x4f;
R3.COMPONENT_D3_SHADOW_DIRECTIONAL = 0x50;
R3.COMPONENT_D3_SHADOW = 0x51;
R3.COMPONENT_D3_SHADER_VERTEX = 0x52;
R3.COMPONENT_D3_SHADER_FRAGMENT = 0x53;
R3.COMPONENT_D3_SHADER = 0x54;
R3.COMPONENT_D3_SCENE = 0x55;
R3.COMPONENT_D3_RIGIDBODY = 0x56;
R3.COMPONENT_D3_RENDERTARGET_CUBE = 0x57;
R3.COMPONENT_D3_RENDERTARGET = 0x58;
R3.COMPONENT_D3_RAYCASTER = 0x59;
R3.COMPONENT_D3_RAYCASTWHEEL = 0x5a;
R3.COMPONENT_D3_RAYCASTVEHICLE = 0x5b;
R3.COMPONENT_D3_PHYSICSWORLD = 0x5c;
R3.COMPONENT_D3_PASS_RENDER_SSAO = 0x5d;
R3.COMPONENT_D3_PASS_RENDER = 0x5e;
R3.COMPONENT_D3_PASS_FXAA = 0x5f;
R3.COMPONENT_D3_PASS_COPY = 0x60;
R3.COMPONENT_D3_PASS_BLOOM = 0x61;
R3.COMPONENT_D3_PASS = 0x62;
R3.COMPONENT_D3_MESH_SKELETON = 0x63;
R3.COMPONENT_D3_MESH_PARTICLE_ENGINE = 0x64;
R3.COMPONENT_D3_MESH_PARTICLE = 0x65;
R3.COMPONENT_D3_MESH = 0x66;
R3.COMPONENT_D3_MATERIAL_STANDARD = 0x67;
R3.COMPONENT_D3_MATERIAL_SHADER_RAW = 0x68;
R3.COMPONENT_D3_MATERIAL_SHADER = 0x69;
R3.COMPONENT_D3_MATERIAL_POINTS = 0x6a;
R3.COMPONENT_D3_MATERIAL_PHONG = 0x6b;
R3.COMPONENT_D3_MATERIAL_BASIC = 0x6c;
R3.COMPONENT_D3_MATERIAL = 0x6d;
R3.COMPONENT_D3_LIGHT_SPOT = 0x6e;
R3.COMPONENT_D3_LIGHT_RECTAREA = 0x6f;
R3.COMPONENT_D3_LIGHT_POINT = 0x70;
R3.COMPONENT_D3_LIGHT_HEMISPHERE = 0x71;
R3.COMPONENT_D3_LIGHT_DIRECTIONAL = 0x72;
R3.COMPONENT_D3_LIGHT_AMBIENT = 0x73;
R3.COMPONENT_D3_LIGHT = 0x74;
R3.COMPONENT_D3_HELPER = 0x75;
R3.COMPONENT_D3_GEOMETRY_NORMAL_WIREFRAME = 0x76;
R3.COMPONENT_D3_GEOMETRY_NORMAL_TUBE = 0x77;
R3.COMPONENT_D3_GEOMETRY_NORMAL_TORUSKNOT = 0x78;
R3.COMPONENT_D3_GEOMETRY_NORMAL_TORUS = 0x79;
R3.COMPONENT_D3_GEOMETRY_NORMAL_TEXT = 0x7a;
R3.COMPONENT_D3_GEOMETRY_NORMAL_TETRAHEDRON = 0x7b;
R3.COMPONENT_D3_GEOMETRY_NORMAL_SPHERE = 0x7c;
R3.COMPONENT_D3_GEOMETRY_NORMAL_SHAPE = 0x7d;
R3.COMPONENT_D3_GEOMETRY_NORMAL_RING = 0x7e;
R3.COMPONENT_D3_GEOMETRY_NORMAL_POLYHEDRON = 0x7f;
R3.COMPONENT_D3_GEOMETRY_NORMAL_PLANE = 0x80;
R3.COMPONENT_D3_GEOMETRY_NORMAL_PARAMETRIC = 0x81;
R3.COMPONENT_D3_GEOMETRY_NORMAL_OCTAHEDRON = 0x82;
R3.COMPONENT_D3_GEOMETRY_NORMAL_LATHE = 0x83;
R3.COMPONENT_D3_GEOMETRY_NORMAL_ICOSAHEDRON = 0x84;
R3.COMPONENT_D3_GEOMETRY_NORMAL_EXTRUDE = 0x85;
R3.COMPONENT_D3_GEOMETRY_NORMAL_EDGES = 0x86;
R3.COMPONENT_D3_GEOMETRY_NORMAL_DODECAHEDRON = 0x87;
R3.COMPONENT_D3_GEOMETRY_NORMAL_CYLINDER = 0x88;
R3.COMPONENT_D3_GEOMETRY_NORMAL_CONE = 0x89;
R3.COMPONENT_D3_GEOMETRY_NORMAL_CIRCLE = 0x8a;
R3.COMPONENT_D3_GEOMETRY_NORMAL_BOX = 0x8b;
R3.COMPONENT_D3_GEOMETRY_NORMAL = 0x8c;
R3.COMPONENT_D3_GEOMETRY_BUFFER_TUBE = 0x8d;
R3.COMPONENT_D3_GEOMETRY_BUFFER_TORUSKNOT = 0x8e;
R3.COMPONENT_D3_GEOMETRY_BUFFER_TORUS = 0x8f;
R3.COMPONENT_D3_GEOMETRY_BUFFER_TEXT = 0x90;
R3.COMPONENT_D3_GEOMETRY_BUFFER_TETRAHEDRON = 0x91;
R3.COMPONENT_D3_GEOMETRY_BUFFER_SPHERE = 0x92;
R3.COMPONENT_D3_GEOMETRY_BUFFER_SHAPE = 0x93;
R3.COMPONENT_D3_GEOMETRY_BUFFER_RING = 0x94;
R3.COMPONENT_D3_GEOMETRY_BUFFER_POLYHEDRON = 0x95;
R3.COMPONENT_D3_GEOMETRY_BUFFER_PLANE = 0x96;
R3.COMPONENT_D3_GEOMETRY_BUFFER_PARAMETRIC = 0x97;
R3.COMPONENT_D3_GEOMETRY_BUFFER_OCTAHEDRON = 0x98;
R3.COMPONENT_D3_GEOMETRY_BUFFER_LATHE = 0x99;
R3.COMPONENT_D3_GEOMETRY_BUFFER_INSTANCED = 0x9a;
R3.COMPONENT_D3_GEOMETRY_BUFFER_ICOSAHEDRON = 0x9b;
R3.COMPONENT_D3_GEOMETRY_BUFFER_EXTRUDE = 0x9c;
R3.COMPONENT_D3_GEOMETRY_BUFFER_DODECAHEDRON = 0x9d;
R3.COMPONENT_D3_GEOMETRY_BUFFER_CYLINDER = 0x9e;
R3.COMPONENT_D3_GEOMETRY_BUFFER_CONE = 0x9f;
R3.COMPONENT_D3_GEOMETRY_BUFFER_CIRCLE = 0xa0;
R3.COMPONENT_D3_GEOMETRY_BUFFER_BOX = 0xa1;
R3.COMPONENT_D3_GEOMETRY_BUFFER = 0xa2;
R3.COMPONENT_D3_GEOMETRY = 0xa3;
R3.COMPONENT_D3_FRICTIONMATERIAL = 0xa4;
R3.COMPONENT_D3_FRICTIONCONTACTMATERIAL = 0xa5;
R3.COMPONENT_D3_FOG_NORMAL = 0xa6;
R3.COMPONENT_D3_FOG_EXP = 0xa7;
R3.COMPONENT_D3_FOG = 0xa8;
R3.COMPONENT_D3_FACE_GRAPHICS = 0xa9;
R3.COMPONENT_D3_FACE = 0xaa;
R3.COMPONENT_D3_EFFECT_STEREO = 0xab;
R3.COMPONENT_D3_EFFECT_PARALLAX = 0xac;
R3.COMPONENT_D3_EFFECT_ANAGLYPH = 0xad;
R3.COMPONENT_D3_EFFECT = 0xae;
R3.COMPONENT_D3_COMPOSER = 0xaf;
R3.COMPONENT_D3_CAMERA_PERSPECTIVE_STEREO = 0xb0;
R3.COMPONENT_D3_CAMERA_PERSPECTIVE = 0xb1;
R3.COMPONENT_D3_CAMERA_ORTHOGRAPHIC_SCALEDASPECT = 0xb2;
R3.COMPONENT_D3_CAMERA_ORTHOGRAPHIC_FIXEDASPECT = 0xb3;
R3.COMPONENT_D3_CAMERA_ORTHOGRAPHIC = 0xb4;
R3.COMPONENT_D3_CAMERA_CUBE = 0xb5;
R3.COMPONENT_D3_CAMERA = 0xb6;
R3.COMPONENT_D3_BROADPHASE = 0xb7;
R3.COMPONENT_D3_BONEWEIGHT = 0xb8;
R3.COMPONENT_D3_BONE = 0xb9;
R3.COMPONENT_D3_AUDIO = 0xba;
R3.COMPONENT_D3_ANIMATION = 0xbb;
R3.COMPONENT_D3_OBJECT = 0xbc;
R3.COMPONENT_CUSTOMCODE = 0xbd;
R3.COMPONENT_CURVE_PATH_D2_SHAPE = 0xbe;
R3.COMPONENT_CURVE_PATH_D2 = 0xbf;
R3.COMPONENT_CURVE_PATH = 0xc0;
R3.COMPONENT_CURVE = 0xc1;
R3.COMPONENT_CONTROLS_TOUCH = 0xc2;
R3.COMPONENT_CONTROLS_MOUSE = 0xc3;
R3.COMPONENT_CONTROLS_KEYBOARD = 0xc4;
R3.COMPONENT_CONTROLS_D3_ORBIT = 0xc5;
R3.COMPONENT_CONTROLS_D3_FIRSTPERSON = 0xc6;
R3.COMPONENT_CONTROLS_D3 = 0xc7;
R3.COMPONENT_CONTROLS = 0xc8;
R3.COMPONENT_COLOR = 0xc9;
R3.COMPONENT_CLOCK = 0xca;
R3.COMPONENT_CANVAS = 0xcb;
R3.COMPONENT_BOX3 = 0xcc;
R3.MAX_COMPONENTS = 0xcd;
/**
* R3.GetComponentType
@ -277,6 +279,10 @@ R3.GetComponentType = function(component) {
return R3.COMPONENT_RENDERER;
}
if (component instanceof R3.Query.Users) {
return R3.COMPONENT_QUERY_USERS;
}
if (component instanceof R3.Query.UserDevices) {
return R3.COMPONENT_QUERY_USERDEVICES;
}
@ -301,6 +307,10 @@ R3.GetComponentType = function(component) {
return R3.COMPONENT_QUERY_DEVICES_UNKNOWN;
}
if (component instanceof R3.Query.Devices.SQL) {
return R3.COMPONENT_QUERY_DEVICES_SQL;
}
if (component instanceof R3.Query.Devices.Known) {
return R3.COMPONENT_QUERY_DEVICES_KNOWN;
}
@ -1609,6 +1619,10 @@ R3.GetComponentType = function(component) {
return R3.COMPONENT_RENDERER;
}
if (component instanceof R3.API.Query.Users) {
return R3.COMPONENT_QUERY_USERS;
}
if (component instanceof R3.API.Query.UserDevices) {
return R3.COMPONENT_QUERY_USERDEVICES;
}
@ -1633,6 +1647,10 @@ R3.GetComponentType = function(component) {
return R3.COMPONENT_QUERY_DEVICES_UNKNOWN;
}
if (component instanceof R3.API.Query.Devices.SQL) {
return R3.COMPONENT_QUERY_DEVICES_SQL;
}
if (component instanceof R3.API.Query.Devices.Known) {
return R3.COMPONENT_QUERY_DEVICES_KNOWN;
}
@ -1933,6 +1951,12 @@ R3.GetComponentInfo = function(componentType) {
apiConstructor : R3.API.Renderer,
runtime: R3.Runtime.GRAPHICS
};
case R3.COMPONENT_QUERY_USERS : return {
name : 'R3.Query.Users',
constructor : R3.Query.Users,
apiConstructor : R3.API.Query.Users,
runtime: R3.Runtime.DEFAULT
};
case R3.COMPONENT_QUERY_USERDEVICES : return {
name : 'R3.Query.UserDevices',
constructor : R3.Query.UserDevices,
@ -1969,6 +1993,12 @@ R3.GetComponentInfo = function(componentType) {
apiConstructor : R3.API.Query.Devices.Unknown,
runtime: R3.Runtime.DEFAULT
};
case R3.COMPONENT_QUERY_DEVICES_SQL : return {
name : 'R3.Query.Devices.SQL',
constructor : R3.Query.Devices.SQL,
apiConstructor : R3.API.Query.Devices.SQL,
runtime: R3.Runtime.DEFAULT
};
case R3.COMPONENT_QUERY_DEVICES_KNOWN : return {
name : 'R3.Query.Devices.Known',
constructor : R3.Query.Devices.Known,
@ -3107,6 +3137,9 @@ R3.GetAPIConstructor = function(runtimeComponent) {
if (runtimeComponent instanceof R3.Renderer){
return R3.API.Renderer;
}
if (runtimeComponent instanceof R3.Query.Users){
return R3.API.Query.Users;
}
if (runtimeComponent instanceof R3.Query.UserDevices){
return R3.API.Query.UserDevices;
}
@ -3125,6 +3158,9 @@ R3.GetAPIConstructor = function(runtimeComponent) {
if (runtimeComponent instanceof R3.Query.Devices.Unknown){
return R3.API.Query.Devices.Unknown;
}
if (runtimeComponent instanceof R3.Query.Devices.SQL){
return R3.API.Query.Devices.SQL;
}
if (runtimeComponent instanceof R3.Query.Devices.Known){
return R3.API.Query.Devices.Known;
}
@ -3724,6 +3760,9 @@ R3.GetConstructor = function(apiComponent) {
if (apiComponent instanceof R3.API.Renderer){
return R3.Renderer;
}
if (apiComponent instanceof R3.API.Query.Users){
return R3.Query.Users;
}
if (apiComponent instanceof R3.API.Query.UserDevices){
return R3.Query.UserDevices;
}
@ -3742,6 +3781,9 @@ R3.GetConstructor = function(apiComponent) {
if (apiComponent instanceof R3.API.Query.Devices.Unknown){
return R3.Query.Devices.Unknown;
}
if (apiComponent instanceof R3.API.Query.Devices.SQL){
return R3.Query.Devices.SQL;
}
if (apiComponent instanceof R3.API.Query.Devices.Known){
return R3.Query.Devices.Known;
}
@ -4309,12 +4351,14 @@ R3.GetConstructorFromComponentType = function(componentType) {
case R3.COMPONENT_RENDERER_D3: return R3.Renderer.D3;
case R3.COMPONENT_RENDERER_D2: return R3.Renderer.D2;
case R3.COMPONENT_RENDERER: return R3.Renderer;
case R3.COMPONENT_QUERY_USERS: return R3.Query.Users;
case R3.COMPONENT_QUERY_USERDEVICES: return R3.Query.UserDevices;
case R3.COMPONENT_QUERY_LOGINS_VPN: return R3.Query.Logins.VPN;
case R3.COMPONENT_QUERY_LOGINS_DEVICES: return R3.Query.Logins.Devices;
case R3.COMPONENT_QUERY_LOGINS_APPLICATIONS: return R3.Query.Logins.Applications;
case R3.COMPONENT_QUERY_LOGINS: return R3.Query.Logins;
case R3.COMPONENT_QUERY_DEVICES_UNKNOWN: return R3.Query.Devices.Unknown;
case R3.COMPONENT_QUERY_DEVICES_SQL: return R3.Query.Devices.SQL;
case R3.COMPONENT_QUERY_DEVICES_KNOWN: return R3.Query.Devices.Known;
case R3.COMPONENT_QUERY_DEVICES: return R3.Query.Devices;
case R3.COMPONENT_QUERY_ALERTS_TIMESERIES: return R3.Query.Alerts.Timeseries;
@ -4558,6 +4602,9 @@ R3.GetComponentName = function(runtimeComponent) {
if (runtimeComponent instanceof R3.Renderer){
return 'R3.Renderer';
}
if (runtimeComponent instanceof R3.Query.Users){
return 'R3.Query.Users';
}
if (runtimeComponent instanceof R3.Query.UserDevices){
return 'R3.Query.UserDevices';
}
@ -4576,6 +4623,9 @@ R3.GetComponentName = function(runtimeComponent) {
if (runtimeComponent instanceof R3.Query.Devices.Unknown){
return 'R3.Query.Devices.Unknown';
}
if (runtimeComponent instanceof R3.Query.Devices.SQL){
return 'R3.Query.Devices.SQL';
}
if (runtimeComponent instanceof R3.Query.Devices.Known){
return 'R3.Query.Devices.Known';
}

View File

@ -1158,7 +1158,10 @@ R3.Utils.IsObject = function(member) {
* @return {string}
*/
R3.Utils.LowerUnderscore = function(name) {
return name.toLowerCase().replace(/\s+/, '_');
var string = name.toLowerCase().replace(/\s+/g, '_');
string = string.replace(/-/g, '_');
string = string.replace(/\_+/g, '_');
return string;
};
R3.Utils.UpperCaseWordsSpaces = function(input) {

View File

@ -737,6 +737,24 @@ R3.Component.prototype.toString = function() {
return this.id;
};
R3.Component.prototype.getParentProject = function() {
if (this instanceof R3.Project) {
return this;
}
if (this.parent === null) {
return null;
}
if (this.parent instanceof R3.Project) {
return this.parent;
}
return this.parent.getParentProject();
};
/**
* Returns the runtime friendly name
* @param runtime

View File

@ -15,7 +15,95 @@ R3.API.CustomCode = function(
this.eventId = apiComponent.eventId;
if (R3.Utils.UndefinedOrNull(apiComponent.code)) {
apiComponent.code = "console.log(this.name);return null;\n//@ sourceURL=" + R3.Event.GetEventName(this.eventId)+ ".js";
if (this.eventId === R3.Event.BEFORE_RENDER) {
apiComponent.code = "var project = data;\n" +
"\n" +
"if (!project.loaded) {\n" +
"\treturn;\n" +
"}\n" +
"\n" +
"/**\n" +
" * Only respond to before_render events for my parent project\n" +
" */\n" +
"if (project !== this.getParentProject()) {\n" +
"\treturn;\n" +
"}\n" +
"\n" +
"if (!this.initialized) {\n" +
"\n" +
"\t/**\n" +
"\t * Set some initialization code here\n" +
"\t */\n" +
"\tthis.totalTime = 0;\n" +
"\n" +
"\tthis.initialized = true;\n" +
"}\n" +
"\n" +
"if (project.applicationMode === R3.API.Project.APPLICATION_MODE_RUN) {\n" +
"\n" +
"\tthis.totalTime += project.clock.delta;\n" +
"\t\n" +
"\tproject.cameras[1].position.x = 4 * Math.sin(this.totalTime);\n" +
"\tproject.cameras[1].lookAt.x = 0;\n" +
"\tproject.cameras[1].lookAt.y = 0;\n" +
"\tproject.cameras[1].lookAt.z = 0;\n" +
"\n" +
"\tproject.cameras[1].updateInstance('position');\n" +
"\tproject.cameras[1].updateInstance('lookAt');\n" +
"}\n" +
"\n" +
"return null;";
} else if (this.eventId === R3.Event.PROJECT_LOADED) {
apiComponent.code = "var project = data.component;\n" +
"\n" +
"/**\n" +
" * Only respond to project loaded events for my parent project\n" +
" */\n" +
"if (project !== this.getParentProject()) {\n" +
"\treturn;\n" +
"}\n" +
"\n" +
"if (!this.initialized) {\n" +
"\n" +
"\t/**\n" +
"\t * Set some initialization code here\n" +
"\t */\n" +
"\tconsole.log(project.name + ' Loaded');" +
"\t\n" +
"\tthis.initialized = true;\n" +
"}\n" +
"\n" +
"\n" +
"return null;";
} else {
apiComponent.code = "var project = this.getParentProject();\n" +
"\n" +
"if (!project || !project.loaded) {\n" +
"\treturn;\n" +
"}\n" +
"\n" +
"/**\n" +
" * Ignore events which don't belong to my project\n" +
" */\n" +
"if (project !== data.project) {\n" +
"\treturn;\n" +
"}\n" +
"\n" +
"if (!this.initialized) {\n" +
"\n" +
"\t/**\n" +
"\t * Set some initialization code here\n" +
"\t */\n" +
"\t\n" +
"\tthis.initialized = true;\n" +
"}\n" +
"\n" +
"\n" +
"return null;";
}
apiComponent.code += "\n\n//@ sourceURL=" + R3.Utils.LowerUnderscore(this.name) + ".js";
}
this.code = apiComponent.code;
};

View File

@ -0,0 +1,35 @@
/**
* R3.API.Query.Devices.SQL
* @param apiComponent
* @constructor
*/
R3.API.Query.Devices.SQL = function(
apiComponent
) {
__API_COMPONENT__;
if (R3.Utils.UndefinedOrNull(apiComponent.path)) {
apiComponent.path = '/crud/devices.json';
}
this.path = apiComponent.path;
if (R3.Utils.UndefinedOrNull(apiComponent.httpMethod)) {
apiComponent.httpMethod = 'GET';
}
this.httpMethod = apiComponent.httpMethod;
if (R3.Utils.UndefinedOrNull(apiComponent.text)) {
apiComponent.text = '';
}
this.text = apiComponent.text;
R3.API.Query.Devices.call(
this,
apiComponent
);
};
R3.API.Query.Devices.SQL.prototype = Object.create(R3.API.Query.Devices.prototype);
R3.API.Query.Devices.SQL.prototype.constructor = R3.API.Query.Devices.SQL;

35
src/r3-api-query-users.js Normal file
View File

@ -0,0 +1,35 @@
/**
* R3.API.Query.Users
* @param apiComponent
* @constructor
*/
R3.API.Query.Users = function(
apiComponent
) {
__API_COMPONENT__;
if (R3.Utils.UndefinedOrNull(apiComponent.path)) {
apiComponent.path = '/crud/users.json';
}
this.path = apiComponent.path;
if (R3.Utils.UndefinedOrNull(apiComponent.httpMethod)) {
apiComponent.httpMethod = 'GET';
}
this.httpMethod = apiComponent.httpMethod;
if (R3.Utils.UndefinedOrNull(apiComponent.text)) {
apiComponent.text = '';
}
this.text = apiComponent.text;
R3.API.Query.call(
this,
apiComponent
);
};
R3.API.Query.Users.prototype = Object.create(R3.API.Query.prototype);
R3.API.Query.Users.prototype.constructor = R3.API.Query.Users;

View File

@ -3,6 +3,7 @@
* @param apiComponent
*
* @property aspect
* @property autoAspect - automatically update the aspect ratio of this camera if the viewport aspect changes
*
* @constructor
*/
@ -10,7 +11,7 @@ R3.D3.API.Camera = function(
apiComponent
) {
__DEFINE_API_COMPONENT__
__DEFINE_API_COMPONENT__;
if (R3.Utils.UndefinedOrNull(apiComponent.aspectRatio)) {
apiComponent.aspectRatio = R3.D3.API.Camera.ASPECT_RATIO_1_1;
@ -22,6 +23,11 @@ R3.D3.API.Camera = function(
dp: 4
};
if (R3.Utils.UndefinedOrNull(apiComponent.autoAspect)) {
apiComponent.autoAspect = true;
}
this.autoAspect = apiComponent.autoAspect;
R3.D3.API.Object.call(
this,
apiComponent

View File

@ -79,8 +79,8 @@ R3.D3.API.Camera.Perspective = function(
apiComponent.filmOffset = 0;
}
this.filmOffset = apiComponent.filmOffset;
this.guiInfo.filmGauge = {
range: [0, 1],
this.guiInfo.filmOffset = {
range: [-100, 100],
step: 0.01,
dp: 2
};

View File

@ -40,6 +40,13 @@ R3.D3.Camera.prototype.updateInstance = function(property) {
return;
}
if (property === 'autoAspect') {
console.log('todo - autoAspect change');
return;
}
R3.D3.Object.prototype.updateInstance.call(this, property);
};

View File

@ -50,7 +50,6 @@ R3.D3.Camera.Perspective.prototype.updateInstance = function(property) {
}
if (property === 'lookAt') {
console.log('test here lookAt');
this.instance.lookAt(
this.lookAt.x,
this.lookAt.y,

View File

@ -97,6 +97,12 @@ R3.D3.Camera.Perspective.Stereo.prototype.updateInstance = function(property) {
return;
}
if (property === 'lookAt') {
R3.D3.Camera.Perspective.prototype.updateInstance.call(this, property);
this.instance.userData.stereo.update(this.instance);
return;
}
R3.D3.Camera.prototype.updateInstance.call(this, property);
};

View File

@ -342,6 +342,10 @@ R3.EntityManager.prototype.removeEntity = function(entity) {
// return entities;
// };
R3.EntityManager.prototype.findComponentsByType = function(componentTypes) {
return R3.EntityManager.prototype.queryComponents.call(this, componentTypes);
};
/**
* Returns all actual components of all entities that contain this component
* More efficient

View File

@ -8,7 +8,7 @@ R3.Query.Devices = function(
inherited
) {
__INHERIT_AND_INSTANTIATE__
__INHERIT_AND_INSTANTIATE__;
R3.Query.call(
this,

View File

@ -0,0 +1,84 @@
/**
* R3.Query.Devices.SQL
* @param apiComponent
* @constructor
*/
R3.Query.Devices.SQL = function(
apiComponent
) {
__RUNTIME_COMPONENT__;
R3.Query.Devices.call(
this,
apiComponent,
true
);
};
R3.Query.Devices.SQL.prototype = Object.create(R3.Query.Devices.prototype);
R3.Query.Devices.SQL.prototype.constructor = R3.Query.Devices.SQL;
/**
* Updates the instance with the current state
*/
R3.Query.Devices.SQL.prototype.createInstance = function() {
this.instance = true;
__CREATE_INSTANCE__;
};
/**
* Updates the instance with the current state
*/
R3.Query.Devices.SQL.prototype.updateInstance = function(property) {
R3.Query.Devices.prototype.updateInstance.call(this, property);
};
R3.Query.Devices.SQL.prototype.parse = function(data) {
this.columns = [
{
type: 'string',
name: 'Hostname'
},
{
type: 'string',
name: 'IP'
},
{
type: 'string',
name: 'MAC Address'
},
{
type: 'datetime',
name: 'Created'
},
];
if (data.error) {
this.rows = [
['error', null, null, null]
]
} else {
this.rows = data.devices.reduce(
function (result, device) {
var row = [
device.hostname,
device.ip_v4,
device.mac,
new Date(device.created)
];
result.push(row);
return result;
},
[]
);
}
};

View File

@ -46,11 +46,7 @@ R3.Query.UserDevices.prototype.parse = function(data) {
this.columns = [
{
type: 'string',
name: 'Name'
},
{
type: 'string',
name: 'Family Name'
name: 'Email'
},
{
type: 'string',
@ -70,13 +66,12 @@ R3.Query.UserDevices.prototype.parse = function(data) {
function(result, userDevice){
result.push(
[
userDevice.user.given_name,
userDevice.user.family_name,
userDevice.device.hostname,
userDevice.device.dns_suffix,
userDevice.created
userDevice.user?userDevice.user.email:'unknown',
userDevice.device?userDevice.device.hostname:'unknown',
userDevice.device?userDevice.device.dns_suffix:'unknown',
new Date(userDevice.created)
]
)
);
return result;
},
[]

73
src/r3-query-users.js Normal file
View File

@ -0,0 +1,73 @@
/**
* R3.Query.Users
* @param apiComponent
* @constructor
*/
R3.Query.Users = function(
apiComponent
) {
__RUNTIME_COMPONENT__;
R3.Query.call(
this,
true
);
};
R3.Query.Users.prototype = Object.create(R3.Query.prototype);
R3.Query.Users.prototype.constructor = R3.Query.Users;
/**
* Updates the instance with the current state
*/
R3.Query.Users.prototype.createInstance = function() {
this.instance = true;
__CREATE_INSTANCE__;
};
/**
* Updates the instance with the current state
*/
R3.Query.Users.prototype.updateInstance = function(property) {
R3.Query.Devices.prototype.updateInstance.call(this, property);
};
R3.Query.Users.prototype.parse = function(data) {
this.columns = [
{
type: 'string',
name: 'Email'
},
{
type: 'datetime',
name: 'Created'
},
];
if (data.error) {
this.rows = [
['error', null, null, null]
]
} else {
this.rows = data.users.reduce(
function (result, user) {
var row = [
user.email,
new Date(user.created)
];
result.push(row);
return result;
},
[]
);
}
};

View File

@ -36,13 +36,14 @@ R3.Runtime.Graphics.Chart.prototype.BarchartStacked = function(runtimeObject) {
datasets: runtimeObject.query.datasets
};
Chart.defaults.global.defaultFontColor = '#414141ee';
runtimeObject.chart = new Chart(ctx, {
type: 'bar',
data: barChartData,
options: {
title: {
display: true,
text: R3.GetComponentName(runtimeObject.query)
display: true
},
tooltips: {
mode: 'index',

View File

@ -41,7 +41,7 @@ R3.Runtime.Graphics.Google.prototype.Table = function(runtimeObject) {
var table = new google.visualization.Table(document.getElementById(graph.domElement.domElementId));
table.draw(dataTable, {showRowNumber: true, width: '100%', height: '100%'});
table.draw(dataTable, {showRowNumber: false, width: '100%', height: '100%'});
}
}(runtimeObject)

View File

@ -1,16 +1,8 @@
/**
* System takes care of updating all the entities (based on their component data)
* @param apiSystem R3.API.System
* R3.System.CustomCode
* @constructor
*/
R3.System.CustomCode = function(
apiSystem
) {
R3.System.call(
this,
apiSystem
);
R3.System.CustomCode = function() {
this.instanceCreatedSubscription = null;
this.removeComponentSubscription = null;
@ -20,6 +12,10 @@ R3.System.CustomCode = function(
this.subscriptions = {};
R3.System.call(
this
);
};
R3.System.CustomCode.prototype = Object.create(R3.System.prototype);
@ -30,8 +26,6 @@ R3.System.CustomCode.prototype.constructor = R3.System.CustomCode;
*/
R3.System.CustomCode.prototype.start = function() {
R3.System.prototype.start.call(this);
R3.EntityManager.Instance.queryComponents(R3.Component.CUSTOM_CODE).map(
function(component) {
this.subscriptions[component.id] = R3.Event.Subscribe(
@ -61,14 +55,16 @@ R3.System.CustomCode.prototype.start = function() {
this.compileFailed.bind(this)
);
this.eventIdUpdateSubscription = this.subscribe(
this.eventIdUpdateSubscription = R3.Event.Subscribe(
R3.Event.EVENT_ID_UPDATE,
this.compileSuccess
this.compileSuccess.bind(this)
);
R3.System.prototype.start.call(this);
};
R3.System.CustomCode.prototype.instanceCreated = function(data) {
if (data.component instanceof R3.CustomCode) {
if (this.subscriptions[data.component.id]) {
@ -117,8 +113,6 @@ R3.System.CustomCode.prototype.compileFailed = function(data) {
*/
R3.System.CustomCode.prototype.stop = function() {
R3.System.prototype.stop.call(this);
if (this.instanceCreatedSubscription) {
this.instanceCreatedSubscription.remove();
this.instanceCreatedSubscription = null;
@ -153,5 +147,7 @@ R3.System.CustomCode.prototype.stop = function() {
}.bind(this)
);
R3.System.prototype.stop.call(this);
};

View File

@ -621,12 +621,31 @@ R3.System.Input.prototype.deRegisterMouseControl = function(mouseControl) {
};
R3.System.Input.GetProject = function(canvasInstance) {
var canvasses = R3.EntityManager.Instance.findComponentsByType(R3.COMPONENT_CANVAS);
var project = null;
canvasses.map(
function (canvas) {
if (canvas.instance === canvasInstance) {
project = canvas.getParentProject();
}
}
);
return project;
};
R3.System.Input.prototype.onKeyboardKeyUp = function(event) {
R3.Event.Emit(
R3.Event.KEY_UP,
{
code : event.code || event.key,
keyCode : event.keyCode
keyCode : event.keyCode,
project : R3.System.Input.GetProject(event.target)
}
);
@ -637,7 +656,8 @@ R3.System.Input.prototype.onKeyboardKeyDown = function(event) {
R3.Event.KEY_DOWN,
{
code : event.code || event.key,
keyCode : event.keyCode
keyCode : event.keyCode,
project : R3.System.Input.GetProject(event.target)
}
);
@ -668,7 +688,10 @@ R3.System.Input.prototype.onTouchStart = function(event) {
R3.Event.Emit(
R3.Event.TOUCH_START,
this.touches
{
touches: this.touches,
project : R3.System.Input.GetProject(event.target)
}
)
};
@ -794,7 +817,10 @@ R3.System.Input.prototype.onTouchMove = function(event) {
R3.Event.Emit(
R3.Event.TOUCH_MOVE,
this.touches
{
touches : this.touches,
project : R3.System.Input.GetProject(event.target)
}
);
@ -811,7 +837,10 @@ R3.System.Input.prototype.onTouchCancel = function(event) {
this.touches[event.changedTouches[t].identifier].event = event;
R3.Event.Emit(
R3.Event.TOUCH_CANCEL,
this.touches[event.changedTouches[t].identifier]
{
touches: this.touches[event.changedTouches[t].identifier],
project: R3.System.Input.GetProject(event.target)
}
);
delete this.touches[event.changedTouches[t].identifier];
}
@ -826,7 +855,10 @@ R3.System.Input.prototype.onTouchEnd = function(event) {
this.touches[event.changedTouches[t].identifier].event = event;
R3.Event.Emit(
R3.Event.TOUCH_END,
this.touches[event.changedTouches[t].identifier]
{
touches: this.touches[event.changedTouches[t].identifier],
project: R3.System.Input.GetProject(event.target)
}
);
delete this.touches[event.changedTouches[t].identifier];
}
@ -943,7 +975,8 @@ R3.System.Input.prototype.onMouseDown = function(event) {
R3.Event.Emit(
R3.Event.MOUSE_DOWN,
{
event : event
event : event,
project : R3.System.Input.GetProject(event.target)
}
)
};
@ -953,7 +986,8 @@ R3.System.Input.prototype.onMouseMove = function(event) {
R3.Event.Emit(
R3.Event.MOUSE_MOVE,
{
event : event
event : event,
project : R3.System.Input.GetProject(event.target)
}
)
};
@ -963,7 +997,8 @@ R3.System.Input.prototype.onMouseWheel = function(event) {
R3.Event.Emit(
R3.Event.MOUSE_WHEEL,
{
event : event
event : event,
project : R3.System.Input.GetProject(event.target)
}
)
};
@ -973,7 +1008,8 @@ R3.System.Input.prototype.onMouseUp = function(event) {
R3.Event.Emit(
R3.Event.MOUSE_UP,
{
event : event
event : event,
project : R3.System.Input.GetProject(event.target)
}
)
};

View File

@ -746,8 +746,33 @@ R3.System.Render.prototype.render = function() {
cameraInstance = camera.instance.userData.stereo.cameraR;
}
if (camera.autoAspect) {
/**
* Avoid unneccessary aspect ratio updates if LR viewports are the same
* size
*/
if (camera.aspectRatio !== viewport.aspectRatio) {
camera.aspectRatio = viewport.aspectRatio;
camera.updateInstance('aspectRatio');
camera.instance.userData.stereo.update(camera.instance);
}
}
}
} else {
/**
* If the autoAspect of the camera is set - update the aspect ratio of the camera
* to the aspect ratio of the viewport
*/
if (camera.autoAspect) {
if (camera.aspectRatio !== viewport.aspectRatio) {
camera.aspectRatio = viewport.aspectRatio;
camera.updateInstance('aspectRatio');
}
}
}
// if (scene.enableEffect) {