apysc is the Python frontend library to create html and js file, that has ActionScript 3 (as3)-like interface.

Overview

apysc

Deploy to PyPI CodeQL PyPI version License: MIT

logo

apysc is the Python frontend library to create HTML and js files, that has ActionScript 3 (as3)-like interface.

Notes: Currently developing and only works partially.

Supported Python Version

Python 3.6 or later.

Installing

$ pip install apysc

How to start

Please see apysc documentation and quick start guide page.

What apysc can do in its current implementation

  • Save HTML or use it on the Jupyter notebook, JupyterLab, and Google Colaboratory!

Documents: save_overall_html interface, display_on_jupyter interface, display_on_colaboratory interface

  • Draw the many types of vector graphics

Example code fragments:

...
sprite.graphics.begin_fill(color='#0af')
rectangle: ap.Rectangle = sprite.graphics.draw_rect(
    x=50, y=50, width=50, height=50)
...

Documents: begin_fill interface, line_style interface, draw_rect interface, draw_round_rect interface, draw_circle interface, draw_ellipse interfac, move_to and line_to interfaces, draw_line interface, draw_dotted_line interface, draw_dashed_line interface, draw_round_dotted_line interface, draw_dash_dotted_line interface, draw_dash_dotted_line interface, draw_polygon interface

  • Lots of the vector graphics updating interfaces, such as the x, width, rotation, alpha (opacity), ellipse size, scale

Example code fragments:

...
rectangle.x = ap.Int(100)
...

Document: x and y interfaces, visible interface, get_css and set_css interfaces, rotation_around_center interface, rotation_around_point interfaces, scale_x_from_center and scale_y_from_center interfaces, get_scale_from_point and set_scale_from_point interfaces, flip_x and flip_y interfaces, skew_x and skew_y interfaces

  • Set each mouse event, such as the click, double click, mouse down, mouse up, mouse over, mouse out, mouse move

Example code fragments:

...
def on_click(e: ap.MouseEvent, options: dict) -> None:
    ap.trace('Rectangle is clicked!')


rectangle.click(on_click)
...

Documents: Click interface, Double click interface, Mousedown and mouseup interfaces, Mouseover and mouseout interfaces, Mousemove interface

  • Use the timer interface and animation

Example code fragments:

...
def on_timer(e: ap.TimerEvent, options: dict) -> None:
    ...


ap.Timer(on_timer, delay=1000).start()
...

Documents: Timer

  • Lots of tween animations, including easing options

Example code fragments:

...
rectangle.animation_x(
    x=100, duration=1000, easing=ap.Easing.EASE_IN_QUART,
).start()
...

Documents: Animation interfaces abstract (each animation attribute), AnimationEvent, Duration setting, Delay setting, Start interface, animation_complete interface, Method chaining, animation_pause and animation_play interfaces, animation_reset interface, animation_finish interface, animation_reverse interface, Sequential animation setting, animation_parallel interface

  • Basic control, like the for loop, if branch instruction, and so on

Documents: If, Elif, Else, For

For more details, please see the following document:

What apysc can do in its current implementation

License

This library is released under the MIT License.

The logo image is using followed Creative Commons license font:

Also, the apysc library depends on the following libraries:

You might also like...
A C-like hardware description language (HDL) adding high level synthesis(HLS)-like automatic pipelining as a language construct/compiler feature.
A C-like hardware description language (HDL) adding high level synthesis(HLS)-like automatic pipelining as a language construct/compiler feature.

██████╗ ██╗██████╗ ███████╗██╗ ██╗███╗ ██╗███████╗ ██████╗ ██╔══██╗██║██╔══██╗██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝ ██████╔╝██║██████╔╝█

Grimoire is a Python library for creating interactive fiction as hyperlinked html.

Grimoire Grimoire is a Python library for creating interactive fiction as hyperlinked html. Installation pip install grimoire-if Usage Check out the

A simple interface to help lazy people like me to shutdown/reboot/sleep their computer remotely.
A simple interface to help lazy people like me to shutdown/reboot/sleep their computer remotely.

🦥 Lazy Helper ! A simple interface to help lazy people like me to shut down/reboot/sleep/lock/etc. their computer remotely. - USAGE If you're a lazy

Vehicle Identification Speed Detection (VISD) extracts vehicle information like License Plate number, Manufacturer and colour from a video and provides this data in the form of a CSV file
Vehicle Identification Speed Detection (VISD) extracts vehicle information like License Plate number, Manufacturer and colour from a video and provides this data in the form of a CSV file

Vehicle Identification Speed Detection (VISD) extracts vehicle information like License Plate number, Manufacturer and colour from a video and provides this data in the form of a CSV file. VISD can also perform vehicle speed detection on a video. All these features of VSID are provided to the user using a Web Application which is created using Flask

An example file showing a simple endpoints like a login/logout function and maybe some others.

Flask API Example An example project showing a simple endpoints like a login/logout function and maybe some others. How to use: Open up your IDE (or u

This is a far more in-depth and advanced version of "Write user interface to a file API Sample"

Fusion360-Write-UserInterface This is a far more in-depth and advanced version of "Write user interface to a file API Sample" from https://help.autode

MiniJVM is simple java virtual machine written by python language, it can load class file from file system and run it.

MiniJVM MiniJVM是一款使用python编写的简易JVM,能够从本地加载class文件并且执行绝大多数指令。 支持的功能 1.从本地磁盘加载class并解析 2.支持绝大多数指令集的执行 3.支持虚拟机内存分区以及对象的创建 4.支持方法的调用和参数传递 5.支持静态代码块的初始化 不支

JD-backup is an advanced Python script, that will extract all links from a jDownloader 2 file list and export them to a text file.

JD-backup is an advanced Python script, that will extract all links from a jDownloader 2 file list and export them to a text file.

This python code will get requests from SET (The Stock Exchange of Thailand) a previously-close stock price and return it in Thai Baht currency using beautiful soup 4 HTML scrapper.

This python code will get requests from SET (The Stock Exchange of Thailand) a previously-close stock price and return it in Thai Baht currency using beautiful soup 4 HTML scrapper.

Comments
  • Add the `DateTime` class-related document

    Add the `DateTime` class-related document

    • Add the keywords link settings
    • Add the DateTime document
    • Add the year property document
    • Add the month property document
    • Add the day property document
    • Add the hour property document
    • Add the minute property document
    • Add the second property document
    • Add the millisecond property document
    • Add the now's class method document
    documentation wip 
    opened by simon-ritchie 0
  • Adjust the branch error message when a `bool` value is specified

    Adjust the branch error message when a `bool` value is specified

    Display the error message to recommend a Boolean value instead of bool. Current message:

            >>> import apysc as ap
            >>> arr: ap.Array = ap.Array([10, 20, 5])
            >>> with ap.For(arr) as i:
            ...     with ap.If(arr[i] >= 15):
            ...         _ = ap.Return()
    
    Traceback (most recent call last):
      File "/usr/local/lib/python3.6/doctest.py", line 1330, in __run
        compileflags, 1), test.globs)
      File "<doctest apysc._type._return.Return.__init__[2]>", line 2, in <module>
      File "/mnt/apysc/apysc/_branch/if_base.py", line 82, in __enter__
        self._append_enter_expression()
      File "/mnt/apysc/apysc/_branch/_if.py", line 80, in _append_enter_expression
        f'if ({self._condition.variable_name}) {{'
    AttributeError: 'bool' object has no attribute 'variable_name'
    /mnt/apysc/apysc/_type/_return.py:32: UnexpectedException
    
    enhancement 
    opened by simon-ritchie 0
  • Export the public interfaces docstring with markdown format

    Export the public interfaces docstring with markdown format

    • Set to skip these files directory from Sphinx build. ref: https://sphinx-users.jp/reverse-dict/system/excludepatterns.html
    • Use the hash files to skip not updating docstring
    • Only targets the root package interfaces (ap.*)
    documentation 
    opened by simon-ritchie 0
Releases(v2.5.79)
Owner
simonritchie
simonritchie
Programmatic startup/shutdown of ASGI apps.

asgi-lifespan Programmatically send startup/shutdown lifespan events into ASGI applications. When used in combination with an ASGI-capable HTTP client

Florimond Manca 129 Dec 27, 2022
Basic Clojure REPL for Sublime Text

Basic Clojure REPL for Sublime Text Goals: Decomplected: just REPL, nothing more Zero dependencies: works directly with pREPL Compact: Display code ev

Nikita Prokopov 23 Dec 24, 2021
Functions to analyze Cell-ID single-cell cytometry data using python language.

PyCellID (building...) Functions to analyze Cell-ID single-cell cytometry data using python language. Dependecies for this project. attrs(=21.1.0) fo

0 Dec 22, 2021
SQL centered, docker process running game

REQUIREMENTS Linux Docker Python/bash set up image "docker build -t game ." create db container "run my_whatever/game_docker/pdb create" # creating po

1 Jan 11, 2022
python's memory-saving dictionary data structure

ConstDict python代替的Dict数据结构 若字典不会增加字段,只读/原字段修改 使用ConstDict可节省内存 Dict()内存主要消耗的地方: 1、Dict扩容机制,预留内存空间 2、Dict也是一个对象,内部会动态维护__dict__,增加slot类属性可以节省内容 节省内存大小

Grenter 1 Nov 03, 2021
BMI-Calculator: Program to Calculate Body Mass Index (BMI)

The Body Mass Index (BMI) or Quetelet index is a value derived from the mass (weight) and height of an individual, male or female.

PyLaboratory 0 Feb 07, 2022
This is a simple leaderboard for 30 days of Google Cloud program for students of ASIET

30daysleaderboard #Hacktoberfest - Please don't make changes in readme file. Only improvement in the project will be accepted. Update - Now if you run

5 Oct 29, 2021
Simple Python script I use to manage and build my Reflux themes.

Simple Python script I use to manage and build my Reflux themes. Built for personal use, but anyone can easily fork and tweak to suit thier needs.

Ire 3 Jan 25, 2022
urlwatch is intended to help you watch changes in webpages and get notified of any changes.

urlwatch is intended to help you watch changes in webpages and get notified (via e-mail, in your terminal or through various third party services) of any changes.

Thomas Perl 2.5k Jan 08, 2023
Tracking development of the Class Schedule Siri Shortcut, an iOS program that checks the type of school day and tells you class scheduling.

Class Schedule Shortcut Tracking development of the Class Schedule Siri Shortcut, an iOS program that checks the type of school day and tells you clas

3 Jun 28, 2022
Tools for analyzing Java JVM gc log files

gc_log This package consists of two separate utilities useful for : gc_log_visualizer.py regionsize.py GC Log Visualizer This was updated to run under

Brad Schoening 0 Jan 04, 2022
A tool to help calculate how to split conveyors in Satisfactory into specific ratios.

Satisfactory Splitter Calculator A tool to help calculate how to split conveyors in Satisfactory into specific ratios. Dependencies Python 3.9 PyYAML

RobotiCat 5 Dec 22, 2022
Grail(TM) is a web browser written in Python

Grail is distributed in source form. It requires that you have a Python interpreter and a Tcl/Tk installation, with the Python interpreter configured for Tcl/Tk support.

22 Oct 18, 2022
This repository contains the code for the python introduction lab

This repository contains the code for the python introduction lab. The purpose is to have a fairly simple python assignment that introduces the basic features and tools of python

1 Jan 24, 2022
Proyecto desarrollado para el programa #FutureDevelopers, tabla periódica interactiva.

Tabla_Periodica Proyecto desarrollado para el programa #FutureDevelopers, tabla periódica interactiva. Descripcion primer entregable: Tabla periodica

1 Dec 04, 2021
A python package for bitclout.

BitClout.py A python package for bitclout. Developed by ItsAditya Run pip install bitclout to install the module! Examples of How To Use BitClout.py G

ItsAditya 9 Dec 31, 2021
A NetBox Plugin that gives a UI for generating, comparing and deploying configurations to devices.

netbox_config_plugin - A plugin to generate, compare and deploy configurations This plugin allows you to execute your code to generate a config for a

Jo 11 Dec 21, 2022
プレヤフHackUチーム「キャット・タン」が作成したアプリ「illustection」

cat_tongue_illustection プレヤフHackUチーム「キャット・タン」が作成した, プライバシー保護アプリ「illustection」です! デモ動画 https://youtu.be/z3I7LuB_i58 機能 アップロードされた画像をいい感じのイラストやの素材に置き換える(

4 Jul 03, 2021
This is a practice on Airflow, which is building virtual env, installing Airflow and constructing data pipeline (DAGs)

airflow-test This is a practice on Airflow, which is Builing virtualbox env and setting Airflow on that env Installing Airflow using python virtual en

Jaeyoung 1 Nov 01, 2021
An Embedded Linux Project Build and Compile Tool -- An Bitbake UI Extension

Dianshao - An Embedded Linux Project Build and Compile Tool

0 Mar 27, 2022