g-plugin-control
上一篇
g-plugin-dragndrop
Loading...
为 3D 场景提供相机交互,内部使用 Hammer.js 响应鼠标移动、滚轮事件。根据不同的 相机类型,提供不同的交互效果。
创建 g-webgl
渲染器,注册该插件:
import { Renderer as WebGLRenderer } from '@antv/g-webgl';import { Plugin } from '@antv/g-plugin-control';// 创建 WebGL 渲染器const webglRenderer = new WebGLRenderer();// 注册 3D 插件webglRenderer.registerPlugin(new Plugin());
完整示例: