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
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
Introduction to Databases Coursework 2 (SQL) - dataset generator

Introduction to Databases Coursework 2 (SQL) - dataset generator This is python script generates a text file with insert queries for the schema.sql fi

Javier Bosch 1 Nov 08, 2021
Controller state monitor plugin for EVA ICS

eva-plugin-cmon Controller status monitor plugin for EVA ICS Monitors connected controllers status in SFA and pushes measurements into an external Inf

Altertech 1 Nov 06, 2021
reproduces experiments from

Installation To enable importing of modules, from the parent directory execute: pip install -e . To install requirements: python -m pip install requir

Meta Research 15 Aug 11, 2022
Get a list of content on your Netflix My List that is expiring in the next month or two.

Netflix My List Expiring Movies Annoyed at Netflix for taking away your movies? Now you don't have to be! Installation instructions Install selenium C

24 Aug 06, 2022
Runs macOS on linux with qemu.

mac-on-linux-with-qemu Runs macOS on linux with qemu. Pre-requisites qemu-system-x86_64 dmg2img pulseaudio python[click] Usage After cloning the repos

Arindam Das 177 Dec 26, 2022
Personal Assistant Tessa

Personal Assistant Tessa Introducing our all new personal assistant Tessa..... An intelligent virtual assistant (IVA) or intelligent personal assistan

Anusha Joseph 4 Mar 08, 2022
Check if Python package names are available on PyPI.

😻 isavailable Can I haz this Python package on PyPI? Check if Python package names are available on PyPI. Usage $ isavailable checks whether your des

Felipe S. S. Schneider 3 May 18, 2022
Module to align code with thoughts of users and designers. Also magically handles navigation and permissions.

This readme will introduce you to Carteblanche and walk you through an example app, please refer to carteblanche-django-starter for the full example p

Eric Neuman 42 May 28, 2021
PyToQlik is a library that allows you to integrate Qlik Desktop with Jupyter notebooks

PyToQlik is a library that allows you to integrate Qlik Desktop with Jupyter notebooks. With it you can: Open and edit a Qlik app inside a Ju

BIX Tecnologia 16 Sep 09, 2022
PIP VA TASHQI KUTUBXONALAR

39-dars PIP VA TASHQI KUTUBXONALAR KIRISH Avvalgi darsimizda Python bilan birga o'rnatluvchi, standart kutubxona va undagi ba'zi foydali modullar bila

Sayfiddin 3 Nov 25, 2021
Flames Calculater App used to calculate flames status between two names created using python's Flask web framework.

Flames Finder Web App Flames Calculater App used to calculate flames status between two names created using python's Flask web framework. First, App g

Siva Prakash 4 Jan 02, 2022
A turtlebot auto controller allows robot to autonomously explore environment.

A turtlebot auto controller allows robot to autonomously explore environment.

Yuliang Zhong 1 Nov 10, 2021
Anki cards generator for Leetcode

Leetcode Anki card generator Summary By running this script you'll be able to generate Anki cards with all the leetcode problems. I personally use it

Pavel Safronov 150 Dec 25, 2022
SymbLang are my programming language! Insired by the brainf**k.

SymbLang . - output as Unicode. , - input. ; - clear data. & - character that the main line start with. @value: 0 - 9 - character that the function

1 Apr 04, 2022
Apache Superset out of box version(Windows 64-bit)

superset_app Apache Superset out of box version (Windows 64bit) prepare job download 3 files python-3.8.10-embed-amd64.zip get-pip.py python_geohash‑0

Steven Lee 9 Oct 02, 2022
Python Repository for Bachelor Ski Sign.

BachelorSkiSign Python Repository for Bachelor Ski Sign. This application reads data from https://bachelorapi.azurewebsites.net/ It is written in Ciru

Winston 1 Jan 04, 2022
Socorro is the Mozilla crash ingestion pipeline. It accepts and processes Breakpad-style crash reports. It provides analysis tools.

Socorro Socorro is a Mozilla-centric ingestion pipeline and analysis tools for crash reports using the Breakpad libraries. Support This is a Mozilla-s

Mozilla Services 552 Dec 19, 2022
Hashcrack - A non-object oriented open source, Software for Windows/Linux made in Python 3

Multi Force This project is a non-object oriented open source, Software for Wind

Radiationbolt 3 Jan 02, 2023
A Github Action for sending messages to a Matrix Room.

matrix-commit A Github Action for sending messages to a Matrix Room. Screenshot: Example Usage: # .github/workflows/matrix-commit.yml on: push:

3 Sep 11, 2022