Skip to main content

Type Alias: UnregisterSceneCanvasView()

UnregisterSceneCanvasView = (canvas) => Promise<void>

Function

Removes a previously registered canvas from the 3D viewing system.

This action stops displaying the 3D product on a specific canvas that was previously added with registerSceneCanvasView. It's like disconnecting a secondary monitor - the main view continues to work, but the specified canvas will no longer show the product.

Business value:

  • Conserves processing power by removing unnecessary views
  • Supports dynamic interface layouts where product views can be added and removed
  • Enables temporary comparison views that can be dismissed when no longer needed
  • Prevents memory leaks by properly cleaning up unused canvas resources

Parameters

canvas

HTMLCanvasElement

The HTML canvas element to remove from the viewing system

Returns

Promise<void>

Example

// Remove a secondary view when closing a comparison panel
document.getElementById('close-comparison').addEventListener('click', () => {
const comparisonCanvas = document.getElementById('comparison-view');
window.mimeeqApp.actions.unregisterSceneCanvasView(comparisonCanvas);
});