logo

G

  • Tutorials
  • API
  • Examples
  • Plugins
  • Productsantv logo arrow
  • 6.1.26
  • Introduction to the plug-in system
  • 插件结构
  • g-plugin-a11y
  • g-plugin-annotation
  • g-plugin-box2d
  • g-plugin-gpgpu
  • g-plugin-matterjs
  • g-plugin-yoga
  • g-plugin-css-select
  • g-plugin-3d
  • g-plugin-device-renderer
  • g-plugin-canvas-renderer
  • g-plugin-canvaskit-renderer
  • g-plugin-rough-canvas-renderer
  • g-plugin-rough-svg-renderer
  • g-plugin-canvas-path-generator
  • g-plugin-canvas-picker
  • g-plugin-svg-renderer
  • g-plugin-svg-picker
  • g-plugin-dom-interaction
  • g-plugin-dragndrop
  • g-plugin-control

g-plugin-3d

Previous
g-plugin-css-select
Next
g-plugin-device-renderer

Resource

Ant Design
Galacea Effects
Umi-React Application Framework
Dumi-Component doc generator
ahooks-React Hooks Library

Community

Ant Financial Experience Tech
seeconfSEE Conf-Experience Tech Conference

Help

GitHub
StackOverflow

more productsMore Productions

Ant DesignAnt Design-Enterprise UI design language
yuqueYuque-Knowledge creation and Sharing tool
EggEgg-Enterprise-class Node development framework
kitchenKitchen-Sketch Tool set
GalaceanGalacean-Interactive solution
xtechLiven Experience technology
© Copyright 2025 Ant Group Co., Ltd..备案号:京ICP备15032932号-38

Loading...

This plug-in can be introduced when 3D graphics are needed in the scene, and it has some common 3D graphics built in.

Usage

3D graphics drawing is only supported by the g-webgl and g-webgpu renderers.

import { Renderer as WebGLRenderer } from '@antv/g-webgl';
// Creating a WebGL renderer
const webglRenderer = new WebGLRenderer();

Then you need to register the 3D plug-in.

import { Plugin } from '@antv/g-plugin-3d';
webglRenderer.registerPlugin(new Plugin());

Finally, specify this renderer when creating the canvas.

import { Canvas } from '@antv/g';
const canvas = new Canvas({
container: 'container',
width: 600,
height: 500,
renderer: webglRenderer, // 指定 WebGL 渲染器
});

Built-in objects

  • Material
  • Geometry
  • Light
  • Mesh