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
Blender addon to import images as meshes

ImagesAsMesh Blender addon to import images as meshes. Inspired by: ImagesAsPlanes Installation It's like just about every other Blender addon. Downlo

Niccolo Zuppichini 4 Jan 04, 2022
Karte der Allgemeinverfügungen zu Schulschließungen oder eingeschränktem Regelbetrieb in Sachsen

SNSZ Karte Datenquelle: Allgemeinverfügungen zu Schulschließungen oder eingeschränktem Regelbetrieb in Sachsen Sächsisches Staatsministerium für Kultu

Jannis Leidel 3 Sep 26, 2022
This Python library searches through a static directory and appends artist, title, track number, album title, duration, and genre to a .json object

This Python library searches through a static directory (needs to match your environment) and appends artist, title, track number, album title, duration, and genre to a .json object. This .json objec

Edan Ybarra 1 Jun 20, 2022
Refer'd Resume Scanner

Refer'd Resume Scanner I wanted to share a free resource we built to assist applicants with resume building. Our resume scanner identifies potential s

Refer'd 74 Mar 07, 2022
Modify the value and status of the records KoboToolbox

Modify the value and status of the records KoboToolbox (Modica el valor y status de los registros de KoboToolbox)

1 Oct 30, 2021
Fixes your Microphone Level to one specific value.

MicLeveler Fixes your Microphone Level to one specific value. Intention A friend of mine has the problem that some programs are setting his microphone

Moritz Timpe 2 Oct 14, 2021
A PDM plugin to publish to PyPI

PDM Publish A PDM plugin to publish to PyPI NOTE: Consider if you need this over using twine directly Installation If you installed pdm via pipx: pipx

Branch Vincent 20 Aug 06, 2022
💉 🔍 VaxFinder - Backend The backend for the Vaccine Hunters Finder tool.

💉 🔍 VaxFinder - Backend The backend for the Vaccine Hunters Finder tool. Development Prerequisites Python 3.8 Poetry: A tool for dependency manageme

Vaccine Hunters Canada 32 Jan 19, 2022
A simple and easy to use Python's PIP configuration manager, similar to the Arch Linux's Java manager.

PIPCONF - The PIP configuration manager If you need to manage multiple configurations containing indexes and trusted hosts for PIP, this project was m

João Paulo Carvalho 11 Nov 30, 2022
This is a menu driven Railway Reservation Project which is mainly based on the python-mysql connectivity.

Online-Railway-Reservation-System This is a menu driven Railway Reservation Project which is mainly based on the python-mysql connectivity. The projec

Ananya Gupta 1 Jan 09, 2022
Airplane reservation system python 2

airplane-reservation-system-python-2 Announcement 🔊 : 🔴 IMPORTANT 🔴 : Few new things have been added into the code [16/05/2021] different names is

voyager2005 1 Dec 06, 2021
Python dictionaries with advanced dot notation access

from box import Box movie_box = Box({ "Robin Hood: Men in Tights": { "imdb stars": 6.7, "length": 104 } }) movie_box.Robin_Hood_Men_in_Tights.imdb_s

Chris Griffith 2.1k Dec 28, 2022
rebalance is a simple Python 3.9+ library for rebalancing investment portfolios

rebalance rebalance is a simple Python 3.9+ library for rebalancing investment portfolios. It supports cash flow rebalancing with contributions and wi

Darik Harter 5 Feb 26, 2022
Linux Backlight Manager

Is a program to manage your laptop keyboard backlights in linux. Tested on Tuxedo / Clevo / Monste models. Must be tested on other devices

Arshia Ihammi 4 Jan 14, 2022
Addons like multipages for streamlit webapp

streamlit_pages Installation $ pip install streamlit-pages Features Adding multiple pages to streamlit Sharing specific pages Usage import streamlit

36 Dec 25, 2022
Sheet2export - FreeCAD macro to export spreadsheet

Description This is FreeCAD macro to export spreadsheet to file.

Darek L 3 Jul 09, 2022
Block fingerprinting for the beacon chain, for client identification & client diversity metrics

blockprint This is a repository for discussion and development of tools for Ethereum block fingerprinting. The primary aim is to measure beacon chain

Sigma Prime 49 Dec 08, 2022
APC Power Usage is an application which shows power consuption overtime for UPS units manufactured by APC.

APC Power Usage Introduction APC Power Usage is an application which shows power consuption overtime for UPS units manufactured by APC. Screenshoots G

Stefan Kondinski 3 Oct 08, 2021
Convert your Gyrosco.pe travels to GPX files

gyroscope2gpx This little python joint will do you a favor of taking your "Travel" export from Gyroscope (https://gyrosco.pe) and turn it into a bunch

nick g 4 Oct 02, 2022
This application is made solely for entertainment purposes

Timepass This application is made solely for entertainment purposes helps you find things to do when you're bored ! tells jokes guaranteed to bring on

Omkar Pramod Hankare 2 Nov 24, 2021