Some content could not load. We could not load files from our content delivery networks (CDN).
Your network may be blocking access. Ask your IT to allow loading from: .
Network domains required
We use these CDNs to deliver the files the site needs to run, please allow the following:
Domains to allow Used for
cdn.jsdelivr.net styles and JavaScript libraries.
cdnjs.cloudflare.com JavaScript libraries and icons.
code.jquery.com jQuery and jQuery UI.
pixelpad.io, cdn.pixelpad.io CDN of images, sounds, and application files.
cdn.datatables.net Interactive tables.
fonts.googleapis.com, fonts.gstatic.com Fonts stylesheets and font files.
s3.us-west-1.amazonaws.com, s3-us-west-1.amazonaws.com Project files stored on Amazon S3.
vmwan2cvlyzeklq4knz63qh6d40lewka.lambda-url.us-west-1.on.aws Amazon AWS Project play counters.
nexushud.org Learning assistant.
u45ivsqoja6u3sk7zaliv37zq40hpbxk.lambda-url.us-west-1.on.aws Amazon AWS AI character responses, when used.
  • 探す
  • 学ぶ
  • ログイン
  • Introduction
  • Game
  • Start-loop
  • Objects
  • Sprites
  • Animation
  • Sounds
  • Rooms
  • Input
  • Collision
  • Functions
  • Camera
  • Fps
  • Text
  • Graphics
  • Filters
  • Multiplayer
  • Ai

PixelPAD 2D - graphics

draw_rectangle(x1 :number, y1 :number, x2 :number, y2 :number, lineThickness :number, lineColor :number, fillColor :number) -> graphic

例
説明
Draws a rectangle between two corners and gives you back a graphic you can move, hide or destroy.
パラメータ
x1
The x position of the left edge.

y1
The y position of the bottom edge.

x2
The x position of the right edge.

y2
The y position of the top edge.

lineThickness
How thick the border is, in pixels.

lineColor
The border colour, as a hex number like 0xFF0000.

fillColor
The inside colour, as a hex number.

戻り値
A graphic object

draw_ellipse(x :number, y :number, width :number, height :number, lineThickness :number, lineColor :number, fillColor :number) -> graphic

例
説明
Draws an ellipse around a centre point.
パラメータ
x
The x position of the centre.

y
The y position of the centre.

width
How far the ellipse reaches left and right of the centre.

height
How far the ellipse reaches above and below the centre.

lineThickness
How thick the border is, in pixels.

lineColor
The border colour, as a hex number.

fillColor
The inside colour, as a hex number.

戻り値
A graphic object

draw_polygon(points :list, lineThickness :number, lineColor :number, fillColor :number) -> graphic

例
説明
Draws a shape from a list of corner points. The last point joins back to the first.
パラメータ
points
A list of [x, y] pairs, one for each corner.

lineThickness
How thick the border is, in pixels.

lineColor
The border colour, as a hex number.

fillColor
The inside colour, as a hex number.

戻り値
A graphic object

draw_arc(x :number, y :number, radius :number, startAngle :number, endAngle :number, lineThickness :number, lineColor :number, fillColor :number) -> graphic

例
説明
Draws part of a circle. The angles are in degrees, going anticlockwise from the right.
パラメータ
x
The x position of the centre.

y
The y position of the centre.

radius
How far the arc sits from the centre.

startAngle
The angle the arc starts at, in degrees.

endAngle
The angle the arc ends at, in degrees.

lineThickness
How thick the line is, in pixels.

lineColor
The line colour, as a hex number.

fillColor
The inside colour. Leave it out for no fill.

戻り値
A graphic object

draw_line(x1 :number, y1 :number, x2 :number, y2 :number, lineThickness :number, lineColor :number) -> graphic

例
説明
Draws a straight line between two points.
パラメータ
x1
The x position the line starts at.

y1
The y position the line starts at.

x2
The x position the line ends at.

y2
The y position the line ends at.

lineThickness
How thick the line is, in pixels.

lineColor
The line colour, as a hex number.

戻り値
A graphic object

graphic properties

Every draw function hands back a graphic object. Change these properties to move it, fade it or hide it.
box.x = 100 sets the x position to 100
box.y = 100 sets the y position to 100
box.z = 1000 draws it in front of anything with a lower z
box.angle = 45 turns it 45 degrees
box.alpha = 0.5 makes it half see-through
box.visible = False hides it without destroying it
box.scaleX = 2 sets the width to 200%
box.scaleY = 2 sets the height to 200%
When you are finished with a graphic, remove it with destroy(box). The same destroy() works on objects and text too.
PixelPAD
PixelPADについて
Discord
Armビルド 3.0.943
リソース
ドキュメント
EULA
プライバシーポリシー
お問い合わせ
hello@pixelpad.io
© 2026 All Rights Reserved.
PixelPAD.io
日本語
English Deutsch Español Français Português 日本語 简体中文 繁體中文 한국어
Logo

おかえりなさい!

ログインして制作を続けよう

ログインか新規登録をすると、プロジェクトを保存できます。
パスワードをお忘れですか?

アカウントをお持ちでないですか?

Logo

アカウントを作成

PixelPadで何千人ものクリエイターの仲間になろう

ログインか新規登録をすると、プロジェクトを保存できます。

すでにアカウントをお持ちですか? ログイン

Logo

先生として登録

創造的なツールで生徒の力を引き出しましょう

クラスを作成して、生徒の進捗を確認できます。

すでにアカウントをお持ちですか? ログイン