MCPcopy
hub / github.com/microsoft/SandDance / homeCamera

Method homeCamera

packages/vega-deck.gl/src/presenter.ts:340–352  ·  view source on GitHub ↗

* Home the camera to the last initial position.

()

Source from the content-addressed store, hash-verified

338 * Home the camera to the last initial position.
339 */
340 homeCamera() {
341 const viewState = targetViewState(this._last.height, this._last.width, this._last.view) as any;
342 viewState.transitionDuration = defaultPresenterConfig.transitionDurations.view;
343 viewState.transitionEasing = easing;
344 viewState.transitionInterpolator = new LinearInterpolator(viewStateProps);
345 const deckProps: Partial<DeckProps> = {
346 effects: lightingEffects(),
347 views: this.deckgl.props.views,
348 initialViewState: viewState,
349 layers: this.deckgl.props.layers,
350 };
351 this.deckgl.setProps(deckProps);
352 }
353
354 /**
355 * Get cube data array from the cubes layer.

Callers 2

presentMethod · 0.95
renderMethod · 0.45

Calls 3

targetViewStateFunction · 0.90
lightingEffectsFunction · 0.90
setPropsMethod · 0.45

Tested by

no test coverage detected