Module: debug

Engine debugging API.
Source:

Summary

Members

Methods

Type Definitions

Detailed Description

Members

DV_BATCHES_VIEW

Debug view mode: turn on the batches view.
Type:
Source:

DV_BOUNDINGS

Debug view mode: turn on the debug spheres view.
Type:
Source:

DV_CLUSTERS_VIEW

Debug view mode: turn on the clusters view.
Type:
Source:

DV_FRONT_BACK_VIEW

Debug view mode: turn on the wireframe view with the front/back faces coloration.
Type:
Source:

DV_NONE

Debug view mode: turn off debug view.
Type:
Source:

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:

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
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:

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 –°omparison function.
ok OkFunction Code test function.
Source:

DebugViewMode

Debug view mode.
Type:
  • Number
Source:

EqualsFunction(result, exp_result)

Return the comparison result of entrace params.
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: