MCPcopy Create free account
hub / github.com/ashawkey/camera_viewer / loadSampleData

Method loadSampleData

js/main.js:601–637  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

599 }
600
601 loadSampleData() {
602 // Generate two sample trajectories for demonstration
603 const circlePoses = PoseParser.generateSample(24, 'circle');
604 const helixPoses = PoseParser.generateSample(30, 'helix');
605
606 const circleSource = this.formatPosesCompact(circlePoses);
607 const helixSource = this.formatPosesCompact(helixPoses);
608 this.ui.poseInput.value = '';
609
610 // Auto-visualize the samples
611 this.currentTrajectories = [
612 {
613 id: this.nextTrajectoryId++,
614 name: 'Circle Path',
615 poses: circlePoses,
616 count: circlePoses.length,
617 visible: true,
618 color: this.sceneManager.getDefaultTrajectoryColor(0),
619 source: circleSource,
620 inputFormat: 'matrix'
621 },
622 {
623 id: this.nextTrajectoryId++,
624 name: 'Helix Path',
625 poses: helixPoses,
626 count: helixPoses.length,
627 visible: true,
628 color: this.sceneManager.getDefaultTrajectoryColor(1),
629 source: helixSource,
630 inputFormat: 'matrix'
631 }
632 ];
633
634 this.sceneManager.setTrajectories(this.currentTrajectories, 'c2w', 'opengl');
635 this.updateInfoPanel();
636 this.updateTrajectoryList();
637 }
638
639 updatePreviewMask() {
640 const mask = this.ui.exportPreviewMask;

Callers 1

initMethod · 0.95

Calls 6

formatPosesCompactMethod · 0.95
updateInfoPanelMethod · 0.95
updateTrajectoryListMethod · 0.95
generateSampleMethod · 0.80
setTrajectoriesMethod · 0.80

Tested by

no test coverage detected