Skip to main content

P5Canvas Helper Class

概要

P5Canvasはp5.jsをPyScript(ブラウザ上で動くPython)で使うためのヘルパーライブラリです。

使い方

import P5Canvas

class MyCanvas(P5Canvas):
    def setup(self, p5):
        self.x = 100
        self.y = 100
        p5.createCanvas(300, 300)

    def draw(self, p5):
        p5.background(128)
        p5.fill(255, 0, 0)
        p5.ellipse(self.x, self.y, 50, 50)

        if p5.keyIsDown(p5.LEFT_ARROW):
            self.x -= 1
        if p5.keyIsDown(p5.RIGHT_ARROW):
            self.x += 1
        if p5.keyIsDown(p5.UP_ARROW):
            self.y -= 1
        if p5.keyIsDown(p5.DOWN_ARROW):
            self.y += 1

MyCanvas().run()

Metadata

Release files for P5Canvas 1.0.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 P5Canvas 1.0.0
File Size Uploaded Provenance Actions
p5canvas-1.0.0.tar.gz 2.4 kB Without provenance Details for p5canvas-1.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 4.9 kB

Release files / p5canvas-1.0.0.tar.gz

Download URL p5canvas-1.0.0.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
64e072983a136e2c4dfea2538e0fc1471162b282fb4446b553b2fa562e72588d
BLAKE2b-256 checksum
How to use checksums
7da615c4d7a7d9344898c04b638a054d844c6e1c19bd7dfa15d38b5b791db2cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.3

Release files / P5Canvas-1.0.0-py3-none-any.whl

Download URL P5Canvas-1.0.0-py3-none-any.whl
Size 2.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2416d5826b1932826b2cb434d7f72d70a2fea52cf6d987069c0d9ccb4f533759
BLAKE2b-256 checksum
How to use checksums
3e2479fc9088e46d13333622292d8b8f8a1799a4d09d1516604665a7829f0aed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.3

Security for P5Canvas 1.0.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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

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