Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ipywebgl

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ipywebgl

WebGL2 jupyter widget

  • 0.4.0
  • PyPI
  • Socket score

Maintainers
1

ipywebgl


A WebGL2 widget for Jupyter Lab

Documentation Status

Introduction

This module is exposing a part of the WebGL2 context. Is is assumed that you are familiar with the concepts and commands. You can find more information about it here : https://webgl2fundamentals.org/

There is some major differences still :

  • All the WebGL2 commands are called on the GLViewer instead of a gl context.
  • All the API is written in snake_case instead of camelCase, so for example gl.drawArrays(...) in JavaScript becomes widget.draw_arrays(...) in Python
  • Masks parameters are replaced by positional attribute, so for example gl.clear(gl.DEPTH_BUFFER_BIT | gl.COLOR_BUFFER_BIT); in JavaScript becomes widget.clear(depth_buffer_bit=True, color_buffer_bit=True) in Python
  • Enums are replaced by strings, so for example gl.bufferData(gl.ARRAY_BUFFER, data, gl.DYNAMIC_DRAW); in JavaScript becomes widget.buffer_data("ARRAY_BUFFER", data, "DYNAMIC_DRAW") in Python
  • There is no delete functions, once something is created it stays created (we are in a prototype environment).
  • You will find some 'Extended' methods that can simplify some calls like the create_vertex_array_ext that will create and link the programs and buffers all at once.

Not all the functions are exposed as of today. If you need more, feel free to ask on github https://github.com/JeromeEippers/ipywebgl.

All the commands you call on the GLViewer are push to a commands buffer. That commands buffer is only flushed when you call the execute_commands() method.

Installation

You can install using pip:

pip install ipywebgl

Keywords

FAQs


Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc