# apysc
[![Deploy to PyPI](https://github.com/simon-ritchie/apysc/actions/workflows/deploy_to_pypi.yml/badge.svg)](https://github.com/simon-ritchie/apysc/actions/workflows/deploy_to_pypi.yml)
[![CodeQL](https://github.com/simon-ritchie/apysc/actions/workflows/codeql_analysis.yml/badge.svg)](https://github.com/simon-ritchie/apysc/actions/workflows/codeql_analysis.yml)
[![PyPI version](https://badge.fury.io/py/apysc.svg)](https://badge.fury.io/py/apysc)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/simon-ritchie/apysc/blob/main/LICENSE)
![](https://byob.yarr.is/simon-ritchie/apysc/pytest_on_py3.6.15)
![](https://byob.yarr.is/simon-ritchie/apysc/pytest_on_py3.7.12)
![](https://byob.yarr.is/simon-ritchie/apysc/pytest_on_py3.8.12)
![](https://byob.yarr.is/simon-ritchie/apysc/pytest_on_py3.9.9)
![](https://byob.yarr.is/simon-ritchie/apysc/pytest_on_py3.10.0)
![](https://byob.yarr.is/simon-ritchie/apysc/pytest_coverage)
![](https://byob.yarr.is/simon-ritchie/apysc/passed_tests_num)
![](https://byob.yarr.is/simon-ritchie/apysc/flake8_checking)
![](https://byob.yarr.is/simon-ritchie/apysc/mypy_checking)
![](https://byob.yarr.is/simon-ritchie/apysc/numdoclint_checking)
![logo](https://github.com/simon-ritchie/apysc/blob/main/assets/logo_v1/logo_small_v1.png)
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](https://simon-ritchie.github.io/apysc/index.html) and [quick start guide](https://simon-ritchie.github.io/apysc/quick_start.html) page.
<a href="https://simon-ritchie.github.io/apysc/index.html"><img src="https://github.com/simon-ritchie/apysc/blob/main/assets/document_index_screenshot.png"></a>
## What apysc can do in its current implementation
- **Save HTML or use it on the Jupyter notebook, JupyterLab, and Google Colaboratory!**
![](https://github.com/simon-ritchie/apysc/blob/main/assets/jupyterlab_interface.png)
Documents: [save_overall_html interface](https://simon-ritchie.github.io/apysc/save_overall_html.html), [display_on_jupyter interface](https://simon-ritchie.github.io/apysc/display_on_jupyter.html), [display_on_colaboratory interface](https://simon-ritchie.github.io/apysc/display_on_colaboratory.html)
- **Draw the many types of vector graphics**
![](https://github.com/simon-ritchie/apysc/blob/main/assets/vector_graphics_samples.png)
Example code fragments:
```py
...
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](https://simon-ritchie.github.io/apysc/graphics_begin_fill.html), [line_style interface](https://simon-ritchie.github.io/apysc/graphics_line_style.html), [draw_rect interface](https://simon-ritchie.github.io/apysc/graphics_draw_rect.html), [draw_round_rect interface](https://simon-ritchie.github.io/apysc/graphics_draw_round_rect.html), [draw_circle interface](https://simon-ritchie.github.io/apysc/graphics_draw_circle.html), [draw_ellipse interfac](https://simon-ritchie.github.io/apysc/graphics_draw_ellipse.html), [move_to and line_to interfaces](https://simon-ritchie.github.io/apysc/graphics_move_to_and_line_to.html), [draw_line interface](https://simon-ritchie.github.io/apysc/graphics_draw_line.html), [draw_dotted_line interface](https://simon-ritchie.github.io/apysc/graphics_draw_dotted_line.html), [draw_dashed_line interface](https://simon-ritchie.github.io/apysc/graphics_draw_dashed_line.html), [draw_round_dotted_line interface](https://simon-ritchie.github.io/apysc/graphics_draw_round_dotted_line.html), [draw_dash_dotted_line interface](https://simon-ritchie.github.io/apysc/graphics_draw_dash_dotted_line.html), [draw_dash_dotted_line interface](https://simon-ritchie.github.io/apysc/graphics_draw_dash_dotted_line.html), [draw_polygon interface](https://simon-ritchie.github.io/apysc/graphics_draw_polygon.html)
- **Lots of the vector graphics updating interfaces, such as the `x`, `width`, `rotation`, `alpha (opacity)`, `ellipse size`, `scale`**
Example code fragments:
```py
...
rectangle.x = ap.Int(100)
...
```
Document: [x and y interfaces](https://simon-ritchie.github.io/apysc/display_object_x_and_y.html), [visible interface](https://simon-ritchie.github.io/apysc/display_object_visible.html), [get_css and set_css interfaces](https://simon-ritchie.github.io/apysc/display_object_get_and_set_css.html), [rotation_around_center interface](https://simon-ritchie.github.io/apysc/graphics_base_rotation_around_center.html), [rotation_around_point interfaces](https://simon-ritchie.github.io/apysc/graphics_base_rotation_around_point.html), [scale_x_from_center and scale_y_from_center interfaces](https://simon-ritchie.github.io/apysc/graphics_base_scale_from_center.html), [get_scale_from_point and set_scale_from_point interfaces](https://simon-ritchie.github.io/apysc/graphics_base_scale_from_point.html), [flip_x and flip_y interfaces](https://simon-ritchie.github.io/apysc/graphics_base_flip_interfaces.html), [skew_x and skew_y interfaces](https://simon-ritchie.github.io/apysc/graphics_base_skew.html)
- **Set each mouse event, such as the click, double click, mouse down, mouse up, mouse over, mouse out, mouse move**
![](https://github.com/simon-ritchie/apysc/blob/main/assets/mouse_move.gif)
Example code fragments:
```py
...
def on_click(e: ap.MouseEvent, options: dict) -> None:
ap.trace('Rectangle is clicked!')
rectangle.click(on_click)
...
```
Documents: [Click interface](https://simon-ritchie.github.io/apysc/click.html), [Double click interface](https://simon-ritchie.github.io/apysc/dblclick.html), [Mousedown and mouseup interfaces](https://simon-ritchie.github.io/apysc/mousedown_and_mouseup.html), [Mouseover and mouseout interfaces](https://simon-ritchie.github.io/apysc/mouseover_and_mouseout.html), [Mousemove interface](https://simon-ritchie.github.io/apysc/mousemove.html)
- **Use the timer interface and animation**
![](https://github.com/simon-ritchie/apysc/blob/main/assets/rotation_and_alpha_animation.gif)
Example code fragments:
```py
...
def on_timer(e: ap.TimerEvent, options: dict) -> None:
...
ap.Timer(on_timer, delay=1000).start()
...
```
Documents: [Timer](https://simon-ritchie.github.io/apysc/timer.html)
- **Lots of tween animations, including easing options**
[![](https://github.com/simon-ritchie/apysc/blob/main/assets/animation_interfaces_abstract.gif)](https://simon-ritchie.github.io/apysc/animation_interfaces_abstract.html)
Example code fragments:
```py
...
rectangle.animation_x(
x=100, duration=1000, easing=ap.Easing.EASE_IN_QUART,
).start()
...
```
Documents: [Animation interfaces abstract (each animation attribute)](https://simon-ritchie.github.io/apysc/animation_interfaces_abstract.html), [AnimationEvent](https://simon-ritchie.github.io/apysc/animation_event.html), [Duration setting](https://simon-ritchie.github.io/apysc/animation_duration.html), [Delay setting](https://simon-ritchie.github.io/apysc/animation_delay.html), [Start interface](https://simon-ritchie.github.io/apysc/animation_base_start.html), [animation_complete interface](https://simon-ritchie.github.io/apysc/animation_complete.html), [Method chaining](https://simon-ritchie.github.io/apysc/animation_method_chaining.html), [animation_pause and animation_play interfaces](https://simon-ritchie.github.io/apysc/animation_pause_and_play.html), [animation_reset interface](https://simon-ritchie.github.io/apysc/animation_reset.html), [animation_finish interface](https://simon-ritchie.github.io/apysc/animation_finish.html), [animation_reverse interface](https://simon-ritchie.github.io/apysc/animation_reverse.html), [Sequential animation setting](https://simon-ritchie.github.io/apysc/sequential_animati
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
PyPI 官网下载 | apysc-0.58.37.tar.gz (260个子文件)
setup.cfg 38B
MANIFEST.in 24B
jquery.min.js 87KB
svg.min.js 76KB
underscore.min.js 19KB
jquery.mousewheel.min.js 3KB
README.md 9KB
PKG-INFO 866B
PKG-INFO 866B
array.py 39KB
number_value_interface.py 35KB
string.py 24KB
graphics.py 22KB
dictionary.py 20KB
exporter.py 19KB
assertion.py 19KB
line_style_interface.py 18KB
any_value.py 18KB
timer.py 16KB
expression_data_util.py 14KB
boolean.py 14KB
custom_event_interface.py 11KB
debug_mode.py 11KB
child_interface.py 10KB
handler_circular_calling_util.py 10KB
point2d.py 9KB
graphics_expression.py 9KB
animation_parallel.py 9KB
lint_hash_util.py 9KB
html_util.py 8KB
animation_base.py 8KB
rotation_around_point_interface.py 8KB
stage.py 8KB
revert_interface.py 8KB
line_base.py 8KB
__init__.py 8KB
width_and_height_interfaces_for_ellipse.py 7KB
mouse_event.py 7KB
_for.py 7KB
display_validation.py 7KB
handler.py 7KB
event_handler_scope.py 6KB
scale_y_from_center_interface.py 6KB
scale_x_from_center_interface.py 6KB
animation_rotation_around_point.py 6KB
rectangle.py 6KB
rotation_around_center_interface.py 6KB
css_interface.py 6KB
fill_alpha_interface.py 6KB
line_dash_dot_setting_interface.py 6KB
line_round_dot_setting_interface.py 6KB
animation_scale_y_from_point.py 5KB
animation_scale_x_from_point.py 5KB
line_color_interface.py 5KB
scale_x_from_point_interface.py 5KB
line_thickness_interface.py 5KB
scale_y_from_point_interface.py 5KB
line_alpha_interface.py 5KB
path_bezier_3d.py 5KB
points_2d_interface.py 5KB
begin_fill_interface.py 5KB
mouse_event_interface_base.py 5KB
fill_color_interface.py 5KB
file_util.py 5KB
line_dash_setting_interface.py 5KB
ellipse_width_interface.py 5KB
ellipse_height_interface.py 5KB
radius_interface.py 5KB
skew_y_interface.py 5KB
skew_x_interface.py 5KB
easing.py 5KB
animation_rotation_around_center.py 5KB
line.py 5KB
height_interface.py 5KB
line_dot_setting_interface.py 5KB
width_interface.py 5KB
expression_variables_util.py 5KB
animation_scale_y_from_center.py 5KB
animation_scale_x_from_center.py 5KB
circle.py 5KB
mouse_move_interface.py 5KB
value_util.py 5KB
mouse_down_interface.py 4KB
int.py 4KB
flip_y_interface.py 4KB
flip_x_interface.py 4KB
x_interface.py 4KB
y_interface.py 4KB
mouse_over_interface.py 4KB
mouse_out_interface.py 4KB
if_base.py 4KB
mouse_up_interface.py 4KB
color_util.py 4KB
click_interface.py 4KB
ellipse.py 4KB
line_joints_interface.py 4KB
sprite.py 4KB
double_click_interface.py 4KB
visible_interface.py 4KB
line_cap_interface.py 4KB
共 260 条
- 1
- 2
- 3
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功