Skip to main content

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

Metadata

Release files for ipywebgl 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ipywebgl 0.4.0
File Size Uploaded Provenance
ipywebgl-0.4.0.tar.gz 3.4 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ipywebgl 0.4.0
File Interpreter ABI Platform
ipywebgl-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 3.9 MB

Release files / ipywebgl-0.4.0.tar.gz

Download URL ipywebgl-0.4.0.tar.gz
Size 3.4 MB
Tags Source
SHA-256 checksum
How to use checksums
a6d134aa2d2bde3cfdb686ae14430c38df6e5b3fa596b1e360f58b49d9792014
BLAKE2b-256 checksum
How to use checksums
56fc37a737c841c59a5f22cab49edf5384082f1d1465447379e3974f935e7264
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.9

Release files / ipywebgl-0.4.0-py3-none-any.whl

Download URL ipywebgl-0.4.0-py3-none-any.whl
Size 559.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5044af09364bf3d57b2c6c5ee80bb70c9d5cabc3d18e9cd896aaa7ea9bf3d537
BLAKE2b-256 checksum
How to use checksums
fba0f1331ecfec1a1af10ab6a639672694a76ffa4078b536df6fbfadeb11507d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.9

Security for ipywebgl 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page