-
Notifications
You must be signed in to change notification settings - Fork 294
Extension: "SVG" #2005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
WAYLIVES
wants to merge
64
commits into
TurboWarp:master
Choose a base branch
from
WAYLIVES:svg
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Extension: "SVG" #2005
Changes from all commits
Commits
Show all changes
64 commits
Select commit
Hold shift + click to select a range
d8d4660
Merge pull request #1 from TurboWarp/master
WAYLIVES 950a9de
Create 1.0.0.js
WAYLIVES 3d09c90
[Automated] Format code
DangoCat a1a7359
Update 1.0.0.js
WAYLIVES e7b0867
Update 1.0.0.js
WAYLIVES a33d0b2
[Automated] Format code
DangoCat ea8e1e5
Update 1.0.0.js
WAYLIVES e01604f
Update 1.0.0.js
WAYLIVES 1188bb5
Update 1.0.0.js
WAYLIVES a2c43fb
Update 1.0.0.js
WAYLIVES 537c8c7
Update 1.0.0.js
WAYLIVES 5f6b77d
Update 1.0.0.js
WAYLIVES 77c3421
Create Window Settings.svg
WAYLIVES 4e77dc8
Update 1.0.0.js
WAYLIVES 02ebdfd
Rename 1.0.0.js to 1.0.0.js
WAYLIVES e4e2c9f
Rename Window Settings.svg to Window Settings.svg
WAYLIVES db656c4
Update and rename 1.0.0.js to 2.0.0.js
WAYLIVES 2411fe3
Update 2.0.0.js
WAYLIVES 46abee7
Create 1.0.1.js
WAYLIVES 1ff413f
Delete extensions/WAYLIVES/SVG directory
WAYLIVES 568253c
Create 1.0.1.js
WAYLIVES 8331ebd
Delete extensions/WAYLIVES/Window Settings/SVG directory
WAYLIVES bf6a38f
Create 1.0.1.js
WAYLIVES e198545
[Automated] Format code
DangoCat 90d23ab
Update 1.0.1.js
WAYLIVES 36f60c6
[Automated] Format code
DangoCat 0831d51
Update 1.0.1.js
WAYLIVES 4bfba54
Update 1.0.1.js
WAYLIVES d618b30
Update 1.0.1.js
WAYLIVES c66d90c
Update 1.0.1.js
WAYLIVES 926a0b3
Update 1.0.1.js
WAYLIVES 70d66d4
Update 1.0.1.js
WAYLIVES 487e7ad
[Automated] Format code
DangoCat e3e9b88
Create SVG.svg
WAYLIVES a803ef6
Update 1.0.1.js
WAYLIVES 38c8a1f
[Automated] Format code
DangoCat acecb61
Update 1.0.1.js
WAYLIVES 669d9bd
Update 1.0.1.js
WAYLIVES b178019
Update 1.0.1.js
WAYLIVES ea6a2b2
Update 1.0.1.js
WAYLIVES dad2315
[Automated] Format code
DangoCat acd5f75
Update 1.0.1.js
WAYLIVES ae3eed2
Update 1.0.1.js
WAYLIVES 618e2a0
Update 1.0.1.js
WAYLIVES 4a4f4f3
Update 1.0.1.js
WAYLIVES f2f0f5a
[Automated] Format code
DangoCat 147f340
Delete extensions/WAYLIVES/Window Settings directory
WAYLIVES fdd49ac
Update extensions.json
WAYLIVES eaa65e7
Create SVG.md
WAYLIVES 9fb195b
Update SVG.md
WAYLIVES 808a8b5
Update SVG.md
WAYLIVES d06fcd9
Update SVG.md
WAYLIVES 7afe800
Update SVG.md
WAYLIVES 385cc0f
Update SVG.md
WAYLIVES 4fdd134
Update 1.0.1.js
WAYLIVES 41ea579
Update 1.0.1.js
WAYLIVES d9f1c7a
Delete images/WAYLIVES/Window Settings.svg
WAYLIVES 50a3324
Update SVG.md
WAYLIVES 2645267
Update SVG.md
WAYLIVES 0955787
Add files via upload
WAYLIVES a51e001
Update SVG.md
WAYLIVES a9fa4e1
Delete samples/SVG.sb3
WAYLIVES 40cac2a
Update 1.0.1.js
WAYLIVES 5b3ee0a
[Automated] Format code
DangoCat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
# SVG | ||
|
||
SVG is an XML language that is designed for drawing vector images. There are two types of images: raster and vector, so using SVG you can draw vector graphics. | ||
|
||
Example: | ||
|
||
<img src="https://github.com/WAYLIVES/my-extensions/blob/main/extensions/SVG/doc/11.png"> | ||
 <i>- This image belongs to @WAYLIVES</i> | ||
|
||
## | ||
|
||
Using the "SVG" extension, you can create code for simple SVG images, where the following elements will be available: | ||
- line | ||
- rectangle | ||
- circle | ||
|
||
## Блоки | ||
### SVG-frame: | ||
```scratch | ||
(SVG-frame // width:[100] height:[100] elements in svg:[...] :: #9823FF) | ||
``` | ||
<img src="https://github.com/WAYLIVES/my-extensions/blob/main/extensions/SVG/doc/s1.svg"> | ||
|
||
Nothing will work without this block, it sets the beginning and end of vector images. | ||
|
||
(width) - here you set the width of the SVG format | ||
|
||
(height) - here you set the height of the SVG format | ||
|
||
(elements in svg) - here you can insert SVG elements with which you will draw images. | ||
|
||
### Line: | ||
|
||
```scratch | ||
(LINE // x1, y1:[4][4] x2, y2:[96][96] width:[8] color:[#FF0000] opacity:[100]% dash, gap:[0][0] linecap:[round v] :: #9823FF) | ||
``` | ||
<img src="https://github.com/WAYLIVES/my-extensions/blob/main/extensions/SVG/doc/s2.svg"> | ||
|
||
You can use this block to draw lines. | ||
|
||
(x1), (y2) - is the position of the first point of the line along the X, Y coordinate (SVG coordinates: https://developer.mozilla.org/en/docs/Web/SVG/Tutorial/Positions ). | ||
|
||
(x2), (y2) - is the position of the end (second) point of the line along the X, Y coordinate. | ||
|
||
(width) - here you can set the line thickness. | ||
|
||
(color) - here you set the color of the line. | ||
|
||
(opacity) - here you set the transparency of the line as a percentage (%). | ||
|
||
(dash), (gap) - you can use these parameters to set the line type. Dash is the length of the dotted lines. Gap is the indentation, i.e. the distance between the dotted lines. | ||
|
||
(linecap) - here you can set the shape of the line ends (more details here: https://developer.mozilla.org/en/docs/Web/SVG/Attribute/stroke-linecap ). | ||
|
||
Linecap: | ||
|
||
<img src="https://github.com/WAYLIVES/my-extensions/blob/main/extensions/SVG/doc/14.svg"> | ||
|
||
### Rect: | ||
|
||
```scratch | ||
(RECT // x, y:[4][4] width:[92] height:[92] radius:[20] fill color:[#FF0000] fill opacity:[100]% stroke width:[8] stroke color[#000000] stroke opacity:[100]% dash, gap:[0][0] stroke linecap:[round v] :: #9823FF) | ||
``` | ||
<img src="https://github.com/WAYLIVES/my-extensions/blob/main/extensions/SVG/doc/s3.svg"> | ||
|
||
You can use this block to draw rectangles and squares. | ||
|
||
(x), (y) - is the position of the rectangle's starting point along the X, Y coordinate. | ||
|
||
(width), (height) - are the width and height of the rectangle. | ||
|
||
(radius) - here you set the rounded corners of the rectangle. | ||
|
||
(fill color) - here you set the fill color of the rectangle. | ||
|
||
(fill opacity) - here you set the transparency of the rectangle fill as a percentage (%). | ||
|
||
(stroke width) - here you set the stroke thickness of the rectangle. | ||
|
||
(stroke color) - here you set the stroke color. | ||
|
||
(stroke opacity) - here you set the transparency of the stroke. | ||
|
||
(dash), (gap) - you can use these parameters to set the line type. Dash is the length of the dotted lines. Gap is the indentation, i.e. the distance between the dotted lines. | ||
|
||
(linecap) - here you can set the shape of the line ends. | ||
|
||
### Ellipse: | ||
|
||
```scratch | ||
(ELLIPSE // cx, cy:[50][50] width:[92] height:[92] fill color:[#FF0000] fill opacity:[100]% stroke width:[8] stroke color[#000000] stroke opacity:[100]% dash, gap:[0][0] stroke linecap:[round v] :: #9823FF) | ||
``` | ||
<img src="https://github.com/WAYLIVES/my-extensions/blob/main/extensions/SVG/doc/s4.svg"> | ||
|
||
You can use this block to draw circles and ovals. | ||
|
||
(cx), (cy) - is the position of the center point of the circle along the X, Y coordinate. | ||
|
||
(width), (height) - are the width and height of the circle. | ||
|
||
(fill color) - here you set the fill color. | ||
|
||
(fill opacity) - here you set the transparency of the fill as a percentage (%). | ||
|
||
(stroke width) - here you set the thickness of the circle outline. | ||
|
||
(stroke color) - here you set the stroke color. | ||
|
||
(stroke opacity) - here you set the transparency of the stroke. | ||
|
||
(dash), (gap) - you can use these parameters to set the line type. Dash is the length of the dotted lines. Gap is the indentation, i.e. the distance between the dotted lines. | ||
|
||
(linecap) - here you can set the shape of the line ends. | ||
|
||
## Пример-проект | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And here. |
||
|
||
<img src="https://github.com/WAYLIVES/my-extensions/blob/main/extensions/SVG/doc/12.png"> | ||
<img src="https://github.com/WAYLIVES/my-extensions/blob/main/extensions/SVG/doc/13.png"> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's still a Russian heading here...