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
Fetch data from an excel file and create HTML file

excel-to-html Problem Statement! - Fetch data from excel file and create html file Excel.xlsx file contain the information.in multiple rows that is ne

Vivek Kashyap 1 Oct 25, 2021
We'll be using HTML, CSS and JavaScript for the frontend

We'll be using HTML, CSS and JavaScript for the frontend. Nothing to install in specific. Open your text-editor and start coding a beautiful front-end.

Mugada sai tilak 1 Dec 15, 2021
Bootstraparse is a personal project started with a specific goal in mind: creating static html pages for direct display from a markdown-like file

Bootstraparse is a personal project started with a specific goal in mind: creating static html pages for direct display from a markdown-like file

null 1 Jun 15, 2022
🔩 Like builtins, but boltons. 250+ constructs, recipes, and snippets which extend (and rely on nothing but) the Python standard library. Nothing like Michael Bolton.

Boltons boltons should be builtins. Boltons is a set of over 230 BSD-licensed, pure-Python utilities in the same spirit as — and yet conspicuously mis

Mahmoud Hashemi 6k Jan 6, 2023
🔩 Like builtins, but boltons. 250+ constructs, recipes, and snippets which extend (and rely on nothing but) the Python standard library. Nothing like Michael Bolton.

Boltons boltons should be builtins. Boltons is a set of over 230 BSD-licensed, pure-Python utilities in the same spirit as — and yet conspicuously mis

Mahmoud Hashemi 5.4k Feb 20, 2021
InfiniPy has some neat features - like the endpoint for function

InfiniPy has some neat features - like the endpoint for function

ZeroTwo 7 Nov 20, 2022
This is a repository containing the backend and the frontend of a simple pokédex.

Pokémon This is a repository containing the backend and the frontend of a simple pokédex. This is a work in progress project! Project Structure ?? pok

André Rato 1 Nov 28, 2021
A frontend to ease the use of pulseaudio's routing capabilities, mimicking voicemeeter's workflow

Pulsemeeter A frontend to ease the use of pulseaudio's routing capabilities, mimicking voicemeeter's workflow Features Create virtual inputs and outpu

Gabriel Carneiro 164 Jan 4, 2023
Placeholders is a single-unit storage solution for your Frontend.

Placeholder Placeholders is a single-unit file storage solution for your Frontend. Why Placeholder? Generally, when a website/service requests for fil

Tanmoy Sen Gupta 1 Nov 9, 2021
This repo houses the qhub frontend moving forward.

This repo houses the qhub frontend moving forward. This effort will house a backend written in fastAPI, and a fronend in Vue, with additional components.

Quansight 1 Feb 10, 2021