@antv/g-camera-api
A simple implementation of Camera API.
Last updated 2 years ago by panyuqi .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install @antv/g-camera-api 
SYNC missed versions from official npm registry.

English | 简体中文

Provides advanced camera features, including full camera movements and animations.

Usage

It's already built-in in @antv/g, with the lite version to use the following way:

import '@antv/g-lite';
import '@antv/g-camera-api';

The camera can then be retrieved from the canvas to perform the camera action.

const camera = canvas.getCamera();
camera.pan(100, 20);

API

Action

The camera's three axes in the camera coordinate system are uvn, and the camera action is actually moving and rotating along these three axes.

https://g-next.antv.vision/en/docs/api/camera#camera-action

Animation

We can record the current position and viewpoint of the camera and save it as a Landmark, and then when the camera parameters change, we can switch to any of the previously saved Landmark at any time, with a smooth switching animation, similar to the camera pendulum on a real set, also called flyTo in some applications.

https://g-next.antv.vision/en/docs/api/camera#camera-animation

Current Tags

  • 1.0.34                                ...           latest (2 years ago)

34 Versions

  • 1.0.34                                ...           2 years ago
  • 1.0.33                                ...           2 years ago
  • 1.0.32                                ...           2 years ago
  • 1.0.31                                ...           2 years ago
  • 1.0.30                                ...           2 years ago
  • 1.0.29                                ...           2 years ago
  • 1.0.28                                ...           2 years ago
  • 1.0.27                                ...           2 years ago
  • 1.0.26                                ...           2 years ago
  • 1.0.25                                ...           2 years ago
  • 1.0.24                                ...           2 years ago
  • 1.0.23                                ...           2 years ago
  • 1.0.22                                ...           2 years ago
  • 1.0.21                                ...           2 years ago
  • 1.0.20                                ...           2 years ago
  • 1.0.19                                ...           2 years ago
  • 1.0.18                                ...           2 years ago
  • 1.0.17                                ...           2 years ago
  • 1.0.16                                ...           2 years ago
  • 1.0.15                                ...           2 years ago
  • 1.0.14                                ...           2 years ago
  • 1.0.13                                ...           2 years ago
  • 1.0.12                                ...           2 years ago
  • 1.0.11                                ...           2 years ago
  • 1.0.10                                ...           2 years ago
  • 1.0.9                                ...           2 years ago
  • 1.0.8                                ...           2 years ago
  • 1.0.7                                ...           2 years ago
  • 1.0.6                                ...           2 years ago
  • 1.0.5                                ...           2 years ago
  • 1.0.4                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago

Copyright 2013 - present © cnpmjs.org | Home |