Socket
Socket
Sign inDemoInstall

@antv/g-webgl

Package Overview
Dependencies
18
Maintainers
65
Versions
252
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @antv/g-webgl

A renderer implemented by WebGL1/2


Version published
Weekly downloads
584
decreased by-33.03%
Maintainers
65
Created
Weekly downloads
ย 

Readme

Source

@antv/g-webgl

This is a renderer implemented with WebGL2/1.

import { Renderer as WebGLRenderer } from '@antv/g-webgl';

const webglRenderer = new WebGLRenderer();

// create a canvas
const canvas = new Canvas({
  container: 'container',
  width: 600,
  height: 500,
  renderer: webglRenderer,
});

Options

targets

We can pass in a specific target(s), which will get downgraded automatically.

new Renderer({
  targets: ['webgl2', 'webgl1'],
});

onContextLost

https://www.khronos.org/webgl/wiki/HandlingContextLost

new Renderer({
  onContextLost: () => {},
});

Keywords

FAQs

Last updated on 28 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with โšก๏ธ by Socket Inc