Được TopGit lập chỉ mục từ metadata GitHub: aseprite/api có 299 sao. Scripting API for Aseprite
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
This is the scripting API for Aseprite. Since version 1.2.10 you
are able to create scripts with Lua.
You can find some examples
for this API or some tests.
Where to start
Generally you will want to write a script to solve a problem or to do
a little experiment, so you have six options to approach your idea:
Transform the active sprite: In this case
app.sprite will give you access
to the current sprite (it's nil if there is no active sprite,
e.g. we are in the Home tab).
Create a new sprite : Here the
Sprite() function creates a new
sprite and sets it as the active one. From there you can modify the
Sprite object as you want.
Open one or several existing files: You can use
app.open to load a sprite from the disk and
then modify it.
Save the modified sprite: After you have done some modifications
to a sprite, you might want to save the result directly to the
disk, Sprite:saveCopyAs() function is a
good option to export the modified sprite.
Show a dialog to the user: The Dialog object
gives you the possibility to show controls to the user to enter values.
Add new options to any menu: In this case you'll need to create a
plugin with a script.
API Changes
API changes between versions.
Reference
Global namespace
app
app.clipboard
app.command
app.fs
app.os
app.pixelColor
app.theme
json
Constants
Align
AniDir
BlendMode
BrushPattern
BrushType
ColorMode
FilterChannels
FlipType
Ink
MouseButton
MouseCursor
RangeType
SelectionMode
SpriteSheetDataFormat
SpriteSheetType
TilemapMode
TilesetMode
WebSocketMessageType
Classes/objects
Brush
Cel
Color
ColorSpace
Dialog
Editor
Events
Frame
GraphicsContext
Grid
Image
ImageSpec
KeyEvent
Layer
MouseEvent
Palette
Plugin
Point
Range
Rectangle
Selection
Site
Size
Slice
Sprite
Tag
Tile
Tileset
Timer
Tool
TouchEvent
Version
Uuid
WebSocket
Window
Lua libraries
Base library and Basic Functions in Lua manual
Coroutine Manipulation
String Manipulation
UTF-8 Support
Table Manipulation
Mathematical Functions
Operating System Facilities
Some functions like os.exit, os.tmpname are not available yet
Other functions like os.execute and io.open will ask for permissions to the user
Có — aseprite/api phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/aseprite/api.
aseprite/api là gì?
aseprite/api (aseprite/api) là dự án đa ngôn ngữ trên GitHub. Theo mô tả gốc: Scripting API for Aseprite
Đọc thêm về aseprite/api ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/aseprite/api là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
api có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về api.