HTML Canvas: Difference between revisions
This extension seems to be recently removed |
No edit summary |
||
(9 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
⚫ | |||
{{Needs Images}} |
|||
⚫ | |||
{{Obsolete feature}} |
|||
⚫ | |||
⚫ | |||
|extension_desc = Extra drawing tools using an HTML Canvas. Works well when used with other extensions. |
|extension_desc = Extra drawing tools using an HTML Canvas. Works well when used with other extensions. |
||
}} |
}} |
||
{{Split|HTML Canvas and HTML Canvas (Original)}} |
|||
'''HTML Canvas''' is an extension in [[PenguinMod]]. It was removed, but eventually returned with new blocks. When added, it appears as a lowercased version of the actual title (i.e. "html canvas"). It replaced the [[HTML Canvas (original)|original extension]], which had the same name. |
|||
==Blocks== |
==Blocks== |
||
Livetests had a version of the extension with the same thumbnail, but more blocks, while the version that was shown in the editor was the legacy version. The livetests version was added to the editor after being re-added. Currently, the extension has 9 reporter blocks and 47 stack blocks, for a total of 56 blocks. <!-- Note: The number of stack blocks needs to be verified --> |
|||
*[[() (HTML Canvas)|()]] |
|||
*[[() (HTML Canvas, New)|<sb>canvas::#0069c2 reporter</sb>]] |
|||
*[[set composite operation of () to ()]] |
|||
*[[set width: () height: () of ()]] |
*[[set width: () height: () of ()|<sb>set width: (480) height: (360) of [canvas v]::#0069c2</sb>]] |
||
*[[set () of () to () (HTML Canvas)|<sb>set [compositing method v] of [canvas v] to [source over v]::#0069c2</sb>]] |
|||
*[[set transparency of () to ()]] |
|||
*[[get () of ()|<sb>get [compositing method v] of [canvas v]::#0069c2 reporter</sb>]] |
|||
*[[set fill color of () to ()]] |
|||
*[[set line dash to () on ()|<sb>set line dash to [[10, 10\]] on [canvas v]::#0069c2</sb>]] |
|||
*[[set border color of () to ()]] |
|||
*[[clear canvas ()]] |
*[[clear canvas ()|<sb>clear canvas [canvas v]::#0069c2</sb>]] |
||
*[[clear area at x: () y: () with width: () height: () on ()]] |
*[[clear area at x: () y: () with width: () height: () on ()|<sb>clear area at x: (0) y: (0) with width: (480) height: (360) on [canvas v]::#0069c2</sb>]] |
||
*[[draw |
*[[draw text () at () () onto ()|<sb>draw text [photos printed] at (0) (0) onto [canvas v]::#0069c2</sb>]] |
||
*[[draw text () at () () with size cap () onto ()|<sb>draw text [photos printed] at (0) (0) with size cap (0) onto [canvas v]::#0069c2</sb>]] |
|||
*[[draw image () at x: () y: () on ()]] |
|||
*[[draw text outline for () at () () onto ()|<sb>draw text outline for [photos printed] at (0) (0) onto [canvas]::#0069c2</sb>]] |
|||
*[[draw text outline for () at () () with size cap () onto ()|<sb>draw text outline for [photos printed] at (0) (0) with size cap (0) onto [canvas v]::#0069c2</sb>]] |
|||
*[[draw rectangle at x: () y: () with width: () height: () on ()|<sb>draw rectangle at x: (0) y: (0) with width: (480) height: (360) on [canvas v]::#0069c2</sb>]] |
|||
*[[draw rectangle outline at x: () y: () with width: () height: () on ()|<sb>draw rectangle outline at x: (0) y: (0) with width: (480) height: (360) on [canvas v]::#0069c2</sb>]] |
|||
*[[preload image () as ()|<sb>preload image [https://studio.penguinmod.com/favicon.ico] as [preloaded image]::#0069c2</sb>]] |
|||
*[[unload image ()|<sb>unload image [preloaded image]::#0069c2</sb>]] |
|||
*[[get width of ()|<sb>get width of [preloaded image]::#0069c2 reporter</sb>]] |
|||
*[[get height of ()|<sb>get height of [preloaded image]::#0069c2 reporter</sb>]] |
|||
*[[draw image () at x: () y: () onto canvas ()|<sb>draw image [https://studio.penguinmod.com/favicon.ico] at x: (0) y: (0) onto canvas [canvas v]::#0069c2</sb>]] |
|||
*[[draw image () at x: () y: () width: () height: () pointed at: () onto canvas ()|<sb>draw image [https://studio.penguinmod.com/favicon.ico] at x: (0) y: (0) width: (64) height: (64) pointed at: (90) onto canvas [canvas v]::#0069c2</sb>]] |
|||
*[[draw image () at x: () y: () width: () height: () cropping from x: () y: () width: () height: () pointed at: () onto canvas ()|<sb>draw image [https://studio.penguinmod.com/favicon.ico] at x: (0) y: (0) width: (64) height: (64) cropping from x: (0) y: (0) width: (100) height: (100) pointed at: (90) onto canvas [canvas]::#0069c2</sb>]] |
|||
*[[begin path drawing on ()|<sb>begin path drawing on [canvas v]::#0069c2</sb>]] |
|||
*[[move pen to x: () y: () on ()|<sb>move pen to x: (0) y: (0) on [canvas v]::#0069c2</sb>]] |
|||
*[[add line going to x: () y: () on ()|<sb>add line going to x: (0) y: (0) on [canvas v]::#0069c2</sb>]] |
|||
*[[add arc going to x: () y: () on () with control points x: () y: () x: () y: () and radius ()|add arc going to x: () y: () on () with control points x: () y: () x: () y: () and radius ()]] <!-- Figure out a way to create this one --> |
|||
*[[add a rectangle at x: () y: () with width: () height: () to ()|<sb>add a rectangle at x: (0) y: (0) with width: (10) height: (10) to [canvas v]::#0069c2</sb>]] |
|||
*[[add a ellipse at x: () y: () with width: () height: () pointed towards () to ()|<sb>add a ellipse at x: (0) y: (0) with width: (10) height: (10) pointed towards (90) to [canvas v]::#0069c2</sb>]] {{sic}} |
|||
*[[add a ellipse with starting rotation () and ending rotation () at x: () y: () with width: () height: () pointed towards () to ()|<sb>add a ellipse with starting rotation (0) and ending rotation (360) at x: (0) y: (0) with width: (10) height: (10) pointed towards (90) to [canvas v]::#0069c2</sb>]] {{sic}} |
|||
*[[attempt to close any open path in ()|<sb>attempt to close any open path in [canvas v]::#0069c2</sb>]] |
|||
*[[draw outline for current path in ()|<sb>draw outline for current path in [canvas v]::#0069c2</sb>]] |
|||
*[[draw fill for current path in ()|<sb>draw fill for current path in [canvas v]::#0069c2</sb>]] |
|||
*[[save ()'s transform|<sb>save [canvas v]'s transform::#0069c2</sb>]] |
|||
*[[reset to ()'s saved transform|<sb>reset to [canvas v]'s saved transform::#0069c2</sb>]] |
|||
*[[turn left () on ()|<sb>turn left (90) on [canvas v]::#0069c2</sb>]] |
|||
*[[turn right () on ()|<sb>turn right (90) on [canvas v]::#0069c2</sb>]] |
|||
*[[set rotation to () on ()|<sb>set rotation to (90) on [canvas v]::#0069c2</sb>]] |
|||
*[[set translation X: () Y: () on ()|<sb>set translation X: (10) Y: (10) on [canvas v]::#0069c2</sb>]] |
|||
*[[change translation X: () Y: () on ()|<sb>change translation X: (10) Y: (10) on [canvas v]::#0069c2</sb>]] |
|||
*[[change X translation by () on ()|<sb>change X translation by (10) on [canvas v]::#0069c2</sb>]] |
|||
*[[set X scaler to () on ()|<sb>set X scaler to (50) on [canvas v]::#0069c2</sb>]] <!-- Note: This might be a misnamed X translation block --> |
|||
*[[change Y translation by () on ()|<sb>change Y translation by (10) on [canvas v]::#0069c2</sb>]] |
|||
*[[set Y translation by () on ()|<sb>set Y translation by (50) on [canvas v]::#0069c2</sb>]] {{sic}} |
|||
*[[change XY scaler by ()% on ()|<sb>change XY scaler by (10)% on [canvas v]::#0069c2</sb>]] |
|||
*[[set XY scaler to ()% on ()|<sb>set XY scaler to (50)% on [canvas v]::#0069c2</sb>]] |
|||
*[[change X scaler by ()% on ()|<sb>change X scaler by (10)% on [canvas v]::#0069c2</sb>]] |
|||
*[[set X scaler to ()% on ()|<sb>set X scaler to (50)% on [canvas v]::#0069c2</sb>]] |
|||
*[[change Y scaler by ()% on ()|<sb>change Y scaler by (50)% on [canvas v]::#0069c2</sb>]] |
|||
*[[set Y scaler to ()% on ()|<sb>set Y scaler to (50)% on [canvas v]::#0069c2</sb>]] |
|||
*[[clear transform in ()|<sb>clear transform in [canvas v]::#0069c2</sb>]] |
|||
*[[set new transform () on ()|<sb>set new transform [[1, 0, 0, 1, 0, 0\]] on [canvas v]::#0069c2</sb>]] |
|||
*[[get current transform in ()|<sb>get current transform in [canvas v]::#0069c2 reporter</sb>]] |
|||
*[[set this sprites costume to ()|<sb>set this sprites costume to [canvas v]::#0069c2</sb>]] {{sic}} |
|||
*[[get data URL of ()|<sb>get data URL of [canvas v]::#0069c2 reporter</sb>]] |
|||
*[[get width of ()|<sb>get width of [canvas v]::#0069c2 reporter</sb>]] |
|||
*[[get height of ()|<sb>get height of [canvas v]::#0069c2 reporter</sb>]] |
|||
*[[get () of text () when drawn to ()|<sb>get [width v] of text [bogos binted] when drawn to [canvas v]::#0069c2</sb>]] |
|||
==Bugs== |
|||
After the extension was re-added, the ability to rename and delete canvases was added, as well as the ability to make canvases for all sprites and sprite only. However, deleting doesn't work properly at the moment. When attempting to delete a canvas, the canvas either still appears, or the user is prevented from creating new canvases afterward (the latter is true if the [[() (HTML Canvas, New)|()]] stage monitor is shown). |
|||
==Trivia== |
==Trivia== |
||
*The blocks in this extension |
*The blocks in this extension only appear until a canvas is created. This was also the case before it was removed. |
||
*The options for renaming and deleting canvases can be seen when selecting a canvas dropdown, or when a canvas is right clicked. However, it says "variable" instead. This doesn't happen when creating a canvas. |
|||
{{ExtensionsNav}} |
{{ExtensionsNav}} |
Latest revision as of 17:13, 22 July 2024
HTML Canvas | |
---|---|
![]() | |
Description | Extra drawing tools using an HTML Canvas. Works well when used with other extensions. |
Split
This article is a candidate for splitting into HTML Canvas and HTML Canvas (Original). You can discuss this on the talk page.
HTML Canvas is an extension in PenguinMod. It was removed, but eventually returned with new blocks. When added, it appears as a lowercased version of the actual title (i.e. "html canvas"). It replaced the original extension, which had the same name.
Blocks
Livetests had a version of the extension with the same thumbnail, but more blocks, while the version that was shown in the editor was the legacy version. The livetests version was added to the editor after being re-added. Currently, the extension has 9 reporter blocks and 47 stack blocks, for a total of 56 blocks.
canvas::#0069c2 reporter
set width: (480) height: (360) of [canvas v]::#0069c2
set [compositing method v] of [canvas v] to [source over v]::#0069c2
get [compositing method v] of [canvas v]::#0069c2 reporter
set line dash to [[10, 10\]] on [canvas v]::#0069c2
clear canvas [canvas v]::#0069c2
clear area at x: (0) y: (0) with width: (480) height: (360) on [canvas v]::#0069c2
draw text [photos printed] at (0) (0) onto [canvas v]::#0069c2
draw text [photos printed] at (0) (0) with size cap (0) onto [canvas v]::#0069c2
draw text outline for [photos printed] at (0) (0) onto [canvas]::#0069c2
draw text outline for [photos printed] at (0) (0) with size cap (0) onto [canvas v]::#0069c2
draw rectangle at x: (0) y: (0) with width: (480) height: (360) on [canvas v]::#0069c2
draw rectangle outline at x: (0) y: (0) with width: (480) height: (360) on [canvas v]::#0069c2
preload image [https://studio.penguinmod.com/favicon.ico] as [preloaded image]::#0069c2
unload image [preloaded image]::#0069c2
get width of [preloaded image]::#0069c2 reporter
get height of [preloaded image]::#0069c2 reporter
draw image [https://studio.penguinmod.com/favicon.ico] at x: (0) y: (0) onto canvas [canvas v]::#0069c2
draw image [https://studio.penguinmod.com/favicon.ico] at x: (0) y: (0) width: (64) height: (64) pointed at: (90) onto canvas [canvas v]::#0069c2
draw image [https://studio.penguinmod.com/favicon.ico] at x: (0) y: (0) width: (64) height: (64) cropping from x: (0) y: (0) width: (100) height: (100) pointed at: (90) onto canvas [canvas]::#0069c2
begin path drawing on [canvas v]::#0069c2
move pen to x: (0) y: (0) on [canvas v]::#0069c2
add line going to x: (0) y: (0) on [canvas v]::#0069c2
- add arc going to x: () y: () on () with control points x: () y: () x: () y: () and radius ()
add a rectangle at x: (0) y: (0) with width: (10) height: (10) to [canvas v]::#0069c2
add a ellipse at x: (0) y: (0) with width: (10) height: (10) pointed towards (90) to [canvas v]::#0069c2
[sic]add a ellipse with starting rotation (0) and ending rotation (360) at x: (0) y: (0) with width: (10) height: (10) pointed towards (90) to [canvas v]::#0069c2
[sic]attempt to close any open path in [canvas v]::#0069c2
draw outline for current path in [canvas v]::#0069c2
draw fill for current path in [canvas v]::#0069c2
save [canvas v]'s transform::#0069c2
reset to [canvas v]'s saved transform::#0069c2
turn left (90) on [canvas v]::#0069c2
turn right (90) on [canvas v]::#0069c2
set rotation to (90) on [canvas v]::#0069c2
set translation X: (10) Y: (10) on [canvas v]::#0069c2
change translation X: (10) Y: (10) on [canvas v]::#0069c2
change X translation by (10) on [canvas v]::#0069c2
set X scaler to (50) on [canvas v]::#0069c2
change Y translation by (10) on [canvas v]::#0069c2
set Y translation by (50) on [canvas v]::#0069c2
[sic]change XY scaler by (10)% on [canvas v]::#0069c2
set XY scaler to (50)% on [canvas v]::#0069c2
change X scaler by (10)% on [canvas v]::#0069c2
set X scaler to (50)% on [canvas v]::#0069c2
change Y scaler by (50)% on [canvas v]::#0069c2
set Y scaler to (50)% on [canvas v]::#0069c2
clear transform in [canvas v]::#0069c2
set new transform [[1, 0, 0, 1, 0, 0\]] on [canvas v]::#0069c2
get current transform in [canvas v]::#0069c2 reporter
set this sprites costume to [canvas v]::#0069c2
[sic]get data URL of [canvas v]::#0069c2 reporter
get width of [canvas v]::#0069c2 reporter
get height of [canvas v]::#0069c2 reporter
get [width v] of text [bogos binted] when drawn to [canvas v]::#0069c2
Bugs
After the extension was re-added, the ability to rename and delete canvases was added, as well as the ability to make canvases for all sprites and sprite only. However, deleting doesn't work properly at the moment. When attempting to delete a canvas, the canvas either still appears, or the user is prevented from creating new canvases afterward (the latter is true if the () stage monitor is shown).
Trivia
- The blocks in this extension only appear until a canvas is created. This was also the case before it was removed.
- The options for renaming and deleting canvases can be seen when selecting a canvas dropdown, or when a canvas is right clicked. However, it says "variable" instead. This doesn't happen when creating a canvas.