@antv/g-camera-api
TypeScript icon, indicating that this package has built-in type declarations

2.0.13 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i @antv/g-camera-api

Weekly Downloads

23,330

Version

2.0.13

License

MIT

Unpacked Size

894 kB

Total Files

11

Last publish

Collaborators

  • banxuan
  • xuying1027
  • lvisei
  • yisi.wang
  • basketduck
  • biupiubiupiu
  • flash1
  • dreammy23
  • laixingui.lxg
  • zhangjunjie-loki
  • rainy25ghz
  • zeyuwang
  • yanxiong
  • susiwen8
  • freestyle21
  • soundquiet
  • elaine.q.10
  • sturuby
  • sakuya223
  • serializedowen
  • xdzhao
  • yangzhanmei
  • wjgogogo
  • leungwensen
  • dori
  • iaaron
  • yard
  • simaq
  • dxq613
  • intchous
  • susan_ann
  • jinke.li
  • lzxue
  • army8735
  • atool
  • baizn
  • dengfuping
  • neoddish
  • jeffy2012
  • zqlu
  • afc163
  • pomelo-nwu
  • kopiluwaky
  • ccnuzindex
  • panyuqi
  • bubkoo
  • zengyue
  • kasmine
  • boyu.zlj
  • l1ud0ngq1
  • newbyvector
  • winniexing
  • chenluli
  • kn9117
  • xdddst
  • semious2020
  • esora
  • nadia_liu
  • bbsqq
  • mxz96102
  • openwayne
  • pearmini
  • pddpd
  • yiqianyao
  • zhanba
  • cxxxxxn