Engine debugging API.
- Source:
Summary
Members
- DV_BATCHES_VIEW
- DV_BOUNDINGS
- DV_CLUSTERS_VIEW
- DV_FRONT_BACK_VIEW
- DV_NONE
- DV_OPAQUE_WIREFRAME
- DV_RENDER_TIME
- DV_TRANSPARENT_WIREFRAME
Methods
- analyze_shaders(opt_shader_id_partopt)
- assert_constants()
- check_finite(o)
- controls_info()
- fake_load(stageload_cb, intervalopt, startopt, endopt, loaded_cbopt)
- fbmsg()
- fbres(fun, timeout)
- geometry_stats() → {Object}
- hide_normals()
- make_camera_frustum_shot()
- make_light_frustum_shot()
- msg()
- mute_music()
- num_draw_calls() → {number}
- num_render_targets() → {Object}
- num_shaders() → {number}
- num_textures() → {Object}
- num_triangles() → {number}
- num_vertices() → {number}
- object_distance(obj, obj2) → {number}
- object_info(name)
- objects_stat()
- physics_id(id)
- physics_stats()
- pix(ref_color)
- plot_telemetry()
- print_telemetry()
- scenegraph_to_dot()
- set_debug_params(params)
- show_normals(obj, mat_name, length, width)
- test(test_name, callback)
- test_performance(callback)
- visible_objects()
Type Definitions
- CodeTestCallback(equals, ok)
- DebugViewMode
- EqualsFunction(result, exp_result)
- LoadedCallback()
- OKFunction(result)
- StageloadCallback(percentage)
Detailed Description
Members
DV_BATCHES_VIEW
DV_BOUNDINGS
Debug view mode: turn on the debug spheres view.
Type:
- Source:
DV_CLUSTERS_VIEW
DV_FRONT_BACK_VIEW
Debug view mode: turn on the wireframe view with the front/back faces coloration.
Type:
- Source:
DV_NONE
DV_OPAQUE_WIREFRAME
Debug view mode: turn on the black-and-white wireframe view.
Type:
- Source:
DV_RENDER_TIME
Debug view mode: turn on the render time view.
Type:
- Source:
DV_TRANSPARENT_WIREFRAME
Debug view mode: turn on the transparent (superimposed on the source color) wireframe view.
Type:
- Source:
Methods
analyze_shaders(opt_shader_id_partopt)
Print shaders' statistics.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
opt_shader_id_part |
string |
<optional> |
"" | Shader ID (filename) part. |
- Source:
assert_constants()
Check the engine constants, abort if not constant.
- Source:
check_finite(o)
Check the object for a finite value.
Parameters:
Name | Type | Description |
---|---|---|
o |
* | Value |
- Source:
controls_info()
Print info about the controls module.
- Source:
fake_load(stageload_cb, intervalopt, startopt, endopt, loaded_cbopt)
Return stage callback without loading data.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
stageload_cb |
StageloadCallback | Callback to report about the loading progress | ||
interval |
number |
<optional> |
5000 | Loading interval |
start |
number |
<optional> |
0 | Start percentage |
end |
number |
<optional> |
5000 | End percentage |
loaded_cb |
LoadedCallback |
<optional> |
null | Callback to be executed right after load |
- Source:
fbmsg()
Store a flashback telemetry message.
- Source:
fbres(fun, timeout)
Store the callback function result as a flashback message.
Parameters:
Name | Type | Description |
---|---|---|
fun |
function | fun |
timeout |
number | timeout |
- Source:
geometry_stats() → {Object}
Return geometry info in the main scenes.
Returns:
Geometry info.
- Type
- Object
- Source:
hide_normals()
Hide normals of a dynamic object.
- Source:
make_camera_frustum_shot()
Draw a frustum for the active camera.
- Source:
make_light_frustum_shot()
Draw a light frustum, used for rendering the shadow maps.
- Source:
msg()
Store a simple telemetry message.
- Source:
mute_music()
Mute the BACKGROUND_MUSIC speakers.
- Source:
num_draw_calls() → {number}
Return the number of batches in the main scenes.
Returns:
The number of batches.
- Type
- number
- Source:
num_render_targets() → {Object}
Return the number and the total size of unique output framebuffers.
Returns:
Render targets info.
- Type
- Object
- Source:
num_shaders() → {number}
Return the number of compiled shaders.
Returns:
The number of compiled shaders.
- Type
- number
- Source:
num_textures() → {Object}
Return the number of unique textures in the main scenes.
Returns:
Textures info.
- Type
- Object
- Source:
num_triangles() → {number}
Return the number of all triangles in the active scene.
Returns:
The number of all triangles.
- Type
- number
- Source:
num_vertices() → {number}
Return the number of vertices in the active scene.
Returns:
The number of vertices.
- Type
- number
- Source:
object_distance(obj, obj2) → {number}
Get the distance between two objects.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object3D | The first object. |
obj2 |
Object3D | The second object. |
Returns:
Distance.
- Type
- number
- Deprecated
- use transform.distance instead.
- Source:
object_info(name)
Print debug info for the object with the given name
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Object name |
- Source:
objects_stat()
Print debug info for the object with the given name
- Source:
physics_id(id)
Print object info by physics ID.
Parameters:
Name | Type | Description |
---|---|---|
id |
number | Physics ID |
- Source:
physics_stats()
Print info about the physics worker.
- Source:
pix(ref_color)
Compare color picked at the center of the screen with reference RGBA vector.
Parameters:
Name | Type | Description |
---|---|---|
ref_color |
RGBA | Reference RGBA vector to compare with. |
- Source:
plot_telemetry()
Plot the list of flashback messages as a gnuplot datafile.
- Source:
print_telemetry()
Print the list of flashback messages.
- Source:
scenegraph_to_dot()
Print info about the active scene graph in DOT format.
- Source:
set_debug_params(params)
Set debugging parameters.
Parameters:
Name | Type | Description |
---|---|---|
params |
DebugParams | Debug parameters |
- Source:
show_normals(obj, mat_name, length, width)
Show normals of the dynamic object.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object3D | Object 3D |
mat_name |
string | Material name |
length |
number | Length of normals |
width |
number | Width of normals |
- Source:
test(test_name, callback)
Test code.
Parameters:
Name | Type | Description |
---|---|---|
test_name |
string | Test name |
callback |
CodeTestCallback | Callback |
- Source:
test_performance(callback)
Perform simple performance test.
Parameters:
Name | Type | Description |
---|---|---|
callback |
TestPerformanceCallback | Callback |
- Source:
visible_objects()
Print names and info for objects inside the view frustum.
- Source:
Type Definitions
CodeTestCallback(equals, ok)
Code test callback.
Parameters:
Name | Type | Description |
---|---|---|
equals |
EqualsFunction | Comparison function. |
ok |
OKFunction | Code test function. |
- Source:
DebugViewMode
EqualsFunction(result, exp_result)
Return the comparison result of the given parameters.
Parameters:
Name | Type | Description |
---|---|---|
result |
* | Real function result. |
exp_result |
* | Expected result. |
- Source:
LoadedCallback()
Data loaded callback.
- Source:
OKFunction(result)
Check code crash.
Parameters:
Name | Type | Description |
---|---|---|
result |
* | Real function result. |
- Source:
StageloadCallback(percentage)
Loading stage callback.
Parameters:
Name | Type | Description |
---|---|---|
percentage |
number | Loading progress (0-100). |
- Source: