Debug Panels
This example shows how to use the various types of debug panels.
const section = engine.debugPanel.addSection('New Section', true);
section.addValue('Label', () => 'Value');
section.addInput('Translate Z', 'number', '-3', (value) => {
transform.transform.translation[2] = parseFloat(value);
});
section.addButtons('Rotation', {
label: 'Pause',
onClick: () => {
const rotating = this.world.getComponent(entity, TRotatingComponent);
rotating.paused = !rotating.paused;
},
});