init
7
.editorconfig
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = tab
|
||||||
|
indent_size = 4
|
||||||
|
tab_width = 4
|
||||||
|
charset = utf-8
|
||||||
2
.gitattributes
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# Normalize EOL for all files that Git considers text files.
|
||||||
|
* text=auto eol=lf
|
||||||
5
.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# Godot 4+ specific ignores
|
||||||
|
.godot/
|
||||||
|
/android/
|
||||||
|
|
||||||
|
.idea/
|
||||||
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2026 hmdfrds
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
8
Node War.csproj
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<Project Sdk="Godot.NET.Sdk/4.6.2">
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'android' ">net9.0</TargetFramework>
|
||||||
|
<EnableDynamicLoading>true</EnableDynamicLoading>
|
||||||
|
<RootNamespace>NodeWar</RootNamespace>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
||||||
19
Node War.sln
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 2012
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Node War", "Node War.csproj", "{4C582811-BADF-4C82-8A05-94A9B4C5926F}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
ExportDebug|Any CPU = ExportDebug|Any CPU
|
||||||
|
ExportRelease|Any CPU = ExportRelease|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{4C582811-BADF-4C82-8A05-94A9B4C5926F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{4C582811-BADF-4C82-8A05-94A9B4C5926F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{4C582811-BADF-4C82-8A05-94A9B4C5926F}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
|
||||||
|
{4C582811-BADF-4C82-8A05-94A9B4C5926F}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
|
||||||
|
{4C582811-BADF-4C82-8A05-94A9B4C5926F}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU
|
||||||
|
{4C582811-BADF-4C82-8A05-94A9B4C5926F}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
175
README.md
Normal file
@@ -0,0 +1,175 @@
|
|||||||
|
<p align="center">
|
||||||
|
<img src="media/icon.png" alt="GodotVim Logo" width="128" height="128" />
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h1 align="center">GodotVim</h1>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<b>Vim emulation for Godot's built-in script editor.</b>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://godotengine.org/asset-library/asset/4666">
|
||||||
|
<img src="https://img.shields.io/badge/Godot%20Asset%20Lib-4.5%2B-478cbf?logo=godot-engine&logoColor=white" alt="Godot Asset Library">
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/hmdfrds/godot-vim/actions/workflows/release.yml">
|
||||||
|
<img src="https://github.com/hmdfrds/godot-vim/actions/workflows/release.yml/badge.svg" alt="Release">
|
||||||
|
</a>
|
||||||
|
<img src="https://img.shields.io/github/license/hmdfrds/godot-vim" alt="License">
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<img src="media/hero.gif" alt="GodotVim Demo" width="800" />
|
||||||
|
</p>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
### Godot Asset Library (Recommended)
|
||||||
|
1. Open your Godot project → **AssetLib** tab
|
||||||
|
2. Search **"[GodotVim](https://godotengine.org/asset-library/asset/4666)"** → **Download**
|
||||||
|
3. In the install dialog, click **Install**
|
||||||
|
4. **Project → Project Settings** → **Plugins** → Enable **GodotVim**
|
||||||
|
5. **Restart the Editor** (required for full initialization)
|
||||||
|
|
||||||
|
### Manual (from Releases page)
|
||||||
|
1. Download `godot-vim-vX.Y.Z.zip` from the [Releases page](https://github.com/hmdfrds/godot-vim/releases/latest)
|
||||||
|
2. Extract the archive — you'll get a `godot-vim-vX.Y.Z/` folder containing `addons/`, `LICENSE`, and `README.md`
|
||||||
|
3. Copy the **`addons/godot_vim/`** folder (from inside the extracted folder) into your Godot project's root, so the final path is `<your-project>/addons/godot_vim/`
|
||||||
|
4. **Project → Project Settings** → **Plugins** → Enable **GodotVim**
|
||||||
|
5. **Restart the Editor** (required for full initialization)
|
||||||
|
|
||||||
|
### Upgrading from v0.x
|
||||||
|
|
||||||
|
This is a complete rewrite — settings, config format, and internals are all new.
|
||||||
|
|
||||||
|
1. **Remove the old `addons/godot_vim/` folder** from your Godot project before installing
|
||||||
|
2. **Clear old EditorSettings** (optional): old GodotVim keys in `editor_settings-4.tres` are harmless — the new version ignores them — but you can delete lines starting with `plugins/GodotVim` in that file for a clean slate. The file is located at:
|
||||||
|
- **Windows:** `%APPDATA%\Godot\editor_settings-4.tres`
|
||||||
|
- **Linux:** `~/.config/godot/editor_settings-4.tres`
|
||||||
|
- **macOS:** `~/Library/Application Support/Godot/editor_settings-4.tres`
|
||||||
|
3. **Recreate key mappings**: v0.x stored mappings in EditorSettings; v1.0 uses a `.godot-vimrc` config file instead (see [Configuration](#configuration))
|
||||||
|
|
||||||
|
## Quick Start
|
||||||
|
|
||||||
|
Open any script.
|
||||||
|
|
||||||
|
| Keys | What happens |
|
||||||
|
|------|-------------|
|
||||||
|
| `i` | Enter Insert mode (type normally) |
|
||||||
|
| `Escape` | Return to Normal mode |
|
||||||
|
| `dd` | Delete the current line |
|
||||||
|
| `ci"` | Change text inside quotes |
|
||||||
|
| `/pattern` | Search forward |
|
||||||
|
| `:w` | Save the file |
|
||||||
|
| `:run` | Run the project (F5) |
|
||||||
|
| `Ctrl+h/j/k/l` | Navigate between Godot panels |
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
### Full Composable Vim Grammar
|
||||||
|
|
||||||
|
`d2w`, `ci"`, `gUiw`, `>ap` — operators compose with motions and text objects exactly like real Vim. Counts multiply, registers route output. Dot repeat (`.`) replays any edit faithfully, including complex multi-key sequences.
|
||||||
|
|
||||||
|
```
|
||||||
|
[count] [register] operator [count] motion/textobject
|
||||||
|
```
|
||||||
|
|
||||||
|
Motions, operators, text objects — including advanced text objects like `ib` (any bracket), `iq` (any quote), `ii` (indent), `im` (symbol), and `ie` (entire buffer). Visual block mode supports `I`/`A` for multi-line insert/append. Undo tree with time-based navigation. [Full list →](docs/REFERENCE.md#motions)
|
||||||
|
|
||||||
|
### Built for Godot
|
||||||
|
|
||||||
|
Not just Vim in an editor — Vim that speaks Godot:
|
||||||
|
|
||||||
|
- **`:run`** / **`:runcurrent`** — launch scenes without leaving the keyboard
|
||||||
|
- **`:GodotBreakpoint`** — toggle breakpoints, step through with `:next` / `:stepin`
|
||||||
|
- **`Ctrl+h/j/k/l`** — spatial panel navigation (script editor, scene tree, inspector, filesystem)
|
||||||
|
- **`j/k/h/l` in docks** — browse the scene tree, filesystem, and output with Vim keys; `/` to search
|
||||||
|
- **File explorer** — `a` create file/dir, `d` delete, `r` rename, `y` yank path, `R` refresh (nvim-tree style)
|
||||||
|
- **`gd`** — go-to-definition; **`K`** — hover docs
|
||||||
|
- **Code completion** — `Ctrl-N`/`Ctrl-P`/`Ctrl-Space` trigger and navigate completions
|
||||||
|
- **Cross-buffer jump list** — `Ctrl-O`/`Ctrl-I` switch tabs when the jump is in another buffer
|
||||||
|
- **`:zen`** — distraction-free mode
|
||||||
|
|
||||||
|
[All Godot commands →](docs/REFERENCE.md#custom-commands)
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<img src="media/dock_filesystem.gif" alt="Panel Navigation" width="800" />
|
||||||
|
<br><em>Navigate between docks with Ctrl+h/j/k/l — browse files, scenes, and inspector without the mouse</em>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<img src="media/docs.gif" alt="Go-to-definition and Hover Docs" width="800" />
|
||||||
|
<br><em>K for hover docs, gd for go-to-definition</em>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
### Search and Replace
|
||||||
|
|
||||||
|
Incremental search highlighting as you type. `:s/old/new/g` highlights every match region in yellow as you type the pattern — see exactly what will be affected before you press Enter.
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<img src="media/incremental_search_replace.gif" alt="Incremental Search and Replace" width="800" />
|
||||||
|
<br><em>Live match highlighting as you type the substitution pattern</em>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
### Custom Cursor
|
||||||
|
|
||||||
|
A GLSL difference-blend shader renders the cursor above Godot's native caret. Block, beam, and underline shapes with smooth animation, per-mode colors, and adjustable blink speed. [Cursor settings →](docs/REFERENCE.md#cursor)
|
||||||
|
|
||||||
|
### Configuration
|
||||||
|
|
||||||
|
Create a `.godot-vimrc` at your project root or user directory:
|
||||||
|
|
||||||
|
```vim
|
||||||
|
let mapleader = " "
|
||||||
|
set timeoutlen=500
|
||||||
|
|
||||||
|
nnoremap <Leader>w :save<CR>
|
||||||
|
inoremap jk <Esc>
|
||||||
|
vnoremap < <gv
|
||||||
|
vnoremap > >gv
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Hot-reloads on save. 20 built-in presets togglable via the `:mappings` dialog. [Config syntax →](docs/REFERENCE.md#godot-vimrc-syntax) · [All presets →](docs/REFERENCE.md#preset-mappings)
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<img src="media/mappings.gif" alt="Mappings Dialog" width="800" />
|
||||||
|
<br><em>Toggle built-in presets and manage custom mappings with :mappings</em>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
### Macros, Registers, and Marks
|
||||||
|
|
||||||
|
Record with `qa`, replay with `@a`. Named registers `"a`-`"z`, system clipboard via `"+`. Local and global marks, jump list with `Ctrl-O`/`Ctrl-I`. [Full details →](docs/REFERENCE.md#registers-and-macros)
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
| Problem | Solution |
|
||||||
|
|---------|----------|
|
||||||
|
| Plugin not appearing | Ensure `addons/godot_vim/` contains `plugin.cfg`, `.gdextension`, and the compiled library. Enable in Project Settings > Plugins. |
|
||||||
|
| `addons/` folder missing after Asset Library install | "Ignore asset root" was unchecked. Re-install from AssetLib with the box **checked**, or manually copy `addons/godot_vim/` from the release zip. |
|
||||||
|
| Key not working | Check `passthrough_keys` setting — the key may be bypassing Vim. Check `:mappings` for conflicts. |
|
||||||
|
| `.godot-vimrc` not loading | Verify the file is at `res://.godot-vimrc` or `user://.godot-vimrc`. Run `:source` to force reload. |
|
||||||
|
| Clipboard not working | Enable `editor/clipboard_enabled` in EditorSettings. Both `y`/`p` and `"+y`/`"+p` sync with the system clipboard when enabled. |
|
||||||
|
| Cursor not rendering | The custom cursor uses a GLSL shader. Set `cursor/enabled = false` to fall back to native caret. |
|
||||||
|
| macOS: held keys don't repeat | macOS's "Press and Hold" accent picker can interfere with key repeat. Run `defaults write com.godotengine.godot ApplePressAndHoldEnabled -bool false` in Terminal and restart Godot. GodotVim includes a built-in fallback, but disabling Press and Hold gives the most reliable experience. |
|
||||||
|
|
||||||
|
**For bug reports:** Set **Log Level** to `Debug` in Editor Settings > GodotVim, reproduce the issue, then copy the Output panel into GitHub issue. The debug log shows every keystroke and what command was executed.
|
||||||
|
|
||||||
|
## Architecture
|
||||||
|
|
||||||
|
```
|
||||||
|
+----------------+ +----------+ +----------+
|
||||||
|
| Godot CodeEdit | <-> | Bridge | <-> | vim-core |
|
||||||
|
| | | (gdext) | | (Rust) |
|
||||||
|
+----------------+ +----------+ +----------+
|
||||||
|
```
|
||||||
|
|
||||||
|
**vim-core** is a standalone Vim engine — pure Rust, zero Godot dependencies. It processes keystrokes and returns `Effect` values that the host applies. The same engine could power any editor.
|
||||||
|
|
||||||
|
[All settings](docs/REFERENCE.md#settings) · [All commands](docs/REFERENCE.md#custom-commands) · [Full reference](docs/REFERENCE.md)
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
[MIT](LICENSE)
|
||||||
30
addons/curved_lines_2d/AdaptableVectorShape3D.svg
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
width="16"
|
||||||
|
height="16"
|
||||||
|
version="1.1"
|
||||||
|
id="svg1"
|
||||||
|
sodipodi:docname="AdaptableVectorShape3D.svg"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
||||||
|
id="defs1" /><sodipodi:namedview
|
||||||
|
id="namedview1"
|
||||||
|
pagecolor="#505050"
|
||||||
|
bordercolor="#ffffff"
|
||||||
|
borderopacity="1"
|
||||||
|
inkscape:showpageshadow="0"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pagecheckerboard="1"
|
||||||
|
inkscape:deskcolor="#505050"
|
||||||
|
inkscape:zoom="22.627417"
|
||||||
|
inkscape:cx="5.1707183"
|
||||||
|
inkscape:cy="9.6785241"
|
||||||
|
inkscape:current-layer="svg1" /><path
|
||||||
|
id="path1"
|
||||||
|
style="color:#000000;fill:#fc7f7f;stroke-linecap:round;stroke-linejoin:round;-inkscape-stroke:none;fill-opacity:1"
|
||||||
|
d="M 12.007812,1.5019531 C 11.361549,1.4942372 10.706208,1.7931894 10.294922,2.4824219 8.8288054,2.6144492 7.7390741,3.1437768 7.0234375,3.9648438 6.0924195,5.0336435 5.8202842,6.3490867 5.578125,7.5273438 L 4.5097656,11.146484 2.7050781,8.7402344 C 2.3734436,8.2984142 1.746378,8.2092084 1.3046875,8.5410156 0.86410905,8.8725261 0.77499109,9.4980994 1.1054688,9.9394531 l 3,3.9999999 c 0.4936652,0.656099 1.5239157,0.470654 1.7578124,-0.316406 L 7.5039063,8.0644532 8.192645,5.7987177 C 8.2524775,5.6638417 8.3811132,5.4516369 8.53125,5.2792969 8.8772552,4.8805828 9.3691072,4.5692373 10.269531,4.4707031 11.220155,6.171195 13.791802,5.6477381 14.001953,3.7109375 14.137852,2.3801588 13.084918,1.514813 12.007812,1.5019531 Z"
|
||||||
|
sodipodi:nodetypes="sccccccccccccccs" /></svg>
|
||||||
|
After Width: | Height: | Size: 1.7 KiB |
43
addons/curved_lines_2d/AdaptableVectorShape3D.svg.import
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://go4564jqj3hx"
|
||||||
|
path="res://.godot/imported/AdaptableVectorShape3D.svg-fb61f1579497b3af713b816581b03c84.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://addons/curved_lines_2d/AdaptableVectorShape3D.svg"
|
||||||
|
dest_files=["res://.godot/imported/AdaptableVectorShape3D.svg-fb61f1579497b3af713b816581b03c84.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
svg/scale=1.0
|
||||||
|
editor/scale_with_editor_scale=false
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
||||||
105
addons/curved_lines_2d/DefaultMode.svg
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
width="16"
|
||||||
|
height="16"
|
||||||
|
version="1.1"
|
||||||
|
id="svg1"
|
||||||
|
sodipodi:docname="DefaultMode.svg"
|
||||||
|
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
|
||||||
|
xml:space="preserve"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
||||||
|
id="defs1" /><sodipodi:namedview
|
||||||
|
id="namedview1"
|
||||||
|
pagecolor="#505050"
|
||||||
|
bordercolor="#ffffff"
|
||||||
|
borderopacity="1"
|
||||||
|
inkscape:showpageshadow="0"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pagecheckerboard="1"
|
||||||
|
inkscape:deskcolor="#505050"
|
||||||
|
inkscape:zoom="5.6568542"
|
||||||
|
inkscape:cx="20.064155"
|
||||||
|
inkscape:cy="0"
|
||||||
|
inkscape:current-layer="svg1"
|
||||||
|
showguides="true"
|
||||||
|
showgrid="true"><inkscape:grid
|
||||||
|
id="grid1"
|
||||||
|
units="px"
|
||||||
|
originx="0"
|
||||||
|
originy="0"
|
||||||
|
spacingx="1"
|
||||||
|
spacingy="1"
|
||||||
|
empcolor="#0099e5"
|
||||||
|
empopacity="0.11764706"
|
||||||
|
color="#0099e5"
|
||||||
|
opacity="0.04705882"
|
||||||
|
empspacing="8"
|
||||||
|
dotted="false"
|
||||||
|
gridanglex="30"
|
||||||
|
gridanglez="30"
|
||||||
|
visible="true" /><sodipodi:guide
|
||||||
|
position="27,-3"
|
||||||
|
orientation="1,0"
|
||||||
|
id="guide16"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="16,21"
|
||||||
|
orientation="0,-1"
|
||||||
|
id="guide17"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="3.203125,4"
|
||||||
|
orientation="0.70710678,-0.70710678"
|
||||||
|
id="guide22"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="7.5130096,-1"
|
||||||
|
orientation="-0.70710678,-0.70710678"
|
||||||
|
id="guide23"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="12.164446,11.028155"
|
||||||
|
orientation="0.70710678,-0.70710678"
|
||||||
|
id="guide24"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="18.627844,7"
|
||||||
|
orientation="-0.70710678,-0.70710678"
|
||||||
|
id="guide25"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="16.263456,-1"
|
||||||
|
orientation="-0.70710678,-0.70710678"
|
||||||
|
id="guide26"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="9,18.585359"
|
||||||
|
orientation="0.70710678,-0.70710678"
|
||||||
|
id="guide27"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="18.406873,9"
|
||||||
|
orientation="0.70710678,-0.70710678"
|
||||||
|
id="guide28"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="8.1650382,8.9619132"
|
||||||
|
orientation="-0.70710678,-0.70710678"
|
||||||
|
id="guide29"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="-13.302446,-2.2300968"
|
||||||
|
orientation="-0.70710678,-0.70710678"
|
||||||
|
id="guide30"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="8.6841552,1.5"
|
||||||
|
orientation="0,-1"
|
||||||
|
id="guide34"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="8,4.4984662"
|
||||||
|
orientation="0,-1"
|
||||||
|
id="guide35"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="6.5088096,4.498462"
|
||||||
|
orientation="1,0"
|
||||||
|
id="guide36"
|
||||||
|
inkscape:locked="false" /></sodipodi:namedview><path
|
||||||
|
id="path33"
|
||||||
|
style="fill:#ffffff;fill-rule:evenodd;stroke-width:0.324;stroke-miterlimit:80;paint-order:markers fill stroke"
|
||||||
|
inkscape:transform-center-x="-0.3540817"
|
||||||
|
inkscape:transform-center-y="0.42398801"
|
||||||
|
d="M 5.0979421,12.038349 0,0 13,4.136291 9.3847368,7.6932027 15.798281,13.419979 12.267942,15.574695 8,9.136291 Z"
|
||||||
|
sodipodi:nodetypes="cccccccc" /></svg>
|
||||||
|
After Width: | Height: | Size: 3.5 KiB |
43
addons/curved_lines_2d/DefaultMode.svg.import
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://daemvs3ws7fpk"
|
||||||
|
path="res://.godot/imported/DefaultMode.svg-322d0054747e94d97892a6dc6a51ecd2.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://addons/curved_lines_2d/DefaultMode.svg"
|
||||||
|
dest_files=["res://.godot/imported/DefaultMode.svg-322d0054747e94d97892a6dc6a51ecd2.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
svg/scale=1.0
|
||||||
|
editor/scale_with_editor_scale=false
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
||||||
30
addons/curved_lines_2d/DrawablePath2D.svg
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
width="16"
|
||||||
|
height="16"
|
||||||
|
version="1.1"
|
||||||
|
id="svg1"
|
||||||
|
sodipodi:docname="DrawablePath2D.svg"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
||||||
|
id="defs1" /><sodipodi:namedview
|
||||||
|
id="namedview1"
|
||||||
|
pagecolor="#505050"
|
||||||
|
bordercolor="#ffffff"
|
||||||
|
borderopacity="1"
|
||||||
|
inkscape:showpageshadow="0"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pagecheckerboard="1"
|
||||||
|
inkscape:deskcolor="#505050"
|
||||||
|
inkscape:zoom="45.254834"
|
||||||
|
inkscape:cx="7.236796"
|
||||||
|
inkscape:cy="6.9716309"
|
||||||
|
inkscape:current-layer="svg1" /><path
|
||||||
|
id="path1"
|
||||||
|
style="color:#000000;fill:#8da5f3;stroke-linecap:round;stroke-linejoin:round;-inkscape-stroke:none"
|
||||||
|
d="M 12.007812,1.5019531 C 11.361549,1.4942372 10.706208,1.7931894 10.294922,2.4824219 8.8288054,2.6144492 7.7390741,3.1437768 7.0234375,3.9648438 6.0924195,5.0336435 5.8202842,6.3490867 5.578125,7.5273438 L 4.5097656,11.146484 2.7050781,8.7402344 C 2.3734436,8.2984142 1.746378,8.2092084 1.3046875,8.5410156 0.86410905,8.8725261 0.77499109,9.4980994 1.1054688,9.9394531 l 3,3.9999999 c 0.4936652,0.656099 1.5239157,0.470654 1.7578124,-0.316406 L 7.5039063,8.0644532 8.192645,5.7987177 C 8.2524775,5.6638417 8.3811132,5.4516369 8.53125,5.2792969 8.8772552,4.8805828 9.3691072,4.5692373 10.269531,4.4707031 11.220155,6.171195 13.791802,5.6477381 14.001953,3.7109375 14.137852,2.3801588 13.084918,1.514813 12.007812,1.5019531 Z"
|
||||||
|
sodipodi:nodetypes="sccccccccccccccs" /></svg>
|
||||||
|
After Width: | Height: | Size: 1.7 KiB |
43
addons/curved_lines_2d/DrawablePath2D.svg.import
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://c4iwjwirkh4qi"
|
||||||
|
path="res://.godot/imported/DrawablePath2D.svg-099d0bb923e6ea3c9ba933305574eccb.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://addons/curved_lines_2d/DrawablePath2D.svg"
|
||||||
|
dest_files=["res://.godot/imported/DrawablePath2D.svg-099d0bb923e6ea3c9ba933305574eccb.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
svg/scale=1.0
|
||||||
|
editor/scale_with_editor_scale=false
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
||||||
94
addons/curved_lines_2d/FlipHorizontal.svg
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="16"
|
||||||
|
height="16"
|
||||||
|
viewBox="0 0 4.2333332 4.2333333"
|
||||||
|
version="1.1"
|
||||||
|
id="svg1"
|
||||||
|
sodipodi:docname="FlipHorizontal.svg"
|
||||||
|
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview1"
|
||||||
|
pagecolor="#505050"
|
||||||
|
bordercolor="#ffffff"
|
||||||
|
borderopacity="1"
|
||||||
|
inkscape:showpageshadow="0"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pagecheckerboard="1"
|
||||||
|
inkscape:deskcolor="#505050"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
showguides="true"
|
||||||
|
showgrid="true"
|
||||||
|
inkscape:zoom="32"
|
||||||
|
inkscape:cx="4.96875"
|
||||||
|
inkscape:cy="7.828125"
|
||||||
|
inkscape:current-layer="layer1">
|
||||||
|
<sodipodi:guide
|
||||||
|
position="2.4173693,3.3819843"
|
||||||
|
orientation="1,0"
|
||||||
|
id="guide1"
|
||||||
|
inkscape:locked="false" />
|
||||||
|
<inkscape:grid
|
||||||
|
id="grid1"
|
||||||
|
units="px"
|
||||||
|
originx="0"
|
||||||
|
originy="0"
|
||||||
|
spacingx="0.26458332"
|
||||||
|
spacingy="0.26458333"
|
||||||
|
empcolor="#0099e5"
|
||||||
|
empopacity="0.30196078"
|
||||||
|
color="#0099e5"
|
||||||
|
opacity="0.14901961"
|
||||||
|
empspacing="5"
|
||||||
|
dotted="false"
|
||||||
|
gridanglex="30"
|
||||||
|
gridanglez="30"
|
||||||
|
visible="true" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<defs
|
||||||
|
id="defs1" />
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1">
|
||||||
|
<path
|
||||||
|
id="path1"
|
||||||
|
style="fill:#f9f9f9;fill-rule:evenodd;stroke-width:0.264583;stroke-miterlimit:80;paint-order:markers fill stroke"
|
||||||
|
d="M 2.6629232,4.2333332 2.6512301,0 4.2333332,4.2333332 Z"
|
||||||
|
sodipodi:nodetypes="cccc"
|
||||||
|
inkscape:transform-center-x="-0.4182978" />
|
||||||
|
<path
|
||||||
|
id="path2"
|
||||||
|
style="fill:#676767;fill-opacity:1;fill-rule:evenodd;stroke-width:0.264583;stroke-miterlimit:80;paint-order:markers fill stroke"
|
||||||
|
d="M 1.5874999,4.2333331 1.5879496,0 0,4.2333332 Z"
|
||||||
|
sodipodi:nodetypes="cccc"
|
||||||
|
inkscape:transform-center-x="0.4182978" />
|
||||||
|
<rect
|
||||||
|
style="fill:#ffffff;fill-rule:evenodd;stroke-width:0.214337;stroke-miterlimit:80;paint-order:markers fill stroke"
|
||||||
|
id="rect2"
|
||||||
|
width="0.49867022"
|
||||||
|
height="0.86816394"
|
||||||
|
x="1.8702548"
|
||||||
|
y="3.365169" />
|
||||||
|
<rect
|
||||||
|
style="fill:#ffffff;fill-rule:evenodd;stroke-width:0.23665;stroke-miterlimit:80;paint-order:markers fill stroke"
|
||||||
|
id="rect2-8"
|
||||||
|
width="0.49867022"
|
||||||
|
height="1.0583333"
|
||||||
|
x="1.8702548"
|
||||||
|
y="1.7611327" />
|
||||||
|
<rect
|
||||||
|
style="fill:#ffffff;fill-rule:evenodd;stroke-width:0.23665;stroke-miterlimit:80;paint-order:markers fill stroke"
|
||||||
|
id="rect2-0"
|
||||||
|
width="0.49867022"
|
||||||
|
height="1.0583333"
|
||||||
|
x="1.8702548"
|
||||||
|
y="0.15709628" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.9 KiB |
43
addons/curved_lines_2d/FlipHorizontal.svg.import
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dvrgy7r2fvcxk"
|
||||||
|
path="res://.godot/imported/FlipHorizontal.svg-05762722fb050f0a8f9ca51a98b28cff.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://addons/curved_lines_2d/FlipHorizontal.svg"
|
||||||
|
dest_files=["res://.godot/imported/FlipHorizontal.svg-05762722fb050f0a8f9ca51a98b28cff.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
svg/scale=1.0
|
||||||
|
editor/scale_with_editor_scale=false
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
||||||
97
addons/curved_lines_2d/FlipVertical.svg
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="16"
|
||||||
|
height="16"
|
||||||
|
viewBox="0 0 4.2333332 4.2333333"
|
||||||
|
version="1.1"
|
||||||
|
id="svg1"
|
||||||
|
sodipodi:docname="FlipVertical.svg"
|
||||||
|
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview1"
|
||||||
|
pagecolor="#505050"
|
||||||
|
bordercolor="#ffffff"
|
||||||
|
borderopacity="1"
|
||||||
|
inkscape:showpageshadow="0"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pagecheckerboard="1"
|
||||||
|
inkscape:deskcolor="#505050"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
showguides="true"
|
||||||
|
showgrid="true"
|
||||||
|
inkscape:zoom="32"
|
||||||
|
inkscape:cx="4.96875"
|
||||||
|
inkscape:cy="7.828125"
|
||||||
|
inkscape:current-layer="layer1">
|
||||||
|
<sodipodi:guide
|
||||||
|
position="2.4173693,3.3819843"
|
||||||
|
orientation="1,0"
|
||||||
|
id="guide1"
|
||||||
|
inkscape:locked="false" />
|
||||||
|
<inkscape:grid
|
||||||
|
id="grid1"
|
||||||
|
units="px"
|
||||||
|
originx="0"
|
||||||
|
originy="0"
|
||||||
|
spacingx="0.26458332"
|
||||||
|
spacingy="0.26458333"
|
||||||
|
empcolor="#0099e5"
|
||||||
|
empopacity="0.30196078"
|
||||||
|
color="#0099e5"
|
||||||
|
opacity="0.14901961"
|
||||||
|
empspacing="5"
|
||||||
|
dotted="false"
|
||||||
|
gridanglex="30"
|
||||||
|
gridanglez="30"
|
||||||
|
visible="true" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<defs
|
||||||
|
id="defs1" />
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1">
|
||||||
|
<path
|
||||||
|
id="path1"
|
||||||
|
style="fill:#f9f9f9;fill-rule:evenodd;stroke-width:0.264583;stroke-miterlimit:80;paint-order:markers fill stroke"
|
||||||
|
d="M -9.4595338e-8,2.6626983 4.2333332,2.6510052 -9.4595338e-8,4.2331083 Z"
|
||||||
|
sodipodi:nodetypes="cccc"
|
||||||
|
inkscape:transform-center-y="0.41829775" />
|
||||||
|
<path
|
||||||
|
id="path2"
|
||||||
|
style="fill:#676767;fill-opacity:1;fill-rule:evenodd;stroke-width:0.264583;stroke-miterlimit:80;paint-order:markers fill stroke"
|
||||||
|
d="M 0,1.587275 4.2333332,1.5877247 -9.4595339e-8,-2.248522e-4 Z"
|
||||||
|
sodipodi:nodetypes="cccc"
|
||||||
|
inkscape:transform-center-y="-0.4182978" />
|
||||||
|
<rect
|
||||||
|
style="fill:#ffffff;fill-rule:evenodd;stroke-width:0.214337;stroke-miterlimit:80;paint-order:markers fill stroke"
|
||||||
|
id="rect2"
|
||||||
|
width="0.49867022"
|
||||||
|
height="0.86816394"
|
||||||
|
x="1.8700299"
|
||||||
|
y="-0.86816412"
|
||||||
|
transform="rotate(90)" />
|
||||||
|
<rect
|
||||||
|
style="fill:#ffffff;fill-rule:evenodd;stroke-width:0.23665;stroke-miterlimit:80;paint-order:markers fill stroke"
|
||||||
|
id="rect2-8"
|
||||||
|
width="0.49867022"
|
||||||
|
height="1.0583333"
|
||||||
|
x="1.8700299"
|
||||||
|
y="-2.4722004"
|
||||||
|
transform="rotate(90)" />
|
||||||
|
<rect
|
||||||
|
style="fill:#ffffff;fill-rule:evenodd;stroke-width:0.23665;stroke-miterlimit:80;paint-order:markers fill stroke"
|
||||||
|
id="rect2-0"
|
||||||
|
width="0.49867022"
|
||||||
|
height="1.0583333"
|
||||||
|
x="1.8700299"
|
||||||
|
y="-4.0762372"
|
||||||
|
transform="rotate(90)" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.0 KiB |
43
addons/curved_lines_2d/FlipVertical.svg.import
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://ly2rtvkn6ush"
|
||||||
|
path="res://.godot/imported/FlipVertical.svg-65a107e2bc86ccde12ecd018a466acd7.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://addons/curved_lines_2d/FlipVertical.svg"
|
||||||
|
dest_files=["res://.godot/imported/FlipVertical.svg-65a107e2bc86ccde12ecd018a466acd7.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
svg/scale=1.0
|
||||||
|
editor/scale_with_editor_scale=false
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
||||||
157
addons/curved_lines_2d/Gradients.svg
Normal file
@@ -0,0 +1,157 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
width="128"
|
||||||
|
height="32"
|
||||||
|
version="1.1"
|
||||||
|
id="svg1"
|
||||||
|
sodipodi:docname="Gradients.svg"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
||||||
|
id="defs1"><linearGradient
|
||||||
|
id="linearGradient1"
|
||||||
|
inkscape:collect="always"><stop
|
||||||
|
style="stop-color:#447dff;stop-opacity:0.99215698;"
|
||||||
|
offset="0"
|
||||||
|
id="stop1" /><stop
|
||||||
|
style="stop-color:#ffffff;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop2" /></linearGradient><linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient1"
|
||||||
|
id="linearGradient2"
|
||||||
|
x1="37.625"
|
||||||
|
y1="16"
|
||||||
|
x2="58.375"
|
||||||
|
y2="16"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(1.2322116,0,0,1.2593566,-11.146164,-4.1497112)" /><radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient1"
|
||||||
|
id="radialGradient5"
|
||||||
|
cx="79.994942"
|
||||||
|
cy="16"
|
||||||
|
fx="79.994942"
|
||||||
|
fy="16"
|
||||||
|
r="15.921697"
|
||||||
|
gradientTransform="matrix(0.87847583,0,0,0.88013962,9.7263807,1.9177658)"
|
||||||
|
gradientUnits="userSpaceOnUse" /></defs><sodipodi:namedview
|
||||||
|
id="namedview1"
|
||||||
|
pagecolor="#505050"
|
||||||
|
bordercolor="#ffffff"
|
||||||
|
borderopacity="1"
|
||||||
|
inkscape:showpageshadow="0"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pagecheckerboard="1"
|
||||||
|
inkscape:deskcolor="#505050"
|
||||||
|
inkscape:zoom="5.6568543"
|
||||||
|
inkscape:cx="88.7419"
|
||||||
|
inkscape:cy="16.970563"
|
||||||
|
inkscape:current-layer="svg1"
|
||||||
|
showgrid="true"
|
||||||
|
showguides="true"><inkscape:grid
|
||||||
|
id="grid1"
|
||||||
|
units="px"
|
||||||
|
originx="0"
|
||||||
|
originy="0"
|
||||||
|
spacingx="1"
|
||||||
|
spacingy="1"
|
||||||
|
empcolor="#e5e500"
|
||||||
|
empopacity="0.52156863"
|
||||||
|
color="#0099e5"
|
||||||
|
opacity="0.14901961"
|
||||||
|
empspacing="32"
|
||||||
|
dotted="false"
|
||||||
|
gridanglex="30"
|
||||||
|
gridanglez="30"
|
||||||
|
visible="true" /><sodipodi:guide
|
||||||
|
position="26,4"
|
||||||
|
orientation="0,-1"
|
||||||
|
id="guide22"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="62.46875,31.608014"
|
||||||
|
orientation="0,-1"
|
||||||
|
id="guide3"
|
||||||
|
inkscape:locked="false" /></sodipodi:namedview><rect
|
||||||
|
style="opacity:0.99;fill:#4880ff;fill-opacity:0.984314;fill-rule:evenodd;stroke:none;stroke-width:1.34001;stroke-linejoin:round;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:0.984314;paint-order:normal"
|
||||||
|
id="rect13"
|
||||||
|
width="5.0625019"
|
||||||
|
height="4.7313385"
|
||||||
|
x="119.9375"
|
||||||
|
y="23.634331" /><rect
|
||||||
|
style="opacity:0.99;fill:#ffffff;fill-opacity:0.984314;fill-rule:evenodd;stroke:none;stroke-width:1.94812;stroke-linejoin:round;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:0.984314;paint-order:normal"
|
||||||
|
id="rect14"
|
||||||
|
width="5.0625019"
|
||||||
|
height="10"
|
||||||
|
x="-125"
|
||||||
|
y="13.63433"
|
||||||
|
transform="scale(-1,1)" /><rect
|
||||||
|
style="opacity:0.99;fill:#4880ff;fill-opacity:0.984314;fill-rule:evenodd;stroke:none;stroke-width:1.94812;stroke-linejoin:round;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:0.984314;paint-order:normal"
|
||||||
|
id="rect15"
|
||||||
|
width="5.0625019"
|
||||||
|
height="10"
|
||||||
|
x="119.9375"
|
||||||
|
y="4" /><rect
|
||||||
|
style="opacity:0.99;fill:#ffffff;fill-opacity:0.984314;fill-rule:evenodd;stroke:none;stroke-width:1.88333;stroke-linejoin:round;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:0.984314;paint-order:normal"
|
||||||
|
id="rect11"
|
||||||
|
width="10"
|
||||||
|
height="4.7313385"
|
||||||
|
x="110"
|
||||||
|
y="23.634331" /><rect
|
||||||
|
style="opacity:0.99;fill:#4880ff;fill-opacity:0.984314;fill-rule:evenodd;stroke:none;stroke-width:1.88333;stroke-linejoin:round;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:0.984314;paint-order:normal"
|
||||||
|
id="rect12"
|
||||||
|
width="10"
|
||||||
|
height="4.7313385"
|
||||||
|
x="100"
|
||||||
|
y="23.634331" /><rect
|
||||||
|
style="opacity:0.99;fill:#ffffff;fill-opacity:0.984314;fill-rule:evenodd;stroke:none;stroke-width:2.738;stroke-linejoin:round;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:0.984314;paint-order:normal"
|
||||||
|
id="rect9"
|
||||||
|
width="10"
|
||||||
|
height="10"
|
||||||
|
x="-110"
|
||||||
|
y="13.63433"
|
||||||
|
transform="scale(-1,1)" /><rect
|
||||||
|
style="opacity:0.99;fill:#4880ff;fill-opacity:0.984314;fill-rule:evenodd;stroke:none;stroke-width:2.738;stroke-linejoin:round;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:0.984314;paint-order:normal"
|
||||||
|
id="rect10"
|
||||||
|
width="10"
|
||||||
|
height="10"
|
||||||
|
x="-120"
|
||||||
|
y="13.63433"
|
||||||
|
transform="scale(-1,1)" /><rect
|
||||||
|
style="opacity:0.99;fill:#ffffff;fill-opacity:0.984314;fill-rule:evenodd;stroke:none;stroke-width:2.738;stroke-linejoin:round;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:0.984314;paint-order:normal"
|
||||||
|
id="rect8"
|
||||||
|
width="10"
|
||||||
|
height="10"
|
||||||
|
x="110"
|
||||||
|
y="4" /><rect
|
||||||
|
style="opacity:0.99;fill:#4880ff;fill-opacity:0.984314;fill-rule:evenodd;stroke:none;stroke-width:2.738;stroke-linejoin:round;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:0.984314;paint-order:normal"
|
||||||
|
id="rect7"
|
||||||
|
width="10"
|
||||||
|
height="10"
|
||||||
|
x="100"
|
||||||
|
y="4" /><rect
|
||||||
|
style="opacity:0.99;fill:url(#linearGradient2);fill-rule:evenodd;stroke:#3d44ff;stroke-width:2.43161;stroke-linejoin:round;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
||||||
|
id="rect4"
|
||||||
|
width="25.568394"
|
||||||
|
height="25.568388"
|
||||||
|
x="35.215805"
|
||||||
|
y="3.2158034" /><path
|
||||||
|
id="rect5"
|
||||||
|
style="opacity:0.99;fill:#d00765;fill-opacity:0.992157;fill-rule:evenodd;stroke:#710035;stroke-width:4.17145;stroke-linejoin:round;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:0.984314;paint-order:stroke fill markers"
|
||||||
|
d="M 22.193585,4.0856406 15.937957,10.961998 9.5133163,4.2136268 4.0856391,8.4585077 l 7.2247789,7.5899783 -7.0343717,7.73154 5.5303684,4.134347 6.2556293,-6.876358 6.424639,6.74837 5.427678,-4.244878 -7.224779,-7.58998 7.034372,-7.7315394 z" /><rect
|
||||||
|
style="opacity:0.99;fill:url(#radialGradient5);fill-rule:evenodd;stroke:#3d44ff;stroke-width:2.43162;stroke-linejoin:round;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
||||||
|
id="rect1"
|
||||||
|
width="25.568384"
|
||||||
|
height="25.56838"
|
||||||
|
x="67.215813"
|
||||||
|
y="3.2158098" /><rect
|
||||||
|
style="opacity:0.99;fill:none;fill-rule:evenodd;stroke:#3d44ff;stroke-width:2.43162;stroke-linejoin:round;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
||||||
|
id="rect6"
|
||||||
|
width="25.568384"
|
||||||
|
height="25.56838"
|
||||||
|
x="99.431618"
|
||||||
|
y="3.2158093" /></svg>
|
||||||
|
After Width: | Height: | Size: 6.7 KiB |
43
addons/curved_lines_2d/Gradients.svg.import
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://caqsvv6rdxkm4"
|
||||||
|
path="res://.godot/imported/Gradients.svg-442389ec367d37fa1fc4089ae6f2e926.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://addons/curved_lines_2d/Gradients.svg"
|
||||||
|
dest_files=["res://.godot/imported/Gradients.svg-442389ec367d37fa1fc4089ae6f2e926.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
svg/scale=1.0
|
||||||
|
editor/scale_with_editor_scale=false
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
||||||
1
addons/curved_lines_2d/Key.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill="#e0e0e0" d="M1 7v2h1v2h3V9h2.133a4 4 0 1 0 0-2zm10-1a2 2 0 0 1 0 4 2 2 0 0 1 0-4z"/></svg>
|
||||||
|
After Width: | Height: | Size: 165 B |
43
addons/curved_lines_2d/Key.svg.import
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://31qakec1dm6y"
|
||||||
|
path="res://.godot/imported/Key.svg-a834afef46c7b244ee3f6f041d1a070a.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://addons/curved_lines_2d/Key.svg"
|
||||||
|
dest_files=["res://.godot/imported/Key.svg-a834afef46c7b244ee3f6f041d1a070a.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
svg/scale=1.0
|
||||||
|
editor/scale_with_editor_scale=false
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
||||||
21
addons/curved_lines_2d/LICENSE
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2025 René van der Ark, Mark Hedberg and contributors
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
265
addons/curved_lines_2d/LineCaps.svg
Normal file
@@ -0,0 +1,265 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
width="96"
|
||||||
|
height="64"
|
||||||
|
version="1.1"
|
||||||
|
id="svg1"
|
||||||
|
sodipodi:docname="LineCaps.svg"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
||||||
|
id="defs1" /><sodipodi:namedview
|
||||||
|
id="namedview1"
|
||||||
|
pagecolor="#505050"
|
||||||
|
bordercolor="#ffffff"
|
||||||
|
borderopacity="1"
|
||||||
|
inkscape:showpageshadow="0"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pagecheckerboard="1"
|
||||||
|
inkscape:deskcolor="#505050"
|
||||||
|
inkscape:zoom="4"
|
||||||
|
inkscape:cx="9.875"
|
||||||
|
inkscape:cy="20.375"
|
||||||
|
inkscape:current-layer="svg1"
|
||||||
|
showgrid="true"
|
||||||
|
showguides="true"><inkscape:grid
|
||||||
|
id="grid1"
|
||||||
|
units="px"
|
||||||
|
originx="0"
|
||||||
|
originy="0"
|
||||||
|
spacingx="1"
|
||||||
|
spacingy="1"
|
||||||
|
empcolor="#e5e500"
|
||||||
|
empopacity="0.52156863"
|
||||||
|
color="#0099e5"
|
||||||
|
opacity="0.14901961"
|
||||||
|
empspacing="32"
|
||||||
|
dotted="false"
|
||||||
|
gridanglex="30"
|
||||||
|
gridanglez="30"
|
||||||
|
visible="true" /><sodipodi:guide
|
||||||
|
position="16.0625,17.3125"
|
||||||
|
orientation="1,0"
|
||||||
|
id="guide14"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="80.346717,28.606601"
|
||||||
|
orientation="0,-1"
|
||||||
|
id="guide17"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="48,30.606604"
|
||||||
|
orientation="1,0"
|
||||||
|
id="guide19"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="9.2255338,18.270079"
|
||||||
|
orientation="0,-1"
|
||||||
|
id="guide27"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="13.5625,22.6875"
|
||||||
|
orientation="1,0"
|
||||||
|
id="guide28"
|
||||||
|
inkscape:locked="false" /></sodipodi:namedview><circle
|
||||||
|
style="opacity:0.99;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.194;stroke-linejoin:miter;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||||
|
id="path19"
|
||||||
|
cx="48"
|
||||||
|
cy="14.393396"
|
||||||
|
r="13" /><path
|
||||||
|
id="path18"
|
||||||
|
style="opacity:0.99;fill:#fefefe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.19361;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="M 35,13.999999 V 32 H 61 V 14.000001 Z"
|
||||||
|
sodipodi:nodetypes="ccccc" /><path
|
||||||
|
id="rect5"
|
||||||
|
style="opacity:0.99;fill:#fefefe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.19361;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="M 3,13.999999 V 32 H 29 V 14.000001 Z"
|
||||||
|
sodipodi:nodetypes="ccccc" /><rect
|
||||||
|
style="opacity:0.99;fill:#ce07d0;fill-opacity:0.992157;fill-rule:evenodd;stroke:none;stroke-width:1.28348;stroke-linejoin:miter;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||||
|
id="rect1"
|
||||||
|
width="6.3639612"
|
||||||
|
height="6.3639612"
|
||||||
|
x="-1.7235732"
|
||||||
|
y="18.075417"
|
||||||
|
transform="rotate(-45.000002)" /><rect
|
||||||
|
style="opacity:0.99;fill:#437dff;fill-opacity:0.984314;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||||
|
id="rect7"
|
||||||
|
width="4"
|
||||||
|
height="4"
|
||||||
|
x="14.0625"
|
||||||
|
y="21" /><rect
|
||||||
|
style="opacity:0.99;fill:#437dff;fill-opacity:0.984314;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||||
|
id="rect8"
|
||||||
|
width="4"
|
||||||
|
height="4"
|
||||||
|
x="14.0625"
|
||||||
|
y="28" /><rect
|
||||||
|
style="opacity:0.99;fill:#ce07d0;fill-opacity:0.992157;fill-rule:evenodd;stroke:none;stroke-width:1.28348;stroke-linejoin:miter;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||||
|
id="rect9"
|
||||||
|
width="6.3639612"
|
||||||
|
height="6.3639612"
|
||||||
|
x="20.974577"
|
||||||
|
y="40.607513"
|
||||||
|
transform="rotate(-45.000002)" /><rect
|
||||||
|
style="opacity:0.99;fill:#437dff;fill-opacity:0.984314;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||||
|
id="rect10"
|
||||||
|
width="4"
|
||||||
|
height="4"
|
||||||
|
x="46.076363"
|
||||||
|
y="21.132582" /><rect
|
||||||
|
style="opacity:0.99;fill:#437dff;fill-opacity:0.984314;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||||
|
id="rect11"
|
||||||
|
width="4"
|
||||||
|
height="4"
|
||||||
|
x="46.076363"
|
||||||
|
y="28.132582" /><path
|
||||||
|
id="path15"
|
||||||
|
style="opacity:0.99;fill:#fefefe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4.02605;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="M 67.346717,3.3933973 V 32 h 26 V 3.3934004 Z"
|
||||||
|
sodipodi:nodetypes="ccccc" /><rect
|
||||||
|
style="opacity:0.99;fill:#ce07d0;fill-opacity:0.992157;fill-rule:evenodd;stroke:none;stroke-width:1.28348;stroke-linejoin:miter;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||||
|
id="rect15"
|
||||||
|
width="6.3639612"
|
||||||
|
height="6.3639612"
|
||||||
|
x="43.776424"
|
||||||
|
y="63.575417"
|
||||||
|
transform="rotate(-45.000002)" /><rect
|
||||||
|
style="opacity:0.99;fill:#437dff;fill-opacity:0.984314;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||||
|
id="rect16"
|
||||||
|
width="4"
|
||||||
|
height="4"
|
||||||
|
x="78.409218"
|
||||||
|
y="21" /><rect
|
||||||
|
style="opacity:0.99;fill:#437dff;fill-opacity:0.984314;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||||
|
id="rect17"
|
||||||
|
width="4"
|
||||||
|
height="4"
|
||||||
|
x="78.409218"
|
||||||
|
y="28" /><circle
|
||||||
|
style="opacity:0.99;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.194;stroke-linejoin:miter;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||||
|
id="circle4"
|
||||||
|
cx="45.578423"
|
||||||
|
cy="46.213203"
|
||||||
|
r="13" /><path
|
||||||
|
id="path12"
|
||||||
|
style="opacity:0.99;fill:#fefefe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.19361;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 45.57842,59.213203 h 18.000001 v -26 H 45.578422 Z"
|
||||||
|
sodipodi:nodetypes="ccccc" /><path
|
||||||
|
id="path4"
|
||||||
|
style="opacity:0.99;fill:#fefefe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.19361;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 32.578422,45.819804 v 18.000001 h 26 V 45.819806 Z"
|
||||||
|
sodipodi:nodetypes="ccccc" /><rect
|
||||||
|
style="opacity:0.99;fill:#437dff;fill-opacity:0.984314;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||||
|
id="rect13"
|
||||||
|
width="4"
|
||||||
|
height="4"
|
||||||
|
x="-47.702385"
|
||||||
|
y="52.850979"
|
||||||
|
transform="rotate(-90)" /><rect
|
||||||
|
style="opacity:0.99;fill:#ce07d0;fill-opacity:0.992157;fill-rule:evenodd;stroke:none;stroke-width:1.28348;stroke-linejoin:miter;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||||
|
id="rect4"
|
||||||
|
width="6.3639612"
|
||||||
|
height="6.3639612"
|
||||||
|
x="-3.2377379"
|
||||||
|
y="61.395199"
|
||||||
|
transform="rotate(-45.000002)" /><rect
|
||||||
|
style="opacity:0.99;fill:#437dff;fill-opacity:0.984314;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||||
|
id="rect14"
|
||||||
|
width="4"
|
||||||
|
height="4"
|
||||||
|
x="-47.702385"
|
||||||
|
y="59.401646"
|
||||||
|
transform="rotate(-90)" /><rect
|
||||||
|
style="opacity:0.99;fill:#437dff;fill-opacity:0.984314;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||||
|
id="rect6"
|
||||||
|
width="4"
|
||||||
|
height="4"
|
||||||
|
x="43.654785"
|
||||||
|
y="52.952389" /><rect
|
||||||
|
style="opacity:0.99;fill:#437dff;fill-opacity:0.984314;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||||
|
id="rect12"
|
||||||
|
width="4"
|
||||||
|
height="4"
|
||||||
|
x="43.654785"
|
||||||
|
y="59.952389" /><path
|
||||||
|
id="path14"
|
||||||
|
style="opacity:0.99;fill:#fefefe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4.19091;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 64.400772,59.213203 h 30.997454 v -26 H 64.400775 Z"
|
||||||
|
sodipodi:nodetypes="ccccc" /><path
|
||||||
|
id="path16"
|
||||||
|
style="opacity:0.99;fill:#fefefe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.19361;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 64.398227,45.819804 v 18.000001 h 26 V 45.819806 Z"
|
||||||
|
sodipodi:nodetypes="ccccc" /><rect
|
||||||
|
style="opacity:0.99;fill:#437dff;fill-opacity:0.984314;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||||
|
id="rect18"
|
||||||
|
width="4"
|
||||||
|
height="4"
|
||||||
|
x="-47.702385"
|
||||||
|
y="84.670784"
|
||||||
|
transform="rotate(-90)" /><rect
|
||||||
|
style="opacity:0.99;fill:#ce07d0;fill-opacity:0.992157;fill-rule:evenodd;stroke:none;stroke-width:1.28348;stroke-linejoin:miter;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||||
|
id="rect19"
|
||||||
|
width="6.3639612"
|
||||||
|
height="6.3639612"
|
||||||
|
x="19.26226"
|
||||||
|
y="83.895203"
|
||||||
|
transform="rotate(-45.000002)" /><rect
|
||||||
|
style="opacity:0.99;fill:#437dff;fill-opacity:0.984314;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||||
|
id="rect20"
|
||||||
|
width="4"
|
||||||
|
height="4"
|
||||||
|
x="-47.702385"
|
||||||
|
y="91.221451"
|
||||||
|
transform="rotate(-90)" /><rect
|
||||||
|
style="opacity:0.99;fill:#437dff;fill-opacity:0.984314;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||||
|
id="rect21"
|
||||||
|
width="4"
|
||||||
|
height="4"
|
||||||
|
x="75.474594"
|
||||||
|
y="52.952389" /><rect
|
||||||
|
style="opacity:0.99;fill:#437dff;fill-opacity:0.984314;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||||
|
id="rect22"
|
||||||
|
width="4"
|
||||||
|
height="4"
|
||||||
|
x="75.474594"
|
||||||
|
y="59.952389" /><path
|
||||||
|
id="path22"
|
||||||
|
style="opacity:0.99;fill:#fefefe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4.19091;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="M 0.57754887,59.241582 H 31.575003 v -26 l -17.997451,0 -13.00000157,12.444145 z"
|
||||||
|
sodipodi:nodetypes="cccccc" /><path
|
||||||
|
id="path23"
|
||||||
|
style="opacity:0.99;fill:#fefefe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.19361;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="M 0.57500387,45.848183 V 63.848184 H 26.575004 V 45.848185 Z"
|
||||||
|
sodipodi:nodetypes="ccccc" /><rect
|
||||||
|
style="opacity:0.99;fill:#437dff;fill-opacity:0.984314;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||||
|
id="rect23"
|
||||||
|
width="4"
|
||||||
|
height="4"
|
||||||
|
x="-47.730762"
|
||||||
|
y="20.847561"
|
||||||
|
transform="rotate(-90)" /><rect
|
||||||
|
style="opacity:0.99;fill:#ce07d0;fill-opacity:0.992157;fill-rule:evenodd;stroke:none;stroke-width:1.28348;stroke-linejoin:miter;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||||
|
id="rect24"
|
||||||
|
width="6.3639612"
|
||||||
|
height="6.3639612"
|
||||||
|
x="-25.887638"
|
||||||
|
y="38.785435"
|
||||||
|
transform="rotate(-45.000002)" /><rect
|
||||||
|
style="opacity:0.99;fill:#437dff;fill-opacity:0.984314;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||||
|
id="rect25"
|
||||||
|
width="4"
|
||||||
|
height="4"
|
||||||
|
x="-47.730762"
|
||||||
|
y="27.398228"
|
||||||
|
transform="rotate(-90)" /><rect
|
||||||
|
style="opacity:0.99;fill:#437dff;fill-opacity:0.984314;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||||
|
id="rect26"
|
||||||
|
width="4"
|
||||||
|
height="4"
|
||||||
|
x="11.651371"
|
||||||
|
y="52.980766" /><rect
|
||||||
|
style="opacity:0.99;fill:#437dff;fill-opacity:0.984314;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||||
|
id="rect27"
|
||||||
|
width="4"
|
||||||
|
height="4"
|
||||||
|
x="11.651371"
|
||||||
|
y="59.980766" /></svg>
|
||||||
|
After Width: | Height: | Size: 13 KiB |
43
addons/curved_lines_2d/LineCaps.svg.import
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cdkf2g8b5e55r"
|
||||||
|
path="res://.godot/imported/LineCaps.svg-d0c5b895aee70887354b4f313bec8f0c.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://addons/curved_lines_2d/LineCaps.svg"
|
||||||
|
dest_files=["res://.godot/imported/LineCaps.svg-d0c5b895aee70887354b4f313bec8f0c.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
svg/scale=1.0
|
||||||
|
editor/scale_with_editor_scale=false
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
||||||
1
addons/curved_lines_2d/LockViewport.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill-opacity=".392" d="M2 6v1H1v9h14V7h-1V6A6 6 0 0 0 2 6zm8 0v1H6V6a1 1 0 0 1 4 0z"/><path fill="#e0e0e0" d="M3 6v2H2v7h12V8h-1V6A5 5 0 0 0 3 6zm8 0v2H5V6a3 3 0 0 1 6 0zm-4 4h2v3H7z"/></svg>
|
||||||
|
After Width: | Height: | Size: 260 B |
43
addons/curved_lines_2d/LockViewport.svg.import
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://b8ludy6aqsejg"
|
||||||
|
path="res://.godot/imported/LockViewport.svg-3eb11eac4fb123bef92b15fdbe2fa6de.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://addons/curved_lines_2d/LockViewport.svg"
|
||||||
|
dest_files=["res://.godot/imported/LockViewport.svg-3eb11eac4fb123bef92b15fdbe2fa6de.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
svg/scale=1.0
|
||||||
|
editor/scale_with_editor_scale=false
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
||||||
BIN
addons/curved_lines_2d/LumAlpha8.tex
Normal file
107
addons/curved_lines_2d/MergeChain.svg
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
width="16"
|
||||||
|
height="16"
|
||||||
|
version="1.1"
|
||||||
|
id="svg1"
|
||||||
|
sodipodi:docname="MergeChain.svg"
|
||||||
|
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
|
||||||
|
xml:space="preserve"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"><path
|
||||||
|
id="circle1"
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2;stroke-miterlimit:80;paint-order:markers fill stroke"
|
||||||
|
d="M 15.023459,3.6537548 C 14.997955,5.5062253 11.261146,9.5396803 9.5238051,9.6320808 7.432495,9.7433072 6.0164679,8.2956668 6.0927101,6.4482568 6.1644089,4.7109388 10.129591,1.2544053 11.642154,1.0495407 13.06177,0.85726516 15.050071,1.720772 15.023459,3.6537548 Z"
|
||||||
|
sodipodi:nodetypes="sssss" /><defs
|
||||||
|
id="defs1" /><sodipodi:namedview
|
||||||
|
id="namedview1"
|
||||||
|
pagecolor="#505050"
|
||||||
|
bordercolor="#ffffff"
|
||||||
|
borderopacity="1"
|
||||||
|
inkscape:showpageshadow="0"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pagecheckerboard="1"
|
||||||
|
inkscape:deskcolor="#505050"
|
||||||
|
inkscape:zoom="1"
|
||||||
|
inkscape:cx="-49.5"
|
||||||
|
inkscape:cy="20"
|
||||||
|
inkscape:current-layer="svg1"
|
||||||
|
showguides="true"
|
||||||
|
showgrid="true"><inkscape:grid
|
||||||
|
id="grid1"
|
||||||
|
units="px"
|
||||||
|
originx="0"
|
||||||
|
originy="0"
|
||||||
|
spacingx="1"
|
||||||
|
spacingy="1"
|
||||||
|
empcolor="#0099e5"
|
||||||
|
empopacity="0.11764706"
|
||||||
|
color="#0099e5"
|
||||||
|
opacity="0.04705882"
|
||||||
|
empspacing="8"
|
||||||
|
dotted="false"
|
||||||
|
gridanglex="30"
|
||||||
|
gridanglez="30"
|
||||||
|
visible="true" /><sodipodi:guide
|
||||||
|
position="27,-3"
|
||||||
|
orientation="1,0"
|
||||||
|
id="guide16"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="16,21"
|
||||||
|
orientation="0,-1"
|
||||||
|
id="guide17"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="3.203125,4"
|
||||||
|
orientation="0.70710678,-0.70710678"
|
||||||
|
id="guide22"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="7.5130096,-1"
|
||||||
|
orientation="-0.70710678,-0.70710678"
|
||||||
|
id="guide23"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="12.164446,11.028155"
|
||||||
|
orientation="0.70710678,-0.70710678"
|
||||||
|
id="guide24"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="18.627844,7"
|
||||||
|
orientation="-0.70710678,-0.70710678"
|
||||||
|
id="guide25"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="16.263456,-1"
|
||||||
|
orientation="-0.70710678,-0.70710678"
|
||||||
|
id="guide26"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="9,18.585359"
|
||||||
|
orientation="0.70710678,-0.70710678"
|
||||||
|
id="guide27"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="18.406873,9"
|
||||||
|
orientation="0.70710678,-0.70710678"
|
||||||
|
id="guide28"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="8.1650382,8.9619132"
|
||||||
|
orientation="-0.70710678,-0.70710678"
|
||||||
|
id="guide29"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="-13.302446,-2.2300968"
|
||||||
|
orientation="-0.70710678,-0.70710678"
|
||||||
|
id="guide30"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="8.6841552,1.5"
|
||||||
|
orientation="0,-1"
|
||||||
|
id="guide34"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="8,4.4984662"
|
||||||
|
orientation="0,-1"
|
||||||
|
id="guide35"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="2.5130096,4"
|
||||||
|
orientation="1,0"
|
||||||
|
id="guide36"
|
||||||
|
inkscape:locked="false" /></sodipodi:namedview><path
|
||||||
|
id="path1"
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2;stroke-miterlimit:80;paint-order:markers fill stroke"
|
||||||
|
d="m 1.1074095,12.407618 c 0,-1.852645 3.6809302,-5.9371598 5.416835,-6.0534678 2.0895808,-0.140005 3.5254015,1.288005 3.4745985,3.136289 -0.04778,1.7381408 -3.9649993,5.2489318 -5.4745993,5.4745988 -1.416834,0.2118 -3.4168342,-0.624254 -3.4168342,-2.55742 z"
|
||||||
|
sodipodi:nodetypes="sssss" /></svg>
|
||||||
|
After Width: | Height: | Size: 4.0 KiB |
43
addons/curved_lines_2d/MergeChain.svg.import
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://6mmxldln6pdn"
|
||||||
|
path="res://.godot/imported/MergeChain.svg-b55975687f678fac86711208c660d64a.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://addons/curved_lines_2d/MergeChain.svg"
|
||||||
|
dest_files=["res://.godot/imported/MergeChain.svg-b55975687f678fac86711208c660d64a.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
svg/scale=1.0
|
||||||
|
editor/scale_with_editor_scale=false
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
||||||
139
addons/curved_lines_2d/PaintOrder.svg
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
width="96"
|
||||||
|
height="64"
|
||||||
|
version="1.1"
|
||||||
|
id="svg1"
|
||||||
|
sodipodi:docname="PaintOrder.svg"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
||||||
|
id="defs1" /><sodipodi:namedview
|
||||||
|
id="namedview1"
|
||||||
|
pagecolor="#505050"
|
||||||
|
bordercolor="#ffffff"
|
||||||
|
borderopacity="1"
|
||||||
|
inkscape:showpageshadow="0"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pagecheckerboard="1"
|
||||||
|
inkscape:deskcolor="#505050"
|
||||||
|
inkscape:zoom="4"
|
||||||
|
inkscape:cx="25.125"
|
||||||
|
inkscape:cy="-61.25"
|
||||||
|
inkscape:current-layer="svg1"
|
||||||
|
showgrid="true"
|
||||||
|
showguides="true"><inkscape:grid
|
||||||
|
id="grid1"
|
||||||
|
units="px"
|
||||||
|
originx="0"
|
||||||
|
originy="0"
|
||||||
|
spacingx="1"
|
||||||
|
spacingy="1"
|
||||||
|
empcolor="#e5e500"
|
||||||
|
empopacity="0.52156863"
|
||||||
|
color="#0099e5"
|
||||||
|
opacity="0.14901961"
|
||||||
|
empspacing="32"
|
||||||
|
dotted="false"
|
||||||
|
gridanglex="30"
|
||||||
|
gridanglez="30"
|
||||||
|
visible="true" /></sodipodi:namedview><ellipse
|
||||||
|
style="opacity:0.99;fill:#ce07d0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.97552;stroke-miterlimit:80"
|
||||||
|
id="ellipse7"
|
||||||
|
cy="43.009087"
|
||||||
|
cx="11.50004"
|
||||||
|
rx="10.676207"
|
||||||
|
ry="10.675922" /><path
|
||||||
|
id="path6"
|
||||||
|
style="opacity:0.99;fill:#ffffff;fill-opacity:0.992157;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="M 39,6.8378906 V 30.302734 h 7.822266 V 14.662109 L 61.375,14.681641 V 6.796875 L 46.822266,6.837891 Z"
|
||||||
|
sodipodi:nodetypes="cccccccc" /><rect
|
||||||
|
style="opacity:0.99;fill:#447dff;fill-opacity:0.992157;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect4"
|
||||||
|
width="18.375"
|
||||||
|
height="20.302734"
|
||||||
|
x="11"
|
||||||
|
y="10" /><path
|
||||||
|
id="rect5"
|
||||||
|
style="opacity:0.99;fill:#ffffff;fill-opacity:0.992157;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="M 7,6.8378906 V 30.302734 h 7.822266 V 14.662109 L 29.375,14.681641 V 6.796875 L 14.822266,6.837891 Z"
|
||||||
|
sodipodi:nodetypes="cccccccc" /><ellipse
|
||||||
|
style="opacity:0.99;fill:#ce07d0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.97552;stroke-miterlimit:80"
|
||||||
|
id="path2"
|
||||||
|
cy="11.009088"
|
||||||
|
cx="11.50004"
|
||||||
|
rx="10.676207"
|
||||||
|
ry="10.675922" /><rect
|
||||||
|
style="opacity:0.99;fill:#447dff;fill-opacity:0.992157;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect6"
|
||||||
|
width="18.375"
|
||||||
|
height="20.302734"
|
||||||
|
x="43"
|
||||||
|
y="10" /><ellipse
|
||||||
|
style="opacity:0.99;fill:#ce07d0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.97552;stroke-miterlimit:80"
|
||||||
|
id="ellipse6"
|
||||||
|
cy="11.009088"
|
||||||
|
cx="43.500038"
|
||||||
|
rx="10.676207"
|
||||||
|
ry="10.675922" /><rect
|
||||||
|
style="opacity:0.99;fill:#447dff;fill-opacity:0.992157;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect7"
|
||||||
|
width="18.375"
|
||||||
|
height="20.302734"
|
||||||
|
x="11"
|
||||||
|
y="42" /><path
|
||||||
|
id="path7"
|
||||||
|
style="opacity:0.99;fill:#ffffff;fill-opacity:0.992157;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 7,38.837891 v 23.464843 h 7.822266 V 46.662109 L 29.375,46.681641 v -7.884766 l -14.552734,0.04102 z"
|
||||||
|
sodipodi:nodetypes="cccccccc" /><path
|
||||||
|
id="path8"
|
||||||
|
style="opacity:0.99;fill:#ffffff;fill-opacity:0.992157;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 39,38.837891 v 23.464843 h 7.822266 V 46.662109 L 61.375,46.681641 v -7.884766 l -14.552734,0.04102 z"
|
||||||
|
sodipodi:nodetypes="cccccccc" /><ellipse
|
||||||
|
style="opacity:0.99;fill:#ce07d0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.97552;stroke-miterlimit:80"
|
||||||
|
id="ellipse8"
|
||||||
|
cy="43.009087"
|
||||||
|
cx="43.500038"
|
||||||
|
rx="10.676207"
|
||||||
|
ry="10.675922" /><rect
|
||||||
|
style="opacity:0.99;fill:#447dff;fill-opacity:0.992157;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect8"
|
||||||
|
width="18.375"
|
||||||
|
height="20.302734"
|
||||||
|
x="43"
|
||||||
|
y="42" /><rect
|
||||||
|
style="opacity:0.99;fill:#447dff;fill-opacity:0.992157;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect9"
|
||||||
|
width="18.375"
|
||||||
|
height="20.302734"
|
||||||
|
x="75"
|
||||||
|
y="10" /><ellipse
|
||||||
|
style="opacity:0.99;fill:#ce07d0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.97552;stroke-miterlimit:80"
|
||||||
|
id="ellipse9"
|
||||||
|
cy="11.009088"
|
||||||
|
cx="75.500038"
|
||||||
|
rx="10.676207"
|
||||||
|
ry="10.675922" /><path
|
||||||
|
id="path9"
|
||||||
|
style="opacity:0.99;fill:#ffffff;fill-opacity:0.992157;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="M 71,6.8378906 V 30.302734 h 7.822266 V 14.662109 L 93.375,14.681641 V 6.796875 L 78.822266,6.837891 Z"
|
||||||
|
sodipodi:nodetypes="cccccccc" /><ellipse
|
||||||
|
style="opacity:0.99;fill:#ce07d0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.97552;stroke-miterlimit:80"
|
||||||
|
id="ellipse10"
|
||||||
|
cy="43.009087"
|
||||||
|
cx="75.500038"
|
||||||
|
rx="10.676207"
|
||||||
|
ry="10.675922" /><path
|
||||||
|
id="path10"
|
||||||
|
style="opacity:0.99;fill:#ffffff;fill-opacity:0.992157;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 71,38.837891 v 23.464843 h 7.822266 V 46.662109 L 93.375,46.681639 v -7.884766 l -14.552734,0.04102 z"
|
||||||
|
sodipodi:nodetypes="cccccccc" /><rect
|
||||||
|
style="opacity:0.99;fill:#447dff;fill-opacity:0.992157;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect10"
|
||||||
|
width="18.375"
|
||||||
|
height="20.302734"
|
||||||
|
x="75"
|
||||||
|
y="42" /></svg>
|
||||||
|
After Width: | Height: | Size: 6.1 KiB |
43
addons/curved_lines_2d/PaintOrder.svg.import
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://7hhlkt6n4b32"
|
||||||
|
path="res://.godot/imported/PaintOrder.svg-b53e3dfee775f6d968e90108f6946848.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://addons/curved_lines_2d/PaintOrder.svg"
|
||||||
|
dest_files=["res://.godot/imported/PaintOrder.svg-b53e3dfee775f6d968e90108f6946848.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
svg/scale=1.0
|
||||||
|
editor/scale_with_editor_scale=false
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
||||||
919
addons/curved_lines_2d/README.md
Normal file
@@ -0,0 +1,919 @@
|
|||||||
|
# Scalable Vector Shapes 2D plugin for Godot 4
|
||||||
|
|
||||||
|
Ask questions on [discord](https://discord.gg/mNTdwgwBy)
|
||||||
|
|
||||||
|
Scalable Vector Shapes 2D lets you do 3 things:
|
||||||
|
1. Draw seamless vector shapes using a Path Editor inspired by the awesome [Inkscape](https://inkscape.org/) with a new node type: [`ScalableVectorShape2D`](./scalable_vector_shape_2d.gd)[^1]
|
||||||
|
2. Animate the shape of the curve using keyframes on a [property-track](https://docs.godotengine.org/en/stable/tutorials/animation/introduction.html#doc-introduction-animation) in an [`AnimationPlayer`](https://docs.godotengine.org/en/stable/classes/class_animationplayer.html#class-animationplayer)
|
||||||
|
3. Import [.svg](https://www.w3.org/TR/SVG/) files as seamless vector shapes in stead of as raster images[^2]
|
||||||
|
|
||||||
|
[^2]: __Important sidenote__: _This plugin only supports a small - yet relevant - subset of the huge [SVG Specification](https://www.w3.org/TR/SVG/struct.html)_
|
||||||
|
|
||||||
|
## Watch the A-Z explainer on Youtube
|
||||||
|
|
||||||
|
In this 10 minute video I explain how to use all the features of Scalable Vector Shapes 2D in short succession:
|
||||||
|
|
||||||
|
[](https://youtu.be/z8Y1e-TehoE)
|
||||||
|
|
||||||
|
[^1]: Looking for EZ Curved Lines 2D? The renamed plugin deprecates the old [`DrawablePath2D`](./drawable_path_2d.gd) custom node in favor of `ScalableVectorShape2D`. A Conversion button is provided: [converter button](./screenshots/00-converter.png). The reason is that [`ScalableVectorShape2D`](./scalable_vector_shape_2d.gd) inherits directly from `Node2D` giving much more control to the plugin over how you can draw.
|
||||||
|
|
||||||
|
|
||||||
|
# Table of Contents
|
||||||
|
|
||||||
|
- [Scalable Vector Shapes 2D plugin for Godot 4](#scalable-vector-shapes-2d-plugin-for-godot-4)
|
||||||
|
- [Watch the A-Z explainer on Youtube](#watch-the-a-z-explainer-on-youtube)
|
||||||
|
- [Table of Contents](#table-of-contents)
|
||||||
|
- [Drawing Shapes in the Godot 2D Viewport](#drawing-shapes-in-the-godot-2d-viewport)
|
||||||
|
- [Basic Drawing Explainer on youtube](#basic-drawing-explainer-on-youtube)
|
||||||
|
- [Quick Start](#quick-start)
|
||||||
|
- [The Create Shapes Dock](#the-create-shapes-dock)
|
||||||
|
- [Creating Paths based on Bézier curves](#creating-paths-based-on-bézier-curves)
|
||||||
|
- [Creating 'primitive' shapes: Rectangle and Ellipse](#creating-primitive-shapes-rectangle-and-ellipse)
|
||||||
|
- [Draw Settings](#draw-settings)
|
||||||
|
- [Futher reading](#futher-reading)
|
||||||
|
- [The Import SVG File Dock](#the-import-svg-file-dock)
|
||||||
|
- [Watch an explainer on Youtube](#watch-an-explainer-on-youtube)
|
||||||
|
- [Using the Import SVG File Dock](#using-the-import-svg-file-dock)
|
||||||
|
- [`Line2D` Stroke versus `Polygon2D` Stroke](#line2d-stroke-versus-polygon2d-stroke)
|
||||||
|
- [The import log](#the-import-log)
|
||||||
|
- [The Project Settings Dock](#the-project-settings-dock)
|
||||||
|
- [Editor Settings (how the 2D Viewport should behave):](#editor-settings-how-the-2d-viewport-should-behave)
|
||||||
|
- [Curve Settings](#curve-settings)
|
||||||
|
- [Extra's: Line2D antialiasing for Compatibility Mode](#extras-line2d-antialiasing-for-compatibility-mode)
|
||||||
|
- [The Advanced Tab](#the-advanced-tab)
|
||||||
|
- [Basic export options](#basic-export-options)
|
||||||
|
- [Bake Animations](#bake-animations)
|
||||||
|
- [Moving, Rotating and Resizing the Points of a Shape](#moving-rotating-and-resizing-the-points-of-a-shape)
|
||||||
|
- [Moving (Translating) all the points](#moving-translating-all-the-points)
|
||||||
|
- [Translating Ellipses and Rectangles](#translating-ellipses-and-rectangles)
|
||||||
|
- [Translating Paths](#translating-paths)
|
||||||
|
- [Rotating all the Points](#rotating-all-the-points)
|
||||||
|
- [Rotating Ellipses and Rectangles](#rotating-ellipses-and-rectangles)
|
||||||
|
- [Rotating Paths](#rotating-paths)
|
||||||
|
- [Resizing all the Points](#resizing-all-the-points)
|
||||||
|
- [Resizing Ellipses and Rectangles](#resizing-ellipses-and-rectangles)
|
||||||
|
- [Resizing Paths](#resizing-paths)
|
||||||
|
- [Flipping your shapes](#flipping-your-shapes)
|
||||||
|
- [Flipping primitive shapes](#flipping-primitive-shapes)
|
||||||
|
- [Flipping paths](#flipping-paths)
|
||||||
|
- [Manipulating shapes](#manipulating-shapes)
|
||||||
|
- [Adding a point to a shape](#adding-a-point-to-a-shape)
|
||||||
|
- [Subdividing a shape](#subdividing-a-shape)
|
||||||
|
- [Bending a curve](#bending-a-curve)
|
||||||
|
- [Creating, mirroring and dragging control point handles](#creating-mirroring-and-dragging-control-point-handles)
|
||||||
|
- [Closing the loop and breaking the loop](#closing-the-loop-and-breaking-the-loop)
|
||||||
|
- [Deleting points and control points](#deleting-points-and-control-points)
|
||||||
|
- [Setting the global position of a point / curve handle manually](#setting-the-global-position-of-a-point--curve-handle-manually)
|
||||||
|
- [Create a cutout/clip/merge shape (a hole, a clipped frame, ...)](#create-a-cutoutclipmerge-shape-a-hole-a-clipped-frame-)
|
||||||
|
- [Cutting out an empty shape](#cutting-out-an-empty-shape)
|
||||||
|
- [Converting a line segment into an arc-segment](#converting-a-line-segment-into-an-arc-segment)
|
||||||
|
- [Editing arc properties](#editing-arc-properties)
|
||||||
|
- [Setting the pivot of your shape](#setting-the-pivot-of-your-shape)
|
||||||
|
- [Sticking two or more shapes together by vertex merge](#sticking-two-or-more-shapes-together-by-vertex-merge)
|
||||||
|
- [Manipulating 2D Shapes in the 3D export](#manipulating-2d-shapes-in-the-3d-export)
|
||||||
|
- [Animating 3D curves](#animating-3d-curves)
|
||||||
|
- [Manipulating gradients](#manipulating-gradients)
|
||||||
|
- [Changing the start- and endpoint of the gradient](#changing-the-start--and-endpoint-of-the-gradient)
|
||||||
|
- [Changing the color stop positions](#changing-the-color-stop-positions)
|
||||||
|
- [Add new color stops](#add-new-color-stops)
|
||||||
|
- [Ways to prevent 'over-selecting' `ScalableVectorShape2D` nodes](#ways-to-prevent-over-selecting-scalablevectorshape2d-nodes)
|
||||||
|
- [Using the Inspector Form for `ScalableVectorShape2D`](#using-the-inspector-form-for-scalablevectorshape2d)
|
||||||
|
- [Inspector Form](#inspector-form)
|
||||||
|
- [Convert to Path button](#convert-to-path-button)
|
||||||
|
- [The Fill inspector form](#the-fill-inspector-form)
|
||||||
|
- [The Stroke inspector form](#the-stroke-inspector-form)
|
||||||
|
- [Creating new Strokes](#creating-new-strokes)
|
||||||
|
- [The Collision inspector form](#the-collision-inspector-form)
|
||||||
|
- [The Navigation inspector form](#the-navigation-inspector-form)
|
||||||
|
- [The Curve settings inspector form](#the-curve-settings-inspector-form)
|
||||||
|
- [The Glue Map property](#the-glue-map-property)
|
||||||
|
- [The Masking Inspector form](#the-masking-inspector-form)
|
||||||
|
- [The Shape type inspector form](#the-shape-type-inspector-form)
|
||||||
|
- [The Editor settings inspector form](#the-editor-settings-inspector-form)
|
||||||
|
- [The Export Options inspector form](#the-export-options-inspector-form)
|
||||||
|
- [Export as PNG button](#export-as-png-button)
|
||||||
|
- [Export as 'baked' scene button](#export-as-baked-scene-button)
|
||||||
|
- [Caveats when 'Baking'](#caveats-when-baking)
|
||||||
|
- [More about assigned `Line2D`, `Polygon2D` and `CollisionObject2D`](#more-about-assigned-line2d-polygon2d-and-collisionobject2d)
|
||||||
|
- [Watch the chapter about working with collisions, paint order and the node hierarchy on youtube](#watch-the-chapter-about-working-with-collisions-paint-order-and-the-node-hierarchy-on-youtube)
|
||||||
|
- [Animating / Changing shapes at runtime](#animating--changing-shapes-at-runtime)
|
||||||
|
- [Youtube explainer on animating](#youtube-explainer-on-animating)
|
||||||
|
- [A note up front (this being said)](#a-note-up-front-this-being-said)
|
||||||
|
- [Animating the shape and gradients at Runtime](#animating-the-shape-and-gradients-at-runtime)
|
||||||
|
- [Add keyframes in an animation player](#add-keyframes-in-an-animation-player)
|
||||||
|
- [Don't duplicate `ScalableVectorShape2D`, use the `path_changed` signal in stead](#dont-duplicate-scalablevectorshape2d-use-the-path_changed-signal-in-stead)
|
||||||
|
- [Performance impact](#performance-impact)
|
||||||
|
- [Autoscaling SVG Textures for GUI Controls](#autoscaling-svg-textures-for-gui-controls)
|
||||||
|
- [Adding Autoscaling SVG Textures via the Inspector](#adding-autoscaling-svg-textures-via-the-inspector)
|
||||||
|
- [Example of Autoscaling GUI](#example-of-autoscaling-gui)
|
||||||
|
- [Removing an Automatically Scaled Texture](#removing-an-automatically-scaled-texture)
|
||||||
|
- [Advanced use of `SVGTextureHelper`](#advanced-use-of-svgtexturehelper)
|
||||||
|
- [FAQ's](#faqs)
|
||||||
|
- [The curve of my `ScalableVectorShape2D` won't animate at runtime, what do I do?](#the-curve-of-my-scalablevectorshape2d-wont-animate-at-runtime-what-do-i-do)
|
||||||
|
- [I want to change shapes while debugging my game. Is this even possible?](#i-want-to-change-shapes-while-debugging-my-game-is-this-even-possible)
|
||||||
|
- [When I animate the curve of an imported scene, it animates all the other curves as well](#when-i-animate-the-curve-of-an-imported-scene-it-animates-all-the-other-curves-as-well)
|
||||||
|
- [When I duplicate a `ScalableVectorShape2D` and change its shape, the original `ScalableVectorShape2D` shape also changes](#when-i-duplicate-a-scalablevectorshape2d-and-change-its-shape-the-original-scalablevectorshape2d-shape-also-changes)
|
||||||
|
- [Can I draw shapes programmatically?](#can-i-draw-shapes-programmatically)
|
||||||
|
- [Should I draw shapes programmatically?](#should-i-draw-shapes-programmatically)
|
||||||
|
- [When should I draw shapes programmatically?](#when-should-i-draw-shapes-programmatically)
|
||||||
|
- [Can I change shapes in the 2D editor while running the game?](#can-i-change-shapes-in-the-2d-editor-while-running-the-game)
|
||||||
|
- [Attributions](#attributions)
|
||||||
|
- [Lots of thanks go out to those who helped me out getting started:](#lots-of-thanks-go-out-to-those-who-helped-me-out-getting-started)
|
||||||
|
- [And a big thank you goes to to @MewPurPur](#and-a-big-thank-you-goes-to-to-mewpurpur)
|
||||||
|
- [Many thanks to @HannesParth/Permotion](#many-thanks-to-hannesparthpermotion)
|
||||||
|
- [And of course everyone who helped test and review the code thus far](#and-of-course-everyone-who-helped-test-and-review-the-code-thus-far)
|
||||||
|
- [Reaching out / Contributing](#reaching-out--contributing)
|
||||||
|
|
||||||
|
# Drawing Shapes in the Godot 2D Viewport
|
||||||
|
|
||||||
|
## Basic Drawing Explainer on youtube
|
||||||
|
|
||||||
|
[](https://youtu.be/gaug5zv57IE)
|
||||||
|
|
||||||
|
## Quick Start
|
||||||
|
After activating this plugin a new bottom panel item appears, called "Scalable Vector Shapes 2D".
|
||||||
|
|
||||||
|
There are 2 recommended ways to start drawing:
|
||||||
|
1. [Creating a Circle/Ellipse, Rectangle or empty Path using the bottom panel item](#the-create-shapes-dock)
|
||||||
|
2. [Using the `.svg` importer](#using-the-import-svg-file-dock)
|
||||||
|
|
||||||
|
|
||||||
|
# The Create Shapes Dock
|
||||||
|
|
||||||
|
The `Create Shapes` tab gives you some basic choices:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Creating Paths based on Bézier curves
|
||||||
|
|
||||||
|
Pressing the `Create Empty Path` or one of the `Create Path` buttons will add a new shape to an open `2D Scene` in 'Path' mode, meaning all points in the 'Bézier' curve are editable.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
## Creating 'primitive' shapes: Rectangle and Ellipse
|
||||||
|
|
||||||
|
It's probably easier to start out with a basic primitive shape (like you would in Inkscape <3) using the `Create Rectangle` or `Create Ellipse` button. This will expose less features, but will make it a lot easier to manipulate shapes:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Ellipses will only have one handle to change the `size` property with (representing the x and y diameter). This will set the `rx` and `ry` property indirectly.
|
||||||
|
|
||||||
|
Rectangles will have a handle for `size` and 2 handles for rounded corners `rx` and `ry` property.
|
||||||
|
|
||||||
|
## Draw Settings
|
||||||
|
|
||||||
|
- Enable/Disable Fill (when creating new shapes via this bottom panel)
|
||||||
|
- Fill color (when creating new shapes in this bottom panel)
|
||||||
|
- Enable/Disable Stroke (when creating new shapes this this bottom panel)
|
||||||
|
- Stroke color (when creating new shapes in this bottom panel)
|
||||||
|
- Choose a `CollisionObject2D` type (when creating new shapes in this bottom panel, default is no collision object assignment)
|
||||||
|
- Paint order: a toggle which represent what comes in front of what (when creating new shapes in the bottom panel)
|
||||||
|
- Stroke Settings:
|
||||||
|
- Stroke Width (when creating new shapes via this bottom panel)
|
||||||
|
- Use `Line2D`: when flagged off, a `Polygon2D` will be used to draw strokes with in stead (see also: [`Line2D Stroke` versus `Polygon2D Stroke`](#line2d-stroke-versus-polygon2d-stroke) )
|
||||||
|
- Begin- and End Cap modes
|
||||||
|
- Line Joint Mode
|
||||||
|
|
||||||
|
|
||||||
|
## Futher reading
|
||||||
|
Read more about [manipulating shapes](#manipulating-shapes)
|
||||||
|
|
||||||
|
# The Import SVG File Dock
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Watch an explainer on Youtube
|
||||||
|
|
||||||
|
[](https://youtu.be/5PIVoQcm8QE)
|
||||||
|
|
||||||
|
|
||||||
|
## Using the Import SVG File Dock
|
||||||
|
|
||||||
|
On the left side of this panel is a form with a couple of options:
|
||||||
|
|
||||||
|
- Import as ScalableVectorShape2D: check this Off if you want to import the svg file with only built-in godot nodes, without being able to edit/animate the curves in the editor.
|
||||||
|
- Lock imported shapes in editor: this simply flags on the lock so that the `Polygon2D`, `Line2D`, etc are not selected on click, but the owning ScalableVectorShape2D is
|
||||||
|
- Flag on antialiased on Polygon2D and Line2D: flags on the `antialiased` property of either
|
||||||
|
- Use Line2D for Strokes: when flagged Off a `Polygon2D` is used for strokes in stead of a Line2D
|
||||||
|
- Pick a `CollisionObject2D` type to also generate collision polygons when importing the svg file
|
||||||
|
|
||||||
|
## `Line2D` Stroke versus `Polygon2D` Stroke
|
||||||
|
|
||||||
|
A tooltip highlights the costs and benefits when picking either of these to draw strokes with:
|
||||||
|
- A `Polygon2D` stroke can be more neatly clipped than a `Line2D`
|
||||||
|
- `CollisionPolygon2D`'s match `Polygon2D` Stroke better
|
||||||
|
- A `Polygon2D` stroke can be textured with gradients like fills are textured
|
||||||
|
- `Line2D` has sharper caps and line joints at high zoom
|
||||||
|
- `Line2D` can be textured directionally in stead of like a Fill texture
|
||||||
|
- `Line2D` can set different Begin and End Cap Modes where `Polygon2D` can only pick one
|
||||||
|
|
||||||
|
## The import log
|
||||||
|
|
||||||
|
On the right side is an import log, which will show warnings of known problems, usually unsupported stuff.
|
||||||
|
|
||||||
|
The link it shows is to the issues list on the github repository hosting this plugin. Here you can report any encountered bugs while importing SVG files using this plugin.
|
||||||
|
|
||||||
|
# The Project Settings Dock
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Editor Settings (how the 2D Viewport should behave):
|
||||||
|
|
||||||
|
- Enable/Disable ScalableVectorShape2D Editing (when checked off, you can edit nodes the normal, built-in, godot-way. You _are_ going to need this)
|
||||||
|
- Show/Hide Edit hints
|
||||||
|
- Show Point Details (which are the exact _indices_ of each point on the `Curve2D` of this shape, what is it's global position)
|
||||||
|
- Snap to Pixel (snaps points and curve handles to whole pixels on the global transform)
|
||||||
|
- Snap distance (the snap step / resolution)
|
||||||
|
|
||||||
|
## Curve Settings
|
||||||
|
|
||||||
|
These settings are applied to the `Curve Settings` of new shapes when added via the bottom panel docks (either SVG importer or via Create Shapes).
|
||||||
|
|
||||||
|
For more information on these settings, please refer to the section on [The Curve settings inspector form](#the-curve-settings-inspector-form)
|
||||||
|
|
||||||
|
## Extra's: Line2D antialiasing for Compatibility Mode
|
||||||
|
|
||||||
|
As of release `2.18.0` a new flag was added which causes any `Line2D` that you add as stroke to be antialiased via a repeating texture.
|
||||||
|
|
||||||
|
This approach follows exactly the [Antialiased Line2D plugin](https://github.com/godot-extended-libraries/godot-antialiased-line2d) by @Calinou.
|
||||||
|
|
||||||
|
To be more specific, I reused these bits:
|
||||||
|
- The tool script code for the `Line2D` creation is here: [addons/antialiased_line2d/antialiased_line2d.gd](https://github.com/godot-extended-libraries/godot-antialiased-line2d/blob/v1.2.0/addons/antialiased_line2d/antialiased_line2d.gd)
|
||||||
|
- And the [LumAlpha8.tex](./LumAlpha8.tex) texture resource it uses was generated by this script: [addons/antialiased_line2d/texture.gd](https://github.com/godot-extended-libraries/godot-antialiased-line2d/blob/v1.2.0/addons/antialiased_line2d/texture.gd)
|
||||||
|
|
||||||
|
Of course, once you assign this to the `Line2D.texture`, you cannot use another texture on that `Line2D` anymore.
|
||||||
|
|
||||||
|
# The Advanced Tab
|
||||||
|
|
||||||
|
Since release `2.13.0` a tab named 'Advanced' is added to the bottom dock.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Basic export options
|
||||||
|
- PNG file (see [Export as PNG Button](#export-as-png-button) )
|
||||||
|
- A 'Baked' scene (see [Export as 'baked' scene button](#export-as-baked-scene-button))
|
||||||
|
- 3D scene: creates a new 3D scene, in which all the Fills and Strokes in the scene are turned into instances of `CSGPolygon3D`[^6]
|
||||||
|
|
||||||
|
[^6]: Coming soon: a 3D Node with an editable outline using a `ScalableVectorShape2D` node
|
||||||
|
|
||||||
|
## Bake Animations
|
||||||
|
Since `2.14.0` you can export your animated scene as sprite frames in one PNG spritesheet or separate PNG files.
|
||||||
|
|
||||||
|
# Moving, Rotating and Resizing the Points of a Shape
|
||||||
|
|
||||||
|
Release `2.16.0` adds the posibility to do uniform transforms on the points of a shape, as opposed to the entire node.
|
||||||
|
|
||||||
|
When a `ScalableVectorShape2D` is selected in `Select Mode (Q)`, the following command buttons are made available:
|
||||||
|
|
||||||
|
- `Move all the Points without moving the Node (Z)`
|
||||||
|
- `Rotate all the Points without rotating the Node (X)`
|
||||||
|
- `Resize all the Points without scaling the Node (C)`
|
||||||
|
- `Edit the points normally (Q)`
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
## Moving (Translating) all the points
|
||||||
|
|
||||||
|
When moving all the points of a shape, the `Node2D.position` property does not change.
|
||||||
|
|
||||||
|
This operation responds to the snap-to-pixel mode of the `Project Settings` tab.
|
||||||
|
|
||||||
|
### Translating Ellipses and Rectangles
|
||||||
|
|
||||||
|
In the case of the 2 supported primitive shapes, the `offset` property is changed, to represent the translation.
|
||||||
|
|
||||||
|
The `offset` property can be used to set keyframes in an `AnimationPlayer` and is so easier to use than the `Batch Update` button for an entire curve.
|
||||||
|
|
||||||
|
### Translating Paths
|
||||||
|
|
||||||
|
When the `Shape Type Settings > Shape Type` is `Path`, all the points are simply moved, relative to the node position (translating their individual local position).
|
||||||
|
|
||||||
|
## Rotating all the Points
|
||||||
|
|
||||||
|
When rotating all the points of a shape, the `Node2D.rotation` property does not change.
|
||||||
|
|
||||||
|
Just like rotating `Node2D`, holding `Ctrl` allows you to rotate in steps of 5°.
|
||||||
|
|
||||||
|
### Rotating Ellipses and Rectangles
|
||||||
|
|
||||||
|
In the case of the 2 supported primitive shapes, the `spin` property is changed, to represent the rotation of all the points.
|
||||||
|
|
||||||
|
The `spin` property can be used to set keyframes in an `AnimationPlayer` and is so easier to use than the `Batch Update` button for an entire cruve.
|
||||||
|
|
||||||
|
### Rotating Paths
|
||||||
|
|
||||||
|
When the `Shape Type Settings > Shape Type` is `Path`, all the points can be rotated in 2 ways:
|
||||||
|
1. Around the `Node2D`'s pivot
|
||||||
|
2. Around their natural center (by holding the `Shift` button - this is not perfect, but comes close enough)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Resizing all the Points
|
||||||
|
|
||||||
|
When resizing all the points of a shape, the `Node2D.scale` property does not change, this is especially useful when using strokes, because their width will remain the same this way.
|
||||||
|
|
||||||
|
This operation responds to the snap-to-pixel mode of the `Project Settings` tab.
|
||||||
|
|
||||||
|
### Resizing Ellipses and Rectangles
|
||||||
|
|
||||||
|
In the case of the 2 supported primitive shapes, the `size` property is changed, to represent the 'distance' of all the points away from their origin.
|
||||||
|
|
||||||
|
The `size` property can be used to set keyframes in an `AnimationPlayer` and is so easier to use than the `Batch Update` button for an entire cruve.
|
||||||
|
|
||||||
|
### Resizing Paths
|
||||||
|
|
||||||
|
When the `Shape Type Settings > Shape Type` is `Path`, all the points can be resized in 2 ways:
|
||||||
|
1. Away from / towards the `Node2D`'s pivot
|
||||||
|
2. Away from / towards their natural center (by holding Shift)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Flipping your shapes
|
||||||
|
|
||||||
|
Release `2.17.0` adds vertical and horizontal flip buttons. This allows you to flip your shape without changing the `Node2D.scale` property of your `ScalableVectorShape2D`.
|
||||||
|
|
||||||
|
### Flipping primitive shapes
|
||||||
|
|
||||||
|
Flipping primitive shapes (shape type is ellipse, or rectangle) simply reverses the rotation of points around their pivot by negating the value of the `spin` property.
|
||||||
|
|
||||||
|
### Flipping paths
|
||||||
|
|
||||||
|
Flipping paths multiplies the position of each point by negative-x for horizontal flipping, or negative-y for vertical flipping. The in- and out- control points are also flipped, effectively flipping the bézier curves.
|
||||||
|
|
||||||
|
Arcs are flipped by toggling negating the `sweep` flag of each listed arc.
|
||||||
|
|
||||||
|
# Manipulating shapes
|
||||||
|
|
||||||
|
The hints in the 2D viewport should have you covered, but this section lists all the operations available to you. You can also watch the chapter on sculpting paths on youtube:
|
||||||
|
|
||||||
|
[](https://www.youtube.com/watch?v=z8Y1e-TehoE&t=710s)
|
||||||
|
|
||||||
|
|
||||||
|
## Adding a point to a shape
|
||||||
|
|
||||||
|
Using `Ctrl`[^5] + `Left Click` you can add a point anywhere in the 2D viewport, while your shape is selected.
|
||||||
|
|
||||||
|
[^5]: Use `Cmd` in stead of `Ctrl` on a mac
|
||||||
|
|
||||||
|
By double clicking on a line segment you can add a point _inbetween_ 2 existing points:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
By holding alt and left-clicking while hovering over a line segment you add a point at the halfway-mark of a curve:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
## Subdividing a shape
|
||||||
|
|
||||||
|
Double click on a shape without hovering over an edge to subdivide all edges on the shape:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Bending a curve
|
||||||
|
|
||||||
|
Holding the mouse over line segment you can start dragging it to turn it into a curve.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Creating, mirroring and dragging control point handles
|
||||||
|
|
||||||
|
When you have new node you can drag out curve manipulation control points while holding the `Shift` button. The 2 control points will be mirrored for a symmetrical / round effect.
|
||||||
|
|
||||||
|
Dragging control point handles while holding `Shift` will keep them mirrored / round:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Dragging them without holding shift will allow for unmirrored / shap corners:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Closing the loop and breaking the loop
|
||||||
|
|
||||||
|
Double clicking on the start node, or end node of an unclosed shape will close the loop.
|
||||||
|
|
||||||
|
Double clicking on the start-/endpoint again will break the loop back up:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
You can recognise the start-/endpoint(s) by the infinity symbol: ∞
|
||||||
|
|
||||||
|
## Deleting points and control points
|
||||||
|
|
||||||
|
You can delete points and control points by using right click.
|
||||||
|
|
||||||
|
## Setting the global position of a point / curve handle manually
|
||||||
|
|
||||||
|
Using `Alt+Click` you can now open a form to set the global position of a point manually:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Create a cutout/clip/merge shape (a hole, a clipped frame, ...)
|
||||||
|
|
||||||
|
While holding `Ctrl+Shift`[^5] on a selected shape you can start adding cutouts to your selected shape:
|
||||||
|
- Use `mousewheel` to change shapes (rectangle, ellipse, or empty path)
|
||||||
|
- Use `right click` to change operation (cut out, clip, or merge)
|
||||||
|
- Use `left click` __on__ your selected shape to create _and_ select the new `ScalableVectorShape2D` which acta as a cutout, a frame clipping, or merged shape:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### Cutting out an empty shape
|
||||||
|
|
||||||
|
When cutting out an empty shapem, the created cutout will have only _one_ point, so to see the effect you'd need to add more points to using regular `Ctrl+Click`[^5]:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Converting a line segment into an arc-segment
|
||||||
|
|
||||||
|
Use `Right click` on a line segment to convert it into an arc[^3] (a an ellipse-shaped bend with an x- and y-radius).
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Use `Right click` on an arc again to convert it back into a normal line segment.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Editing arc properties
|
||||||
|
|
||||||
|
Using `Left click` on an arc segment opens a popup form to edit the properties of the arc:
|
||||||
|
- radius (`rx` / `ry`)
|
||||||
|
- rotation (rotates the arc around its elliptical center; is only noticable when radius is non-uniform)
|
||||||
|
- large arc (when the arc's radius is greater than distance between its start- and endpoint it can be drawn the short and the long way 'round)
|
||||||
|
- sweep (determines the direction the arc points are drawn: clockwise / counter-clockwise; this effectively flips the arc)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
[^3]: Arcs are implemented the same way as specified by the [w3c for scalable vecor graphics](https://www.w3.org/TR/SVG/paths.html#PathDataEllipticalArcCommands).
|
||||||
|
|
||||||
|
## Setting the pivot of your shape
|
||||||
|
|
||||||
|
You can use the `Change pivot` mode to change the origin of your shape, just like you would a `Sprite2D`. In this case, the 'pivot' will actually be the `position` property of you `ScalableVectorShape2D` node.
|
||||||
|
|
||||||
|
This rat will want to rotate it's head elsewhere:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Like this:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Sticking two or more shapes together by vertex merge
|
||||||
|
|
||||||
|
Press 'M' while editing, or by pressing the chainlink button to 'Merge Vertices'.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
This allows you to link one point of 2 or more shapes together, so they will now always have the same global position.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
This action create a new instance of the `SVSVertexMerge2D` node. Delete this node to break the link between points.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
# Manipulating 2D Shapes in the 3D export
|
||||||
|
|
||||||
|
Using the new `Export to 3D Scene` in the [Advanced Editing Tab](#the-advanced-tab) produces the new `AdaptableVectorShape3D` node, which holds instances of `CSGPolygon3D` with:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Pressing the button `Add 2D Shape Editor` will instantiate a new `ScalableVectorShape2D` that can be used to edit with. For now I will suffice with a screenshot. I'm hope to record a long explainer about this soon.
|
||||||
|
|
||||||
|
This screenshot was made using the [DualEditor](https://github.com/Meta-Ben/DualEditor) plugin by @Meta-Ben, which is _very_ useful for this purpose:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Animating 3D curves
|
||||||
|
|
||||||
|
You can also use the `Batch insert` button for curve key frames to animate the 3D shape's curve. Of course the [performace impact](#performance-impact) for this is not negligable.
|
||||||
|
|
||||||
|
# Manipulating gradients
|
||||||
|
|
||||||
|
Once a gradient is assigned to the 'Fill' of your shape via the inspector, its properties can be changed using the same controls as will the other handles.
|
||||||
|
|
||||||
|
## Changing the start- and endpoint of the gradient
|
||||||
|
|
||||||
|
Drag the outer orbit of the start- and endpoint of a the gradient line using the left mouse button to move them:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
## Changing the color stop positions
|
||||||
|
|
||||||
|
Drag the color stops along the gradient line to change their position.
|
||||||
|
|
||||||
|
Right click to remove a color stop.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Add new color stops
|
||||||
|
|
||||||
|
Double clicking on the gradient line will add a new color stop (the assigned color will be sampled from the existing color at that point)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Ways to prevent 'over-selecting' `ScalableVectorShape2D` nodes
|
||||||
|
|
||||||
|
This plugin can sometimes get in the way of the default 2D viewport behavior. Sometimes it is hard _not_ to select a `ScalableVectorShape2D`.
|
||||||
|
|
||||||
|
There are 4 ways to get around this:
|
||||||
|
1. Locking the `ScalableVectorShape2D` using the lock toggle  button above the 2D viewport
|
||||||
|
2. Hiding the `ScalableVectorShape2D` via the scene tree
|
||||||
|
3. Saving the branch containing the `ScalableVectorShape2D` as a new scene via the scene tree and importing it will also prevent selection
|
||||||
|
4. Toggling off Enable/Disable ScalableVectorShape2D Editing altogether in the bottom panel
|
||||||
|
|
||||||
|
|
||||||
|
# Using the Inspector Form for `ScalableVectorShape2D`
|
||||||
|
|
||||||
|
The following custom forms were added, with extensive tooltips to help explain the actual functions they provide:
|
||||||
|
|
||||||
|
- [Fill](#the-fill-inspector-form) (actually the assigned `Polygon2D`)
|
||||||
|
- [Stroke](#the-stroke-inspector-form) (actually the assigned `Line2D` or `Polygon2D`)
|
||||||
|
- [Collision](#the-collision-inspector-form) (manages an assigned `CollisionObject2D`)
|
||||||
|
- [Navigation](#the-navigation-inspector-form) (manages an assigned `NavigationRegion2D`)
|
||||||
|
- [Curve Settings](#the-curve-settings-inspector-form)
|
||||||
|
- [Masking](#the-masking-inspector-form)
|
||||||
|
- [Shape Type Settings](#the-shape-type-inspector-form)
|
||||||
|
- [Editor Settings](#the-editor-settings-inspector-form)
|
||||||
|
- [Export Options](#the-export-options-inspector-form)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
## Inspector Form
|
||||||
|
|
||||||
|
### Convert to Path button
|
||||||
|
|
||||||
|
When a primitive shape (basic rectangle or ellipse) is selected, a `Convert to Path`-button is available at the top of the inspector.
|
||||||
|
|
||||||
|
## The Fill inspector form
|
||||||
|
|
||||||
|
When the selected shape has no fill, an `Add Fill` button is provided. Clicking that will create and assign a new `Polygon2D` to the selected `ScalableVectorShape2D`:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Once assigned, the following options are available:
|
||||||
|
- Fill color, changes the `color` property of the assigned `Polygon2D`
|
||||||
|
- Gradient, will assign or remove a `GradientTexture2D` to the `Polygon2D`
|
||||||
|
- Stop colors (if a gradient is set), one color button per color
|
||||||
|
- A `Edit Polygon2D` button, which will make the editor select the assigned `Polygon2D`
|
||||||
|
|
||||||
|
Below that, a standard godot `Assign ...`-field is also available to set the `polygon`-property directly with and to enable unassignment.
|
||||||
|
|
||||||
|
## The Stroke inspector form
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
With this form the following `ScalableVectorShape2D` properties can be edited:
|
||||||
|
- `stroke_color`
|
||||||
|
- `stroke_width`
|
||||||
|
- `begin_cap_mode` (in case of a `Polygon2D`-based stroke, this will also set the end cap)
|
||||||
|
- `end_cap_mode`
|
||||||
|
- `line_joint_mode`
|
||||||
|
|
||||||
|
When a `Line2D` is assigned to draw the stroke with, these properties will be kept synchronized with the `ScalableVectorShape2D` properties.
|
||||||
|
|
||||||
|
In case of a `Polygon2D` based stroke, the `stroke_color` will be kept synchronized with the `Polygon2D` color.
|
||||||
|
|
||||||
|
### Creating new Strokes
|
||||||
|
When the selected shape has no stroke, an extra set of buttons is provided:
|
||||||
|
- `Add Line2D Stroke`
|
||||||
|
- `Add Polygon2D Stroke`
|
||||||
|
|
||||||
|
Clicking either will create and assign a new `Line2D` or `Polygon2D` to the selected `ScalableVectorShape2D`:
|
||||||
|
|
||||||
|
Below that, a standard godot `Assign ...`-field is also available to set these properties:
|
||||||
|
- `line`: a `Line2D` assignment
|
||||||
|
- `poly_stroke`: a `Polygon2D` assignment
|
||||||
|
|
||||||
|
## The Collision inspector form
|
||||||
|
|
||||||
|
This works the same as the Fill- and Stroke forms, but in this case a descendant of a `CollisionObject2D` is assigned to the `collision_object`-property[^4]:
|
||||||
|
|
||||||
|
[^4]: Note that the `collision_polygon` property of `ScalableVectorShape2D` remains supported for backward compatibility, even though the inspector form will now show a deprecation warning and suggest replacing it by assigning a `CollisionObject2D` to the `collision_object` property.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Every time the shape is changed, one or more `Polygon2D` nodes will be added/updated as direct children of this `collision_object`. The descendants of `CollisionObject2D` are:
|
||||||
|
|
||||||
|
- `StaticBody2D`
|
||||||
|
- `Area2D`
|
||||||
|
- `AnimatableBody2D`
|
||||||
|
- `RigidBody2D`
|
||||||
|
- `CharacterBody2D`
|
||||||
|
- `PhysicalBone2D`
|
||||||
|
|
||||||
|
## The Navigation inspector form
|
||||||
|
|
||||||
|
This form can hold a reference to an assigned `NavigationRegion2D`. When the shape changes, a new navigation polygon is calculated.
|
||||||
|
|
||||||
|
## The Curve settings inspector form
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
The curve settings inspector form provides the following options
|
||||||
|
- A `Batch insert` keyframes button for all the `Curve2D`'s control points (the whole shape). This will be active when a valid track is being edited in a `AnimationPlayer` via the bottom panel
|
||||||
|
- The standard godot built-in editor for `Curve2D` resources, assigned to the `curve` property of the selected `ScalableVectorShape2D`
|
||||||
|
- The `update_curve_at_runtime` checkbox, which enables animating the entire shape
|
||||||
|
- The `max_stages` property which influences smoothness (and performance!) of curve drawing; a higher value means smoother lines
|
||||||
|
- The `tolerance_degrees` property, which also influences smoothness (and performance) of curve drawing: a lower value adds a smoother curve, especially for very subtle bends
|
||||||
|
- The `arc_list` property: a container for the metadata-objects describing elliptical arc segments of the curve (implemented via `ScalableArc2D` and `ScalableArcList` resource-classes).
|
||||||
|
- The `glue_map` property: with this dictionary you can control the position of any `Node2D` in the scene with the a point position in the `curve`.
|
||||||
|
|
||||||
|
### The Glue Map property
|
||||||
|
|
||||||
|
With the property `glue_map : Dictionary[int, Node2D]` you can control the position of any `Node2D` in the scene with the a point position in the `curve`.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## The Masking Inspector form
|
||||||
|
|
||||||
|
These properties are used for clipping this shape and cutting out of this shape.
|
||||||
|
|
||||||
|
- The `clip_paths` property: an array of assigned `ScalableVectorShape2D`-nodes, which describe the shapes to cut out of this shape
|
||||||
|
- When the `use_interect_when_clipping` property is checked on and this `ScalableVectorShape2D` is used in another's clip_paths array, the `Geometry2D.intersect_polygons(...)` operation is used in stead of the `Geometry2D.clip_polygons(...) operation`
|
||||||
|
- When the `use_union_in_stead_of_clipping` property is check on and this `ScalableVectorShape2D` is used in another's clip_paths array, the `Geometry2D.merge_polygons(...)` operation is used in stead of the `Geometry2D.clip_polygons(...) operation`[^8]
|
||||||
|
|
||||||
|
[^8]: see also: the [cloud example](./examples/cloud.tscn)
|
||||||
|
|
||||||
|
## The Shape type inspector form
|
||||||
|
|
||||||
|
This form allows manipulation of the properties of primitive shape types (rectangle, ellipsis):
|
||||||
|
- Shape type, here you can selected the type of the shape: Path, Rect and Ellipse. (Be warned: changing a shape from a path to a primitive shape is a destructive action and cannot be undone)
|
||||||
|
- Offset: this represents the position of the pivot relative to the shape's natural center.
|
||||||
|
- Size: the box size of the entire shape (stroke thickness excluded)
|
||||||
|
- Rx: the x-radius of the shape
|
||||||
|
- Ry: the y-radius of the shape
|
||||||
|
|
||||||
|
It is best to change these properties via the handles in the 2D editor. They are, however, quite useful for animating key frames.
|
||||||
|
|
||||||
|
|
||||||
|
## The Editor settings inspector form
|
||||||
|
|
||||||
|
This form exposes 2 settings:
|
||||||
|
|
||||||
|
- Shape Hint Color: the color of the line with which this shape is drawn, when selected
|
||||||
|
- Lock Assigned Shapes: when this is checked, added strokes, fills and collision polygons will be locked in the editor, once created.
|
||||||
|
|
||||||
|
## The Export Options inspector form
|
||||||
|
|
||||||
|
### Export as PNG button
|
||||||
|
|
||||||
|
With the `Export as PNG`-button you can save any `ScalableVectorShape2D` and its children as a new `.png`-file. Note that nodes which are assigned as Fill or Stroke that are higher up in the hierarchy will be excluded from the exported file.
|
||||||
|
|
||||||
|
You _can_ however change the type of any `Node2D` to `ScalableVectorShape2D` temporarily in order to export group of shapes as a PNG file.
|
||||||
|
|
||||||
|
### Export as 'baked' scene button
|
||||||
|
|
||||||
|
With the `Export as baked scene` button you can generate a new scene (like `Save branch as scene`), with all the `ScalableVectorShape2D`-nodes converted to basic `Node2D`-nodes.
|
||||||
|
|
||||||
|
Use this when you are done drawing entirely and do not want to update curves at runtime, or when you want to keep the shapes but drop the dependency of this plugin from your project.
|
||||||
|
|
||||||
|
#### Caveats when 'Baking'
|
||||||
|
An exported AnimationPlayer will not support animated curves, track references will, however, remain.
|
||||||
|
|
||||||
|
|
||||||
|
# More about assigned `Line2D`, `Polygon2D` and `CollisionObject2D`
|
||||||
|
|
||||||
|
Using the `Add ...` buttons in the inspector simply adds a new node as a child to `ScalableVectorShape2D` but it does __not need to be__ a child. The important bit is that the new node is _assigned_ to it via its properties: `polygon`, `line` and `collision_object`.
|
||||||
|
|
||||||
|
## Watch the chapter about working with collisions, paint order and the node hierarchy on youtube
|
||||||
|
|
||||||
|
This video gives more context on how `Line2D`, `Polygon2D` and `CollisionPolygon2D` are _assigned_ to the `ScalableVectorShape2D`:
|
||||||
|
|
||||||
|
[](https://www.youtube.com/watch?v=z8Y1e-TehoE&t=1453s)
|
||||||
|
|
||||||
|
|
||||||
|
# Animating / Changing shapes at runtime
|
||||||
|
|
||||||
|
## Youtube explainer on animating
|
||||||
|
|
||||||
|
Watch this explainer on youtube on animating:
|
||||||
|
|
||||||
|
[](https://youtu.be/IwS2Rf65i18?feature=shared)
|
||||||
|
|
||||||
|
## A note up front (this being said)
|
||||||
|
|
||||||
|
The shapes you create will work fine with basic key-frame operations.
|
||||||
|
|
||||||
|
You can even detach the Line2D, Polygon2D and CollisionObject2D from `ScalableVectorShape2D` entirely, once you're done drawing and aligning, and change the `ScalableVectorShape2D` to a simple `Node2D` if necessary.
|
||||||
|
|
||||||
|
## Animating the shape and gradients at Runtime
|
||||||
|
|
||||||
|
Sometimes, however, you want your shape to change at runtime (or even your collision shape!)
|
||||||
|
|
||||||
|
You can use the `Update Curve at Runtime` checkbox in the inspector to enable dynamic changing of your curved shapes at runtime.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Add keyframes in an animation player
|
||||||
|
|
||||||
|
You can then add an `AnimationPlayer` node to your scene, create a new animation and (batch) insert key frames for the following:
|
||||||
|
|
||||||
|
- The entire shape of your `ScalableVectorShape2D`, which are:
|
||||||
|
- `curve:point_*/position`
|
||||||
|
- `curve:point_*/in`
|
||||||
|
- `curve:point_*/out`
|
||||||
|
- `arc_list:arc_*/radius`
|
||||||
|
- `arc_list:arc_*/rotation_deg`
|
||||||
|
- `arc_list:arc_*/large_arc_flag`
|
||||||
|
- `arc_list:arc_*/sweep_flag`
|
||||||
|
- All the gradient properties of your fill (`Polygon2D` assigned to `ScalableVectorShape2D`), which are:
|
||||||
|
- `texture:gradient:colors` (the entire `PackedColorArray`)
|
||||||
|
- `texture:gradient:offsets` (the entire `PackedFloat32Array`)
|
||||||
|
- `texture:fill_from`
|
||||||
|
- `texture:fill_to`
|
||||||
|
- Fill color, i.e.: the `color` of the assigned `Polygon2D`
|
||||||
|
|
||||||
|
__* Note: the keyframes of stroke properties are set directly on `ScalableVectorShape2D` as of release 2.12__
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Don't duplicate `ScalableVectorShape2D`, use the `path_changed` signal in stead
|
||||||
|
|
||||||
|
When the `update_curve_at_runtime` property is checked, every time the curve changes in your game the `path_changed` signal is emitted.
|
||||||
|
|
||||||
|
Duplicating a `ScalableVectorShape2D` will __not__ make a new `Curve2D`, but use a reference. This means line-segments will be calculated multiple times on one and the same curve! Very wasteful.
|
||||||
|
|
||||||
|
If however you want to, for instance, animate 100 blades of grass, just use __one__ `ScalableVectorShape2D` and have the 100 `Line2D` node listen to the `path_changed` signal and overwrite their `points` property with the `PackedVector2Array` argument of your listener `func`:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
This very short section of the youtube video illustrates how to do this: https://youtu.be/IwS2Rf65i18?feature=shared&t=55
|
||||||
|
|
||||||
|
|
||||||
|
## Performance impact
|
||||||
|
|
||||||
|
Animating curve points at runtime does, however, impact performance of your game, because calculating segments is an expensive operation.
|
||||||
|
|
||||||
|
Under `Tesselation settings` you can lower `Max Stages` or bump up `Tolerance Degrees` to reduce curve smoothness and increase performance (and vice-versa)
|
||||||
|
|
||||||
|
# Autoscaling SVG Textures for GUI Controls
|
||||||
|
|
||||||
|
Release `2.15` makes it easy to add crisp, autoscaling images for your GUI Control nodes using two new classes:
|
||||||
|
|
||||||
|
- `SVGTextureHelper`: a `Node` that manages an SVG image resource when it's a direct child of a `TextureRect`, `Button`, or `TextureButton`
|
||||||
|
- `SVGTextureResource`: a `Resource` that holds a reference to the svg file and a base64 encoded string of the file's contents, as well as a baseline scale factor (so you can even keep the image crips and sharp at higher zoom levels)
|
||||||
|
|
||||||
|
## Adding Autoscaling SVG Textures via the Inspector
|
||||||
|
|
||||||
|
These 3 control nodes now have an extra button `Set Scalable SVG Texture` in the inspector to set their texture with:
|
||||||
|
|
||||||
|
- `TextureRect`
|
||||||
|
- `Button`
|
||||||
|
- `TextureButton`
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Once an SVG file has been chosen as a texture, a `SVGTextureHelper` node is automatically added to manage the automatically scaled image via a `SVGTextureResource`.
|
||||||
|
|
||||||
|
A button with the name of the texture property and an icon-preview will then be presented with which you can pick another SVG file source.
|
||||||
|
|
||||||
|
### Example of Autoscaling GUI
|
||||||
|
|
||||||
|
There is an example scene in the plugin directory: `addons/curved_lines_2d/examples/gui.tscn`.
|
||||||
|
|
||||||
|
## Removing an Automatically Scaled Texture
|
||||||
|
|
||||||
|
To remove this type of texture again, the `SVGTextureHelper` node needs to be deleted via the scene tree:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Advanced use of `SVGTextureHelper`
|
||||||
|
|
||||||
|
Any `Control` node's `Texture2D` properties can be managed by a manually added `SVGTextureHelper`. For this you will need to set the `target_property`-field of the `SVGTextureHelper` manually.
|
||||||
|
|
||||||
|
# FAQ's
|
||||||
|
|
||||||
|
## The curve of my `ScalableVectorShape2D` won't animate at runtime, what do I do?
|
||||||
|
Check the box:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## I want to change shapes while debugging my game. Is this even possible?
|
||||||
|
|
||||||
|
Yes, when you check the box `Update Curve at Runtime` box.
|
||||||
|
|
||||||
|
## When I animate the curve of an imported scene, it animates all the other curves as well
|
||||||
|
|
||||||
|
This is a common issue: there is _one_ `Curve2D` instance being referenced by all scenes. You fix this by checking On "Local To Scene" for the `Curve2D`:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
## When I duplicate a `ScalableVectorShape2D` and change its shape, the original `ScalableVectorShape2D` shape also changes
|
||||||
|
|
||||||
|
This is a common issue: there is _one_ `Curve2D` instance being referenced by both nodes.
|
||||||
|
|
||||||
|
You can work around this by using 'Make unique' by right-clicking `Curve settings > Curve > Curve2D` in the Inspector of your duplicated shape:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
When using [arcs](#editing-arc-properties) in a shape the `Arc List` property must also be 'made unique'
|
||||||
|
|
||||||
|
Overriding the default duplication behavior of godot can lead to more unforeseen problems. So [a good solution must be well thought through](https://github.com/Teaching-myself-Godot/ez-curved-lines-2d/issues/200#issuecomment-3318594193).
|
||||||
|
|
||||||
|
Search reddit on the trials and tribulations of 'Make Unique':
|
||||||
|
|
||||||
|
- https://www.reddit.com/r/godot/search/?q=make+unique
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Can I draw shapes programmatically?
|
||||||
|
|
||||||
|
Yes you can. There are a couple of small things to be aware of:
|
||||||
|
1. You need to set `my_shape.up_date_curve_at_runtime = true`
|
||||||
|
2. To draw anything, your shape needs a Stroke, Fill, or Collision Object:
|
||||||
|
1. Setting a stroke: `my_shape.line = Line2D.new()`
|
||||||
|
2. Setting a fill: `my_shape.polygon = Polygon2D.new()`
|
||||||
|
3. Setting a collision object: `my_shape.collision_object = StaticBody2D.new()`
|
||||||
|
3. The Stroke, Fill, Collision Object need to be inside the scene tree, i.e.: `my_shape.add_child(my_shape.line)`
|
||||||
|
|
||||||
|
I added a [small example](./examples/add_shapes_programmatically/click_ellipse.gd) based on [this question](https://github.com/Teaching-myself-Godot/ez-curved-lines-2d/issues/111)
|
||||||
|
|
||||||
|
## Should I draw shapes programmatically?
|
||||||
|
|
||||||
|
This depends on the complexity of what you want to achieve.
|
||||||
|
|
||||||
|
In many cases just drawing something in the editor and saving it as a scene to import elsewhere (or `instantiate()` via preloading) is a better option, adhering to the _Keep it Simple_ principle.
|
||||||
|
|
||||||
|
But that's just my personal opinion.
|
||||||
|
|
||||||
|
## When should I draw shapes programmatically?
|
||||||
|
|
||||||
|
There are very many situations left where you might want to do exactly this, but that is up to your own creativity.
|
||||||
|
|
||||||
|
One powerful feature I can think of is 'mining': use `ScalableVectorShape2D`-nodes to make cuts in collision shapes and navigation areas.
|
||||||
|
|
||||||
|
Playing [Rat's Return](./examples/rat/rats_return.tscn) will give a first impression how this might work:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
`ScalableVectorShape2D` already ships quite some convenience methods like:
|
||||||
|
- `clipped_polygon_has_point(global_pos : Vector2) -> bool` and
|
||||||
|
- `add_clip_path(other_shape : ScalableVectorShape2D)`
|
||||||
|
|
||||||
|
But I have not come around to documenting yet.
|
||||||
|
|
||||||
|
## Can I change shapes in the 2D editor while running the game?
|
||||||
|
|
||||||
|
When the `Update Curve At Runtime` checkbox is checked, the shape will also sync up with a scene running in debug mode.
|
||||||
|
|
||||||
|
Once you're done drawing and do not need the shape to change anymore at runtime you can turn this checkbox off again.
|
||||||
|
|
||||||
|
# Attributions
|
||||||
|
|
||||||
|
## Lots of thanks go out to those who helped me out getting started:
|
||||||
|
- This plugin was first inspired by [Mark Hedberg's blog on rendering curves in Godot](https://www.hedberggames.com/blog/rendering-curves-in-godot).
|
||||||
|
- The suggestion to support both `Polygon2D` and collisions was done by [GeminiSquishGames](https://github.com/GeminiSquishGames), who's pointers inspired me to go further, like implementing uniform transform tools.
|
||||||
|
- The SVG Importer code was adapted from the script hosted on github in the [pixelriot/SVG2Godot](https://github.com/pixelriot/SVG2Godot) repository
|
||||||
|
- The code for making cutout shapes was adapted from the great [knife tool plugin](https://github.com/mrkdji/knife-tool/) by @mrkdji
|
||||||
|
- The inspiration for using [Geometry2D.offset_polyline](https://docs.godotengine.org/en/stable/classes/class_geometry2d.html#class-geometry2d-method-offset-polyline) for strokes came from @theshaggydev, who recorded [this video](https://www.youtube.com/watch?v=5TW7H7aXhxQ) about it.
|
||||||
|
- Lot's of gratitude to [@kcfresh53](https://github.com/kcfresh) for architecting the auto-scaling control image textures via the `SVGTextureHelper` node and the `SVGTextureResource`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## And a big thank you goes to to [@MewPurPur](https://github.com/MewPurPur)
|
||||||
|
|
||||||
|
The author of GodSVG for writing a great [SVG Arc command implementation](https://github.com/MewPurPur/GodSVG/blob/v1.0-alpha10/src/data_classes/ElementPath.gd#L117) I could reuse here:
|
||||||
|
- Download from the [GodSVG website](https://www.godsvg.com/)
|
||||||
|
- Or try out the [web version](https://www.godsvg.com/editor/)
|
||||||
|
- Also on [itch.io](https://mewpurpur.itch.io/godsvg)
|
||||||
|
|
||||||
|
|
||||||
|
## Many thanks to @HannesParth/Permotion
|
||||||
|
|
||||||
|
As an early adopter Hannes was quick to point out good quality of life improvements like snap to pixel, setting global position exactly and exporting as PNG.
|
||||||
|
|
||||||
|
Make sure to try out ["Spring Ball" on Itch](https://permotion.itch.io/spring-ball), a 48h game jam solo project that used ScalableVectorShape2D for all level objects, including a wrapper script to change the block that makes up the majority of the level between cube and triangle shapes:
|
||||||
|
|
||||||
|
[](https://permotion.itch.io/spring-ball)
|
||||||
|
|
||||||
|
|
||||||
|
## And of course everyone who helped test and review the code thus far
|
||||||
|
|
||||||
|
- @hedberg-games
|
||||||
|
- @thiagola92
|
||||||
|
- @HannesParth
|
||||||
|
|
||||||
|
|
||||||
|
# Reaching out / Contributing
|
||||||
|
If you have feedback on this project, feel free to post an [issue](https://github.com/Teaching-myself-Godot/ez-curved-lines-2d/issues) on github, or to:
|
||||||
|
- Follow my channel on youtube: [@scalablev2d](https://www.youtube.com/@scalablev2d)
|
||||||
|
|
||||||
|
If you'd like to improve on the code yourself, ideally use a fork and make a pull request.
|
||||||
|
|
||||||
|
This stuff makes me zero money, so you can always branch off in your own direction if you're in a hurry.
|
||||||
125
addons/curved_lines_2d/UniformRotate.svg
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
width="16"
|
||||||
|
height="16"
|
||||||
|
version="1.1"
|
||||||
|
id="svg1"
|
||||||
|
sodipodi:docname="UniformRotate.svg"
|
||||||
|
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
|
||||||
|
xml:space="preserve"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
||||||
|
id="defs1" /><sodipodi:namedview
|
||||||
|
id="namedview1"
|
||||||
|
pagecolor="#505050"
|
||||||
|
bordercolor="#ffffff"
|
||||||
|
borderopacity="1"
|
||||||
|
inkscape:showpageshadow="0"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pagecheckerboard="1"
|
||||||
|
inkscape:deskcolor="#505050"
|
||||||
|
inkscape:zoom="16"
|
||||||
|
inkscape:cx="32.0625"
|
||||||
|
inkscape:cy="7.90625"
|
||||||
|
inkscape:current-layer="svg1"
|
||||||
|
showguides="true"
|
||||||
|
showgrid="true"><inkscape:grid
|
||||||
|
id="grid1"
|
||||||
|
units="px"
|
||||||
|
originx="0"
|
||||||
|
originy="0"
|
||||||
|
spacingx="1"
|
||||||
|
spacingy="1"
|
||||||
|
empcolor="#0099e5"
|
||||||
|
empopacity="0.11764706"
|
||||||
|
color="#0099e5"
|
||||||
|
opacity="0.04705882"
|
||||||
|
empspacing="8"
|
||||||
|
dotted="false"
|
||||||
|
gridanglex="30"
|
||||||
|
gridanglez="30"
|
||||||
|
visible="true" /><sodipodi:guide
|
||||||
|
position="27,-3"
|
||||||
|
orientation="1,0"
|
||||||
|
id="guide16"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="16,21"
|
||||||
|
orientation="0,-1"
|
||||||
|
id="guide17"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="3.203125,4"
|
||||||
|
orientation="0.70710678,-0.70710678"
|
||||||
|
id="guide22"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="7.5130096,-1"
|
||||||
|
orientation="-0.70710678,-0.70710678"
|
||||||
|
id="guide23"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="12.164446,11.028155"
|
||||||
|
orientation="0.70710678,-0.70710678"
|
||||||
|
id="guide24"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="18.627844,7"
|
||||||
|
orientation="-0.70710678,-0.70710678"
|
||||||
|
id="guide25"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="16.263456,-1"
|
||||||
|
orientation="-0.70710678,-0.70710678"
|
||||||
|
id="guide26"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="9,18.585359"
|
||||||
|
orientation="0.70710678,-0.70710678"
|
||||||
|
id="guide27"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="18.406873,9"
|
||||||
|
orientation="0.70710678,-0.70710678"
|
||||||
|
id="guide28"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="8.1650382,8.9619132"
|
||||||
|
orientation="-0.70710678,-0.70710678"
|
||||||
|
id="guide29"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="-13.302446,-2.2300968"
|
||||||
|
orientation="-0.70710678,-0.70710678"
|
||||||
|
id="guide30"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="8.6841552,1.5"
|
||||||
|
orientation="0,-1"
|
||||||
|
id="guide34"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="8,4.4984662"
|
||||||
|
orientation="0,-1"
|
||||||
|
id="guide35"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="6.5088096,4.498462"
|
||||||
|
orientation="1,0"
|
||||||
|
id="guide36"
|
||||||
|
inkscape:locked="false" /></sodipodi:namedview><image
|
||||||
|
width="112.55357"
|
||||||
|
height="41.106522"
|
||||||
|
preserveAspectRatio="none"
|
||||||
|
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHMAAAAqCAYAAACAwmTZAAAABHNCSVQICAgIfAhkiAAABZxJREFU eJztnFtMFFcYx3+zO7O7MyyXFUSqxgICojEag9omJj710baaRmsT05r4YKgmvZjaxNikbUpbfUGj xKQvtIl9wfpi0tT0pYlJa/BWY7yyEW+AsCKLwM5eZnanDwsrtAsMMLt21/k9Hc45fN98+e/3zZxz dlZo2PC2gU1e4HjRF2BjHWK6TkkpzvZ12EyBpj4zNc/OzDwilZllpT76nwZf5LVMyVAwwPBgIGP2 naKE4vVR5CvPmI9MkxOZmWkhAeK6xvBggKFgZv1kkpwQUx3JXsXIpi+ryQkx47qWl76sJifEtDGH LWYeYYuZR9hi5hG2mHmELWYekXZvdjaUrJZZursMURSJ/yYhPnKh6zrRmIaqRqiuXEzjrm0kEgaH jrZy8coNq1wDIFa8hrzuIA6niOvhL0hhPwldI65H0CIhiitqWLOpEcMwaG9rorej3VL/6wtFPn/V hSiKtDGPu6I3q/EDCGNHYOO382az0d5wYgme8tHPxqAT+aeJNj7d+wG+kiIAunr62Lpzv2nb3feu Tzun8M0zOL2LAHDEBijsbJ4wvnbLPjyFJQAM9z/iTNPmSW0tqlpp+trGOL2ygIXuZKEbcEg0y9UT xucSv9mNdssyU3I+r9jRaIyrl67jcbtRFDfeAoVE4vmx6fi2VThEV6qtayo9t84humREdwEujxeM RGrcGNe2Ckl0Asm4wlGN8zeyGz+Ac+GS+i8BFEVGDUeSnZJnxoYqxHKkJRB9puE/8YTh7gjhSJSh 4RD9Twfxdz5k1YpahodDHDrSyuO+ftO2zezLFilujKIaEuEgavvX6M/uo0dVYuog4aEAwZ4OyqtW E1OHaG9rIjTQM7mtWWy2OypeocahEYzpfHcvzIOQZln8CS1qap5lZfb1tSvxKh7OX7pOSI3M+P+n wkyZXbh8I5LHS8+tc2iRkTn5m02ZzWT8WT/P1HUdAI/bnXZ8w+lqNpyuTjtmBYnRPVXRJaf65HUH cC3djCDOvNLMlMniX6E48IlC6u9SSaBeycwiwjKrkWgMAEVJL2am0bVkNojuglRffOAmyvovKHrr LHLDZziLKjPmP138KxQHx2plWpbJ+ESBeZKD47Uyx2rljAhq2QNQOJys694CxSqTM0KPhgCSDzuj aA/OYqz+GMFdiLtuO+667eiBy0T9p9C6/oCEbpn/dPE/jhn06QZVHicty5IVo9Lj5K6aoDdm/UOQ ZWJWVy7mkw93EI/H+erQD1y6ejNtWR3f9+c7nVa5p7iihrVb9mEkdP76+SC9/osYeoTYg19x121P zRPLG8DpAYcT7f5Zy/yniz+oG+y5E6ZlmUyVxwnAXTXBXr/KoJ6BJ3qrDDXu2oavpIiyUh/7P9pp lVnTrNnUiKewBLm4jPVbD6T6Y/5TE+ZFb59k5Pf3LRUSJo9fEIQJ8wQhc99stSwzDcP4T3t85o1l pJXZOKl/nrfjQ/fRA5cRyxuI3j6Ju34HCfUJ0TsnM+d/tF0qCRyv9aRKqyAYVMtOWuoU9naoBC3O Tssy8/sjrXT3BOjuCXD46I9WmTVNe1sTI/1djPR3caHt2wljUf8p9Kc3CP/dTPhKM87S5Zb7Txf/ fEmgTBJSpXVPR5jOcIJySWC+S5ja4CywbJ05HXPJTDPrzClxiEhL3jBdWmezzpyMesVBb8xI3SN9 YlLIDtX8LlTWt/OmI1Pl1RQJ3fJ7pFlu/0u0oG5YXl7HsI/A8ghbzDzCFjOPsMXMI3JCTLenYPpJ NrkhpjL6DYFsUFiSuy8OZW1pMhcUrw9d04hFQkQjoYz4yIe3wFJi/p9f54PZnf6/bOREmbUxR9oy u+bdw9m+DpspuNC629Q8OzPzCGHje9+89D8ds2BB8n7c15e7b02DnZl5hVC2oPKlz8xVq5JHXteu zfGo7QXzD6Z4VdneT2rMAAAAAElFTkSuQmCC "
|
||||||
|
id="image1"
|
||||||
|
x="-51.276787"
|
||||||
|
y="-47.194725" /><path
|
||||||
|
id="path33"
|
||||||
|
style="fill:#ffffff;fill-rule:evenodd;stroke-width:0.324;stroke-miterlimit:80;paint-order:markers fill stroke"
|
||||||
|
inkscape:transform-center-x="0.70466783"
|
||||||
|
inkscape:transform-center-y="-0.022781469"
|
||||||
|
d="M 6.5130096,16 0,12 6.5088096,8 v 3 L 8,11.004243 V 13 H 6.5088096 Z"
|
||||||
|
sodipodi:nodetypes="cccccccc" /><path
|
||||||
|
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:2;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
|
||||||
|
id="path34"
|
||||||
|
sodipodi:type="arc"
|
||||||
|
sodipodi:cx="8"
|
||||||
|
sodipodi:cy="6.5254016"
|
||||||
|
sodipodi:rx="5.4745984"
|
||||||
|
sodipodi:ry="5.4745984"
|
||||||
|
sodipodi:start="3.1415927"
|
||||||
|
sodipodi:end="1.5707963"
|
||||||
|
sodipodi:arc-type="arc"
|
||||||
|
d="M 2.5254016,6.5254016 A 5.4745984,5.4745984 0 0 1 8,1.0508032 5.4745984,5.4745984 0 0 1 13.474598,6.5254016 5.4745984,5.4745984 0 0 1 8,12"
|
||||||
|
sodipodi:open="true" /></svg>
|
||||||
|
After Width: | Height: | Size: 6.4 KiB |
43
addons/curved_lines_2d/UniformRotate.svg.import
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://d1uok4qb3xets"
|
||||||
|
path="res://.godot/imported/UniformRotate.svg-10dc5b9eaf58dd371cbfddfaf791ebda.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://addons/curved_lines_2d/UniformRotate.svg"
|
||||||
|
dest_files=["res://.godot/imported/UniformRotate.svg-10dc5b9eaf58dd371cbfddfaf791ebda.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
svg/scale=1.0
|
||||||
|
editor/scale_with_editor_scale=false
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
||||||
139
addons/curved_lines_2d/UniformScale.svg
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
width="16"
|
||||||
|
height="16"
|
||||||
|
version="1.1"
|
||||||
|
id="svg1"
|
||||||
|
sodipodi:docname="UniformScale.svg"
|
||||||
|
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
|
||||||
|
xml:space="preserve"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
||||||
|
id="defs1" /><sodipodi:namedview
|
||||||
|
id="namedview1"
|
||||||
|
pagecolor="#505050"
|
||||||
|
bordercolor="#ffffff"
|
||||||
|
borderopacity="1"
|
||||||
|
inkscape:showpageshadow="0"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pagecheckerboard="1"
|
||||||
|
inkscape:deskcolor="#505050"
|
||||||
|
inkscape:zoom="11.313709"
|
||||||
|
inkscape:cx="4.9497475"
|
||||||
|
inkscape:cy="-0.92807765"
|
||||||
|
inkscape:current-layer="svg1"
|
||||||
|
showguides="true"
|
||||||
|
showgrid="true"><inkscape:grid
|
||||||
|
id="grid1"
|
||||||
|
units="px"
|
||||||
|
originx="0"
|
||||||
|
originy="0"
|
||||||
|
spacingx="1"
|
||||||
|
spacingy="1"
|
||||||
|
empcolor="#0099e5"
|
||||||
|
empopacity="0.11764706"
|
||||||
|
color="#0099e5"
|
||||||
|
opacity="0.04705882"
|
||||||
|
empspacing="8"
|
||||||
|
dotted="false"
|
||||||
|
gridanglex="30"
|
||||||
|
gridanglez="30"
|
||||||
|
visible="true" /><sodipodi:guide
|
||||||
|
position="27,-3"
|
||||||
|
orientation="1,0"
|
||||||
|
id="guide16"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="16,21"
|
||||||
|
orientation="0,-1"
|
||||||
|
id="guide17"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="3.203125,4"
|
||||||
|
orientation="0.70710678,-0.70710678"
|
||||||
|
id="guide22"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="7.5130096,-1"
|
||||||
|
orientation="-0.70710678,-0.70710678"
|
||||||
|
id="guide23"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="12.164446,11.028155"
|
||||||
|
orientation="0.70710678,-0.70710678"
|
||||||
|
id="guide24"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="18.627844,7"
|
||||||
|
orientation="-0.70710678,-0.70710678"
|
||||||
|
id="guide25"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="16.263456,-1"
|
||||||
|
orientation="-0.70710678,-0.70710678"
|
||||||
|
id="guide26"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="9,18.585359"
|
||||||
|
orientation="0.70710678,-0.70710678"
|
||||||
|
id="guide27"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="18.406873,9"
|
||||||
|
orientation="0.70710678,-0.70710678"
|
||||||
|
id="guide28"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="8.1650382,8.9619132"
|
||||||
|
orientation="-0.70710678,-0.70710678"
|
||||||
|
id="guide29"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="-13.302446,-2.2300968"
|
||||||
|
orientation="-0.70710678,-0.70710678"
|
||||||
|
id="guide30"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="8.6841552,1.5"
|
||||||
|
orientation="0,-1"
|
||||||
|
id="guide34"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="8,4.4984662"
|
||||||
|
orientation="0,-1"
|
||||||
|
id="guide35"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="6.5088096,4.498462"
|
||||||
|
orientation="1,0"
|
||||||
|
id="guide36"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="8,16"
|
||||||
|
orientation="1,0"
|
||||||
|
id="guide1"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="16,8"
|
||||||
|
orientation="0,-1"
|
||||||
|
id="guide2"
|
||||||
|
inkscape:locked="false" /></sodipodi:namedview><image
|
||||||
|
width="112.55357"
|
||||||
|
height="41.106522"
|
||||||
|
preserveAspectRatio="none"
|
||||||
|
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHMAAAAqCAYAAACAwmTZAAAABHNCSVQICAgIfAhkiAAABZxJREFU eJztnFtMFFcYx3+zO7O7MyyXFUSqxgICojEag9omJj710baaRmsT05r4YKgmvZjaxNikbUpbfUGj xKQvtIl9wfpi0tT0pYlJa/BWY7yyEW+AsCKLwM5eZnanDwsrtAsMMLt21/k9Hc45fN98+e/3zZxz dlZo2PC2gU1e4HjRF2BjHWK6TkkpzvZ12EyBpj4zNc/OzDwilZllpT76nwZf5LVMyVAwwPBgIGP2 naKE4vVR5CvPmI9MkxOZmWkhAeK6xvBggKFgZv1kkpwQUx3JXsXIpi+ryQkx47qWl76sJifEtDGH LWYeYYuZR9hi5hG2mHmELWYekXZvdjaUrJZZursMURSJ/yYhPnKh6zrRmIaqRqiuXEzjrm0kEgaH jrZy8coNq1wDIFa8hrzuIA6niOvhL0hhPwldI65H0CIhiitqWLOpEcMwaG9rorej3VL/6wtFPn/V hSiKtDGPu6I3q/EDCGNHYOO382az0d5wYgme8tHPxqAT+aeJNj7d+wG+kiIAunr62Lpzv2nb3feu Tzun8M0zOL2LAHDEBijsbJ4wvnbLPjyFJQAM9z/iTNPmSW0tqlpp+trGOL2ygIXuZKEbcEg0y9UT xucSv9mNdssyU3I+r9jRaIyrl67jcbtRFDfeAoVE4vmx6fi2VThEV6qtayo9t84humREdwEujxeM RGrcGNe2Ckl0Asm4wlGN8zeyGz+Ac+GS+i8BFEVGDUeSnZJnxoYqxHKkJRB9puE/8YTh7gjhSJSh 4RD9Twfxdz5k1YpahodDHDrSyuO+ftO2zezLFilujKIaEuEgavvX6M/uo0dVYuog4aEAwZ4OyqtW E1OHaG9rIjTQM7mtWWy2OypeocahEYzpfHcvzIOQZln8CS1qap5lZfb1tSvxKh7OX7pOSI3M+P+n wkyZXbh8I5LHS8+tc2iRkTn5m02ZzWT8WT/P1HUdAI/bnXZ8w+lqNpyuTjtmBYnRPVXRJaf65HUH cC3djCDOvNLMlMniX6E48IlC6u9SSaBeycwiwjKrkWgMAEVJL2am0bVkNojuglRffOAmyvovKHrr LHLDZziLKjPmP138KxQHx2plWpbJ+ESBeZKD47Uyx2rljAhq2QNQOJys694CxSqTM0KPhgCSDzuj aA/OYqz+GMFdiLtuO+667eiBy0T9p9C6/oCEbpn/dPE/jhn06QZVHicty5IVo9Lj5K6aoDdm/UOQ ZWJWVy7mkw93EI/H+erQD1y6ejNtWR3f9+c7nVa5p7iihrVb9mEkdP76+SC9/osYeoTYg19x121P zRPLG8DpAYcT7f5Zy/yniz+oG+y5E6ZlmUyVxwnAXTXBXr/KoJ6BJ3qrDDXu2oavpIiyUh/7P9pp lVnTrNnUiKewBLm4jPVbD6T6Y/5TE+ZFb59k5Pf3LRUSJo9fEIQJ8wQhc99stSwzDcP4T3t85o1l pJXZOKl/nrfjQ/fRA5cRyxuI3j6Ju34HCfUJ0TsnM+d/tF0qCRyv9aRKqyAYVMtOWuoU9naoBC3O Tssy8/sjrXT3BOjuCXD46I9WmTVNe1sTI/1djPR3caHt2wljUf8p9Kc3CP/dTPhKM87S5Zb7Txf/ fEmgTBJSpXVPR5jOcIJySWC+S5ja4CywbJ05HXPJTDPrzClxiEhL3jBdWmezzpyMesVBb8xI3SN9 YlLIDtX8LlTWt/OmI1Pl1RQJ3fJ7pFlu/0u0oG5YXl7HsI/A8ghbzDzCFjOPsMXMI3JCTLenYPpJ NrkhpjL6DYFsUFiSuy8OZW1pMhcUrw9d04hFQkQjoYz4yIe3wFJi/p9f54PZnf6/bOREmbUxR9oy u+bdw9m+DpspuNC629Q8OzPzCGHje9+89D8ds2BB8n7c15e7b02DnZl5hVC2oPKlz8xVq5JHXteu zfGo7QXzD6Z4VdneT2rMAAAAAElFTkSuQmCC "
|
||||||
|
id="image1"
|
||||||
|
x="-51.276787"
|
||||||
|
y="-47.194725" /><path
|
||||||
|
id="path33"
|
||||||
|
style="fill:#ffffff;fill-rule:evenodd;stroke-width:0.324;stroke-miterlimit:80;paint-order:markers fill stroke"
|
||||||
|
inkscape:transform-center-x="-0.3540817"
|
||||||
|
inkscape:transform-center-y="0.42398801"
|
||||||
|
d="M 16,8 8,0 h 8 z"
|
||||||
|
sodipodi:nodetypes="cccc" /><path
|
||||||
|
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:2;stroke-miterlimit:80;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
|
||||||
|
id="path34"
|
||||||
|
sodipodi:type="arc"
|
||||||
|
sodipodi:cx="24.525402"
|
||||||
|
sodipodi:cy="8"
|
||||||
|
sodipodi:rx="5.4745984"
|
||||||
|
sodipodi:ry="5.4745984"
|
||||||
|
sodipodi:start="3.1415927"
|
||||||
|
sodipodi:end="1.5707963"
|
||||||
|
sodipodi:arc-type="arc"
|
||||||
|
d="M 19.050804,8 A 5.4745984,5.4745984 0 0 1 24.525402,2.5254016 5.4745984,5.4745984 0 0 1 30,8 5.4745984,5.4745984 0 0 1 24.525402,13.474598"
|
||||||
|
sodipodi:open="true" /><path
|
||||||
|
id="path2"
|
||||||
|
style="fill:#ffffff;fill-rule:evenodd;stroke-width:0.324;stroke-miterlimit:80;paint-order:markers fill stroke"
|
||||||
|
inkscape:transform-center-x="0.3540817"
|
||||||
|
inkscape:transform-center-y="-0.42398799"
|
||||||
|
d="m 0,8 8,8 H 0 Z"
|
||||||
|
sodipodi:nodetypes="cccc" /></svg>
|
||||||
|
After Width: | Height: | Size: 6.8 KiB |
43
addons/curved_lines_2d/UniformScale.svg.import
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://do5uut1a4xvqf"
|
||||||
|
path="res://.godot/imported/UniformScale.svg-24a4eaf51d0b7050b6af3cdf16383613.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://addons/curved_lines_2d/UniformScale.svg"
|
||||||
|
dest_files=["res://.godot/imported/UniformScale.svg-24a4eaf51d0b7050b6af3cdf16383613.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
svg/scale=1.0
|
||||||
|
editor/scale_with_editor_scale=false
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
||||||
101
addons/curved_lines_2d/UniformTranslate.svg
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
width="16"
|
||||||
|
height="16"
|
||||||
|
version="1.1"
|
||||||
|
id="svg1"
|
||||||
|
sodipodi:docname="UniformTranslate.svg"
|
||||||
|
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
|
||||||
|
xml:space="preserve"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
||||||
|
id="defs1" /><sodipodi:namedview
|
||||||
|
id="namedview1"
|
||||||
|
pagecolor="#505050"
|
||||||
|
bordercolor="#ffffff"
|
||||||
|
borderopacity="1"
|
||||||
|
inkscape:showpageshadow="0"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pagecheckerboard="1"
|
||||||
|
inkscape:deskcolor="#505050"
|
||||||
|
inkscape:zoom="16"
|
||||||
|
inkscape:cx="29.25"
|
||||||
|
inkscape:cy="4.28125"
|
||||||
|
inkscape:current-layer="svg1"
|
||||||
|
showguides="true"
|
||||||
|
showgrid="true"><inkscape:grid
|
||||||
|
id="grid1"
|
||||||
|
units="px"
|
||||||
|
originx="0"
|
||||||
|
originy="0"
|
||||||
|
spacingx="1"
|
||||||
|
spacingy="1"
|
||||||
|
empcolor="#0099e5"
|
||||||
|
empopacity="0.11764706"
|
||||||
|
color="#0099e5"
|
||||||
|
opacity="0.04705882"
|
||||||
|
empspacing="8"
|
||||||
|
dotted="false"
|
||||||
|
gridanglex="30"
|
||||||
|
gridanglez="30"
|
||||||
|
visible="true" /><sodipodi:guide
|
||||||
|
position="27,-3"
|
||||||
|
orientation="1,0"
|
||||||
|
id="guide16"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="16,21"
|
||||||
|
orientation="0,-1"
|
||||||
|
id="guide17"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="3.203125,4"
|
||||||
|
orientation="0.70710678,-0.70710678"
|
||||||
|
id="guide22"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="7.5130096,-1"
|
||||||
|
orientation="-0.70710678,-0.70710678"
|
||||||
|
id="guide23"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="12.164446,11.028155"
|
||||||
|
orientation="0.70710678,-0.70710678"
|
||||||
|
id="guide24"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="18.627844,7"
|
||||||
|
orientation="-0.70710678,-0.70710678"
|
||||||
|
id="guide25"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="16.263456,-1"
|
||||||
|
orientation="-0.70710678,-0.70710678"
|
||||||
|
id="guide26"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="9,18.585359"
|
||||||
|
orientation="0.70710678,-0.70710678"
|
||||||
|
id="guide27"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="18.406873,9"
|
||||||
|
orientation="0.70710678,-0.70710678"
|
||||||
|
id="guide28"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="8.1650382,8.9619132"
|
||||||
|
orientation="-0.70710678,-0.70710678"
|
||||||
|
id="guide29"
|
||||||
|
inkscape:locked="false" /><sodipodi:guide
|
||||||
|
position="-13.302446,-2.2300968"
|
||||||
|
orientation="-0.70710678,-0.70710678"
|
||||||
|
id="guide30"
|
||||||
|
inkscape:locked="false" /></sodipodi:namedview><image
|
||||||
|
width="112.55357"
|
||||||
|
height="41.106522"
|
||||||
|
preserveAspectRatio="none"
|
||||||
|
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHMAAAAqCAYAAACAwmTZAAAABHNCSVQICAgIfAhkiAAABZxJREFU eJztnFtMFFcYx3+zO7O7MyyXFUSqxgICojEag9omJj710baaRmsT05r4YKgmvZjaxNikbUpbfUGj xKQvtIl9wfpi0tT0pYlJa/BWY7yyEW+AsCKLwM5eZnanDwsrtAsMMLt21/k9Hc45fN98+e/3zZxz dlZo2PC2gU1e4HjRF2BjHWK6TkkpzvZ12EyBpj4zNc/OzDwilZllpT76nwZf5LVMyVAwwPBgIGP2 naKE4vVR5CvPmI9MkxOZmWkhAeK6xvBggKFgZv1kkpwQUx3JXsXIpi+ryQkx47qWl76sJifEtDGH LWYeYYuZR9hi5hG2mHmELWYekXZvdjaUrJZZursMURSJ/yYhPnKh6zrRmIaqRqiuXEzjrm0kEgaH jrZy8coNq1wDIFa8hrzuIA6niOvhL0hhPwldI65H0CIhiitqWLOpEcMwaG9rorej3VL/6wtFPn/V hSiKtDGPu6I3q/EDCGNHYOO382az0d5wYgme8tHPxqAT+aeJNj7d+wG+kiIAunr62Lpzv2nb3feu Tzun8M0zOL2LAHDEBijsbJ4wvnbLPjyFJQAM9z/iTNPmSW0tqlpp+trGOL2ygIXuZKEbcEg0y9UT xucSv9mNdssyU3I+r9jRaIyrl67jcbtRFDfeAoVE4vmx6fi2VThEV6qtayo9t84humREdwEujxeM RGrcGNe2Ckl0Asm4wlGN8zeyGz+Ac+GS+i8BFEVGDUeSnZJnxoYqxHKkJRB9puE/8YTh7gjhSJSh 4RD9Twfxdz5k1YpahodDHDrSyuO+ftO2zezLFilujKIaEuEgavvX6M/uo0dVYuog4aEAwZ4OyqtW E1OHaG9rIjTQM7mtWWy2OypeocahEYzpfHcvzIOQZln8CS1qap5lZfb1tSvxKh7OX7pOSI3M+P+n wkyZXbh8I5LHS8+tc2iRkTn5m02ZzWT8WT/P1HUdAI/bnXZ8w+lqNpyuTjtmBYnRPVXRJaf65HUH cC3djCDOvNLMlMniX6E48IlC6u9SSaBeycwiwjKrkWgMAEVJL2am0bVkNojuglRffOAmyvovKHrr LHLDZziLKjPmP138KxQHx2plWpbJ+ESBeZKD47Uyx2rljAhq2QNQOJys694CxSqTM0KPhgCSDzuj aA/OYqz+GMFdiLtuO+667eiBy0T9p9C6/oCEbpn/dPE/jhn06QZVHicty5IVo9Lj5K6aoDdm/UOQ ZWJWVy7mkw93EI/H+erQD1y6ejNtWR3f9+c7nVa5p7iihrVb9mEkdP76+SC9/osYeoTYg19x121P zRPLG8DpAYcT7f5Zy/yniz+oG+y5E6ZlmUyVxwnAXTXBXr/KoJ6BJ3qrDDXu2oavpIiyUh/7P9pp lVnTrNnUiKewBLm4jPVbD6T6Y/5TE+ZFb59k5Pf3LRUSJo9fEIQJ8wQhc99stSwzDcP4T3t85o1l pJXZOKl/nrfjQ/fRA5cRyxuI3j6Ju34HCfUJ0TsnM+d/tF0qCRyv9aRKqyAYVMtOWuoU9naoBC3O Tssy8/sjrXT3BOjuCXD46I9WmTVNe1sTI/1djPR3caHt2wljUf8p9Kc3CP/dTPhKM87S5Zb7Txf/ fEmgTBJSpXVPR5jOcIJySWC+S5ja4CywbJ05HXPJTDPrzClxiEhL3jBdWmezzpyMesVBb8xI3SN9 YlLIDtX8LlTWt/OmI1Pl1RQJ3fJ7pFlu/0u0oG5YXl7HsI/A8ghbzDzCFjOPsMXMI3JCTLenYPpJ NrkhpjL6DYFsUFiSuy8OZW1pMhcUrw9d04hFQkQjoYz4yIe3wFJi/p9f54PZnf6/bOREmbUxR9oy u+bdw9m+DpspuNC629Q8OzPzCGHje9+89D8ds2BB8n7c15e7b02DnZl5hVC2oPKlz8xVq5JHXteu zfGo7QXzD6Z4VdneT2rMAAAAAElFTkSuQmCC "
|
||||||
|
id="image1"
|
||||||
|
x="-51.276787"
|
||||||
|
y="-47.194725" /><path
|
||||||
|
id="path13"
|
||||||
|
style="fill:#e8e8e8;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:11.1444;stroke-miterlimit:80;stroke-opacity:0.818878;paint-order:stroke markers fill"
|
||||||
|
inkscape:transform-center-x="-0.077466739"
|
||||||
|
inkscape:transform-center-y="-0.05524539"
|
||||||
|
d="M 16,0 10.290677,0.6574568 12.415485,2.7876405 8.1650382,7.0380868 3.7707962,2.6438448 5.6892806,0.7191955 0,0 0.620858,5.8854228 2.8390485,3.5755925 7.2332905,7.9698345 2.8580673,12.345058 0.7919206,10.287331 0,16 5.9251744,15.412165 3.8246503,13.311641 8.1998735,8.9364175 12.335165,13.071709 10,15.406873 15.98014,15.911548 15.24232,10.164553 13.266913,12.139962 9.0908171,8 13.382068,3.7542235 15.405312,5.7774677 Z"
|
||||||
|
sodipodi:nodetypes="ccccccccccccccccccccccccc" /></svg>
|
||||||
|
After Width: | Height: | Size: 5.8 KiB |
43
addons/curved_lines_2d/UniformTranslate.svg.import
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://chojkn0i6ngam"
|
||||||
|
path="res://.godot/imported/UniformTranslate.svg-8157aa4196071516483ecc9cee08cb21.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://addons/curved_lines_2d/UniformTranslate.svg"
|
||||||
|
dest_files=["res://.godot/imported/UniformTranslate.svg-8157aa4196071516483ecc9cee08cb21.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
svg/scale=1.0
|
||||||
|
editor/scale_with_editor_scale=false
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
||||||
114
addons/curved_lines_2d/adaptable_vector_shape_3d.gd
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
@tool
|
||||||
|
extends Node3D
|
||||||
|
|
||||||
|
class_name AdaptableVectorShape3D
|
||||||
|
|
||||||
|
const STORED_CURVE_META_NAME := "_stored_curve_data_"
|
||||||
|
const STORED_ARC_LIST_META_NAME := "_stored_arc_list_data_"
|
||||||
|
const STORED_SHAPE_TYPE_META_NAME := "_stored_shape_type_"
|
||||||
|
const STORED_SIZE_META_NAME := "_stored_shape_size_"
|
||||||
|
const STORED_RX_META_NAME := "_stored_shape_rx_"
|
||||||
|
const STORED_RY_META_NAME := "_stored_shape_ry_"
|
||||||
|
const STORED_OFFSET_META_NAME := "_stored_shape_offset_"
|
||||||
|
const STORED_STROKE_WIDTH_META_NAME := "_stored_stroke_width_"
|
||||||
|
const STORED_JOINT_MODE_META_NAME := "_stored_joint_mode_"
|
||||||
|
const STORED_LINE_CAP_META_NAME := "_stored_line_cap_"
|
||||||
|
|
||||||
|
@export var guide_svs : ScalableVectorShape2D:
|
||||||
|
set(svs):
|
||||||
|
if is_instance_valid(guide_svs) and guide_svs != svs:
|
||||||
|
if guide_svs.polygons_updated.is_connected(_on_guide_svs_polygons_updated):
|
||||||
|
guide_svs.polygons_updated.disconnect(_on_guide_svs_polygons_updated)
|
||||||
|
guide_svs = svs
|
||||||
|
if is_instance_valid(guide_svs):
|
||||||
|
_on_guide_svs_assigned()
|
||||||
|
|
||||||
|
|
||||||
|
@export var fill_polygons : Array[CSGPolygon3D] = []
|
||||||
|
@export var stroke_polygons : Array[CSGPolygon3D] = []
|
||||||
|
|
||||||
|
var _update_locked := false
|
||||||
|
|
||||||
|
func _on_guide_svs_assigned():
|
||||||
|
guide_svs.update_curve_at_runtime = true
|
||||||
|
guide_svs.polygons_updated.connect(_on_guide_svs_polygons_updated)
|
||||||
|
guide_svs.curve_changed()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_guide_svs_polygons_updated(polygons : Array[PackedVector2Array],
|
||||||
|
poly_strokes : Array[PackedVector2Array], _svs : ScalableVectorShape2D):
|
||||||
|
|
||||||
|
if _update_locked:
|
||||||
|
return
|
||||||
|
_update_locked = true
|
||||||
|
for p in fill_polygons + stroke_polygons:
|
||||||
|
p.hide()
|
||||||
|
|
||||||
|
for i in polygons.size():
|
||||||
|
if i < fill_polygons.size():
|
||||||
|
fill_polygons[i].show()
|
||||||
|
fill_polygons[i].polygon = polygons[i]
|
||||||
|
else:
|
||||||
|
var extra_fp := fill_polygons[i - 1].duplicate()
|
||||||
|
extra_fp.polygon = polygons[i]
|
||||||
|
fill_polygons.append(extra_fp)
|
||||||
|
add_child(extra_fp, true)
|
||||||
|
extra_fp.owner = owner
|
||||||
|
|
||||||
|
for i in poly_strokes.size():
|
||||||
|
if i < stroke_polygons.size():
|
||||||
|
stroke_polygons[i].show()
|
||||||
|
stroke_polygons[i].polygon = poly_strokes[i]
|
||||||
|
else:
|
||||||
|
var extra_sp := stroke_polygons[i - 1].duplicate()
|
||||||
|
extra_sp.polygon = poly_strokes[i]
|
||||||
|
stroke_polygons.append(extra_sp)
|
||||||
|
add_child(extra_sp, true)
|
||||||
|
extra_sp.owner = owner
|
||||||
|
_update_locked = false
|
||||||
|
|
||||||
|
static func is_stroke_in_front_of_fill(svs : ScalableVectorShape2D) -> bool:
|
||||||
|
var stroke_node : Node2D = (svs.line if is_instance_valid(svs.line) else svs.poly_stroke)
|
||||||
|
if not is_instance_valid(stroke_node):
|
||||||
|
return false
|
||||||
|
if not is_instance_valid(svs.polygon):
|
||||||
|
return true
|
||||||
|
var fill_found := false
|
||||||
|
for ch in svs.get_children():
|
||||||
|
if ch == svs.polygon:
|
||||||
|
fill_found = true
|
||||||
|
if ch == stroke_node and fill_found:
|
||||||
|
return true
|
||||||
|
|
||||||
|
return false
|
||||||
|
|
||||||
|
|
||||||
|
static func extract_csg_polygons_from_scalable_vector_shapes(svs : ScalableVectorShape2D,
|
||||||
|
is_strokes := false, is_line_2d_strokes := false, z_index := 0.0) -> Array[CSGPolygon3D]:
|
||||||
|
var result : Array[CSGPolygon3D] = []
|
||||||
|
var polygons = (
|
||||||
|
svs.cached_poly_strokes
|
||||||
|
if is_strokes else
|
||||||
|
([svs.cached_outline] if svs.clip_paths.is_empty() else svs.cached_clipped_polygons)
|
||||||
|
)
|
||||||
|
for poly : PackedVector2Array in polygons:
|
||||||
|
var csg_polygon := CSGPolygon3D.new()
|
||||||
|
csg_polygon.depth = 0.01
|
||||||
|
csg_polygon.position.z = 0.01 * z_index
|
||||||
|
csg_polygon.polygon = poly
|
||||||
|
csg_polygon.material = StandardMaterial3D.new()
|
||||||
|
csg_polygon.material.shading_mode = BaseMaterial3D.SHADING_MODE_PER_PIXEL
|
||||||
|
csg_polygon.material.transparency = BaseMaterial3D.TRANSPARENCY_DISABLED
|
||||||
|
if is_strokes:
|
||||||
|
csg_polygon.material.albedo_color = svs.stroke_color
|
||||||
|
if is_line_2d_strokes:
|
||||||
|
csg_polygon.name = svs.line.name
|
||||||
|
else:
|
||||||
|
csg_polygon.name = svs.poly_stroke.name
|
||||||
|
csg_polygon.material.albedo_texture = svs.poly_stroke.texture
|
||||||
|
else:
|
||||||
|
csg_polygon.name = svs.polygon.name
|
||||||
|
csg_polygon.material.albedo_color = svs.polygon.color
|
||||||
|
csg_polygon.material.albedo_texture = svs.polygon.texture
|
||||||
|
result.append(csg_polygon)
|
||||||
|
return result
|
||||||
1
addons/curved_lines_2d/adaptable_vector_shape_3d.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://cx1no66jo1sdd
|
||||||
118
addons/curved_lines_2d/advanced_tab.gd
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
@tool
|
||||||
|
extends Control
|
||||||
|
|
||||||
|
var _init_hint_label_text := ""
|
||||||
|
var _selected_animation_player : AnimationPlayer
|
||||||
|
var fps_number_input : EditorSpinSlider
|
||||||
|
|
||||||
|
func _enter_tree() -> void:
|
||||||
|
_init_hint_label_text = $%HintLabel.text
|
||||||
|
fps_number_input = _make_number_input("FPS", 60.0, 5.0, 120.0, "fps", 1.0)
|
||||||
|
%FpsInputContainer.add_child(fps_number_input)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_export_as_png_button_pressed() -> void:
|
||||||
|
var selected_node := EditorInterface.get_selection().get_selected_nodes().pop_back()
|
||||||
|
Line2DGeneratorInspectorPlugin._on_export_png_button_pressed(selected_node)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_export_as_baked_scene_button_pressed() -> void:
|
||||||
|
var selected_node := EditorInterface.get_selection().get_selected_nodes().pop_back()
|
||||||
|
Line2DGeneratorInspectorPlugin._show_exported_scene_dialog(
|
||||||
|
selected_node, Line2DGeneratorInspectorPlugin._export_baked_scene
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_export_as_3d_scene_button_pressed() -> void:
|
||||||
|
var selected_node := EditorInterface.get_selection().get_selected_nodes().pop_back()
|
||||||
|
Line2DGeneratorInspectorPlugin._show_exported_scene_dialog(
|
||||||
|
selected_node, Line2DGeneratorInspectorPlugin._export_3d_scene
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
func set_animation_player(animation_player : AnimationPlayer) -> void:
|
||||||
|
if not animation_player is AnimationPlayer:
|
||||||
|
%HintLabel.text = _init_hint_label_text
|
||||||
|
%HintLabel.show()
|
||||||
|
%SelectAnimationOptionButton.hide()
|
||||||
|
%CreateSpriteSheetButton.hide()
|
||||||
|
%FpsInputContainer.hide()
|
||||||
|
%ExportAsSpritesheetCheckButton.hide()
|
||||||
|
%StatusLabel.hide()
|
||||||
|
return
|
||||||
|
|
||||||
|
_selected_animation_player = animation_player
|
||||||
|
%HintLabel.hide()
|
||||||
|
%StatusLabel.text = ""
|
||||||
|
%SelectAnimationOptionButton.clear()
|
||||||
|
%SelectAnimationOptionButton.add_item(" - select animation -")
|
||||||
|
%SelectAnimationOptionButton.select(0)
|
||||||
|
%SelectAnimationOptionButton.set_item_disabled(0, true)
|
||||||
|
for anim_name in animation_player.get_animation_list():
|
||||||
|
if anim_name == "RESET":
|
||||||
|
continue
|
||||||
|
%SelectAnimationOptionButton.add_item(anim_name)
|
||||||
|
%SelectAnimationOptionButton.show()
|
||||||
|
%CreateSpriteSheetButton.show()
|
||||||
|
%FpsInputContainer.show()
|
||||||
|
%ExportAsSpritesheetCheckButton.show()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_create_sprite_sheet_button_pressed() -> void:
|
||||||
|
if not _selected_animation_player is AnimationPlayer:
|
||||||
|
return
|
||||||
|
var dialog := EditorFileDialog.new()
|
||||||
|
var anim_name : String = %SelectAnimationOptionButton.get_item_text(%SelectAnimationOptionButton.get_selected_id())
|
||||||
|
dialog.add_filter("*.png", "PNG")
|
||||||
|
dialog.current_file = ("%s_%s" % [
|
||||||
|
EditorInterface.get_edited_scene_root().name,
|
||||||
|
anim_name
|
||||||
|
]).to_snake_case()
|
||||||
|
|
||||||
|
dialog.file_mode = EditorFileDialog.FILE_MODE_SAVE_FILE
|
||||||
|
dialog.file_selected.connect(func(path): _on_animation_file_name_chosen(path, anim_name, dialog))
|
||||||
|
EditorInterface.get_base_control().add_child(dialog)
|
||||||
|
dialog.popup_centered(Vector2i(800, 400))
|
||||||
|
|
||||||
|
|
||||||
|
func _on_animation_file_name_chosen(file_path : String, anim_name : String, dialog : EditorFileDialog):
|
||||||
|
dialog.queue_free()
|
||||||
|
var fps := fps_number_input.value
|
||||||
|
%StatusLabel.show()
|
||||||
|
%CreateSpriteSheetButton.disabled = true
|
||||||
|
%CreateSpriteSheetButton.text = "Creating..."
|
||||||
|
|
||||||
|
var sprite_frames := await SVSSceneExporter.export_sprite_frames(
|
||||||
|
EditorInterface.get_edited_scene_root(), _selected_animation_player, anim_name, fps,
|
||||||
|
EditorInterface.get_base_control(), func(status_msg : String): %StatusLabel.text = status_msg
|
||||||
|
)
|
||||||
|
|
||||||
|
if %ExportAsSpritesheetCheckButton.button_pressed:
|
||||||
|
var im : Image = Image.create_empty(
|
||||||
|
sprite_frames[0].get_size().x * sprite_frames.size(),
|
||||||
|
sprite_frames[0].get_size().y, false, sprite_frames[0].get_format())
|
||||||
|
for idx in sprite_frames.size():
|
||||||
|
im.blit_rect(sprite_frames[idx],
|
||||||
|
Rect2i(Vector2i.ZERO, sprite_frames[idx].get_size()),
|
||||||
|
Vector2i(sprite_frames[0].get_size().x * idx, 0)
|
||||||
|
)
|
||||||
|
im.save_png(file_path)
|
||||||
|
else:
|
||||||
|
for idx in sprite_frames.size():
|
||||||
|
sprite_frames[idx].save_png(file_path.replacen(".png", "_%d.png" % idx))
|
||||||
|
|
||||||
|
%StatusLabel.text = "Exported %d frames" % sprite_frames.size()
|
||||||
|
%CreateSpriteSheetButton.disabled = false
|
||||||
|
%CreateSpriteSheetButton.text = "Create"
|
||||||
|
EditorInterface.get_resource_filesystem().scan()
|
||||||
|
|
||||||
|
|
||||||
|
func _make_number_input(lbl : String, value : float, min_value : float, max_value : float, suffix : String, step := 1.0) -> EditorSpinSlider:
|
||||||
|
var x_slider := EditorSpinSlider.new()
|
||||||
|
x_slider.value = value
|
||||||
|
x_slider.min_value = min_value
|
||||||
|
x_slider.max_value = max_value
|
||||||
|
x_slider.suffix = suffix
|
||||||
|
x_slider.label = lbl
|
||||||
|
x_slider.step = step
|
||||||
|
return x_slider
|
||||||
1
addons/curved_lines_2d/advanced_tab.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://duyq57sg3jn7q
|
||||||
98
addons/curved_lines_2d/advanced_tab.tscn
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
[gd_scene load_steps=3 format=3 uid="uid://3r7rlhrwfmfe"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://duyq57sg3jn7q" path="res://addons/curved_lines_2d/advanced_tab.gd" id="1_h55kp"]
|
||||||
|
|
||||||
|
[sub_resource type="LabelSettings" id="LabelSettings_h55kp"]
|
||||||
|
line_spacing = 0.0
|
||||||
|
font_size = 14
|
||||||
|
font_color = Color(0.73, 0.73, 0.73, 1)
|
||||||
|
|
||||||
|
[node name="AdvancedTab" type="VBoxContainer"]
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme_override_constants/separation = 8
|
||||||
|
script = ExtResource("1_h55kp")
|
||||||
|
metadata/_tab_index = 2
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="HBoxContainer"]
|
||||||
|
custom_minimum_size = Vector2(170, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
tooltip_text = "Exports the entire scene as a PNG spritesheet, or separate PNG files using the selected animation."
|
||||||
|
mouse_filter = 0
|
||||||
|
text = "Export Options*"
|
||||||
|
|
||||||
|
[node name="ExportAsPNGButton" type="Button" parent="HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "PNG Image"
|
||||||
|
|
||||||
|
[node name="ExportAsBakedSceneButton" type="Button" parent="HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "'Baked' Scene
|
||||||
|
"
|
||||||
|
|
||||||
|
[node name="ExportAs3DSceneButton" type="Button" parent="HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "3D Scene"
|
||||||
|
|
||||||
|
[node name="HSeparator" type="HSeparator" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="HBoxContainer2" type="HBoxContainer" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="HBoxContainer2"]
|
||||||
|
custom_minimum_size = Vector2(170, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
tooltip_text = "Exports the entire scene as a PNG spritesheet, or separate PNG files using the selected animation."
|
||||||
|
mouse_filter = 0
|
||||||
|
text = "Bake Sprite Frames*"
|
||||||
|
|
||||||
|
[node name="HintLabel" type="Label" parent="HBoxContainer2"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
text = "- Select a 2D scene with at least an AnimationPlayer and one ScalableVectorShape2D -"
|
||||||
|
label_settings = SubResource("LabelSettings_h55kp")
|
||||||
|
|
||||||
|
[node name="SelectAnimationOptionButton" type="OptionButton" parent="HBoxContainer2"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
visible = false
|
||||||
|
custom_minimum_size = Vector2(120, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="FpsInputContainer" type="PanelContainer" parent="HBoxContainer2"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
visible = false
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
[node name="ExportAsSpritesheetCheckButton" type="CheckButton" parent="HBoxContainer2"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
visible = false
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Export as Spritesheet"
|
||||||
|
|
||||||
|
[node name="StatusLabel" type="Label" parent="HBoxContainer2"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
visible = false
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="CreateSpriteSheetButton" type="Button" parent="HBoxContainer2"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
visible = false
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 8
|
||||||
|
text = "Create"
|
||||||
|
|
||||||
|
[node name="HSeparator2" type="HSeparator" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[connection signal="pressed" from="HBoxContainer/ExportAsPNGButton" to="." method="_on_export_as_png_button_pressed"]
|
||||||
|
[connection signal="pressed" from="HBoxContainer/ExportAsBakedSceneButton" to="." method="_on_export_as_baked_scene_button_pressed"]
|
||||||
|
[connection signal="pressed" from="HBoxContainer/ExportAs3DSceneButton" to="." method="_on_export_as_3d_scene_button_pressed"]
|
||||||
|
[connection signal="pressed" from="HBoxContainer2/CreateSpriteSheetButton" to="." method="_on_create_sprite_sheet_button_pressed"]
|
||||||
95
addons/curved_lines_2d/arc_settings_popup_panel.gd
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
@tool
|
||||||
|
extends PopupPanel
|
||||||
|
|
||||||
|
var rx_input : EditorSpinSlider
|
||||||
|
var ry_input : EditorSpinSlider
|
||||||
|
var rotation_input : EditorSpinSlider
|
||||||
|
var _arc_under_edit : ScalableArc
|
||||||
|
|
||||||
|
var _dragging := false
|
||||||
|
var _drag_start := Vector2.ZERO
|
||||||
|
|
||||||
|
func _enter_tree() -> void:
|
||||||
|
visible = false
|
||||||
|
rx_input = _mk_input()
|
||||||
|
ry_input = _mk_input()
|
||||||
|
rotation_input = _mk_input(1.0)
|
||||||
|
%RxInputContainer.add_child(rx_input)
|
||||||
|
%RyInputContainer.add_child(ry_input)
|
||||||
|
%RotationInputContainer.add_child(rotation_input)
|
||||||
|
if not rx_input.value_changed.is_connected(_on_radius_changed):
|
||||||
|
rx_input.value_changed.connect(_on_radius_changed)
|
||||||
|
if not ry_input.value_changed.is_connected(_on_radius_changed):
|
||||||
|
ry_input.value_changed.connect(_on_radius_changed)
|
||||||
|
if not rotation_input.value_changed.is_connected(_on_rotation_changed):
|
||||||
|
rotation_input.value_changed.connect(_on_rotation_changed)
|
||||||
|
|
||||||
|
func _on_button_pressed() -> void:
|
||||||
|
hide()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_rotation_changed(new_rot : float) -> void:
|
||||||
|
var undo_redo := EditorInterface.get_editor_undo_redo()
|
||||||
|
undo_redo.create_action("Update arc rotation")
|
||||||
|
undo_redo.add_do_property(_arc_under_edit, 'rotation_deg', new_rot)
|
||||||
|
undo_redo.add_undo_property(_arc_under_edit, 'rotation_deg', _arc_under_edit.rotation_deg)
|
||||||
|
undo_redo.commit_action()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_radius_changed(_v : float) -> void:
|
||||||
|
var undo_redo := EditorInterface.get_editor_undo_redo()
|
||||||
|
undo_redo.create_action("Update arc radius")
|
||||||
|
undo_redo.add_do_property(_arc_under_edit, 'radius', Vector2(rx_input.value, ry_input.value))
|
||||||
|
undo_redo.add_undo_property(_arc_under_edit, 'radius', _arc_under_edit.radius)
|
||||||
|
undo_redo.commit_action()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_sweep_check_box_toggled(toggled_on: bool) -> void:
|
||||||
|
var undo_redo := EditorInterface.get_editor_undo_redo()
|
||||||
|
undo_redo.create_action("Update arc sweep flag")
|
||||||
|
undo_redo.add_do_property(_arc_under_edit, 'sweep_flag', toggled_on)
|
||||||
|
undo_redo.add_undo_property(_arc_under_edit, 'sweep_flag', _arc_under_edit.sweep_flag)
|
||||||
|
undo_redo.commit_action()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_large_arc_check_box_toggled(toggled_on: bool) -> void:
|
||||||
|
var undo_redo := EditorInterface.get_editor_undo_redo()
|
||||||
|
undo_redo.create_action("Update arc large arc flag")
|
||||||
|
undo_redo.add_do_property(_arc_under_edit, 'large_arc_flag', toggled_on)
|
||||||
|
undo_redo.add_undo_property(_arc_under_edit, 'large_arc_flag', _arc_under_edit.large_arc_flag)
|
||||||
|
undo_redo.commit_action()
|
||||||
|
|
||||||
|
|
||||||
|
func popup_with_value(arc : ScalableArc):
|
||||||
|
_arc_under_edit = arc
|
||||||
|
rx_input.set_value_no_signal(arc.radius.x)
|
||||||
|
ry_input.set_value_no_signal(arc.radius.y)
|
||||||
|
rotation_input.set_value_no_signal(arc.rotation_deg)
|
||||||
|
%LargeArcCheckBox.set_pressed_no_signal(arc.large_arc_flag)
|
||||||
|
%SweepCheckBox.set_pressed_no_signal(arc.sweep_flag)
|
||||||
|
popup_centered()
|
||||||
|
|
||||||
|
|
||||||
|
func _mk_input(step := 0.001) -> EditorSpinSlider:
|
||||||
|
var num_input := EditorSpinSlider.new()
|
||||||
|
num_input.suffix = "px"
|
||||||
|
num_input.hide_slider = true
|
||||||
|
num_input.value = 0.0
|
||||||
|
num_input.editing_integer = false
|
||||||
|
num_input.allow_lesser = true
|
||||||
|
num_input.allow_greater = true
|
||||||
|
num_input.step = 0.001
|
||||||
|
return num_input
|
||||||
|
|
||||||
|
|
||||||
|
func _on_label_gui_input(event: InputEvent) -> void:
|
||||||
|
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT:
|
||||||
|
if Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT):
|
||||||
|
if not _dragging:
|
||||||
|
_dragging = true
|
||||||
|
_drag_start = EditorInterface.get_base_control().get_local_mouse_position()
|
||||||
|
else:
|
||||||
|
_dragging = false
|
||||||
|
if event is InputEventMouseMotion and _dragging:
|
||||||
|
position += Vector2i(EditorInterface.get_base_control().get_local_mouse_position() - _drag_start)
|
||||||
|
_drag_start = EditorInterface.get_base_control().get_local_mouse_position()
|
||||||
1
addons/curved_lines_2d/arc_settings_popup_panel.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://mk3r6d801wbn
|
||||||
185
addons/curved_lines_2d/arc_settings_popup_panel.tscn
Normal file
@@ -0,0 +1,185 @@
|
|||||||
|
[gd_scene load_steps=8 format=3 uid="uid://c2vk4emclmyfd"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://mk3r6d801wbn" path="res://addons/curved_lines_2d/arc_settings_popup_panel.gd" id="1_3bjn8"]
|
||||||
|
|
||||||
|
[sub_resource type="LabelSettings" id="LabelSettings_3bjn8"]
|
||||||
|
font_color = Color(0.552956, 0.552956, 0.552956, 1)
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_3bjn8"]
|
||||||
|
bg_color = Color(0, 0, 0, 1)
|
||||||
|
corner_radius_top_left = 2
|
||||||
|
corner_radius_bottom_left = 2
|
||||||
|
|
||||||
|
[sub_resource type="LabelSettings" id="LabelSettings_kcp7s"]
|
||||||
|
line_spacing = 0.0
|
||||||
|
font_color = Color(0.54, 0.33696, 0.2808, 1)
|
||||||
|
|
||||||
|
[sub_resource type="LabelSettings" id="LabelSettings_2efm4"]
|
||||||
|
font_color = Color(0.345098, 0.47451, 0.396078, 1)
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_kcp7s"]
|
||||||
|
bg_color = Color(0.0588235, 0.0588235, 0.0588235, 1)
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_1vtg0"]
|
||||||
|
bg_color = Color(0.0588235, 0.0588235, 0.0588235, 1)
|
||||||
|
|
||||||
|
[node name="ArcSettingsPopupPanel" type="PopupPanel"]
|
||||||
|
size = Vector2i(250, 251)
|
||||||
|
script = ExtResource("1_3bjn8")
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
offset_left = 4.0
|
||||||
|
offset_top = 4.0
|
||||||
|
offset_right = -4.0
|
||||||
|
offset_bottom = -4.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
size_flags_horizontal = 0
|
||||||
|
size_flags_vertical = 0
|
||||||
|
theme_override_constants/separation = 5
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
mouse_filter = 0
|
||||||
|
text = "Arc settings"
|
||||||
|
horizontal_alignment = 1
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 12
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer"]
|
||||||
|
custom_minimum_size = Vector2(90, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 0
|
||||||
|
size_flags_vertical = 1
|
||||||
|
text = "Radius"
|
||||||
|
label_settings = SubResource("LabelSettings_3bjn8")
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_stretch_ratio = 1.25
|
||||||
|
|
||||||
|
[node name="PanelContainer" type="PanelContainer" parent="VBoxContainer/HBoxContainer/VBoxContainer"]
|
||||||
|
custom_minimum_size = Vector2(0, 32)
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBoxFlat_3bjn8")
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/HBoxContainer/VBoxContainer/PanelContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer/VBoxContainer/PanelContainer/HBoxContainer"]
|
||||||
|
custom_minimum_size = Vector2(20, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 0
|
||||||
|
size_flags_vertical = 1
|
||||||
|
text = "x"
|
||||||
|
label_settings = SubResource("LabelSettings_kcp7s")
|
||||||
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
|
[node name="RxInputContainer" type="PanelContainer" parent="VBoxContainer/HBoxContainer/VBoxContainer/PanelContainer/HBoxContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
[node name="PanelContainer2" type="PanelContainer" parent="VBoxContainer/HBoxContainer/VBoxContainer"]
|
||||||
|
custom_minimum_size = Vector2(0, 32)
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBoxFlat_3bjn8")
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/HBoxContainer/VBoxContainer/PanelContainer2"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer/VBoxContainer/PanelContainer2/HBoxContainer"]
|
||||||
|
custom_minimum_size = Vector2(20, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 0
|
||||||
|
size_flags_vertical = 1
|
||||||
|
text = "y"
|
||||||
|
label_settings = SubResource("LabelSettings_2efm4")
|
||||||
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
|
[node name="RyInputContainer" type="PanelContainer" parent="VBoxContainer/HBoxContainer/VBoxContainer/PanelContainer2/HBoxContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 12
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer2"]
|
||||||
|
custom_minimum_size = Vector2(90, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 0
|
||||||
|
size_flags_vertical = 1
|
||||||
|
text = "Rotation"
|
||||||
|
label_settings = SubResource("LabelSettings_3bjn8")
|
||||||
|
|
||||||
|
[node name="RotationInputContainer" type="PanelContainer" parent="VBoxContainer/HBoxContainer2"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(0, 32)
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
theme_override_styles/panel = SubResource("StyleBoxFlat_kcp7s")
|
||||||
|
|
||||||
|
[node name="HBoxContainer3" type="HBoxContainer" parent="VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 12
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer3"]
|
||||||
|
custom_minimum_size = Vector2(90, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 0
|
||||||
|
size_flags_vertical = 1
|
||||||
|
text = "Large Arc"
|
||||||
|
label_settings = SubResource("LabelSettings_3bjn8")
|
||||||
|
|
||||||
|
[node name="Container" type="PanelContainer" parent="VBoxContainer/HBoxContainer3"]
|
||||||
|
custom_minimum_size = Vector2(0, 32)
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
theme_override_styles/panel = SubResource("StyleBoxFlat_1vtg0")
|
||||||
|
|
||||||
|
[node name="LargeArcCheckBox" type="CheckBox" parent="VBoxContainer/HBoxContainer3/Container"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
text = "On"
|
||||||
|
|
||||||
|
[node name="HBoxContainer4" type="HBoxContainer" parent="VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 12
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer4"]
|
||||||
|
custom_minimum_size = Vector2(90, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 0
|
||||||
|
size_flags_vertical = 1
|
||||||
|
text = "Sweep"
|
||||||
|
label_settings = SubResource("LabelSettings_3bjn8")
|
||||||
|
|
||||||
|
[node name="Container" type="PanelContainer" parent="VBoxContainer/HBoxContainer4"]
|
||||||
|
custom_minimum_size = Vector2(0, 32)
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
theme_override_styles/panel = SubResource("StyleBoxFlat_1vtg0")
|
||||||
|
|
||||||
|
[node name="SweepCheckBox" type="CheckBox" parent="VBoxContainer/HBoxContainer4/Container"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
text = "On"
|
||||||
|
|
||||||
|
[node name="Button" type="Button" parent="VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Ok"
|
||||||
|
|
||||||
|
[connection signal="gui_input" from="VBoxContainer/Label" to="." method="_on_label_gui_input"]
|
||||||
|
[connection signal="toggled" from="VBoxContainer/HBoxContainer3/Container/LargeArcCheckBox" to="." method="_on_large_arc_check_box_toggled"]
|
||||||
|
[connection signal="toggled" from="VBoxContainer/HBoxContainer4/Container/SweepCheckBox" to="." method="_on_sweep_check_box_toggled"]
|
||||||
|
[connection signal="pressed" from="VBoxContainer/Button" to="." method="_on_button_pressed"]
|
||||||
50
addons/curved_lines_2d/assign_collision_inspector_form.gd
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
@tool
|
||||||
|
extends Control
|
||||||
|
|
||||||
|
var scalable_vector_shape_2d : ScalableVectorShape2D
|
||||||
|
|
||||||
|
func _enter_tree() -> void:
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d):
|
||||||
|
return
|
||||||
|
if 'assigned_node_changed' in scalable_vector_shape_2d:
|
||||||
|
scalable_vector_shape_2d.assigned_node_changed.connect(_on_svs_assignment_changed)
|
||||||
|
_on_svs_assignment_changed()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_svs_assignment_changed() -> void:
|
||||||
|
if is_instance_valid(scalable_vector_shape_2d.collision_polygon):
|
||||||
|
%GotoCollisionButton.show()
|
||||||
|
%GotoCollisionButton.disabled = false
|
||||||
|
%CreateCollisionButton.hide()
|
||||||
|
%CreateCollisionButton.disabled = true
|
||||||
|
else:
|
||||||
|
%GotoCollisionButton.hide()
|
||||||
|
%GotoCollisionButton.disabled = true
|
||||||
|
%CreateCollisionButton.show()
|
||||||
|
%CreateCollisionButton.disabled = false
|
||||||
|
|
||||||
|
|
||||||
|
func _on_goto_collision_button_pressed() -> void:
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d):
|
||||||
|
return
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d.collision_polygon):
|
||||||
|
return
|
||||||
|
EditorInterface.call_deferred('edit_node', scalable_vector_shape_2d.collision_polygon)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_create_collision_button_pressed() -> void:
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d):
|
||||||
|
return
|
||||||
|
var undo_redo := EditorInterface.get_editor_undo_redo()
|
||||||
|
var new_poly := CollisionPolygon2D.new()
|
||||||
|
undo_redo.create_action("Add CollisionPolygon2D to %s " % str(scalable_vector_shape_2d))
|
||||||
|
undo_redo.add_do_method(scalable_vector_shape_2d, 'add_child', new_poly, true)
|
||||||
|
if scalable_vector_shape_2d == EditorInterface.get_edited_scene_root():
|
||||||
|
undo_redo.add_do_method(new_poly, 'set_owner', scalable_vector_shape_2d)
|
||||||
|
else:
|
||||||
|
undo_redo.add_do_method(new_poly, 'set_owner', scalable_vector_shape_2d.owner)
|
||||||
|
undo_redo.add_do_reference(new_poly)
|
||||||
|
undo_redo.add_do_property(scalable_vector_shape_2d, 'collision_polygon', new_poly)
|
||||||
|
undo_redo.add_undo_method(scalable_vector_shape_2d, 'remove_child', new_poly)
|
||||||
|
undo_redo.add_undo_property(scalable_vector_shape_2d, 'collision_polygon', null)
|
||||||
|
undo_redo.commit_action()
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://1a3nrkdo50tg
|
||||||
41
addons/curved_lines_2d/assign_collision_inspector_form.tscn
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
[gd_scene load_steps=2 format=3 uid="uid://bqudr864ptf7r"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://1a3nrkdo50tg" path="res://addons/curved_lines_2d/assign_collision_inspector_form.gd" id="1_wi77q"]
|
||||||
|
|
||||||
|
[node name="AssignCollisionInspectorForm" type="VBoxContainer"]
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
script = ExtResource("1_wi77q")
|
||||||
|
|
||||||
|
[node name="ButtonContainer2" type="HBoxContainer" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Label2" type="Label" parent="ButtonContainer2"]
|
||||||
|
clip_contents = true
|
||||||
|
custom_minimum_size = Vector2(80, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
tooltip_text = "⚠️ Assigning a CollisionPolygon2D directly will at some point be deprecated in favour of assigning a CollisionObject2D: a clipped ScalableVectorShape2D can result in multiple CollisionPolygon2D"
|
||||||
|
mouse_filter = 0
|
||||||
|
text = "⚠️ CollisionPolygon2D*"
|
||||||
|
|
||||||
|
[node name="GotoCollisionButton" type="Button" parent="ButtonContainer2"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
visible = false
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 2
|
||||||
|
tooltip_text = "Click on this button to select the CollisionPolygon2D node that is assigned to this shape in the Scene Tree.
|
||||||
|
|
||||||
|
Use this for advanced features which are already built-in into godot."
|
||||||
|
text = "Go To Node"
|
||||||
|
|
||||||
|
[node name="CreateCollisionButton" type="Button" parent="ButtonContainer2"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Create CollisionPolygon2D"
|
||||||
|
|
||||||
|
[connection signal="pressed" from="ButtonContainer2/GotoCollisionButton" to="." method="_on_goto_collision_button_pressed"]
|
||||||
|
[connection signal="pressed" from="ButtonContainer2/CreateCollisionButton" to="." method="_on_create_collision_button_pressed"]
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
@tool
|
||||||
|
extends Control
|
||||||
|
|
||||||
|
var scalable_vector_shape_2d : ScalableVectorShape2D
|
||||||
|
|
||||||
|
func _enter_tree() -> void:
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d):
|
||||||
|
return
|
||||||
|
if 'assigned_node_changed' in scalable_vector_shape_2d:
|
||||||
|
scalable_vector_shape_2d.assigned_node_changed.connect(_on_svs_assignment_changed)
|
||||||
|
_on_svs_assignment_changed()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_svs_assignment_changed() -> void:
|
||||||
|
if is_instance_valid(scalable_vector_shape_2d.collision_object):
|
||||||
|
%GoToCollisionObjectButton.show()
|
||||||
|
%CollisionObjectTypeOptionButton.hide()
|
||||||
|
else:
|
||||||
|
%GoToCollisionObjectButton.hide()
|
||||||
|
%CollisionObjectTypeOptionButton.show()
|
||||||
|
%CollisionObjectTypeOptionButton.select(0)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_collision_object_type_option_button_type_selected(obj_type: ScalableVectorShape2D.CollisionObjectType) -> void:
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d):
|
||||||
|
return
|
||||||
|
|
||||||
|
match obj_type:
|
||||||
|
ScalableVectorShape2D.CollisionObjectType.STATIC_BODY_2D:
|
||||||
|
_assign_collision_object(StaticBody2D.new())
|
||||||
|
ScalableVectorShape2D.CollisionObjectType.AREA_2D:
|
||||||
|
_assign_collision_object(Area2D.new())
|
||||||
|
ScalableVectorShape2D.CollisionObjectType.ANIMATABLE_BODY_2D:
|
||||||
|
_assign_collision_object(AnimatableBody2D.new())
|
||||||
|
ScalableVectorShape2D.CollisionObjectType.RIGID_BODY_2D:
|
||||||
|
_assign_collision_object(RigidBody2D.new())
|
||||||
|
ScalableVectorShape2D.CollisionObjectType.CHARACTER_BODY_2D:
|
||||||
|
_assign_collision_object(CharacterBody2D.new())
|
||||||
|
ScalableVectorShape2D.CollisionObjectType.PHYSICAL_BONE_2D:
|
||||||
|
_assign_collision_object(PhysicalBone2D.new())
|
||||||
|
_, ScalableVectorShape2D.CollisionObjectType.NONE:
|
||||||
|
scalable_vector_shape_2d.collision_object = null
|
||||||
|
|
||||||
|
|
||||||
|
func _assign_collision_object(new_obj : CollisionObject2D) -> void:
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d):
|
||||||
|
return
|
||||||
|
var undo_redo := EditorInterface.get_editor_undo_redo()
|
||||||
|
undo_redo.create_action("Add %s to %s " % [str(new_obj.name), str(scalable_vector_shape_2d)])
|
||||||
|
undo_redo.add_do_method(scalable_vector_shape_2d, 'add_child', new_obj, true)
|
||||||
|
if scalable_vector_shape_2d == EditorInterface.get_edited_scene_root():
|
||||||
|
undo_redo.add_do_method(new_obj, 'set_owner', scalable_vector_shape_2d)
|
||||||
|
else:
|
||||||
|
undo_redo.add_do_method(new_obj, 'set_owner', scalable_vector_shape_2d.owner)
|
||||||
|
undo_redo.add_do_reference(new_obj)
|
||||||
|
undo_redo.add_do_property(scalable_vector_shape_2d, 'collision_object', new_obj)
|
||||||
|
undo_redo.add_undo_method(scalable_vector_shape_2d, 'remove_child', new_obj)
|
||||||
|
undo_redo.add_undo_property(scalable_vector_shape_2d, 'collision_object', null)
|
||||||
|
undo_redo.commit_action()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_go_to_collision_object_button_pressed() -> void:
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d):
|
||||||
|
return
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d.collision_object):
|
||||||
|
return
|
||||||
|
EditorInterface.call_deferred('edit_node', scalable_vector_shape_2d.collision_object)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://ci3o0cnwiet6
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
[gd_scene load_steps=3 format=3 uid="uid://dar1y7o5qcxic"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://ci3o0cnwiet6" path="res://addons/curved_lines_2d/assign_collision_object_inspector_form.gd" id="1_csmls"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://cjbkvx1pj7gq2" path="res://addons/curved_lines_2d/collision_object_type_option_button.tscn" id="2_ks3po"]
|
||||||
|
|
||||||
|
[node name="AssignCollisionObjectInspectorForm" type="VBoxContainer"]
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme_override_constants/separation = 4
|
||||||
|
script = ExtResource("1_csmls")
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
tooltip_text = "Assign a new CollisionObject2D to this shape.
|
||||||
|
This will hold any generated CollisionPolygon2D nodes.
|
||||||
|
|
||||||
|
Selecting 'none' will unassign any existing node, but will not delete the node."
|
||||||
|
mouse_filter = 0
|
||||||
|
text = "Collision Object* "
|
||||||
|
|
||||||
|
[node name="CollisionObjectTypeOptionButton" parent="HBoxContainer" instance=ExtResource("2_ks3po")]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
[node name="GoToCollisionObjectButton" type="Button" parent="HBoxContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
visible = false
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
text = "Go To Node"
|
||||||
|
|
||||||
|
[connection signal="type_selected" from="HBoxContainer/CollisionObjectTypeOptionButton" to="." method="_on_collision_object_type_option_button_type_selected"]
|
||||||
|
[connection signal="pressed" from="HBoxContainer/GoToCollisionObjectButton" to="." method="_on_go_to_collision_object_button_pressed"]
|
||||||
245
addons/curved_lines_2d/assign_fill_inspector_form.gd
Normal file
@@ -0,0 +1,245 @@
|
|||||||
|
@tool
|
||||||
|
extends KeyframeButtonCapableInspectorFormBase
|
||||||
|
|
||||||
|
var scalable_vector_shape_2d : ScalableVectorShape2D
|
||||||
|
|
||||||
|
|
||||||
|
func _enter_tree() -> void:
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d):
|
||||||
|
return
|
||||||
|
if 'assigned_node_changed' in scalable_vector_shape_2d:
|
||||||
|
scalable_vector_shape_2d.assigned_node_changed.connect(_on_svs_assignment_changed)
|
||||||
|
_on_svs_assignment_changed()
|
||||||
|
_initialize_keyframe_capabilities()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_key_frame_capabilities_changed():
|
||||||
|
%AddFillKeyFrameButton.visible = _is_key_frame_capable()
|
||||||
|
%BatchInsertGradientKeyFrameButton.visible = _is_key_frame_capable()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_svs_assignment_changed() -> void:
|
||||||
|
if is_instance_valid(scalable_vector_shape_2d.polygon):
|
||||||
|
%CreateFillButton.get_parent().hide()
|
||||||
|
%GotoPolygon2DButton.get_parent().show()
|
||||||
|
%GradientFieldContainer.show()
|
||||||
|
%GradientStopColorButtonContainer.show()
|
||||||
|
%CreateFillButton.disabled = true
|
||||||
|
%GotoPolygon2DButton.disabled = false
|
||||||
|
%ColorPickerButton.color = scalable_vector_shape_2d.polygon.color
|
||||||
|
%RadialGradientToggleButton.disabled = false
|
||||||
|
%LinearGradientToggleButton.disabled = false
|
||||||
|
%RemoveGradientToggleButton.disabled = false
|
||||||
|
if scalable_vector_shape_2d.polygon.texture is GradientTexture2D:
|
||||||
|
if scalable_vector_shape_2d.polygon.texture.fill == GradientTexture2D.FILL_RADIAL:
|
||||||
|
%RadialGradientToggleButton.button_pressed = true
|
||||||
|
else:
|
||||||
|
%LinearGradientToggleButton.button_pressed = true
|
||||||
|
_set_gradient_stop_color_buttons()
|
||||||
|
elif scalable_vector_shape_2d.polygon.texture:
|
||||||
|
%OtherTextureToggleButton.button_pressed = true
|
||||||
|
%GradientStopColorButtonContainer.hide()
|
||||||
|
else:
|
||||||
|
%RemoveGradientToggleButton.button_pressed = true
|
||||||
|
%GradientStopColorButtonContainer.hide()
|
||||||
|
else:
|
||||||
|
%CreateFillButton.get_parent().show()
|
||||||
|
%GotoPolygon2DButton.get_parent().hide()
|
||||||
|
%GradientFieldContainer.hide()
|
||||||
|
%GradientStopColorButtonContainer.hide()
|
||||||
|
%CreateFillButton.disabled = false
|
||||||
|
%GotoPolygon2DButton.disabled = true
|
||||||
|
%ColorPickerButton.color = CurvedLines2D._get_default_fill_color()
|
||||||
|
%RadialGradientToggleButton.disabled = true
|
||||||
|
%LinearGradientToggleButton.disabled = true
|
||||||
|
%RemoveGradientToggleButton.disabled = true
|
||||||
|
%RemoveGradientToggleButton.button_pressed = true
|
||||||
|
|
||||||
|
|
||||||
|
func _on_color_picker_button_color_changed(color: Color) -> void:
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d.polygon):
|
||||||
|
return
|
||||||
|
scalable_vector_shape_2d.polygon.color = color
|
||||||
|
|
||||||
|
|
||||||
|
func _on_goto_polygon_2d_button_pressed() -> void:
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d):
|
||||||
|
return
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d.polygon):
|
||||||
|
return
|
||||||
|
EditorInterface.call_deferred('edit_node', scalable_vector_shape_2d.polygon)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_create_fill_button_pressed():
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d):
|
||||||
|
return
|
||||||
|
if is_instance_valid(scalable_vector_shape_2d.polygon):
|
||||||
|
return
|
||||||
|
|
||||||
|
var polygon_2d := Polygon2D.new()
|
||||||
|
var root := EditorInterface.get_edited_scene_root()
|
||||||
|
var undo_redo = EditorInterface.get_editor_undo_redo()
|
||||||
|
polygon_2d.color = %ColorPickerButton.color
|
||||||
|
undo_redo.create_action("Add Polygon2D to %s " % str(scalable_vector_shape_2d))
|
||||||
|
undo_redo.add_do_method(scalable_vector_shape_2d, 'add_child', polygon_2d, true)
|
||||||
|
undo_redo.add_do_method(polygon_2d, 'set_owner', root)
|
||||||
|
undo_redo.add_do_reference(polygon_2d)
|
||||||
|
undo_redo.add_do_property(scalable_vector_shape_2d, 'polygon', polygon_2d)
|
||||||
|
undo_redo.add_undo_method(scalable_vector_shape_2d, 'remove_child', polygon_2d)
|
||||||
|
undo_redo.add_undo_property(scalable_vector_shape_2d, 'polygon', null)
|
||||||
|
undo_redo.commit_action()
|
||||||
|
|
||||||
|
|
||||||
|
func _set_texture(texture : Texture2D, texture_offset := Vector2.ZERO) -> void:
|
||||||
|
var undo_redo = EditorInterface.get_editor_undo_redo()
|
||||||
|
undo_redo.create_action("Set texture for %s" % str(scalable_vector_shape_2d))
|
||||||
|
undo_redo.add_do_property(scalable_vector_shape_2d.polygon, 'texture', texture)
|
||||||
|
undo_redo.add_do_property(scalable_vector_shape_2d.polygon, 'texture_offset', texture_offset)
|
||||||
|
undo_redo.add_do_method(self, '_on_svs_assignment_changed')
|
||||||
|
undo_redo.add_undo_property(scalable_vector_shape_2d.polygon, 'texture', scalable_vector_shape_2d.polygon.texture)
|
||||||
|
undo_redo.add_undo_property(scalable_vector_shape_2d.polygon, 'texture_offset', scalable_vector_shape_2d.polygon.texture_offset)
|
||||||
|
undo_redo.add_undo_method(self, '_on_svs_assignment_changed')
|
||||||
|
undo_redo.commit_action()
|
||||||
|
|
||||||
|
|
||||||
|
func _update_stop_color(idx : int, color : Color) -> void:
|
||||||
|
scalable_vector_shape_2d.polygon.texture.gradient.colors[idx] = color
|
||||||
|
|
||||||
|
|
||||||
|
func _handle_stop_color_undo_redo_action(idx : int, btn : ColorPickerButton, toggled_on : bool) -> void:
|
||||||
|
var undo_redo = EditorInterface.get_editor_undo_redo()
|
||||||
|
if toggled_on:
|
||||||
|
undo_redo.create_action("Set stop color for %s" % str(scalable_vector_shape_2d))
|
||||||
|
undo_redo.add_undo_property(scalable_vector_shape_2d.polygon.texture.gradient, 'colors',
|
||||||
|
scalable_vector_shape_2d.polygon.texture.gradient.colors)
|
||||||
|
undo_redo.add_undo_property(btn, 'color',
|
||||||
|
scalable_vector_shape_2d.polygon.texture.gradient.colors[idx])
|
||||||
|
else:
|
||||||
|
var new_colors = scalable_vector_shape_2d.polygon.texture.gradient.colors.duplicate()
|
||||||
|
new_colors[idx] = btn.color
|
||||||
|
undo_redo.add_do_property(scalable_vector_shape_2d.polygon.texture.gradient, 'colors', new_colors)
|
||||||
|
undo_redo.add_do_property(btn, 'color', btn.color)
|
||||||
|
undo_redo.commit_action()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_remove_gradient_toggle_button_button_down() -> void:
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d):
|
||||||
|
return
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d.polygon):
|
||||||
|
return
|
||||||
|
|
||||||
|
_set_texture(null)
|
||||||
|
|
||||||
|
|
||||||
|
func _set_gradient_stop_color_buttons() -> void:
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d):
|
||||||
|
return
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d.polygon):
|
||||||
|
return
|
||||||
|
if not scalable_vector_shape_2d.polygon.texture is GradientTexture2D:
|
||||||
|
return
|
||||||
|
|
||||||
|
for b in %StopColorButtonsContainer.get_children():
|
||||||
|
b.queue_free()
|
||||||
|
|
||||||
|
for idx in range(scalable_vector_shape_2d.polygon.texture.gradient.colors.size()):
|
||||||
|
var color : Color = scalable_vector_shape_2d.polygon.texture.gradient.colors[idx]
|
||||||
|
var new_button := ColorPickerButton.new()
|
||||||
|
new_button.color = color
|
||||||
|
new_button.color_changed.connect(func(c): _update_stop_color(idx, c))
|
||||||
|
new_button.toggled.connect(func(toggled_on): _handle_stop_color_undo_redo_action(idx, new_button, toggled_on))
|
||||||
|
new_button.custom_minimum_size = Vector2(40, 40)
|
||||||
|
%StopColorButtonsContainer.add_child(new_button)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_linear_gradient_toggle_button_button_down() -> void:
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d):
|
||||||
|
return
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d.polygon):
|
||||||
|
return
|
||||||
|
if (scalable_vector_shape_2d.polygon.texture is GradientTexture2D and
|
||||||
|
scalable_vector_shape_2d.polygon.texture.fill == GradientTexture2D.FILL_LINEAR):
|
||||||
|
return
|
||||||
|
|
||||||
|
var box := scalable_vector_shape_2d.get_bounding_rect()
|
||||||
|
var texture := _initialize_gradient(box)
|
||||||
|
texture.fill = GradientTexture2D.FILL_LINEAR
|
||||||
|
texture.fill_from = Vector2(0.0, 0.5)
|
||||||
|
texture.fill_to = Vector2(1.0, 0.5)
|
||||||
|
_set_texture(texture, -box.position)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_radial_gradient_toggle_button_button_down() -> void:
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d):
|
||||||
|
return
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d.polygon):
|
||||||
|
return
|
||||||
|
if (scalable_vector_shape_2d.polygon.texture is GradientTexture2D and
|
||||||
|
scalable_vector_shape_2d.polygon.texture.fill == GradientTexture2D.FILL_RADIAL):
|
||||||
|
return
|
||||||
|
|
||||||
|
var box := scalable_vector_shape_2d.get_bounding_rect()
|
||||||
|
var texture := _initialize_gradient(box)
|
||||||
|
texture.fill = GradientTexture2D.FILL_RADIAL
|
||||||
|
texture.fill_from = -box.position / box.size
|
||||||
|
texture.fill_to = (scalable_vector_shape_2d.get_farthest_point() - box.position) / box.size
|
||||||
|
_set_texture(texture, -box.position)
|
||||||
|
|
||||||
|
|
||||||
|
static func _initialize_gradient(box : Rect2) -> GradientTexture2D:
|
||||||
|
var texture := GradientTexture2D.new()
|
||||||
|
texture.width = ceil(box.size.x)
|
||||||
|
texture.height = ceil(box.size.y)
|
||||||
|
texture.gradient = Gradient.new()
|
||||||
|
texture.gradient.colors = [Color.WHITE, Color.BLACK]
|
||||||
|
texture.gradient.offsets = [0.0, 1.0]
|
||||||
|
return texture
|
||||||
|
|
||||||
|
|
||||||
|
func _on_add_fill_key_frame_button_pressed() -> void:
|
||||||
|
if is_instance_valid(scalable_vector_shape_2d.polygon):
|
||||||
|
add_key_frame(
|
||||||
|
scalable_vector_shape_2d.polygon, "color", %ColorPickerButton.color
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_batch_insert_gradient_key_frame_button_pressed() -> void:
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d.polygon):
|
||||||
|
return
|
||||||
|
if not scalable_vector_shape_2d.polygon.texture is GradientTexture2D:
|
||||||
|
return
|
||||||
|
|
||||||
|
var p2d := scalable_vector_shape_2d.polygon
|
||||||
|
var animation_name := animation_under_edit_button.get_item_text(animation_under_edit_button.get_selected_id())
|
||||||
|
var animation_player := _find_animation_player(animation_name)
|
||||||
|
var track_position := _guarded_get_track_position()
|
||||||
|
var animation := _guarded_get_animation(animation_player)
|
||||||
|
var path_to_node := _guarded_get_path_to_node(animation_player, p2d)
|
||||||
|
if not animation:
|
||||||
|
return
|
||||||
|
if path_to_node.is_empty():
|
||||||
|
return
|
||||||
|
var undo_redo := EditorInterface.get_editor_undo_redo()
|
||||||
|
undo_redo.create_action("Batch all gradient keyframes for %s on animation %s" % [str(p2d), str(animation)])
|
||||||
|
_add_key_frame(undo_redo, animation, NodePath("%s:texture:gradient:colors" % path_to_node),
|
||||||
|
track_position, p2d.texture.gradient.colors)
|
||||||
|
_add_key_frame(undo_redo, animation, NodePath("%s:texture:gradient:offsets" % path_to_node),
|
||||||
|
track_position, p2d.texture.gradient.offsets)
|
||||||
|
_add_key_frame(undo_redo, animation, NodePath("%s:texture:fill_from" % path_to_node),
|
||||||
|
track_position, p2d.texture.fill_from)
|
||||||
|
_add_key_frame(undo_redo, animation, NodePath("%s:texture:fill_to" % path_to_node),
|
||||||
|
track_position, p2d.texture.fill_to)
|
||||||
|
|
||||||
|
undo_redo.commit_action()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_color_picker_button_toggled(toggled_on: bool) -> void:
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d.polygon):
|
||||||
|
return
|
||||||
|
var undo_redo = EditorInterface.get_editor_undo_redo()
|
||||||
|
if toggled_on:
|
||||||
|
undo_redo.create_action("Adjust Polygon2D color for %s" % str(scalable_vector_shape_2d))
|
||||||
|
undo_redo.add_undo_property(scalable_vector_shape_2d.polygon, 'color', scalable_vector_shape_2d.polygon.color)
|
||||||
|
else:
|
||||||
|
undo_redo.add_do_property(scalable_vector_shape_2d.polygon, 'color', %ColorPickerButton.color)
|
||||||
|
undo_redo.commit_action(false)
|
||||||
1
addons/curved_lines_2d/assign_fill_inspector_form.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://b1ii4843yuwkw
|
||||||
253
addons/curved_lines_2d/assign_fill_inspector_form.tscn
Normal file
@@ -0,0 +1,253 @@
|
|||||||
|
[gd_scene load_steps=11 format=3 uid="uid://53oqf8j7uyuu"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://b1ii4843yuwkw" path="res://addons/curved_lines_2d/assign_fill_inspector_form.gd" id="1_ogtsd"]
|
||||||
|
[ext_resource type="StyleBox" uid="uid://v0ueesjbdyrk" path="res://addons/curved_lines_2d/snazzy_toggle_button.stylebox" id="3_alhox"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://31qakec1dm6y" path="res://addons/curved_lines_2d/Key.svg" id="3_d26vq"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://caqsvv6rdxkm4" path="res://addons/curved_lines_2d/Gradients.svg" id="4_d26vq"]
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ogtsd"]
|
||||||
|
content_margin_left = 4.0
|
||||||
|
content_margin_top = 4.0
|
||||||
|
content_margin_right = 4.0
|
||||||
|
content_margin_bottom = 4.0
|
||||||
|
bg_color = Color(0.0823529, 0.0941176, 0.117647, 1)
|
||||||
|
|
||||||
|
[sub_resource type="ButtonGroup" id="ButtonGroup_6uned"]
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_7smxo"]
|
||||||
|
atlas = ExtResource("4_d26vq")
|
||||||
|
region = Rect2(0, 0, 32, 32)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_j40rh"]
|
||||||
|
atlas = ExtResource("4_d26vq")
|
||||||
|
region = Rect2(32, 0, 32, 32)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_7rdpo"]
|
||||||
|
atlas = ExtResource("4_d26vq")
|
||||||
|
region = Rect2(65, 0, 32, 32)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_alhox"]
|
||||||
|
atlas = ExtResource("4_d26vq")
|
||||||
|
region = Rect2(96, 0, 32, 32)
|
||||||
|
|
||||||
|
[node name="AssignFillInspectorForm" type="VBoxContainer"]
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
script = ExtResource("1_ogtsd")
|
||||||
|
|
||||||
|
[node name="FillColorFieldContainer" type="HBoxContainer" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="FillColorFieldContainer"]
|
||||||
|
clip_contents = true
|
||||||
|
custom_minimum_size = Vector2(80, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
tooltip_text = "This will set the color of the assigned Polygon2D."
|
||||||
|
mouse_filter = 0
|
||||||
|
text = "Fill Color*"
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="FillColorFieldContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
[node name="ColorPickerButton" type="ColorPickerButton" parent="FillColorFieldContainer/HBoxContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
tooltip_text = "This will set the color of the assigned Polygon2D."
|
||||||
|
theme_override_styles/normal = SubResource("StyleBoxFlat_ogtsd")
|
||||||
|
text = "Fill"
|
||||||
|
color = Color(1, 1, 1, 1)
|
||||||
|
|
||||||
|
[node name="AddFillKeyFrameButton" type="Button" parent="FillColorFieldContainer/HBoxContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
tooltip_text = "Add key frame for Polygon2D's color property"
|
||||||
|
icon = ExtResource("3_d26vq")
|
||||||
|
|
||||||
|
[node name="GradientFieldContainer" type="HBoxContainer" parent="."]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="GradientFieldContainer"]
|
||||||
|
clip_contents = true
|
||||||
|
custom_minimum_size = Vector2(80, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
tooltip_text = "- This will change set the texture of the Polygon2D to a GradientTexture2D.
|
||||||
|
- If the Polygon2D already has an active texture, it will be replaced."
|
||||||
|
mouse_filter = 0
|
||||||
|
text = "Gradient*"
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="GradientFieldContainer"]
|
||||||
|
clip_contents = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
[node name="RemoveGradientToggleButton" type="Button" parent="GradientFieldContainer/HBoxContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
clip_contents = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 0
|
||||||
|
tooltip_text = "Remove texture of the Polygon2D"
|
||||||
|
theme_override_colors/icon_hover_pressed_color = Color(1, 1, 1, 1)
|
||||||
|
theme_override_colors/icon_hover_color = Color(1, 1, 1, 1)
|
||||||
|
theme_override_colors/icon_pressed_color = Color(1, 1, 1, 1)
|
||||||
|
theme_override_colors/icon_focus_color = Color(1, 1, 1, 1)
|
||||||
|
theme_override_colors/icon_normal_color = Color(1, 1, 1, 1)
|
||||||
|
theme_override_styles/pressed = ExtResource("3_alhox")
|
||||||
|
toggle_mode = true
|
||||||
|
button_pressed = true
|
||||||
|
keep_pressed_outside = true
|
||||||
|
button_group = SubResource("ButtonGroup_6uned")
|
||||||
|
icon = SubResource("AtlasTexture_7smxo")
|
||||||
|
|
||||||
|
[node name="LinearGradientToggleButton" type="Button" parent="GradientFieldContainer/HBoxContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
clip_contents = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 0
|
||||||
|
tooltip_text = "Set the texture of the Polygon2D to a Linear Gradient"
|
||||||
|
theme_override_colors/icon_hover_pressed_color = Color(1, 1, 1, 1)
|
||||||
|
theme_override_colors/icon_hover_color = Color(1, 1, 1, 1)
|
||||||
|
theme_override_colors/icon_pressed_color = Color(1, 1, 1, 1)
|
||||||
|
theme_override_colors/icon_focus_color = Color(1, 1, 1, 1)
|
||||||
|
theme_override_colors/icon_normal_color = Color(1, 1, 1, 1)
|
||||||
|
theme_override_styles/pressed = ExtResource("3_alhox")
|
||||||
|
toggle_mode = true
|
||||||
|
keep_pressed_outside = true
|
||||||
|
button_group = SubResource("ButtonGroup_6uned")
|
||||||
|
icon = SubResource("AtlasTexture_j40rh")
|
||||||
|
|
||||||
|
[node name="RadialGradientToggleButton" type="Button" parent="GradientFieldContainer/HBoxContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
clip_contents = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 0
|
||||||
|
tooltip_text = "Set the texture of the Polygon2D to a Radial Gradient"
|
||||||
|
theme_override_colors/icon_hover_pressed_color = Color(1, 1, 1, 1)
|
||||||
|
theme_override_colors/icon_hover_color = Color(1, 1, 1, 1)
|
||||||
|
theme_override_colors/icon_pressed_color = Color(1, 1, 1, 1)
|
||||||
|
theme_override_colors/icon_focus_color = Color(1, 1, 1, 1)
|
||||||
|
theme_override_colors/icon_normal_color = Color(1, 1, 1, 1)
|
||||||
|
theme_override_styles/pressed = ExtResource("3_alhox")
|
||||||
|
toggle_mode = true
|
||||||
|
keep_pressed_outside = true
|
||||||
|
button_group = SubResource("ButtonGroup_6uned")
|
||||||
|
icon = SubResource("AtlasTexture_7rdpo")
|
||||||
|
|
||||||
|
[node name="OtherTextureToggleButton" type="Button" parent="GradientFieldContainer/HBoxContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
clip_contents = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 0
|
||||||
|
tooltip_text = "This disabled toggle is active if another type of texture is applied to the Polygon2D"
|
||||||
|
theme_override_colors/icon_hover_pressed_color = Color(1, 1, 1, 1)
|
||||||
|
theme_override_colors/icon_hover_color = Color(1, 1, 1, 1)
|
||||||
|
theme_override_colors/icon_pressed_color = Color(1, 1, 1, 1)
|
||||||
|
theme_override_colors/icon_focus_color = Color(1, 1, 1, 1)
|
||||||
|
theme_override_colors/icon_normal_color = Color(1, 1, 1, 1)
|
||||||
|
theme_override_styles/pressed = ExtResource("3_alhox")
|
||||||
|
disabled = true
|
||||||
|
toggle_mode = true
|
||||||
|
keep_pressed_outside = true
|
||||||
|
button_group = SubResource("ButtonGroup_6uned")
|
||||||
|
icon = SubResource("AtlasTexture_alhox")
|
||||||
|
|
||||||
|
[node name="GradientStopColorButtonContainer" type="HBoxContainer" parent="."]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="GradientStopColorButtonContainer"]
|
||||||
|
clip_contents = true
|
||||||
|
custom_minimum_size = Vector2(80, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_vertical = 0
|
||||||
|
tooltip_text = "- Change the stop colors of the gradient
|
||||||
|
- To add or remove color-stops, use the guide and handles in the 2D Viewport
|
||||||
|
- Or click the `Edit Polgyon2D` button below and use the built-in texture editor"
|
||||||
|
mouse_filter = 0
|
||||||
|
text = "Stop Colors*"
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="GradientStopColorButtonContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
[node name="StopColorButtonsContainer" type="HFlowContainer" parent="GradientStopColorButtonContainer/HBoxContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(0, 40)
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
[node name="BatchInsertGradientKeyFrameButton" type="Button" parent="GradientStopColorButtonContainer/HBoxContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 8
|
||||||
|
size_flags_vertical = 4
|
||||||
|
tooltip_text = "Pressing this button will add key frames for all aspects* of the GradientTexture2D on the Polygon2D:
|
||||||
|
- The start- and end position
|
||||||
|
- The stop colors
|
||||||
|
- The stop positions of the colors
|
||||||
|
|
||||||
|
* For more refined control, use the inspector foe the assigned Polygon2D node"
|
||||||
|
icon = ExtResource("3_d26vq")
|
||||||
|
|
||||||
|
[node name="ButtonContainer" type="HBoxContainer" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Label2" type="Label" parent="ButtonContainer"]
|
||||||
|
clip_contents = true
|
||||||
|
custom_minimum_size = Vector2(80, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
tooltip_text = "This will create a new Polygon2D node and assign it to the polygon property of this ScalableVectorScape2D."
|
||||||
|
mouse_filter = 0
|
||||||
|
text = "Add Fill*"
|
||||||
|
|
||||||
|
[node name="CreateFillButton" type="Button" parent="ButtonContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 2
|
||||||
|
tooltip_text = "This will create a new Polygon2D node and assign it to the polygon property of this ScalableVectorScape2D."
|
||||||
|
text = "Add Fill"
|
||||||
|
|
||||||
|
[node name="HSeparator" type="HSeparator" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ButtonContainer2" type="HBoxContainer" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Label2" type="Label" parent="ButtonContainer2"]
|
||||||
|
clip_contents = true
|
||||||
|
custom_minimum_size = Vector2(80, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
tooltip_text = "Click on this button to select the Polygon2D node that is assigned to this shape in the Scene Tree.
|
||||||
|
|
||||||
|
Use this for advanced features which are already built-in into godot, like gradients and repeating textures."
|
||||||
|
mouse_filter = 0
|
||||||
|
text = "Edit Polygon2D *"
|
||||||
|
|
||||||
|
[node name="GotoPolygon2DButton" type="Button" parent="ButtonContainer2"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 2
|
||||||
|
tooltip_text = "Click on this button to select the Polygon2D node that is assigned to this shape in the Scene Tree.
|
||||||
|
|
||||||
|
Use this for advanced features which are already built-in into godot, like gradients and repeating textures."
|
||||||
|
text = "Edit Polygon2D"
|
||||||
|
|
||||||
|
[connection signal="color_changed" from="FillColorFieldContainer/HBoxContainer/ColorPickerButton" to="." method="_on_color_picker_button_color_changed"]
|
||||||
|
[connection signal="toggled" from="FillColorFieldContainer/HBoxContainer/ColorPickerButton" to="." method="_on_color_picker_button_toggled"]
|
||||||
|
[connection signal="pressed" from="FillColorFieldContainer/HBoxContainer/AddFillKeyFrameButton" to="." method="_on_add_fill_key_frame_button_pressed"]
|
||||||
|
[connection signal="button_down" from="GradientFieldContainer/HBoxContainer/RemoveGradientToggleButton" to="." method="_on_remove_gradient_toggle_button_button_down"]
|
||||||
|
[connection signal="button_down" from="GradientFieldContainer/HBoxContainer/LinearGradientToggleButton" to="." method="_on_linear_gradient_toggle_button_button_down"]
|
||||||
|
[connection signal="button_down" from="GradientFieldContainer/HBoxContainer/RadialGradientToggleButton" to="." method="_on_radial_gradient_toggle_button_button_down"]
|
||||||
|
[connection signal="pressed" from="GradientStopColorButtonContainer/HBoxContainer/BatchInsertGradientKeyFrameButton" to="." method="_on_batch_insert_gradient_key_frame_button_pressed"]
|
||||||
|
[connection signal="pressed" from="ButtonContainer/CreateFillButton" to="." method="_on_create_fill_button_pressed"]
|
||||||
|
[connection signal="pressed" from="ButtonContainer2/GotoPolygon2DButton" to="." method="_on_goto_polygon_2d_button_pressed"]
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
@tool
|
||||||
|
extends Control
|
||||||
|
|
||||||
|
var scalable_vector_shape_2d : ScalableVectorShape2D
|
||||||
|
|
||||||
|
func _enter_tree() -> void:
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d):
|
||||||
|
return
|
||||||
|
if 'assigned_node_changed' in scalable_vector_shape_2d:
|
||||||
|
scalable_vector_shape_2d.assigned_node_changed.connect(_on_svs_assignment_changed)
|
||||||
|
_on_svs_assignment_changed()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_svs_assignment_changed() -> void:
|
||||||
|
if is_instance_valid(scalable_vector_shape_2d.navigation_region):
|
||||||
|
%GoToNavigationRegionButton.show()
|
||||||
|
%AddNavigationRegionButton.hide()
|
||||||
|
else:
|
||||||
|
%GoToNavigationRegionButton.hide()
|
||||||
|
%AddNavigationRegionButton.show()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_add_navigation_region_button_pressed() -> void:
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d):
|
||||||
|
return
|
||||||
|
|
||||||
|
var new_obj := NavigationRegion2D.new()
|
||||||
|
var undo_redo := EditorInterface.get_editor_undo_redo()
|
||||||
|
undo_redo.create_action("Add NavigationRegion2D to %s " % str(scalable_vector_shape_2d))
|
||||||
|
undo_redo.add_do_method(scalable_vector_shape_2d, 'add_child', new_obj, true)
|
||||||
|
if scalable_vector_shape_2d == EditorInterface.get_edited_scene_root():
|
||||||
|
undo_redo.add_do_method(new_obj, 'set_owner', scalable_vector_shape_2d)
|
||||||
|
else:
|
||||||
|
undo_redo.add_do_method(new_obj, 'set_owner', scalable_vector_shape_2d.owner)
|
||||||
|
undo_redo.add_do_reference(new_obj)
|
||||||
|
undo_redo.add_do_property(scalable_vector_shape_2d, 'navigation_region', new_obj)
|
||||||
|
undo_redo.add_undo_method(scalable_vector_shape_2d, 'remove_child', new_obj)
|
||||||
|
undo_redo.add_undo_property(scalable_vector_shape_2d, 'navigation_region', null)
|
||||||
|
undo_redo.commit_action()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_go_to_navigation_region_button_pressed() -> void:
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d):
|
||||||
|
return
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d.navigation_region):
|
||||||
|
return
|
||||||
|
EditorInterface.call_deferred('edit_node', scalable_vector_shape_2d.navigation_region)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://dsfcnewvnijjx
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
[gd_scene load_steps=2 format=3 uid="uid://eo53xo3ylo1a"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://dsfcnewvnijjx" path="res://addons/curved_lines_2d/assign_navigation_region_inspector_form.gd" id="1_opyos"]
|
||||||
|
|
||||||
|
[node name="AssignNavigationRegionInspectorForm" type="VBoxContainer"]
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
script = ExtResource("1_opyos")
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="HBoxContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
tooltip_text = "Creates and assigns a NavigationRegion2D to this shape."
|
||||||
|
mouse_filter = 0
|
||||||
|
text = "Navigation Region *"
|
||||||
|
|
||||||
|
[node name="AddNavigationRegionButton" type="Button" parent="HBoxContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
text = "Add"
|
||||||
|
|
||||||
|
[node name="GoToNavigationRegionButton" type="Button" parent="HBoxContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
visible = false
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
text = "Go To Node"
|
||||||
|
|
||||||
|
[connection signal="pressed" from="HBoxContainer/AddNavigationRegionButton" to="." method="_on_add_navigation_region_button_pressed"]
|
||||||
|
[connection signal="pressed" from="HBoxContainer/GoToNavigationRegionButton" to="." method="_on_go_to_navigation_region_button_pressed"]
|
||||||
106
addons/curved_lines_2d/assign_stroke_inspector_form.gd
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
@tool
|
||||||
|
extends Control
|
||||||
|
|
||||||
|
var scalable_vector_shape_2d : ScalableVectorShape2D
|
||||||
|
|
||||||
|
|
||||||
|
func _enter_tree() -> void:
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d):
|
||||||
|
return
|
||||||
|
if 'assigned_node_changed' in scalable_vector_shape_2d:
|
||||||
|
scalable_vector_shape_2d.assigned_node_changed.connect(_on_svs_assignment_changed)
|
||||||
|
_on_svs_assignment_changed()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_svs_assignment_changed() -> void:
|
||||||
|
if is_instance_valid(scalable_vector_shape_2d.line):
|
||||||
|
%CreateStrokeButton.get_parent().hide()
|
||||||
|
%GotoLine2DButton.get_parent().show()
|
||||||
|
%CreateStrokeButton.disabled = true
|
||||||
|
%GotoLine2DButton.disabled = false
|
||||||
|
else:
|
||||||
|
%CreateStrokeButton.get_parent().show()
|
||||||
|
%GotoLine2DButton.get_parent().hide()
|
||||||
|
%CreateStrokeButton.disabled = false
|
||||||
|
%GotoLine2DButton.disabled = true
|
||||||
|
|
||||||
|
if is_instance_valid(scalable_vector_shape_2d.poly_stroke):
|
||||||
|
%CreatePolyStrokeButton.get_parent().hide()
|
||||||
|
%GotoPolygon2DButton.get_parent().show()
|
||||||
|
%CreatePolyStrokeButton.disabled = true
|
||||||
|
%GotoPolygon2DButton.disabled = false
|
||||||
|
else:
|
||||||
|
%CreatePolyStrokeButton.get_parent().show()
|
||||||
|
%GotoPolygon2DButton.get_parent().hide()
|
||||||
|
%CreatePolyStrokeButton.disabled = false
|
||||||
|
%GotoPolygon2DButton.disabled = true
|
||||||
|
|
||||||
|
|
||||||
|
func _on_goto_line_2d_button_pressed() -> void:
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d):
|
||||||
|
return
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d.line):
|
||||||
|
return
|
||||||
|
EditorInterface.call_deferred('edit_node', scalable_vector_shape_2d.line)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_goto_polygon_2d_button_pressed() -> void:
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d):
|
||||||
|
return
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d.poly_stroke):
|
||||||
|
return
|
||||||
|
EditorInterface.call_deferred('edit_node', scalable_vector_shape_2d.poly_stroke)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_create_stroke_button_pressed():
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d):
|
||||||
|
return
|
||||||
|
if is_instance_valid(scalable_vector_shape_2d.line):
|
||||||
|
return
|
||||||
|
|
||||||
|
var line_2d := Line2D.new()
|
||||||
|
var root := EditorInterface.get_edited_scene_root()
|
||||||
|
var undo_redo = EditorInterface.get_editor_undo_redo()
|
||||||
|
line_2d.name = "Stroke"
|
||||||
|
line_2d.default_color = scalable_vector_shape_2d.stroke_color
|
||||||
|
line_2d.width = scalable_vector_shape_2d.stroke_width
|
||||||
|
line_2d.begin_cap_mode = scalable_vector_shape_2d.begin_cap_mode
|
||||||
|
line_2d.end_cap_mode = scalable_vector_shape_2d.end_cap_mode
|
||||||
|
line_2d.joint_mode = scalable_vector_shape_2d.line_joint_mode
|
||||||
|
line_2d.sharp_limit = 90.0
|
||||||
|
if CurvedLines2D._use_antialiased_line_2d():
|
||||||
|
line_2d.texture = load("res://addons/curved_lines_2d/LumAlpha8.tex")
|
||||||
|
line_2d.texture_mode = Line2D.LINE_TEXTURE_TILE
|
||||||
|
line_2d.texture_filter = CanvasItem.TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC
|
||||||
|
|
||||||
|
undo_redo.create_action("Add Line2D to %s " % str(scalable_vector_shape_2d))
|
||||||
|
undo_redo.add_do_method(scalable_vector_shape_2d, 'add_child', line_2d, true)
|
||||||
|
undo_redo.add_do_method(line_2d, 'set_owner', root)
|
||||||
|
undo_redo.add_do_reference(line_2d)
|
||||||
|
undo_redo.add_do_property(scalable_vector_shape_2d, 'line', line_2d)
|
||||||
|
undo_redo.add_undo_method(scalable_vector_shape_2d, 'remove_child', line_2d)
|
||||||
|
undo_redo.add_undo_property(scalable_vector_shape_2d, 'line', null)
|
||||||
|
undo_redo.commit_action()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
func _on_create_poly_stroke_button_pressed() -> void:
|
||||||
|
if not is_instance_valid(scalable_vector_shape_2d):
|
||||||
|
return
|
||||||
|
if is_instance_valid(scalable_vector_shape_2d.poly_stroke):
|
||||||
|
return
|
||||||
|
|
||||||
|
var poly_stroke := Polygon2D.new()
|
||||||
|
var root := EditorInterface.get_edited_scene_root()
|
||||||
|
var undo_redo = EditorInterface.get_editor_undo_redo()
|
||||||
|
poly_stroke.name = "PolyStroke"
|
||||||
|
poly_stroke.color = scalable_vector_shape_2d.stroke_color
|
||||||
|
|
||||||
|
undo_redo.create_action("Add Polygon2D for Stroke to %s " % str(scalable_vector_shape_2d))
|
||||||
|
undo_redo.add_do_method(scalable_vector_shape_2d, 'add_child', poly_stroke, true)
|
||||||
|
undo_redo.add_do_method(poly_stroke, 'set_owner', root)
|
||||||
|
undo_redo.add_do_reference(poly_stroke)
|
||||||
|
undo_redo.add_do_property(scalable_vector_shape_2d, 'poly_stroke', poly_stroke)
|
||||||
|
undo_redo.add_undo_method(scalable_vector_shape_2d, 'remove_child', poly_stroke)
|
||||||
|
undo_redo.add_undo_property(scalable_vector_shape_2d, 'poly_stroke', null)
|
||||||
|
undo_redo.commit_action()
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://bv0hffvudv51d
|
||||||
107
addons/curved_lines_2d/assign_stroke_inspector_form.tscn
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
[gd_scene load_steps=2 format=3 uid="uid://bm31gemem22uc"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://bv0hffvudv51d" path="res://addons/curved_lines_2d/assign_stroke_inspector_form.gd" id="1_j8wjx"]
|
||||||
|
|
||||||
|
[node name="AssignStrokeInspectorForm" type="VBoxContainer"]
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
script = ExtResource("1_j8wjx")
|
||||||
|
|
||||||
|
[node name="ButtonContainer" type="HBoxContainer" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Label2" type="Label" parent="ButtonContainer"]
|
||||||
|
clip_contents = true
|
||||||
|
custom_minimum_size = Vector2(140, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
tooltip_text = "This will create a new Line2D node and assign it to the line property of this ScalableVectorScape2D."
|
||||||
|
mouse_filter = 0
|
||||||
|
text = "Add Line2D Stroke *"
|
||||||
|
|
||||||
|
[node name="CreateStrokeButton" type="Button" parent="ButtonContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 2
|
||||||
|
tooltip_text = "This will create a new Line2D node and assign it to the line property of this ScalableVectorScape2D."
|
||||||
|
text = "Add Line2D Stroke"
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="ButtonContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ButtonContainer3" type="HBoxContainer" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Label2" type="Label" parent="ButtonContainer3"]
|
||||||
|
clip_contents = true
|
||||||
|
custom_minimum_size = Vector2(140, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
tooltip_text = "This will create a new Polygon2D node and assign it to the poly_stroke property of this ScalableVectorScape2D."
|
||||||
|
mouse_filter = 0
|
||||||
|
text = "Add Polygon2D Stroke *"
|
||||||
|
|
||||||
|
[node name="CreatePolyStrokeButton" type="Button" parent="ButtonContainer3"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 2
|
||||||
|
tooltip_text = "This will create a new Polygon2D node and assign it to the poly_stroke property of this ScalableVectorScape2D."
|
||||||
|
text = "Add Polygon2D Stroke"
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="ButtonContainer3"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="HSeparator" type="HSeparator" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ButtonContainer2" type="HBoxContainer" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Label2" type="Label" parent="ButtonContainer2"]
|
||||||
|
clip_contents = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
tooltip_text = "Click on this button to select the Line2D node that is assigned to this shape in the Scene Tree.
|
||||||
|
|
||||||
|
Use this for advanced features which are already built-in into godot, like gradients, width curvature, and repeating textures."
|
||||||
|
mouse_filter = 0
|
||||||
|
text = "Edit Line2D *"
|
||||||
|
|
||||||
|
[node name="GotoLine2DButton" type="Button" parent="ButtonContainer2"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 2
|
||||||
|
tooltip_text = "Click on this button to select the Line2D node that is assigned to this shape in the Scene Tree.
|
||||||
|
|
||||||
|
Use this for advanced features which are already built-in into godot, like gradients, width curvature, and repeating textures."
|
||||||
|
text = "Edit Line2D"
|
||||||
|
|
||||||
|
[node name="ButtonContainer4" type="HBoxContainer" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Label2" type="Label" parent="ButtonContainer4"]
|
||||||
|
clip_contents = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
tooltip_text = "Click on this button to select the Polygon2D node that is assigned to this shape in the Scene Tree.
|
||||||
|
|
||||||
|
Use this for advanced features which are already built-in into godot, like image textures."
|
||||||
|
mouse_filter = 0
|
||||||
|
text = "Edit Polygon2D *"
|
||||||
|
|
||||||
|
[node name="GotoPolygon2DButton" type="Button" parent="ButtonContainer4"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 2
|
||||||
|
tooltip_text = "Click on this button to select the Polygon2D node that is assigned to this shape in the Scene Tree.
|
||||||
|
|
||||||
|
Use this for advanced features which are already built-in into godot, like image textures."
|
||||||
|
text = "Edit Polygon2D"
|
||||||
|
|
||||||
|
[connection signal="pressed" from="ButtonContainer/CreateStrokeButton" to="." method="_on_create_stroke_button_pressed"]
|
||||||
|
[connection signal="pressed" from="ButtonContainer3/CreatePolyStrokeButton" to="." method="_on_create_poly_stroke_button_pressed"]
|
||||||
|
[connection signal="pressed" from="ButtonContainer2/GotoLine2DButton" to="." method="_on_goto_line_2d_button_pressed"]
|
||||||
|
[connection signal="pressed" from="ButtonContainer4/GotoPolygon2DButton" to="." method="_on_goto_polygon_2d_button_pressed"]
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
@tool
|
||||||
|
extends KeyframeButtonCapableInspectorFormBase
|
||||||
|
|
||||||
|
var scalable_vector_shape_2d : ScalableVectorShape2D
|
||||||
|
|
||||||
|
func _enter_tree() -> void:
|
||||||
|
_initialize_keyframe_capabilities()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_key_frame_capabilities_changed() -> void:
|
||||||
|
if _is_key_frame_capable():
|
||||||
|
%BatchInsertButton.disabled = false
|
||||||
|
else:
|
||||||
|
%BatchInsertButton.disabled = true
|
||||||
|
|
||||||
|
|
||||||
|
func _on_batch_insert_button_pressed() -> void:
|
||||||
|
var animation_name := animation_under_edit_button.get_item_text(animation_under_edit_button.get_selected_id())
|
||||||
|
var animation_player := _find_animation_player(animation_name)
|
||||||
|
var animation := _guarded_get_animation(animation_player)
|
||||||
|
var path_to_node := _guarded_get_path_to_node(animation_player, scalable_vector_shape_2d)
|
||||||
|
var track_position := _guarded_get_track_position()
|
||||||
|
if not animation:
|
||||||
|
return
|
||||||
|
if path_to_node.is_empty():
|
||||||
|
return
|
||||||
|
var undo_redo := EditorInterface.get_editor_undo_redo()
|
||||||
|
undo_redo.create_action("Batch insert curve keyframes for %s on animation %s" % [str(scalable_vector_shape_2d), str(animation)])
|
||||||
|
for p_idx in range(scalable_vector_shape_2d.curve.point_count):
|
||||||
|
_add_key_frame(undo_redo, animation, NodePath("%s:curve:point_%d/position" % [path_to_node, p_idx]),
|
||||||
|
track_position, scalable_vector_shape_2d.curve.get_point_position(p_idx))
|
||||||
|
if p_idx > 0:
|
||||||
|
_add_key_frame(undo_redo, animation, NodePath("%s:curve:point_%d/in" % [path_to_node, p_idx]),
|
||||||
|
track_position, scalable_vector_shape_2d.curve.get_point_in(p_idx))
|
||||||
|
if p_idx < scalable_vector_shape_2d.curve.point_count - 1:
|
||||||
|
_add_key_frame(undo_redo, animation, NodePath("%s:curve:point_%d/out" % [path_to_node, p_idx]),
|
||||||
|
track_position, scalable_vector_shape_2d.curve.get_point_out(p_idx))
|
||||||
|
for a_idx in scalable_vector_shape_2d.arc_list.arcs.size():
|
||||||
|
_add_key_frame(undo_redo, animation, NodePath("%s:arc_list:arc_%d/radius" % [path_to_node, a_idx]),
|
||||||
|
track_position, scalable_vector_shape_2d.arc_list.arcs[a_idx].radius)
|
||||||
|
_add_key_frame(undo_redo, animation, NodePath("%s:arc_list:arc_%d/rotation_deg" % [path_to_node, a_idx]),
|
||||||
|
track_position, scalable_vector_shape_2d.arc_list.arcs[a_idx].rotation_deg)
|
||||||
|
_add_key_frame(undo_redo, animation, NodePath("%s:arc_list:arc_%d/large_arc_flag" % [path_to_node, a_idx]),
|
||||||
|
track_position, scalable_vector_shape_2d.arc_list.arcs[a_idx].large_arc_flag)
|
||||||
|
_add_key_frame(undo_redo, animation, NodePath("%s:arc_list:arc_%d/sweep_flag" % [path_to_node, a_idx]),
|
||||||
|
track_position, scalable_vector_shape_2d.arc_list.arcs[a_idx].sweep_flag)
|
||||||
|
|
||||||
|
undo_redo.commit_action()
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://cm4sio0ryplts
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
[gd_scene load_steps=3 format=3 uid="uid://cb72od43gg2ew"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://cm4sio0ryplts" path="res://addons/curved_lines_2d/batch_insert_curve_point_key_frames_inspector_form.gd" id="1_65iy1"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://31qakec1dm6y" path="res://addons/curved_lines_2d/Key.svg" id="2_2yrvp"]
|
||||||
|
|
||||||
|
[node name="BatchInsertCurvePointKeyFramesInspectorForm" type="VBoxContainer"]
|
||||||
|
anchors_preset = 14
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
offset_top = -15.5
|
||||||
|
offset_bottom = 42.5
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
script = ExtResource("1_65iy1")
|
||||||
|
|
||||||
|
[node name="HSeparator2" type="HSeparator" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
tooltip_text = "- Clicking this button will insert key frames for all the curve points and control points at the current animation postion for all their property tracks
|
||||||
|
- When a track for a certain point, or control point is not found based on its relative it will newly be created
|
||||||
|
- Be aware that removing points or control points that are referenced in an animation track will cause warnings"
|
||||||
|
mouse_filter = 0
|
||||||
|
text = "Insert key frames*"
|
||||||
|
|
||||||
|
[node name="BatchInsertButton" type="Button" parent="HBoxContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
tooltip_text = "- Clicking this button will insert key frames for all the curve points and control points at the current animation postion for all their property tracks
|
||||||
|
- When a track for a certain point, or control point is not found based on its relative it will newly be created
|
||||||
|
- Be aware that removing points or control points that are referenced in an animation track will cause warnings"
|
||||||
|
disabled = true
|
||||||
|
text = "Batch insert"
|
||||||
|
icon = ExtResource("2_2yrvp")
|
||||||
|
|
||||||
|
[node name="HSeparator" type="HSeparator" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[connection signal="pressed" from="HBoxContainer/BatchInsertButton" to="." method="_on_batch_insert_button_pressed"]
|
||||||
20
addons/curved_lines_2d/closest_point_on_curve_meta.gd
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
@tool
|
||||||
|
extends Object
|
||||||
|
class_name ClosestPointOnCurveMeta
|
||||||
|
var before_segment : int
|
||||||
|
var point_position : Vector2
|
||||||
|
var local_point_position : Vector2
|
||||||
|
|
||||||
|
func _init(bs : int = 0, pp := Vector2.ZERO , lpp := Vector2.ZERO):
|
||||||
|
before_segment = bs
|
||||||
|
point_position = pp
|
||||||
|
local_point_position = lpp
|
||||||
|
|
||||||
|
|
||||||
|
func _to_string() -> String:
|
||||||
|
return (
|
||||||
|
"ClosestPointOnCurveMeta(before_segment: " + str(before_segment) +
|
||||||
|
", point_position: " + str(point_position) +
|
||||||
|
", local_point_position: " + str(local_point_position) +
|
||||||
|
")"
|
||||||
|
)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://b5xapyc6rm4ew
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
@tool
|
||||||
|
extends OptionButton
|
||||||
|
|
||||||
|
signal type_selected(obj_type : ScalableVectorShape2D.CollisionObjectType)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_item_selected(index: int) -> void:
|
||||||
|
type_selected.emit(index)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://ppu1camg8q83
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
[gd_scene load_steps=2 format=3 uid="uid://cjbkvx1pj7gq2"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://ppu1camg8q83" path="res://addons/curved_lines_2d/collision_object_type_option_button.gd" id="1_cky2p"]
|
||||||
|
|
||||||
|
[node name="CollisionObjectTypeOptionButton" type="OptionButton"]
|
||||||
|
selected = 0
|
||||||
|
item_count = 7
|
||||||
|
popup/item_0/text = "- No Collision -"
|
||||||
|
popup/item_0/id = 0
|
||||||
|
popup/item_1/text = "StaticBody2D"
|
||||||
|
popup/item_1/id = 1
|
||||||
|
popup/item_2/text = "Area2D"
|
||||||
|
popup/item_2/id = 2
|
||||||
|
popup/item_3/text = "AnimatableBody2D"
|
||||||
|
popup/item_3/id = 3
|
||||||
|
popup/item_4/text = "RigidBody2D"
|
||||||
|
popup/item_4/id = 4
|
||||||
|
popup/item_5/text = "CharacterBody2D"
|
||||||
|
popup/item_5/id = 5
|
||||||
|
popup/item_6/text = "PhysicalBone2D"
|
||||||
|
popup/item_6/id = 6
|
||||||
|
script = ExtResource("1_cky2p")
|
||||||
|
|
||||||
|
[connection signal="item_selected" from="." to="." method="_on_item_selected"]
|
||||||
2066
addons/curved_lines_2d/curved_lines_2d.gd
Normal file
1
addons/curved_lines_2d/curved_lines_2d.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://jf8a2a3dnwk0
|
||||||
4
addons/curved_lines_2d/debug_label_settings.tres
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
[gd_resource type="LabelSettings" format=3 uid="uid://cfn4nq1j1xxok"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
font_color = Color(0.52549, 0.533333, 0.552941, 1)
|
||||||
141
addons/curved_lines_2d/drawable_path_2d.gd
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
@tool
|
||||||
|
extends Path2D
|
||||||
|
## A custom node that extends Path2D so it can be drawn as a Line2D
|
||||||
|
## Original adapted code: https://www.hedberggames.com/blog/rendering-curves-in-godot
|
||||||
|
## @deprecated: Use [ScalableVectorShape2D] instead.
|
||||||
|
class_name DrawablePath2D
|
||||||
|
|
||||||
|
## Emitted when a new set of points was calculated for a connected Line2D, Polygon2D, or CollisionPolygon2D
|
||||||
|
signal path_changed(new_points : PackedVector2Array)
|
||||||
|
|
||||||
|
## This signal is used internally in editor-mode to tell the DrawablePath2D tool that
|
||||||
|
## the instance of assigned Line2D, Polygon2D, or CollisionPolygon2D has changed
|
||||||
|
signal assigned_node_changed()
|
||||||
|
|
||||||
|
|
||||||
|
## The Polygon2D controlled by this Path2D
|
||||||
|
@export var polygon: Polygon2D:
|
||||||
|
set(_poly):
|
||||||
|
polygon = _poly
|
||||||
|
assigned_node_changed.emit()
|
||||||
|
|
||||||
|
## The Line2D controlled by this Path2D
|
||||||
|
@export var line: Line2D:
|
||||||
|
set(_line):
|
||||||
|
line = _line
|
||||||
|
assigned_node_changed.emit()
|
||||||
|
|
||||||
|
## The CollisionPolygon2D controlled by this Path2D
|
||||||
|
@export var collision_polygon: CollisionPolygon2D:
|
||||||
|
set(_poly):
|
||||||
|
collision_polygon = _poly
|
||||||
|
assigned_node_changed.emit()
|
||||||
|
|
||||||
|
## Controls whether the path is treated as static (only update in editor) or dynamic (can be updated during runtime)
|
||||||
|
## If you set this to true, be alert for potential performance issues
|
||||||
|
@export var update_curve_at_runtime: bool = false
|
||||||
|
|
||||||
|
## Controls the paramaters used to divide up the line in segments.
|
||||||
|
## These settings are prefilled with the default values.
|
||||||
|
@export_group("Tesselation settings")
|
||||||
|
## Controls how many subdivisions a curve segment may face before it is considered approximate enough.
|
||||||
|
## Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions
|
||||||
|
## per curve segment. Increase with care!
|
||||||
|
@export_range(1, 10) var max_stages : int = 5:
|
||||||
|
set(_max_stages):
|
||||||
|
max_stages = _max_stages
|
||||||
|
assigned_node_changed.emit()
|
||||||
|
## Controls how many degrees the midpoint of a segment may deviate from the real curve, before the
|
||||||
|
## segment has to be subdivided.
|
||||||
|
@export_range(0.0, 180.0) var tolerance_degrees := 4.0:
|
||||||
|
set(_tolerance_degrees):
|
||||||
|
tolerance_degrees = _tolerance_degrees
|
||||||
|
assigned_node_changed.emit()
|
||||||
|
|
||||||
|
var lock_assigned_shapes := true
|
||||||
|
|
||||||
|
# Wire up signals at runtime
|
||||||
|
func _ready():
|
||||||
|
if update_curve_at_runtime:
|
||||||
|
if not curve.changed.is_connected(curve_changed):
|
||||||
|
curve.changed.connect(curve_changed)
|
||||||
|
|
||||||
|
|
||||||
|
# Wire up signals on enter tree for the editor
|
||||||
|
func _enter_tree():
|
||||||
|
if Engine.is_editor_hint():
|
||||||
|
if not curve.changed.is_connected(curve_changed):
|
||||||
|
curve.changed.connect(curve_changed)
|
||||||
|
if not assigned_node_changed.is_connected(_on_assigned_node_changed):
|
||||||
|
assigned_node_changed.connect(_on_assigned_node_changed)
|
||||||
|
# handles update when reparenting
|
||||||
|
if update_curve_at_runtime:
|
||||||
|
if not curve.changed.is_connected(curve_changed):
|
||||||
|
curve.changed.connect(curve_changed)
|
||||||
|
|
||||||
|
|
||||||
|
# Clean up signals (ie. when closing scene) to prevent error messages in the editor
|
||||||
|
func _exit_tree():
|
||||||
|
if curve.changed.is_connected(curve_changed):
|
||||||
|
curve.changed.disconnect(curve_changed)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_assigned_node_changed():
|
||||||
|
if is_instance_valid(line):
|
||||||
|
if lock_assigned_shapes:
|
||||||
|
line.set_meta("_edit_lock_", true)
|
||||||
|
curve_changed()
|
||||||
|
if is_instance_valid(polygon):
|
||||||
|
if lock_assigned_shapes:
|
||||||
|
polygon.set_meta("_edit_lock_", true)
|
||||||
|
curve_changed()
|
||||||
|
if is_instance_valid(collision_polygon):
|
||||||
|
if lock_assigned_shapes:
|
||||||
|
collision_polygon.set_meta("_edit_lock_", true)
|
||||||
|
curve_changed()
|
||||||
|
|
||||||
|
|
||||||
|
# Redraw the line based on the new curve, using its tesselate method
|
||||||
|
func curve_changed():
|
||||||
|
if (not is_instance_valid(line) and not is_instance_valid(polygon)
|
||||||
|
and not is_instance_valid(collision_polygon)
|
||||||
|
and not path_changed.has_connections()):
|
||||||
|
# guard against needlessly invoking expensive tesselate operation
|
||||||
|
return
|
||||||
|
|
||||||
|
var new_points := curve.tessellate(max_stages, tolerance_degrees)
|
||||||
|
# Fixes cases start- and end-node are so close to each other that
|
||||||
|
# polygons won't fill and closed lines won't cap nicely
|
||||||
|
if new_points[0].distance_to(new_points[new_points.size()-1]) < 0.001:
|
||||||
|
new_points.remove_at(new_points.size() - 1)
|
||||||
|
if is_instance_valid(line):
|
||||||
|
line.points = new_points
|
||||||
|
if is_instance_valid(polygon):
|
||||||
|
polygon.polygon = new_points
|
||||||
|
if is_instance_valid(collision_polygon):
|
||||||
|
collision_polygon.polygon = new_points
|
||||||
|
path_changed.emit(new_points)
|
||||||
|
|
||||||
|
|
||||||
|
func get_bounding_rect() -> Rect2:
|
||||||
|
var points := curve.tessellate(max_stages, tolerance_degrees)
|
||||||
|
if points.size() < 1:
|
||||||
|
# Cannot calculate a center for 0 points
|
||||||
|
return Rect2(Vector2.ZERO, Vector2.ZERO)
|
||||||
|
var minx := INF
|
||||||
|
var miny := INF
|
||||||
|
var maxx := -INF
|
||||||
|
var maxy := -INF
|
||||||
|
for p : Vector2 in points:
|
||||||
|
minx = p.x if p.x < minx else minx
|
||||||
|
miny = p.y if p.y < miny else miny
|
||||||
|
maxx = p.x if p.x > maxx else maxx
|
||||||
|
maxy = p.y if p.y > maxy else maxy
|
||||||
|
return Rect2(minx, miny, maxx - minx, maxy - miny)
|
||||||
|
|
||||||
|
|
||||||
|
func set_position_to_center() -> void:
|
||||||
|
var c = get_bounding_rect().get_center()
|
||||||
|
position += c
|
||||||
|
for i in range(curve.get_point_count()):
|
||||||
|
curve.set_point_position(i, curve.get_point_position(i) - c)
|
||||||
1
addons/curved_lines_2d/drawable_path_2d.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://brqrlfnreboqp
|
||||||
4
addons/curved_lines_2d/error_label_settings.tres
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
[gd_resource type="LabelSettings" format=3 uid="uid://c77jfonujet7g"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
font_color = Color(1, 0, 0, 1)
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
extends Node2D
|
||||||
|
|
||||||
|
|
||||||
|
## Only drawing polygons is fastest
|
||||||
|
@export var draw_fills := true
|
||||||
|
|
||||||
|
## Drawing strokes with cutouts requires extra compute, but still ok
|
||||||
|
@export var draw_strokes := true
|
||||||
|
|
||||||
|
## Redrawing navigation is fast, but would slow down agents
|
||||||
|
@export var draw_navigation := false
|
||||||
|
|
||||||
|
## Redrawing collision polygons is heavy
|
||||||
|
@export var draw_collision := false
|
||||||
|
|
||||||
|
|
||||||
|
var foobar := false
|
||||||
|
func _input(event):
|
||||||
|
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT and event.pressed:
|
||||||
|
add_ellipse(event.position)
|
||||||
|
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_RIGHT and event.pressed:
|
||||||
|
add_clip_to_ellipses(event.position)
|
||||||
|
|
||||||
|
|
||||||
|
func add_clip_to_ellipses(at_pos: Vector2):
|
||||||
|
var ellipse : ScalableVectorShape2D = null
|
||||||
|
for ch in get_children():
|
||||||
|
if ch is ScalableVectorShape2D and ch.shape_type == ScalableVectorShape2D.ShapeType.ELLIPSE and ch.clipped_polygon_has_point(at_pos):
|
||||||
|
ellipse = ch
|
||||||
|
|
||||||
|
if not ellipse:
|
||||||
|
return
|
||||||
|
|
||||||
|
foobar = not foobar
|
||||||
|
var rect = ScalableVectorShape2D.new()
|
||||||
|
rect.name = "ClipRect"
|
||||||
|
rect.update_curve_at_runtime = true
|
||||||
|
rect.shape_type = ScalableVectorShape2D.ShapeType.RECT
|
||||||
|
rect.position = at_pos - ellipse.position
|
||||||
|
rect.size = Vector2(200, 40) if foobar else Vector2(40, 200)
|
||||||
|
rect.rx = 20
|
||||||
|
rect.ry = 20
|
||||||
|
ellipse.add_child(rect, true)
|
||||||
|
ellipse.add_clip_path(rect)
|
||||||
|
|
||||||
|
|
||||||
|
func add_ellipse(at_pos: Vector2):
|
||||||
|
var ellipse = ScalableVectorShape2D.new()
|
||||||
|
# make sure it will rerender in game
|
||||||
|
ellipse.name = "Ellipse"
|
||||||
|
ellipse.update_curve_at_runtime = true
|
||||||
|
ellipse.shape_type = ScalableVectorShape2D.ShapeType.ELLIPSE
|
||||||
|
ellipse.position = at_pos
|
||||||
|
ellipse.size = Vector2(500, 250)
|
||||||
|
|
||||||
|
if draw_fills:
|
||||||
|
# assign a Polygon2D as fill
|
||||||
|
ellipse.polygon = Polygon2D.new()
|
||||||
|
ellipse.polygon.color = Color.WHITE
|
||||||
|
ellipse.add_child(ellipse.polygon)
|
||||||
|
|
||||||
|
if draw_strokes:
|
||||||
|
# assign a Line2D as stroke
|
||||||
|
ellipse.line = Line2D.new()
|
||||||
|
ellipse.stroke_color = Color.BLACK
|
||||||
|
ellipse.add_child(ellipse.line)
|
||||||
|
|
||||||
|
if draw_collision:
|
||||||
|
# assign a collision object to hold new collision polygons
|
||||||
|
ellipse.collision_object = StaticBody2D.new()
|
||||||
|
ellipse.add_child(ellipse.collision_object)
|
||||||
|
|
||||||
|
if draw_navigation:
|
||||||
|
ellipse.navigation_region = NavigationRegion2D.new()
|
||||||
|
ellipse.add_child(ellipse.navigation_region)
|
||||||
|
|
||||||
|
add_child(ellipse, true)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://c8rves0r1i4up
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
[gd_scene load_steps=4 format=3 uid="uid://c2k8nyelxdgi3"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://c8rves0r1i4up" path="res://addons/curved_lines_2d/examples/add_shapes_programmatically/click_ellipse.gd" id="1_1ehuy"]
|
||||||
|
[ext_resource type="Script" uid="uid://dr5dl1my0r0rl" path="res://addons/curved_lines_2d/examples/add_shapes_programmatically/label.gd" id="2_a3wah"]
|
||||||
|
|
||||||
|
[sub_resource type="LabelSettings" id="LabelSettings_1ehuy"]
|
||||||
|
font_size = 32
|
||||||
|
outline_size = 4
|
||||||
|
outline_color = Color(0, 0, 0, 1)
|
||||||
|
|
||||||
|
[node name="Control" type="Control"]
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_vertical = 3
|
||||||
|
|
||||||
|
[node name="ClickEllipse" type="Node2D" parent="."]
|
||||||
|
script = ExtResource("1_1ehuy")
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 8
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
offset_left = -217.0
|
||||||
|
offset_top = -22.5
|
||||||
|
offset_right = 217.0
|
||||||
|
offset_bottom = 22.5
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_vertical = 3
|
||||||
|
text = "- Left click to add an ellipse -
|
||||||
|
|
||||||
|
- Right click to cut a hole in the ellipse -"
|
||||||
|
label_settings = SubResource("LabelSettings_1ehuy")
|
||||||
|
horizontal_alignment = 1
|
||||||
|
script = ExtResource("2_a3wah")
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
extends Label
|
||||||
|
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
if modulate.a > 0.0:
|
||||||
|
modulate.a -= delta * 0.25
|
||||||
|
else:
|
||||||
|
queue_free()
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://dr5dl1my0r0rl
|
||||||
4
addons/curved_lines_2d/examples/cloud.gd
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
extends Node2D
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
$AnimationPlayer.play("cloud_doing_cloud_stuff")
|
||||||
1
addons/curved_lines_2d/examples/cloud.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://376ru33navgn
|
||||||
450
addons/curved_lines_2d/examples/cloud.tscn
Normal file
@@ -0,0 +1,450 @@
|
|||||||
|
[gd_scene load_steps=32 format=3 uid="uid://dqxb6wxwmw6r0"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://de3jpss66xjfh" path="res://addons/curved_lines_2d/scalable_vector_shape_2d.gd" id="1_8gu3s"]
|
||||||
|
[ext_resource type="Script" uid="uid://376ru33navgn" path="res://addons/curved_lines_2d/examples/cloud.gd" id="1_nwkfo"]
|
||||||
|
[ext_resource type="Script" uid="uid://dlbv4pit17dnu" path="res://addons/curved_lines_2d/scalable_arc.gd" id="2_nwkfo"]
|
||||||
|
[ext_resource type="Script" uid="uid://dl1t88tthmwts" path="res://addons/curved_lines_2d/scalable_arc_list.gd" id="3_oar4j"]
|
||||||
|
|
||||||
|
[sub_resource type="Curve2D" id="Curve2D_m6x0f"]
|
||||||
|
_data = {
|
||||||
|
"points": PackedVector2Array(0, 0, 0, 0, 20.1859, -18.275, 0, 0, 0, 0, -1.25378, -25.1621, 0, 0, 0, 0, -7.76143, -26.8937, 0, 0, 0, 0, -18.1859, -21.571, 0, 0, 0, 0, -22.2008, -22.2011, 0, 0, 0, 0, -34.6552, -10.4688, 0, 0, 0, 0, -26.6916, 0.443052, 0, 0, 0, 0, -26.713, 0.72216, 0, 0, 0, 0, -16.9296, 12.1506, 0, 0, 0, 0, -16.9664, 12.6348, 0, 0, 0, 0, -4.51253, 24.367, 0, 0, 0, 0, 3.18721, 21.8227, 0, 0, 0, 0, 13.8984, 27.6159, 0, 0, 0, 0, 26.3522, 15.8836, 0, 0, 0, 0, 25.8708, 12.6639, 0, 0, 0, 0, 29.6017, 4.33186, 0, 0, 0, 0, 29.277, 1.68612, 0, 0, 0, 0, 34.6552, -7.94157, 0, 0, 0, 0, 20.1859, -18.275, 0, 0, 0, 0, 20.1859, -18.275)
|
||||||
|
}
|
||||||
|
point_count = 20
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_q0tfb"]
|
||||||
|
script = ExtResource("2_nwkfo")
|
||||||
|
start_point = 0
|
||||||
|
radius = Vector2(11.7371, 11.0567)
|
||||||
|
rotation_deg = 0.0
|
||||||
|
sweep_flag = false
|
||||||
|
large_arc_flag = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_m08lf"]
|
||||||
|
script = ExtResource("2_nwkfo")
|
||||||
|
start_point = 1
|
||||||
|
radius = Vector2(11.7371, 11.0567)
|
||||||
|
rotation_deg = 0.0
|
||||||
|
sweep_flag = false
|
||||||
|
large_arc_flag = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_h7xxh"]
|
||||||
|
script = ExtResource("2_nwkfo")
|
||||||
|
start_point = 2
|
||||||
|
radius = Vector2(11.7371, 11.0567)
|
||||||
|
rotation_deg = 0.0
|
||||||
|
sweep_flag = false
|
||||||
|
large_arc_flag = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_2y863"]
|
||||||
|
script = ExtResource("2_nwkfo")
|
||||||
|
start_point = 3
|
||||||
|
radius = Vector2(11.7371, 11.0567)
|
||||||
|
rotation_deg = 0.0
|
||||||
|
sweep_flag = false
|
||||||
|
large_arc_flag = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_el6ml"]
|
||||||
|
script = ExtResource("2_nwkfo")
|
||||||
|
start_point = 4
|
||||||
|
radius = Vector2(11.7371, 11.0567)
|
||||||
|
rotation_deg = 0.0
|
||||||
|
sweep_flag = false
|
||||||
|
large_arc_flag = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_pfoxu"]
|
||||||
|
script = ExtResource("2_nwkfo")
|
||||||
|
start_point = 5
|
||||||
|
radius = Vector2(11.7371, 11.0567)
|
||||||
|
rotation_deg = 0.0
|
||||||
|
sweep_flag = false
|
||||||
|
large_arc_flag = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_3ghir"]
|
||||||
|
script = ExtResource("2_nwkfo")
|
||||||
|
start_point = 6
|
||||||
|
radius = Vector2(11.7371, 11.0567)
|
||||||
|
rotation_deg = 0.0
|
||||||
|
sweep_flag = false
|
||||||
|
large_arc_flag = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_xvmfk"]
|
||||||
|
script = ExtResource("2_nwkfo")
|
||||||
|
start_point = 7
|
||||||
|
radius = Vector2(11.7371, 11.0567)
|
||||||
|
rotation_deg = 0.0
|
||||||
|
sweep_flag = false
|
||||||
|
large_arc_flag = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_t7p2c"]
|
||||||
|
script = ExtResource("2_nwkfo")
|
||||||
|
start_point = 8
|
||||||
|
radius = Vector2(11.7371, 11.0567)
|
||||||
|
rotation_deg = 0.0
|
||||||
|
sweep_flag = false
|
||||||
|
large_arc_flag = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_upm0f"]
|
||||||
|
script = ExtResource("2_nwkfo")
|
||||||
|
start_point = 9
|
||||||
|
radius = Vector2(11.7371, 11.0567)
|
||||||
|
rotation_deg = 0.0
|
||||||
|
sweep_flag = false
|
||||||
|
large_arc_flag = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_jnmgg"]
|
||||||
|
script = ExtResource("2_nwkfo")
|
||||||
|
start_point = 10
|
||||||
|
radius = Vector2(11.7371, 11.0567)
|
||||||
|
rotation_deg = 0.0
|
||||||
|
sweep_flag = false
|
||||||
|
large_arc_flag = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_0ig0s"]
|
||||||
|
script = ExtResource("2_nwkfo")
|
||||||
|
start_point = 11
|
||||||
|
radius = Vector2(11.7371, 11.0567)
|
||||||
|
rotation_deg = 0.0
|
||||||
|
sweep_flag = false
|
||||||
|
large_arc_flag = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_gou68"]
|
||||||
|
script = ExtResource("2_nwkfo")
|
||||||
|
start_point = 12
|
||||||
|
radius = Vector2(11.7371, 11.0567)
|
||||||
|
rotation_deg = 0.0
|
||||||
|
sweep_flag = false
|
||||||
|
large_arc_flag = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_42033"]
|
||||||
|
script = ExtResource("2_nwkfo")
|
||||||
|
start_point = 13
|
||||||
|
radius = Vector2(11.7371, 11.0567)
|
||||||
|
rotation_deg = 0.0
|
||||||
|
sweep_flag = false
|
||||||
|
large_arc_flag = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_h1yoj"]
|
||||||
|
script = ExtResource("2_nwkfo")
|
||||||
|
start_point = 14
|
||||||
|
radius = Vector2(11.7371, 11.0567)
|
||||||
|
rotation_deg = 0.0
|
||||||
|
sweep_flag = false
|
||||||
|
large_arc_flag = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_8u3ec"]
|
||||||
|
script = ExtResource("2_nwkfo")
|
||||||
|
start_point = 15
|
||||||
|
radius = Vector2(11.7371, 11.0567)
|
||||||
|
rotation_deg = 0.0
|
||||||
|
sweep_flag = false
|
||||||
|
large_arc_flag = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_50naw"]
|
||||||
|
script = ExtResource("2_nwkfo")
|
||||||
|
start_point = 16
|
||||||
|
radius = Vector2(11.7371, 11.0567)
|
||||||
|
rotation_deg = 0.0
|
||||||
|
sweep_flag = false
|
||||||
|
large_arc_flag = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_a83h2"]
|
||||||
|
script = ExtResource("2_nwkfo")
|
||||||
|
start_point = 17
|
||||||
|
radius = Vector2(11.7371, 11.0567)
|
||||||
|
rotation_deg = 0.0
|
||||||
|
sweep_flag = false
|
||||||
|
large_arc_flag = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_61vjn"]
|
||||||
|
script = ExtResource("3_oar4j")
|
||||||
|
arcs = Array[ExtResource("2_nwkfo")]([SubResource("Resource_q0tfb"), SubResource("Resource_m08lf"), SubResource("Resource_h7xxh"), SubResource("Resource_2y863"), SubResource("Resource_el6ml"), SubResource("Resource_pfoxu"), SubResource("Resource_3ghir"), SubResource("Resource_xvmfk"), SubResource("Resource_t7p2c"), SubResource("Resource_upm0f"), SubResource("Resource_jnmgg"), SubResource("Resource_0ig0s"), SubResource("Resource_gou68"), SubResource("Resource_42033"), SubResource("Resource_h1yoj"), SubResource("Resource_8u3ec"), SubResource("Resource_50naw"), SubResource("Resource_a83h2")])
|
||||||
|
|
||||||
|
[sub_resource type="Gradient" id="Gradient_nwkfo"]
|
||||||
|
offsets = PackedFloat32Array(0, 0.283143, 1)
|
||||||
|
colors = PackedColorArray(1, 1, 1, 1, 0.988493, 0.967342, 0.967342, 0.928441, 0.859375, 0.600891, 0.600891, 0.12549)
|
||||||
|
|
||||||
|
[sub_resource type="GradientTexture2D" id="GradientTexture2D_oar4j"]
|
||||||
|
gradient = SubResource("Gradient_nwkfo")
|
||||||
|
width = 69
|
||||||
|
height = 57
|
||||||
|
fill_from = Vector2(0.482854, 0.914123)
|
||||||
|
fill_to = Vector2(0.633236, -0.0185821)
|
||||||
|
|
||||||
|
[sub_resource type="Curve2D" id="Curve2D_a6hwq"]
|
||||||
|
_data = {
|
||||||
|
"points": PackedVector2Array(0, 0, 0, 5.523, 10, 0, 5.523, 0, -5.523, 0, 0, 10, 0, 5.523, 0, -5.523, -10, 0, -5.523, 0, 5.523, 0, 0, -10, 0, -5.523, 0, 0, 10, 0)
|
||||||
|
}
|
||||||
|
point_count = 5
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_kh3t1"]
|
||||||
|
script = ExtResource("3_oar4j")
|
||||||
|
arcs = Array[ExtResource("2_nwkfo")]([])
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_m6x0f"]
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("CloudPath:rotation")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [0.816665]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("CloudPath/BubbleCutout:position")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(31.2104, -35.3104)]
|
||||||
|
}
|
||||||
|
tracks/2/type = "value"
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/path = NodePath("CloudPath:curve:point_19/position")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(20.1859, -18.275)]
|
||||||
|
}
|
||||||
|
tracks/3/type = "value"
|
||||||
|
tracks/3/imported = false
|
||||||
|
tracks/3/enabled = true
|
||||||
|
tracks/3/path = NodePath("CloudPath:curve:point_18/position")
|
||||||
|
tracks/3/interp = 1
|
||||||
|
tracks/3/loop_wrap = true
|
||||||
|
tracks/3/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(20.1859, -18.275)]
|
||||||
|
}
|
||||||
|
tracks/4/type = "value"
|
||||||
|
tracks/4/imported = false
|
||||||
|
tracks/4/enabled = true
|
||||||
|
tracks/4/path = NodePath("CloudPath:curve:point_0/position")
|
||||||
|
tracks/4/interp = 1
|
||||||
|
tracks/4/loop_wrap = true
|
||||||
|
tracks/4/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(20.1859, -18.275)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_oar4j"]
|
||||||
|
resource_name = "cloud_doing_cloud_stuff"
|
||||||
|
length = 3.0
|
||||||
|
loop_mode = 1
|
||||||
|
step = 0.1
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("CloudPath:rotation")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1.5, 3),
|
||||||
|
"transitions": PackedFloat32Array(1, 1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [0.0, -0.425622, 0.0]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("CloudPath:visible")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(1.5),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 1,
|
||||||
|
"values": [true]
|
||||||
|
}
|
||||||
|
tracks/2/type = "value"
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/path = NodePath("CloudPath/BubbleCutout:position")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1.5, 3),
|
||||||
|
"transitions": PackedFloat32Array(1, 1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(19.1408, -16.6223), Vector2(29.3202, -54.9174), Vector2(29.3828, -66.8249)]
|
||||||
|
}
|
||||||
|
tracks/3/type = "value"
|
||||||
|
tracks/3/imported = false
|
||||||
|
tracks/3/enabled = true
|
||||||
|
tracks/3/path = NodePath("CloudPath:curve:point_0/position")
|
||||||
|
tracks/3/interp = 1
|
||||||
|
tracks/3/loop_wrap = true
|
||||||
|
tracks/3/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 1.5, 3),
|
||||||
|
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(10.4099, -22.163), Vector2(12.8712, -24.8974), Vector2(13.2506, -25.1345), Vector2(13.6988, -23.5426), Vector2(15.3796, -21.0777), Vector2(16.7565, -18.4755), Vector2(17.7767, -16.9076), Vector2(17.7767, -16.9076), Vector2(17.7767, -16.9076)]
|
||||||
|
}
|
||||||
|
tracks/4/type = "value"
|
||||||
|
tracks/4/imported = false
|
||||||
|
tracks/4/enabled = true
|
||||||
|
tracks/4/path = NodePath("CloudPath:curve:point_18/position")
|
||||||
|
tracks/4/interp = 1
|
||||||
|
tracks/4/loop_wrap = true
|
||||||
|
tracks/4/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 1.5, 3),
|
||||||
|
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(28.8791, -13.4321), Vector2(30.3815, -14.554), Vector2(30.6663, -16.2217), Vector2(27.5951, -15.9178), Vector2(26.2874, -15.8419), Vector2(21.5472, -15.8921), Vector2(17.7767, -16.9076), Vector2(17.7767, -16.9076), Vector2(17.7767, -16.9076)]
|
||||||
|
}
|
||||||
|
tracks/5/type = "value"
|
||||||
|
tracks/5/imported = false
|
||||||
|
tracks/5/enabled = true
|
||||||
|
tracks/5/path = NodePath("CloudPath:curve:point_19/position")
|
||||||
|
tracks/5/interp = 1
|
||||||
|
tracks/5/loop_wrap = true
|
||||||
|
tracks/5/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 1.5, 3),
|
||||||
|
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(10.4099, -22.163), Vector2(12.8712, -24.8974), Vector2(13.2506, -25.1345), Vector2(13.6988, -23.5426), Vector2(15.3796, -21.0777), Vector2(16.7565, -18.4755), Vector2(17.7767, -16.9076), Vector2(17.7767, -16.9076), Vector2(17.7767, -16.9076)]
|
||||||
|
}
|
||||||
|
tracks/6/type = "value"
|
||||||
|
tracks/6/imported = false
|
||||||
|
tracks/6/enabled = true
|
||||||
|
tracks/6/path = NodePath("CloudPath/Fill:texture:gradient:colors")
|
||||||
|
tracks/6/interp = 1
|
||||||
|
tracks/6/loop_wrap = true
|
||||||
|
tracks/6/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1.49),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [PackedColorArray(1, 1, 1, 1, 0.988493, 0.967342, 0.967342, 0.928441, 0.859375, 0.600891, 0.600891, 0.12549), PackedColorArray(1, 1, 1, 1, 0.988493, 0.967342, 0.967342, 0.928441, 0.859375, 0.600891, 0.600891, 0.12549)]
|
||||||
|
}
|
||||||
|
tracks/7/type = "value"
|
||||||
|
tracks/7/imported = false
|
||||||
|
tracks/7/enabled = true
|
||||||
|
tracks/7/path = NodePath("CloudPath/Fill:texture:gradient:offsets")
|
||||||
|
tracks/7/interp = 1
|
||||||
|
tracks/7/loop_wrap = true
|
||||||
|
tracks/7/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1.49),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [PackedFloat32Array(0, 0.283143, 1), PackedFloat32Array(0, 0.283143, 1)]
|
||||||
|
}
|
||||||
|
tracks/8/type = "value"
|
||||||
|
tracks/8/imported = false
|
||||||
|
tracks/8/enabled = true
|
||||||
|
tracks/8/path = NodePath("CloudPath/Fill:texture:fill_from")
|
||||||
|
tracks/8/interp = 1
|
||||||
|
tracks/8/loop_wrap = true
|
||||||
|
tracks/8/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1.49),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(0.543707, 0.921161), Vector2(0.344003, 0.898063)]
|
||||||
|
}
|
||||||
|
tracks/9/type = "value"
|
||||||
|
tracks/9/imported = false
|
||||||
|
tracks/9/enabled = true
|
||||||
|
tracks/9/path = NodePath("CloudPath/Fill:texture:fill_to")
|
||||||
|
tracks/9/interp = 1
|
||||||
|
tracks/9/loop_wrap = true
|
||||||
|
tracks/9/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1.49),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(0.53402, -0.0363871), Vector2(0.85962, 0.0220444)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_q0tfb"]
|
||||||
|
_data = {
|
||||||
|
&"RESET": SubResource("Animation_m6x0f"),
|
||||||
|
&"cloud_doing_cloud_stuff": SubResource("Animation_oar4j")
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Cloud" type="Node2D"]
|
||||||
|
script = ExtResource("1_nwkfo")
|
||||||
|
metadata/svg_root = true
|
||||||
|
|
||||||
|
[node name="CloudPath" type="Node2D" parent="." node_paths=PackedStringArray("polygon", "line", "clip_paths")]
|
||||||
|
position = Vector2(470, 285)
|
||||||
|
rotation = 0.816665
|
||||||
|
scale = Vector2(5.95586, 5.95586)
|
||||||
|
script = ExtResource("1_8gu3s")
|
||||||
|
polygon = NodePath("Fill")
|
||||||
|
line = NodePath("Stroke")
|
||||||
|
curve = SubResource("Curve2D_m6x0f")
|
||||||
|
update_curve_at_runtime = true
|
||||||
|
tolerance_degrees = 15.0
|
||||||
|
arc_list = SubResource("Resource_61vjn")
|
||||||
|
clip_paths = [NodePath("BubbleCutout")]
|
||||||
|
|
||||||
|
[node name="Stroke" type="Line2D" parent="CloudPath"]
|
||||||
|
self_modulate = Color(1, 1, 1, 0.818878)
|
||||||
|
points = PackedVector2Array(12.2196, -29.451, 14.9707, -28.1803, 17.279, -26.2821, 18.987, -23.8858, 19.9785, -21.1548, 20.1859, -18.275, 22.4831, -18.5727, 25.5339, -18.3044, 28.4069, -17.3013, 30.9065, -15.6319, 32.8622, -13.41, 34.1408, -10.787, 34.6552, -7.94157, 34.3943, -5.26904, 33.3601, -2.55205, 31.6147, -0.179764, 29.277, 1.68612, 29.6017, 4.33186, 29.5974, 4.96397, 29.0912, 7.81068, 27.8201, 10.437, 25.8708, 12.6639, 25.9755, 13.0191, 26.3522, 15.8836, 26.3522, 17.2784, 25.7615, 20.1106, 24.4128, 22.7023, 22.398, 24.8769, 19.8544, 26.4861, 16.9554, 27.4203, 13.8984, 27.6159, 13.1832, 27.6175, 10.1578, 27.1606, 7.36106, 25.9817, 4.98352, 24.161, 3.18721, 21.8227, 1.38286, 22.9835, -1.46816, 24.0408, -4.51253, 24.367, -5.99311, 24.367, -8.99961, 23.8105, -11.7508, 22.5399, -14.0591, 20.6418, -15.7673, 18.2456, -16.7589, 15.5145, -16.9664, 12.6348, -16.9296, 12.1506, -18.5607, 11.7784, -21.3327, 10.5487, -23.6724, 8.6851, -25.4204, 6.31449, -26.4575, 3.59848, -26.713, 0.72216, -26.6916, 0.443054, -29.1951, -0.681374, -31.5499, -2.52806, -33.3171, -4.88597, -34.3763, -7.59441, -34.6552, -10.4688, -34.6552, -11.8642, -34.0644, -14.6964, -32.7155, -17.288, -30.7006, -19.4625, -28.1569, -21.0716, -25.2578, -22.0057, -22.2008, -22.2011, -21.1836, -22.1683, -18.1859, -21.571, -18.1132, -21.6826, -16.1692, -23.9136, -13.6784, -25.5946, -10.8107, -26.6111, -7.76143, -26.8937, -7.04766, -26.8846, -4.03036, -26.3826, -1.25378, -25.1621, 0.713303, -27.2692, 3.25703, -28.8783, 6.15617, -29.8123, 9.21315, -30.0076)
|
||||||
|
closed = true
|
||||||
|
width = 2.64583
|
||||||
|
default_color = Color(0, 0, 0, 1)
|
||||||
|
sharp_limit = 80.0
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="ExtraStroke" type="Line2D" parent="CloudPath/Stroke"]
|
||||||
|
points = PackedVector2Array(32.2329, -45.2588, 33.2258, -45.1072, 34.1842, -44.8608, 35.1029, -44.5246, 35.9771, -44.1035, 36.8016, -43.6026, 37.5714, -43.0269, 38.2815, -42.3815, 38.9269, -41.6714, 39.5026, -40.9016, 40.0035, -40.0771, 40.4246, -39.2029, 40.7608, -38.2842, 41.0072, -37.3258, 41.1588, -36.3329, 41.2104, -35.3104, 41.1588, -34.2879, 41.0072, -33.295, 40.7608, -32.3366, 40.4246, -31.4179, 40.0035, -30.5437, 39.5026, -29.7192, 38.9269, -28.9494, 38.2815, -28.2393, 37.5714, -27.5939, 36.8016, -27.0182, 35.9771, -26.5173, 35.1029, -26.0962, 34.1842, -25.76, 33.2258, -25.5136, 32.2329, -25.362, 31.2104, -25.3104, 30.1879, -25.362, 29.195, -25.5136, 28.2367, -25.76, 27.3179, -26.0962, 26.4437, -26.5173, 25.6192, -27.0182, 24.8494, -27.5939, 24.1393, -28.2393, 23.4939, -28.9494, 22.9182, -29.7192, 22.4173, -30.5437, 21.9962, -31.4179, 21.66, -32.3366, 21.4136, -33.295, 21.262, -34.2879, 21.2104, -35.3104, 21.262, -36.3329, 21.4136, -37.3258, 21.66, -38.2841, 21.9962, -39.2029, 22.4173, -40.0771, 22.9182, -40.9016, 23.4939, -41.6714, 24.1393, -42.3815, 24.8494, -43.0269, 25.6192, -43.6026, 26.4437, -44.1035, 27.3179, -44.5246, 28.2367, -44.8608, 29.195, -45.1072, 30.1879, -45.2588, 31.2104, -45.3104)
|
||||||
|
closed = true
|
||||||
|
width = 2.64583
|
||||||
|
default_color = Color(0, 0, 0, 1)
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="ExtraStroke2" type="Line2D" parent="CloudPath/Stroke"]
|
||||||
|
visible = false
|
||||||
|
points = PackedVector2Array(-21.3879, -22.1816, -20.5724, -22.1084, -19.7643, -21.9818, -19.7163, -21.971, -22.2008, -22.2011)
|
||||||
|
closed = true
|
||||||
|
width = 2.64583
|
||||||
|
default_color = Color(0, 0, 0, 1)
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="ExtraStroke3" type="Line2D" parent="CloudPath/Stroke"]
|
||||||
|
visible = false
|
||||||
|
points = PackedVector2Array(32.2328, -45.2588, 33.2258, -45.1073, 34.1842, -44.8609, 35.1029, -44.5246, 35.9771, -44.1035, 36.8016, -43.6026, 37.5715, -43.027, 38.2816, -42.3815, 38.9269, -41.6714, 39.5026, -40.9016, 40.0035, -40.0771, 40.4246, -39.2029, 40.7609, -38.2842, 41.0073, -37.3258, 41.1588, -36.3329, 41.2104, -35.3104, 41.1588, -34.288, 41.0073, -33.295, 40.7608, -32.3367, 40.4246, -31.4179, 40.0035, -30.5437, 39.5026, -29.7193, 38.9269, -28.9494, 38.2816, -28.2393, 37.5714, -27.5939, 36.8016, -27.0182, 35.9771, -26.5173, 35.103, -26.0963, 34.1842, -25.76, 33.2258, -25.5136, 32.2329, -25.362, 31.2104, -25.3104, 30.1879, -25.362, 29.195, -25.5136, 28.2367, -25.76, 27.3179, -26.0963, 26.4438, -26.5173, 25.6193, -27.0182, 24.8494, -27.5939, 24.1393, -28.2393, 23.4939, -28.9494, 22.9183, -29.7193, 22.4173, -30.5438, 21.9963, -31.4179, 21.66, -32.3366, 21.4136, -33.295, 21.262, -34.2879, 21.2104, -35.3104, 21.262, -36.3329, 21.4136, -37.3258, 21.66, -38.2841, 21.9962, -39.2029, 22.4174, -40.0771, 22.9182, -40.9016, 23.4939, -41.6714, 24.1393, -42.3815, 24.8494, -43.0269, 25.6193, -43.6026, 26.4438, -44.1035, 27.3179, -44.5246, 28.2366, -44.8609, 29.195, -45.1072, 30.1879, -45.2588, 31.2104, -45.3104)
|
||||||
|
closed = true
|
||||||
|
width = 2.64583
|
||||||
|
default_color = Color(0, 0, 0, 1)
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="Fill" type="Polygon2D" parent="CloudPath"]
|
||||||
|
texture = SubResource("GradientTexture2D_oar4j")
|
||||||
|
texture_offset = Vector2(34.6552, 30.0076)
|
||||||
|
polygon = PackedVector2Array(12.2196, -29.451, 14.9707, -28.1803, 17.279, -26.2821, 18.987, -23.8858, 19.9785, -21.1548, 20.1859, -18.275, 22.4831, -18.5727, 25.5339, -18.3044, 28.4069, -17.3013, 30.9065, -15.6319, 32.8622, -13.41, 34.1408, -10.787, 34.6552, -7.94157, 34.3943, -5.26904, 33.3601, -2.55205, 31.6147, -0.179764, 29.277, 1.68612, 29.6017, 4.33186, 29.5974, 4.96397, 29.0912, 7.81068, 27.8201, 10.437, 25.8708, 12.6639, 25.9755, 13.0191, 26.3522, 15.8836, 26.3522, 17.2784, 25.7615, 20.1106, 24.4128, 22.7023, 22.398, 24.8769, 19.8544, 26.4861, 16.9554, 27.4203, 13.8984, 27.6159, 13.1832, 27.6175, 10.1578, 27.1606, 7.36106, 25.9817, 4.98352, 24.161, 3.18721, 21.8227, 1.38286, 22.9835, -1.46816, 24.0408, -4.51253, 24.367, -5.99311, 24.367, -8.99961, 23.8105, -11.7508, 22.5399, -14.0591, 20.6418, -15.7673, 18.2456, -16.7589, 15.5145, -16.9664, 12.6348, -16.9296, 12.1506, -18.5607, 11.7784, -21.3327, 10.5487, -23.6724, 8.6851, -25.4204, 6.31449, -26.4575, 3.59848, -26.713, 0.72216, -26.6916, 0.443054, -29.1951, -0.681374, -31.5499, -2.52806, -33.3171, -4.88597, -34.3763, -7.59441, -34.6552, -10.4688, -34.6552, -11.8642, -34.0644, -14.6964, -32.7155, -17.288, -30.7006, -19.4625, -28.1569, -21.0716, -25.2578, -22.0057, -22.2008, -22.2011, -21.1836, -22.1683, -18.1859, -21.571, -18.1132, -21.6826, -16.1692, -23.9136, -13.6784, -25.5946, -10.8107, -26.6111, -7.76143, -26.8937, -7.04766, -26.8846, -4.03036, -26.3826, -1.25378, -25.1621, 0.713303, -27.2692, 3.25703, -28.8783, 6.15617, -29.8123, 9.21315, -30.0076, 32.2329, -45.2588, 33.2258, -45.1072, 34.1842, -44.8608, 35.1029, -44.5246, 35.9771, -44.1035, 36.8016, -43.6026, 37.5714, -43.0269, 38.2815, -42.3815, 38.9269, -41.6714, 39.5026, -40.9016, 40.0035, -40.0771, 40.4246, -39.2029, 40.7608, -38.2842, 41.0072, -37.3258, 41.1588, -36.3329, 41.2104, -35.3104, 41.1588, -34.2879, 41.0072, -33.295, 40.7608, -32.3366, 40.4246, -31.4179, 40.0035, -30.5437, 39.5026, -29.7192, 38.9269, -28.9494, 38.2815, -28.2393, 37.5714, -27.5939, 36.8016, -27.0182, 35.9771, -26.5173, 35.1029, -26.0962, 34.1842, -25.76, 33.2258, -25.5136, 32.2329, -25.362, 31.2104, -25.3104, 30.1879, -25.362, 29.195, -25.5136, 28.2367, -25.76, 27.3179, -26.0962, 26.4437, -26.5173, 25.6192, -27.0182, 24.8494, -27.5939, 24.1393, -28.2393, 23.4939, -28.9494, 22.9182, -29.7192, 22.4173, -30.5437, 21.9962, -31.4179, 21.66, -32.3366, 21.4136, -33.295, 21.262, -34.2879, 21.2104, -35.3104, 21.262, -36.3329, 21.4136, -37.3258, 21.66, -38.2841, 21.9962, -39.2029, 22.4173, -40.0771, 22.9182, -40.9016, 23.4939, -41.6714, 24.1393, -42.3815, 24.8494, -43.0269, 25.6192, -43.6026, 26.4437, -44.1035, 27.3179, -44.5246, 28.2367, -44.8608, 29.195, -45.1072, 30.1879, -45.2588, 31.2104, -45.3104)
|
||||||
|
polygons = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79], [80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143]]
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="BubbleCutout" type="Node2D" parent="CloudPath"]
|
||||||
|
position = Vector2(31.2104, -35.3104)
|
||||||
|
script = ExtResource("1_8gu3s")
|
||||||
|
curve = SubResource("Curve2D_a6hwq")
|
||||||
|
update_curve_at_runtime = true
|
||||||
|
arc_list = SubResource("Resource_kh3t1")
|
||||||
|
use_union_in_stead_of_clipping = true
|
||||||
|
shape_type = 2
|
||||||
|
size = Vector2(20, 20)
|
||||||
|
rx = 10.0
|
||||||
|
ry = 10.0
|
||||||
|
metadata/_custom_type_script = "uid://de3jpss66xjfh"
|
||||||
|
|
||||||
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
|
libraries = {
|
||||||
|
&"": SubResource("AnimationLibrary_q0tfb")
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
extends Node2D
|
||||||
|
|
||||||
|
@export var is_open := true:
|
||||||
|
set(flag):
|
||||||
|
if flag != is_open:
|
||||||
|
if flag:
|
||||||
|
$AnimationPlayer.play("open")
|
||||||
|
else:
|
||||||
|
$AnimationPlayer.play("close")
|
||||||
|
is_open = flag
|
||||||
|
|
||||||
|
@onready var _initial_iris_position : Vector2 = $Outline/Iris.position
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
$AnimationPlayer.play("RESET")
|
||||||
|
|
||||||
|
|
||||||
|
func _unhandled_input(event: InputEvent) -> void:
|
||||||
|
if event is InputEventMouseMotion:
|
||||||
|
$Outline/Iris.position = _initial_iris_position + (
|
||||||
|
position.direction_to(get_local_mouse_position()) * 1.5
|
||||||
|
)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://bjguk7v0cas38
|
||||||
197
addons/curved_lines_2d/examples/fan_art_with_clip_paths/eye.tscn
Normal file
@@ -0,0 +1,197 @@
|
|||||||
|
[gd_scene load_steps=19 format=3 uid="uid://b7d7mk2ioy617"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://de3jpss66xjfh" path="res://addons/curved_lines_2d/scalable_vector_shape_2d.gd" id="1_l1n7h"]
|
||||||
|
[ext_resource type="Script" uid="uid://bjguk7v0cas38" path="res://addons/curved_lines_2d/examples/fan_art_with_clip_paths/eye.gd" id="1_x8diq"]
|
||||||
|
[ext_resource type="Script" uid="uid://dlbv4pit17dnu" path="res://addons/curved_lines_2d/scalable_arc.gd" id="2_x8diq"]
|
||||||
|
[ext_resource type="Script" uid="uid://dl1t88tthmwts" path="res://addons/curved_lines_2d/scalable_arc_list.gd" id="3_kjel7"]
|
||||||
|
|
||||||
|
[sub_resource type="Curve2D" id="Curve2D_ng2ve"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
_data = {
|
||||||
|
"points": PackedVector2Array(0, 0, 0, 3.3138, 6.5, 0, 3.58995, 0, -3.58995, 0, 0, 6, 0, 3.3138, 0, -3.3138, -6.5, 0, -3.58995, 0, 3.58995, 0, 0, -6, 0, -3.3138, 0, 0, 6.5, 0)
|
||||||
|
}
|
||||||
|
point_count = 5
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_popqj"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
script = ExtResource("3_kjel7")
|
||||||
|
arcs = Array[ExtResource("2_x8diq")]([])
|
||||||
|
|
||||||
|
[sub_resource type="Curve2D" id="Curve2D_uahbu"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
_data = {
|
||||||
|
"points": PackedVector2Array(0, 0, 0, 0, 4.9572, 0.476006, 0, 0, 0, 0, 0, 10.7101, 0, 0, 0, 0, -5.12222, -1.52588e-05, 0, 0, 0, 0, 0, -10.7101, 0, 0, 0, 0, 4.9572, 0.476006)
|
||||||
|
}
|
||||||
|
point_count = 5
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_lovsl"]
|
||||||
|
script = ExtResource("2_x8diq")
|
||||||
|
start_point = 0
|
||||||
|
radius = Vector2(5.12221, 10.7101)
|
||||||
|
rotation_deg = 0.0
|
||||||
|
sweep_flag = true
|
||||||
|
large_arc_flag = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_shxx8"]
|
||||||
|
script = ExtResource("2_x8diq")
|
||||||
|
start_point = 1
|
||||||
|
radius = Vector2(5.12221, 10.7101)
|
||||||
|
rotation_deg = 0.0
|
||||||
|
sweep_flag = true
|
||||||
|
large_arc_flag = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_jon1a"]
|
||||||
|
script = ExtResource("2_x8diq")
|
||||||
|
start_point = 2
|
||||||
|
radius = Vector2(5.12221, 10.7101)
|
||||||
|
rotation_deg = 0.0
|
||||||
|
sweep_flag = true
|
||||||
|
large_arc_flag = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_sm24i"]
|
||||||
|
script = ExtResource("2_x8diq")
|
||||||
|
start_point = 3
|
||||||
|
radius = Vector2(5.12221, 10.7101)
|
||||||
|
rotation_deg = 0.0
|
||||||
|
sweep_flag = true
|
||||||
|
large_arc_flag = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_kdkpg"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
script = ExtResource("3_kjel7")
|
||||||
|
arcs = Array[ExtResource("2_x8diq")]([SubResource("Resource_lovsl"), SubResource("Resource_shxx8"), SubResource("Resource_jon1a"), SubResource("Resource_sm24i")])
|
||||||
|
|
||||||
|
[sub_resource type="Curve2D" id="Curve2D_4mfx8"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
_data = {
|
||||||
|
"points": PackedVector2Array(0, 0, 0, 1.92886, 1.62979, 0, 0.900136, 0, -0.900136, 0, 0, 3.49241, 0, 1.92886, 0, -1.92886, -1.62979, 0, -0.900136, 0, 0.900136, 0, 0, -3.49241, 0, -1.92886, 0, 0, 1.62979, 0)
|
||||||
|
}
|
||||||
|
point_count = 5
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_hq7x2"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
script = ExtResource("3_kjel7")
|
||||||
|
arcs = Array[ExtResource("2_x8diq")]([])
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_kjel7"]
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("Outline:size")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(13, 12)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_cko43"]
|
||||||
|
resource_name = "close"
|
||||||
|
length = 0.2
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("Outline:size")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.1, 0.2),
|
||||||
|
"transitions": PackedFloat32Array(1, 1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(13, 12), Vector2(13, 3), Vector2(13, 0)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_x8diq"]
|
||||||
|
resource_name = "open"
|
||||||
|
length = 0.2
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("Outline:size")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.2),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(13, 0), Vector2(13, 12)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ppl4k"]
|
||||||
|
_data = {
|
||||||
|
&"RESET": SubResource("Animation_kjel7"),
|
||||||
|
&"close": SubResource("Animation_cko43"),
|
||||||
|
&"open": SubResource("Animation_x8diq")
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Eye" type="Node2D"]
|
||||||
|
script = ExtResource("1_x8diq")
|
||||||
|
|
||||||
|
[node name="Outline" type="Node2D" parent="." node_paths=PackedStringArray("polygon", "line")]
|
||||||
|
script = ExtResource("1_l1n7h")
|
||||||
|
polygon = NodePath("Fill")
|
||||||
|
stroke_color = Color(0, 0, 0, 1)
|
||||||
|
stroke_width = 1.5
|
||||||
|
line = NodePath("Stroke")
|
||||||
|
curve = SubResource("Curve2D_ng2ve")
|
||||||
|
update_curve_at_runtime = true
|
||||||
|
tolerance_degrees = 10.0
|
||||||
|
arc_list = SubResource("Resource_popqj")
|
||||||
|
use_interect_when_clipping = true
|
||||||
|
shape_type = 2
|
||||||
|
size = Vector2(13, 12)
|
||||||
|
rx = 6.5
|
||||||
|
ry = 6.0
|
||||||
|
|
||||||
|
[node name="Stroke" type="Line2D" parent="Outline"]
|
||||||
|
points = PackedVector2Array(6.5, 0, 6.36795, 1.20924, 5.98921, 2.33551, 5.38993, 3.3547, 4.59623, 4.24267, 3.63426, 4.97532, 2.53014, 5.5285, 1.31001, 5.87811, 0, 6, -1.31001, 5.87811, -2.53014, 5.5285, -3.63426, 4.97532, -4.59623, 4.24267, -5.38993, 3.3547, -5.98921, 2.33551, -6.36795, 1.20924, -6.5, 0, -6.36795, -1.20924, -5.98921, -2.33551, -5.38993, -3.3547, -4.59623, -4.24267, -3.63426, -4.97532, -2.53014, -5.5285, -1.31001, -5.87811, 0, -6, 1.31001, -5.87811, 2.53014, -5.5285, 3.63426, -4.97532, 4.59623, -4.24267, 5.38993, -3.3547, 5.98921, -2.33551, 6.36795, -1.20924)
|
||||||
|
closed = true
|
||||||
|
width = 1.5
|
||||||
|
default_color = Color(0, 0, 0, 1)
|
||||||
|
sharp_limit = 80.0
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="Fill" type="Polygon2D" parent="Outline"]
|
||||||
|
polygon = PackedVector2Array(6.5, 0, 6.36795, 1.20924, 5.98921, 2.33551, 5.38993, 3.3547, 4.59623, 4.24267, 3.63426, 4.97532, 2.53014, 5.5285, 1.31001, 5.87811, 0, 6, -1.31001, 5.87811, -2.53014, 5.5285, -3.63426, 4.97532, -4.59623, 4.24267, -5.38993, 3.3547, -5.98921, 2.33551, -6.36795, 1.20924, -6.5, 0, -6.36795, -1.20924, -5.98921, -2.33551, -5.38993, -3.3547, -4.59623, -4.24267, -3.63426, -4.97532, -2.53014, -5.5285, -1.31001, -5.87811, 0, -6, 1.31001, -5.87811, 2.53014, -5.5285, 3.63426, -4.97532, 4.59623, -4.24267, 5.38993, -3.3547, 5.98921, -2.33551, 6.36795, -1.20924)
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="Iris" type="Node2D" parent="Outline" node_paths=PackedStringArray("polygon", "clip_paths")]
|
||||||
|
position = Vector2(0.145126, -0.35392)
|
||||||
|
script = ExtResource("1_l1n7h")
|
||||||
|
polygon = NodePath("Fill")
|
||||||
|
curve = SubResource("Curve2D_uahbu")
|
||||||
|
update_curve_at_runtime = true
|
||||||
|
arc_list = SubResource("Resource_kdkpg")
|
||||||
|
clip_paths = [NodePath("..")]
|
||||||
|
|
||||||
|
[node name="Fill" type="Polygon2D" parent="Outline/Iris"]
|
||||||
|
color = Color(0, 0, 0, 1)
|
||||||
|
polygon = PackedVector2Array(1.16488, -5.52419, 2.38501, -5.17458, 3.48913, -4.6214, 4.4511, -3.88876, 4.65379, -3.66198, 4.7587, -2.99536, 4.84647, -2.27068, 4.90985, -1.53497, 4.94854, -0.791809, 4.96234, -0.0448074, 4.9572, 0.476006, 4.92903, 1.22124, 4.87606, 1.96054, 4.79856, 2.69032, 4.69691, 3.40702, 4.57159, 4.10715, 4.46923, 4.57631, 4.4511, 4.5966, 3.48913, 5.32924, 2.38501, 5.88242, 1.16488, 6.23203, -0.145126, 6.35392, -1.45513, 6.23203, -2.67526, 5.88242, -3.77938, 5.32924, -4.60182, 4.70286, -4.60382, 4.69501, -4.74924, 4.01209, -4.87152, 3.30962, -4.97007, 2.59103, -5.0444, 1.85981, -5.09416, 1.11953, -5.1191, 0.373795, -5.12222, -1.52588e-05, -5.10974, -0.747116, -5.07237, -1.49057, -5.01028, -2.22677, -4.92379, -2.95212, -4.81331, -3.66309, -4.77752, -3.84829, -4.74136, -3.88876, -3.77938, -4.6214, -2.67526, -5.17458, -1.45513, -5.52419, -0.145126, -5.64608)
|
||||||
|
polygons = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44]]
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="Pupil" type="Node2D" parent="Outline/Iris" node_paths=PackedStringArray("polygon", "clip_paths")]
|
||||||
|
position = Vector2(-0.203896, 0.725998)
|
||||||
|
script = ExtResource("1_l1n7h")
|
||||||
|
polygon = NodePath("Fill")
|
||||||
|
curve = SubResource("Curve2D_4mfx8")
|
||||||
|
update_curve_at_runtime = true
|
||||||
|
arc_list = SubResource("Resource_hq7x2")
|
||||||
|
clip_paths = [NodePath("../..")]
|
||||||
|
shape_type = 2
|
||||||
|
size = Vector2(3.25959, 6.98483)
|
||||||
|
rx = 1.62979
|
||||||
|
ry = 3.49242
|
||||||
|
|
||||||
|
[node name="Fill" type="Polygon2D" parent="Outline/Iris/Pupil"]
|
||||||
|
polygon = PackedVector2Array(0.0838699, -3.48787, 0.166641, -3.47439, 0.248207, -3.45218, 0.328468, -3.42146, 0.407318, -3.38247, 0.484657, -3.33541, 0.560387, -3.2805, 0.634399, -3.21797, 0.776871, -3.07091, 0.911247, -2.89598, 1.03671, -2.69493, 1.15245, -2.46953, 1.35146, -1.95267, 1.50172, -1.35943, 1.59669, -0.703857, 1.62979, 0, 1.59669, 0.703857, 1.50172, 1.35943, 1.35146, 1.95267, 1.15245, 2.46953, 1.03671, 2.69493, 0.911247, 2.89598, 0.776871, 3.07091, 0.634399, 3.21797, 0.560387, 3.2805, 0.484657, 3.33541, 0.407318, 3.38247, 0.328468, 3.42146, 0.248207, 3.45218, 0.166641, 3.47439, 0.0838699, 3.48787, 0, 3.49242, -0.0838699, 3.48787, -0.166641, 3.47439, -0.248207, 3.45218, -0.328468, 3.42146, -0.407318, 3.38247, -0.484657, 3.33541, -0.560387, 3.2805, -0.634399, 3.21797, -0.776871, 3.07091, -0.911247, 2.89598, -1.03671, 2.69493, -1.15245, 2.46953, -1.35146, 1.95267, -1.50172, 1.35943, -1.59669, 0.703857, -1.62979, 0, -1.59669, -0.703857, -1.50172, -1.35943, -1.35146, -1.95267, -1.15245, -2.46953, -1.03671, -2.69493, -0.911247, -2.89598, -0.776871, -3.07091, -0.634399, -3.21797, -0.560387, -3.2805, -0.484657, -3.33541, -0.407318, -3.38247, -0.328468, -3.42146, -0.248207, -3.45218, -0.166641, -3.47439, -0.0838699, -3.48787, 0, -3.49242)
|
||||||
|
polygons = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]]
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
|
libraries = {
|
||||||
|
&"": SubResource("AnimationLibrary_ppl4k")
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
extends Node2D
|
||||||
|
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
$AnimationPlayer.play("dance")
|
||||||
|
|
||||||
|
|
||||||
|
func _unhandled_input(event: InputEvent) -> void:
|
||||||
|
if event is InputEventMouseButton:
|
||||||
|
if (event as InputEventMouseButton).pressed:
|
||||||
|
if (event as InputEventMouseButton).button_index == MOUSE_BUTTON_LEFT:
|
||||||
|
%RightEye.is_open = false
|
||||||
|
else:
|
||||||
|
%LeftEye.is_open = false
|
||||||
|
else:
|
||||||
|
if (event as InputEventMouseButton).button_index == MOUSE_BUTTON_LEFT:
|
||||||
|
%RightEye.is_open = true
|
||||||
|
else:
|
||||||
|
%LeftEye.is_open = true
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://cgl7svglo3dea
|
||||||
@@ -0,0 +1,712 @@
|
|||||||
|
[gd_scene load_steps=32 format=3 uid="uid://clkub62tc5soa"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://cgl7svglo3dea" path="res://addons/curved_lines_2d/examples/fan_art_with_clip_paths/fan_art.gd" id="1_3gxsp"]
|
||||||
|
[ext_resource type="Script" uid="uid://dlbv4pit17dnu" path="res://addons/curved_lines_2d/scalable_arc.gd" id="2_i2hyy"]
|
||||||
|
[ext_resource type="Script" uid="uid://dl1t88tthmwts" path="res://addons/curved_lines_2d/scalable_arc_list.gd" id="3_w1jjx"]
|
||||||
|
[ext_resource type="Script" uid="uid://de3jpss66xjfh" path="res://addons/curved_lines_2d/scalable_vector_shape_2d.gd" id="4_i2hyy"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://b7d7mk2ioy617" path="res://addons/curved_lines_2d/examples/fan_art_with_clip_paths/eye.tscn" id="5_3gxsp"]
|
||||||
|
|
||||||
|
[sub_resource type="Curve2D" id="Curve2D_vuvrq"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
_data = {
|
||||||
|
"points": PackedVector2Array(0, 0, 0.601411, 0, 3.889, -2.17783, 0, -0.601411, 0, 0, 4.97791, -1.08891, 0, 0, 0, 0.601411, 4.97791, 1.08891, 0.601411, 0, 0, 0, 3.889, 2.17783, 0, 0, -0.601411, 0, -3.88899, 2.17783, 0, 0.601411, 0, 0, -4.97791, 1.08891, 0, 0, 0, -0.601411, -4.97791, -1.08891, -0.601411, 0, 0, 0, -3.88899, -2.17783, 0, 0, 0.601411, 0, 3.889, -2.17783)
|
||||||
|
}
|
||||||
|
point_count = 9
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_dovol"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
script = ExtResource("3_w1jjx")
|
||||||
|
arcs = Array[ExtResource("2_i2hyy")]([])
|
||||||
|
|
||||||
|
[sub_resource type="Curve2D" id="Curve2D_21j8n"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
_data = {
|
||||||
|
"points": PackedVector2Array(0, 0, 0.601411, 0, 3.889, -2.17783, 0, -0.601411, 0, 0, 4.97791, -1.08891, 0, 0, 0, 0.601411, 4.97791, 1.08891, 0.601411, 0, 0, 0, 3.889, 2.17783, 0, 0, -0.601411, 0, -3.88899, 2.17783, 0, 0.601411, 0, 0, -4.97791, 1.08891, 0, 0, 0, -0.601411, -4.97791, -1.08891, -0.601411, 0, 0, 0, -3.88899, -2.17783, 0, 0, 0.601411, 0, 3.889, -2.17783)
|
||||||
|
}
|
||||||
|
point_count = 9
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_ycpci"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
script = ExtResource("3_w1jjx")
|
||||||
|
arcs = Array[ExtResource("2_i2hyy")]([])
|
||||||
|
|
||||||
|
[sub_resource type="Curve2D" id="Curve2D_h4krt"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
_data = {
|
||||||
|
"points": PackedVector2Array(0, 0, 0.601411, 0, 2.21672, -2.02227, 0, -0.902116, 0, 0, 3.30564, -0.388895, 0, 0, 0, 0.902116, 3.30564, 0.388895, 0.601411, 0, 0, 0, 2.21672, 2.02227, 0, 0, -0.601411, 0, -2.21672, 2.02227, 0, 0.902116, 0, 0, -3.30564, 0.388895, 0, 0, 0, -0.902116, -3.30564, -0.388895, -0.601411, 0, 0, 0, -2.21672, -2.02227, 0, 0, 0.601411, 0, 2.21672, -2.02227)
|
||||||
|
}
|
||||||
|
point_count = 9
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_0ewes"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
script = ExtResource("3_w1jjx")
|
||||||
|
arcs = Array[ExtResource("2_i2hyy")]([])
|
||||||
|
|
||||||
|
[sub_resource type="Curve2D" id="Curve2D_7ab47"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
_data = {
|
||||||
|
"points": PackedVector2Array(0, 0, -0.133581, 3.61672, 1.8011, -2.20657, -0.325121, -2.56204, -0.350664, 0.0769, 1.32512, 10.2287, 3.3371, 0.398483, 0.601829, -9.16264, -6.3566, 10.6149, 0.293953, -0.394287, 0, 0, -1.1954, -1.54593)
|
||||||
|
}
|
||||||
|
point_count = 4
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_0hrpn"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
script = ExtResource("3_w1jjx")
|
||||||
|
arcs = Array[ExtResource("2_i2hyy")]([])
|
||||||
|
|
||||||
|
[sub_resource type="Curve2D" id="Curve2D_tdxpr"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
_data = {
|
||||||
|
"points": PackedVector2Array(0, 0, 7.04836, -1.1108, -8.5744, -12.482, -7.04836, 0.69072, 1.12537, 8.70163, 3.4256, -11.482, -4.6239, -5.8951, -7.38191, 0.96647, 12.0495, 10.4131, 8.7672, 0.418823, -0.792978, -1.75007, -11.2067, 12.202, -0.0253906, 1.75006, 0, 0, -12.0495, 6.95184, 0, 0, 0, 0, -8.5744, -12.482)
|
||||||
|
}
|
||||||
|
point_count = 6
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_m74ci"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
script = ExtResource("3_w1jjx")
|
||||||
|
arcs = Array[ExtResource("2_i2hyy")]([])
|
||||||
|
|
||||||
|
[sub_resource type="Curve2D" id="Curve2D_g3rv6"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
_data = {
|
||||||
|
"points": PackedVector2Array(0, 0, 0.601411, 0, 2.21672, -2.02227, 0, -0.902116, 0, 0, 3.30564, -0.388895, 0, 0, 0, 0.902116, 3.30564, 0.388895, 0.601411, 0, 0, 0, 2.21672, 2.02227, 0, 0, -0.601411, 0, -2.21672, 2.02227, 0, 0.902116, 0, 0, -3.30564, 0.388895, 0, 0, 0, -0.902116, -3.30564, -0.388895, -0.601411, 0, 0, 0, -2.21672, -2.02227, 0, 0, 0.601411, 0, 2.21672, -2.02227)
|
||||||
|
}
|
||||||
|
point_count = 9
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_d0jpf"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
script = ExtResource("3_w1jjx")
|
||||||
|
arcs = Array[ExtResource("2_i2hyy")]([])
|
||||||
|
|
||||||
|
[sub_resource type="Curve2D" id="Curve2D_51t4y"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
_data = {
|
||||||
|
"points": PackedVector2Array(0, 0, 3.98345, 3.1908, -0.0833435, -2.16666, -1.81313, -3.07524, -0.343185, 0.10534, 9.75121, 10.4696, 3.19353, -0.866333, -1.87273, -6.4266, 2.95197, 12.3641, 0, 0, 0, 0, -1.46037, 4.69773)
|
||||||
|
}
|
||||||
|
point_count = 4
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_li8ts"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
script = ExtResource("3_w1jjx")
|
||||||
|
arcs = Array[ExtResource("2_i2hyy")]([])
|
||||||
|
|
||||||
|
[sub_resource type="Curve2D" id="Curve2D_row8l"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
_data = {
|
||||||
|
"points": PackedVector2Array(0, 0, 0, 0, -9.78708, -8.52243, 0, 0, 0.4972, -2.30488, 12.2153, -8.52243, -0.374603, -3.94598, 0.24568, 2.58805, 21.1428, -11.554, 0, 0.731804, 0, 0, 15.0023, -7.46409, 0, 0, 0.0072, 0.46875, 15.2492, 8.63489, 2.48367, -0.551971, -8.77592, 1.95033, 10.8159, 10.8457, 7.33499, -0.178818, -7.33499, 0.17881, -11.5157, 13.3975, 0.466721, 1.67137, -0.466721, -1.67134, -21.135, 11.6806, 0, 0, 0, 0, -11.8468, 6.93817, 0, 0, -1.42244, -0.00072, -12.5741, -6.96933, -1.138, 3.60279, 0.955734, -3.02576, -19.7185, -12.448, -0.551308, -2.32829, 0, 0, -9.78708, -8.52243)
|
||||||
|
}
|
||||||
|
point_count = 12
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_gw0fs"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
script = ExtResource("3_w1jjx")
|
||||||
|
arcs = Array[ExtResource("2_i2hyy")]([])
|
||||||
|
|
||||||
|
[sub_resource type="Curve2D" id="Curve2D_loqdy"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
_data = {
|
||||||
|
"points": PackedVector2Array(0, 0, 0, 0.730646, 3.175, 0, 1.75355, 0, -1.75355, 0, 0, 1.32291, 0, 0.730646, 0, -0.730646, -3.175, 0, -1.75355, 0, 1.75355, 0, 0, -1.32291, 0, -0.730646, 0, 0, 3.175, 0)
|
||||||
|
}
|
||||||
|
point_count = 5
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_vpx2b"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
script = ExtResource("3_w1jjx")
|
||||||
|
arcs = Array[ExtResource("2_i2hyy")]([])
|
||||||
|
|
||||||
|
[sub_resource type="Curve2D" id="Curve2D_ojj3e"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
_data = {
|
||||||
|
"points": PackedVector2Array(0, 0, 0, 0, 2.91041, -1.4493, 0, 0, 0, 0, -2.9104, -1.45967)
|
||||||
|
}
|
||||||
|
point_count = 2
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_k4eqw"]
|
||||||
|
script = ExtResource("2_i2hyy")
|
||||||
|
start_point = 0
|
||||||
|
radius = Vector2(2.91, 2.91)
|
||||||
|
rotation_deg = 0.0
|
||||||
|
sweep_flag = true
|
||||||
|
large_arc_flag = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_mg08f"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
script = ExtResource("3_w1jjx")
|
||||||
|
arcs = Array[ExtResource("2_i2hyy")]([SubResource("Resource_k4eqw")])
|
||||||
|
|
||||||
|
[sub_resource type="Curve2D" id="Curve2D_3gxsp"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
_data = {
|
||||||
|
"points": PackedVector2Array(0, 0, 0.962421, 0.10373, 7.96465, 7.6074, -0.943039, 0.46283, 3.6988, -1.82266, 10.9088, 7.05247, 0.202003, 0.237968, 0.551035, -1.52306, 13.0722, 1.2108, 0.672356, 1.36607, -1.39959, -2.82158, 12.8836, -3.28074, 3.31781, -1.32369, -0.486996, -0.85981, 4.555, -5.92528, 1.05902, 0.181267, -1.33433, -0.21921, 2.09208, -7.58379, 0.683876, -0.99881, -0.42185, -0.66139, -1.24394, -6.29514, 0.712204, 0.121849, -1.38154, -0.22882, -3.00931, -7.51441, 0.477531, -1.5675, -2.99989, 0.12759, -6.23972, -5.18826, 0.380814, -2.27859, -0.466242, 2.80298, -13.4357, -1.24465, -3.69995, -0.615288, 2.69186, 0.44086, -6.10427, 5.07213, -1.35339, 1.70671, 0.897379, 1.67127, 0.569206, 2.98385, -2.0579, -0.21862, 0.51173, 0.90311, 5.25782, 5.9822, -1.20955, -0.130371, 0, 0, 7.96464, 7.60741)
|
||||||
|
}
|
||||||
|
point_count = 14
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_vuvrq"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
script = ExtResource("3_w1jjx")
|
||||||
|
arcs = Array[ExtResource("2_i2hyy")]([])
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_i2hyy"]
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("FanArt/layer1/RightArm:rotation")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [0.0]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("FanArt/layer1/LeftArm:rotation")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [0.0]
|
||||||
|
}
|
||||||
|
tracks/2/type = "value"
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/path = NodePath("FanArt/layer1/LeftFoot:position")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(82.8819, 165.97)]
|
||||||
|
}
|
||||||
|
tracks/3/type = "value"
|
||||||
|
tracks/3/imported = false
|
||||||
|
tracks/3/enabled = true
|
||||||
|
tracks/3/path = NodePath("FanArt/layer1/LeftFoot:rotation")
|
||||||
|
tracks/3/interp = 1
|
||||||
|
tracks/3/loop_wrap = true
|
||||||
|
tracks/3/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [0.0]
|
||||||
|
}
|
||||||
|
tracks/4/type = "value"
|
||||||
|
tracks/4/imported = false
|
||||||
|
tracks/4/enabled = true
|
||||||
|
tracks/4/path = NodePath("FanArt/layer1/RightFoot:position")
|
||||||
|
tracks/4/interp = 1
|
||||||
|
tracks/4/loop_wrap = true
|
||||||
|
tracks/4/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(70.979, 166.323)]
|
||||||
|
}
|
||||||
|
tracks/5/type = "value"
|
||||||
|
tracks/5/imported = false
|
||||||
|
tracks/5/enabled = true
|
||||||
|
tracks/5/path = NodePath("FanArt/layer1/RightFoot:rotation")
|
||||||
|
tracks/5/interp = 1
|
||||||
|
tracks/5/loop_wrap = true
|
||||||
|
tracks/5/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [0.0]
|
||||||
|
}
|
||||||
|
tracks/6/type = "value"
|
||||||
|
tracks/6/imported = false
|
||||||
|
tracks/6/enabled = true
|
||||||
|
tracks/6/path = NodePath("FanArt/layer1/Head:position")
|
||||||
|
tracks/6/interp = 1
|
||||||
|
tracks/6/loop_wrap = true
|
||||||
|
tracks/6/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(71.8393, 128.359)]
|
||||||
|
}
|
||||||
|
tracks/7/type = "value"
|
||||||
|
tracks/7/imported = false
|
||||||
|
tracks/7/enabled = true
|
||||||
|
tracks/7/path = NodePath("FanArt/layer1/Head:rotation")
|
||||||
|
tracks/7/interp = 1
|
||||||
|
tracks/7/loop_wrap = true
|
||||||
|
tracks/7/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [0.0]
|
||||||
|
}
|
||||||
|
tracks/8/type = "value"
|
||||||
|
tracks/8/imported = false
|
||||||
|
tracks/8/enabled = true
|
||||||
|
tracks/8/path = NodePath("FanArt/layer1/RightArm:position")
|
||||||
|
tracks/8/interp = 1
|
||||||
|
tracks/8/loop_wrap = true
|
||||||
|
tracks/8/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(66.7614, 143.412)]
|
||||||
|
}
|
||||||
|
tracks/9/type = "value"
|
||||||
|
tracks/9/imported = false
|
||||||
|
tracks/9/enabled = true
|
||||||
|
tracks/9/path = NodePath("FanArt/layer1/LeftArm:position")
|
||||||
|
tracks/9/interp = 1
|
||||||
|
tracks/9/loop_wrap = true
|
||||||
|
tracks/9/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(79.5669, 140.329)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_k4eqw"]
|
||||||
|
resource_name = "dance"
|
||||||
|
length = 0.4
|
||||||
|
loop_mode = 1
|
||||||
|
step = 0.2
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("FanArt/layer1/RightArm:rotation")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.2),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [2.09829, 0.427068]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("FanArt/layer1/LeftArm:rotation")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.2),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [0.295603, -1.14068]
|
||||||
|
}
|
||||||
|
tracks/2/type = "value"
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/path = NodePath("FanArt/layer1/LeftFoot:position")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.2),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(84.0486, 164.553), Vector2(80.8486, 164.853)]
|
||||||
|
}
|
||||||
|
tracks/3/type = "value"
|
||||||
|
tracks/3/imported = false
|
||||||
|
tracks/3/enabled = true
|
||||||
|
tracks/3/path = NodePath("FanArt/layer1/LeftFoot:rotation")
|
||||||
|
tracks/3/interp = 1
|
||||||
|
tracks/3/loop_wrap = true
|
||||||
|
tracks/3/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.2),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [-0.671079, -0.0436613]
|
||||||
|
}
|
||||||
|
tracks/4/type = "value"
|
||||||
|
tracks/4/imported = false
|
||||||
|
tracks/4/enabled = true
|
||||||
|
tracks/4/path = NodePath("FanArt/layer1/RightFoot:position")
|
||||||
|
tracks/4/interp = 1
|
||||||
|
tracks/4/loop_wrap = true
|
||||||
|
tracks/4/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.2),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(70.979, 166.323), Vector2(71.879, 164.923)]
|
||||||
|
}
|
||||||
|
tracks/5/type = "value"
|
||||||
|
tracks/5/imported = false
|
||||||
|
tracks/5/enabled = true
|
||||||
|
tracks/5/path = NodePath("FanArt/layer1/RightFoot:rotation")
|
||||||
|
tracks/5/interp = 1
|
||||||
|
tracks/5/loop_wrap = true
|
||||||
|
tracks/5/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.2),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [0.0, -0.155044]
|
||||||
|
}
|
||||||
|
tracks/6/type = "value"
|
||||||
|
tracks/6/imported = false
|
||||||
|
tracks/6/enabled = true
|
||||||
|
tracks/6/path = NodePath("FanArt/layer1/RightArm:curve:point_0/position")
|
||||||
|
tracks/6/interp = 1
|
||||||
|
tracks/6/loop_wrap = true
|
||||||
|
tracks/6/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.2),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(1.8011, -2.20657), Vector2(1.93309, 4.24783)]
|
||||||
|
}
|
||||||
|
tracks/7/type = "value"
|
||||||
|
tracks/7/imported = false
|
||||||
|
tracks/7/enabled = true
|
||||||
|
tracks/7/path = NodePath("FanArt/layer1/Head:position")
|
||||||
|
tracks/7/interp = 1
|
||||||
|
tracks/7/loop_wrap = true
|
||||||
|
tracks/7/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.2),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(75.4643, 127.859), Vector2(74.0357, 128.288)]
|
||||||
|
}
|
||||||
|
tracks/8/type = "value"
|
||||||
|
tracks/8/imported = false
|
||||||
|
tracks/8/enabled = true
|
||||||
|
tracks/8/path = NodePath("FanArt/layer1/Head:rotation")
|
||||||
|
tracks/8/interp = 1
|
||||||
|
tracks/8/loop_wrap = true
|
||||||
|
tracks/8/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.2),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [0.292313, -0.121693]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_w1jjx"]
|
||||||
|
_data = {
|
||||||
|
&"RESET": SubResource("Animation_i2hyy"),
|
||||||
|
&"dance": SubResource("Animation_k4eqw")
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Node2D" type="Node2D"]
|
||||||
|
|
||||||
|
[node name="FanArt" type="Node2D" parent="."]
|
||||||
|
script = ExtResource("1_3gxsp")
|
||||||
|
metadata/svg_root = true
|
||||||
|
|
||||||
|
[node name="layer1" type="Node2D" parent="FanArt"]
|
||||||
|
position = Vector2(-52.7614, -106.079)
|
||||||
|
metadata/svg_style = {}
|
||||||
|
|
||||||
|
[node name="RightFoot" type="Node2D" parent="FanArt/layer1" node_paths=PackedStringArray("polygon", "line")]
|
||||||
|
position = Vector2(70.979, 166.323)
|
||||||
|
script = ExtResource("4_i2hyy")
|
||||||
|
polygon = NodePath("Fill")
|
||||||
|
stroke_color = Color(0, 0, 0, 1)
|
||||||
|
stroke_width = 3.0
|
||||||
|
line_joint_mode = 2
|
||||||
|
line = NodePath("Stroke")
|
||||||
|
curve = SubResource("Curve2D_vuvrq")
|
||||||
|
update_curve_at_runtime = true
|
||||||
|
arc_list = SubResource("Resource_dovol")
|
||||||
|
shape_type = 1
|
||||||
|
size = Vector2(9.95583, 4.35567)
|
||||||
|
rx = 1.08892
|
||||||
|
ry = 1.08892
|
||||||
|
|
||||||
|
[node name="Stroke" type="Line2D" parent="FanArt/layer1/RightFoot"]
|
||||||
|
points = PackedVector2Array(3.889, -2.17783, 4.00033, -2.17221, 4.10846, -2.15571, 4.21281, -2.12888, 4.31286, -2.09226, 4.40805, -2.04641, 4.49783, -1.99187, 4.58166, -1.92918, 4.65898, -1.8589, 4.72926, -1.78158, 4.79195, -1.69775, 4.84649, -1.60797, 4.89234, -1.51278, 4.92896, -1.41273, 4.95579, -1.30838, 4.97229, -1.20025, 4.97791, -1.08891, 4.97791, 1.08891, 4.97229, 1.20025, 4.95579, 1.30838, 4.92896, 1.41273, 4.89234, 1.51278, 4.84649, 1.60797, 4.79195, 1.69775, 4.72926, 1.78158, 4.65898, 1.8589, 4.58166, 1.92918, 4.49783, 1.99187, 4.40805, 2.04641, 4.31286, 2.09226, 4.21281, 2.12888, 4.10846, 2.15571, 4.00033, 2.17221, 3.889, 2.17783, -3.88899, 2.17783, -4.00033, 2.17221, -4.10845, 2.15571, -4.21281, 2.12888, -4.31286, 2.09226, -4.40805, 2.04641, -4.49783, 1.99187, -4.58166, 1.92918, -4.65898, 1.8589, -4.72926, 1.78158, -4.79195, 1.69775, -4.84649, 1.60797, -4.89234, 1.51278, -4.92896, 1.41273, -4.95579, 1.30838, -4.97229, 1.20025, -4.97791, 1.08891, -4.97791, -1.08891, -4.97229, -1.20025, -4.95579, -1.30838, -4.92896, -1.41273, -4.89234, -1.51278, -4.84649, -1.60797, -4.79195, -1.69775, -4.72926, -1.78158, -4.65898, -1.8589, -4.58166, -1.92918, -4.49783, -1.99187, -4.40805, -2.04641, -4.31286, -2.09226, -4.21281, -2.12888, -4.10845, -2.15571, -4.00033, -2.17221, -3.88899, -2.17783)
|
||||||
|
closed = true
|
||||||
|
width = 3.0
|
||||||
|
default_color = Color(0, 0, 0, 1)
|
||||||
|
joint_mode = 2
|
||||||
|
sharp_limit = 80.0
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="Fill" type="Polygon2D" parent="FanArt/layer1/RightFoot"]
|
||||||
|
color = Color(0.988235, 0.603922, 0.603922, 1)
|
||||||
|
polygon = PackedVector2Array(3.889, -2.17783, 4.00033, -2.17221, 4.10846, -2.15571, 4.21281, -2.12888, 4.31286, -2.09226, 4.40805, -2.04641, 4.49783, -1.99187, 4.58166, -1.92918, 4.65898, -1.8589, 4.72926, -1.78158, 4.79195, -1.69775, 4.84649, -1.60797, 4.89234, -1.51278, 4.92896, -1.41273, 4.95579, -1.30838, 4.97229, -1.20025, 4.97791, -1.08891, 4.97791, 1.08891, 4.97229, 1.20025, 4.95579, 1.30838, 4.92896, 1.41273, 4.89234, 1.51278, 4.84649, 1.60797, 4.79195, 1.69775, 4.72926, 1.78158, 4.65898, 1.8589, 4.58166, 1.92918, 4.49783, 1.99187, 4.40805, 2.04641, 4.31286, 2.09226, 4.21281, 2.12888, 4.10846, 2.15571, 4.00033, 2.17221, 3.889, 2.17783, -3.88899, 2.17783, -4.00033, 2.17221, -4.10845, 2.15571, -4.21281, 2.12888, -4.31286, 2.09226, -4.40805, 2.04641, -4.49783, 1.99187, -4.58166, 1.92918, -4.65898, 1.8589, -4.72926, 1.78158, -4.79195, 1.69775, -4.84649, 1.60797, -4.89234, 1.51278, -4.92896, 1.41273, -4.95579, 1.30838, -4.97229, 1.20025, -4.97791, 1.08891, -4.97791, -1.08891, -4.97229, -1.20025, -4.95579, -1.30838, -4.92896, -1.41273, -4.89234, -1.51278, -4.84649, -1.60797, -4.79195, -1.69775, -4.72926, -1.78158, -4.65898, -1.8589, -4.58166, -1.92918, -4.49783, -1.99187, -4.40805, -2.04641, -4.31286, -2.09226, -4.21281, -2.12888, -4.10845, -2.15571, -4.00033, -2.17221, -3.88899, -2.17783)
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="LeftFoot" type="Node2D" parent="FanArt/layer1" node_paths=PackedStringArray("polygon", "line")]
|
||||||
|
position = Vector2(82.8819, 165.97)
|
||||||
|
script = ExtResource("4_i2hyy")
|
||||||
|
polygon = NodePath("Fill")
|
||||||
|
stroke_color = Color(0, 0, 0, 1)
|
||||||
|
stroke_width = 3.0
|
||||||
|
line_joint_mode = 2
|
||||||
|
line = NodePath("Stroke")
|
||||||
|
curve = SubResource("Curve2D_21j8n")
|
||||||
|
update_curve_at_runtime = true
|
||||||
|
arc_list = SubResource("Resource_ycpci")
|
||||||
|
shape_type = 1
|
||||||
|
size = Vector2(9.95583, 4.35567)
|
||||||
|
rx = 1.08892
|
||||||
|
ry = 1.08892
|
||||||
|
|
||||||
|
[node name="Stroke" type="Line2D" parent="FanArt/layer1/LeftFoot"]
|
||||||
|
points = PackedVector2Array(3.889, -2.17783, 4.00033, -2.17221, 4.10846, -2.15571, 4.21281, -2.12888, 4.31286, -2.09226, 4.40805, -2.04641, 4.49783, -1.99187, 4.58166, -1.92918, 4.65898, -1.8589, 4.72926, -1.78158, 4.79195, -1.69775, 4.84649, -1.60797, 4.89234, -1.51278, 4.92896, -1.41273, 4.95579, -1.30838, 4.97229, -1.20025, 4.97791, -1.08891, 4.97791, 1.08891, 4.97229, 1.20025, 4.95579, 1.30838, 4.92896, 1.41273, 4.89234, 1.51278, 4.84649, 1.60797, 4.79195, 1.69775, 4.72926, 1.78158, 4.65898, 1.8589, 4.58166, 1.92918, 4.49783, 1.99187, 4.40805, 2.04641, 4.31286, 2.09226, 4.21281, 2.12888, 4.10846, 2.15571, 4.00033, 2.17221, 3.889, 2.17783, -3.88899, 2.17783, -4.00033, 2.17221, -4.10845, 2.15571, -4.21281, 2.12888, -4.31286, 2.09226, -4.40805, 2.04641, -4.49783, 1.99187, -4.58166, 1.92918, -4.65898, 1.8589, -4.72926, 1.78158, -4.79195, 1.69775, -4.84649, 1.60797, -4.89234, 1.51278, -4.92896, 1.41273, -4.95579, 1.30838, -4.97229, 1.20025, -4.97791, 1.08891, -4.97791, -1.08891, -4.97229, -1.20025, -4.95579, -1.30838, -4.92896, -1.41273, -4.89234, -1.51278, -4.84649, -1.60797, -4.79195, -1.69775, -4.72926, -1.78158, -4.65898, -1.8589, -4.58166, -1.92918, -4.49783, -1.99187, -4.40805, -2.04641, -4.31286, -2.09226, -4.21281, -2.12888, -4.10845, -2.15571, -4.00033, -2.17221, -3.88899, -2.17783)
|
||||||
|
closed = true
|
||||||
|
width = 3.0
|
||||||
|
default_color = Color(0, 0, 0, 1)
|
||||||
|
joint_mode = 2
|
||||||
|
sharp_limit = 80.0
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="Fill" type="Polygon2D" parent="FanArt/layer1/LeftFoot"]
|
||||||
|
color = Color(0.988235, 0.603922, 0.603922, 1)
|
||||||
|
polygon = PackedVector2Array(3.889, -2.17783, 4.00033, -2.17221, 4.10846, -2.15571, 4.21281, -2.12888, 4.31286, -2.09226, 4.40805, -2.04641, 4.49783, -1.99187, 4.58166, -1.92918, 4.65898, -1.8589, 4.72926, -1.78158, 4.79195, -1.69775, 4.84649, -1.60797, 4.89234, -1.51278, 4.92896, -1.41273, 4.95579, -1.30838, 4.97229, -1.20025, 4.97791, -1.08891, 4.97791, 1.08891, 4.97229, 1.20025, 4.95579, 1.30838, 4.92896, 1.41273, 4.89234, 1.51278, 4.84649, 1.60797, 4.79195, 1.69775, 4.72926, 1.78158, 4.65898, 1.8589, 4.58166, 1.92918, 4.49783, 1.99187, 4.40805, 2.04641, 4.31286, 2.09226, 4.21281, 2.12888, 4.10846, 2.15571, 4.00033, 2.17221, 3.889, 2.17783, -3.88899, 2.17783, -4.00033, 2.17221, -4.10845, 2.15571, -4.21281, 2.12888, -4.31286, 2.09226, -4.40805, 2.04641, -4.49783, 1.99187, -4.58166, 1.92918, -4.65898, 1.8589, -4.72926, 1.78158, -4.79195, 1.69775, -4.84649, 1.60797, -4.89234, 1.51278, -4.92896, 1.41273, -4.95579, 1.30838, -4.97229, 1.20025, -4.97791, 1.08891, -4.97791, -1.08891, -4.97229, -1.20025, -4.95579, -1.30838, -4.92896, -1.41273, -4.89234, -1.51278, -4.84649, -1.60797, -4.79195, -1.69775, -4.72926, -1.78158, -4.65898, -1.8589, -4.58166, -1.92918, -4.49783, -1.99187, -4.40805, -2.04641, -4.31286, -2.09226, -4.21281, -2.12888, -4.10845, -2.15571, -4.00033, -2.17221, -3.88899, -2.17783)
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="RightHand" type="Node2D" parent="FanArt/layer1" node_paths=PackedStringArray("polygon", "line")]
|
||||||
|
position = Vector2(57.9746, 134.821)
|
||||||
|
rotation = 2.09829
|
||||||
|
script = ExtResource("4_i2hyy")
|
||||||
|
polygon = NodePath("Fill")
|
||||||
|
stroke_color = Color(0, 0, 0, 1)
|
||||||
|
stroke_width = 3.0
|
||||||
|
line_joint_mode = 2
|
||||||
|
line = NodePath("Stroke")
|
||||||
|
curve = SubResource("Curve2D_h4krt")
|
||||||
|
update_curve_at_runtime = true
|
||||||
|
arc_list = SubResource("Resource_0ewes")
|
||||||
|
shape_type = 1
|
||||||
|
size = Vector2(6.61129, 4.04455)
|
||||||
|
rx = 1.08892
|
||||||
|
ry = 1.63338
|
||||||
|
|
||||||
|
[node name="Stroke" type="Line2D" parent="FanArt/layer1/RightHand"]
|
||||||
|
points = PackedVector2Array(2.21672, -2.02227, 2.27276, -2.02015, 2.32806, -2.01384, 2.38256, -2.00346, 2.43619, -1.98909, 2.54054, -1.94884, 2.64059, -1.89392, 2.73578, -1.82514, 2.82556, -1.74333, 2.90939, -1.6493, 2.98671, -1.54388, 3.05699, -1.42789, 3.11968, -1.30214, 3.17422, -1.16747, 3.22007, -1.02469, 3.28352, -0.718085, 3.30564, -0.388895, 3.30564, 0.388895, 3.28352, 0.718085, 3.22007, 1.02469, 3.17422, 1.16747, 3.11968, 1.30214, 3.05699, 1.42789, 2.98671, 1.54388, 2.90939, 1.6493, 2.82556, 1.74333, 2.73578, 1.82514, 2.64059, 1.89392, 2.54054, 1.94884, 2.43618, 1.98909, 2.38256, 2.00346, 2.32806, 2.01384, 2.27276, 2.02015, 2.21672, 2.02227, -2.21672, 2.02227, -2.27276, 2.02015, -2.32806, 2.01384, -2.38256, 2.00346, -2.43619, 1.98909, -2.54054, 1.94884, -2.64059, 1.89392, -2.73578, 1.82514, -2.82556, 1.74333, -2.90939, 1.6493, -2.98671, 1.54388, -3.05699, 1.42789, -3.11968, 1.30214, -3.17422, 1.16747, -3.22007, 1.02469, -3.28352, 0.718085, -3.30564, 0.388895, -3.30564, -0.388895, -3.28352, -0.718085, -3.22007, -1.02469, -3.17422, -1.16747, -3.11968, -1.30214, -3.05699, -1.42789, -2.98671, -1.54388, -2.90939, -1.6493, -2.82556, -1.74333, -2.73578, -1.82514, -2.64059, -1.89392, -2.54054, -1.94884, -2.43618, -1.98909, -2.38256, -2.00346, -2.32806, -2.01384, -2.27276, -2.02015, -2.21672, -2.02227)
|
||||||
|
closed = true
|
||||||
|
width = 3.0
|
||||||
|
default_color = Color(0, 0, 0, 1)
|
||||||
|
joint_mode = 2
|
||||||
|
sharp_limit = 80.0
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="Fill" type="Polygon2D" parent="FanArt/layer1/RightHand"]
|
||||||
|
color = Color(0.988235, 0.603922, 0.603922, 1)
|
||||||
|
polygon = PackedVector2Array(2.21672, -2.02227, 2.27276, -2.02015, 2.32806, -2.01384, 2.38256, -2.00346, 2.43619, -1.98909, 2.54054, -1.94884, 2.64059, -1.89392, 2.73578, -1.82514, 2.82556, -1.74333, 2.90939, -1.6493, 2.98671, -1.54388, 3.05699, -1.42789, 3.11968, -1.30214, 3.17422, -1.16747, 3.22007, -1.02469, 3.28352, -0.718085, 3.30564, -0.388895, 3.30564, 0.388895, 3.28352, 0.718085, 3.22007, 1.02469, 3.17422, 1.16747, 3.11968, 1.30214, 3.05699, 1.42789, 2.98671, 1.54388, 2.90939, 1.6493, 2.82556, 1.74333, 2.73578, 1.82514, 2.64059, 1.89392, 2.54054, 1.94884, 2.43618, 1.98909, 2.38256, 2.00346, 2.32806, 2.01384, 2.27276, 2.02015, 2.21672, 2.02227, -2.21672, 2.02227, -2.27276, 2.02015, -2.32806, 2.01384, -2.38256, 2.00346, -2.43619, 1.98909, -2.54054, 1.94884, -2.64059, 1.89392, -2.73578, 1.82514, -2.82556, 1.74333, -2.90939, 1.6493, -2.98671, 1.54388, -3.05699, 1.42789, -3.11968, 1.30214, -3.17422, 1.16747, -3.22007, 1.02469, -3.28352, 0.718085, -3.30564, 0.388895, -3.30564, -0.388895, -3.28352, -0.718085, -3.22007, -1.02469, -3.17422, -1.16747, -3.11968, -1.30214, -3.05699, -1.42789, -2.98671, -1.54388, -2.90939, -1.6493, -2.82556, -1.74333, -2.73578, -1.82514, -2.64059, -1.89392, -2.54054, -1.94884, -2.43618, -1.98909, -2.38256, -2.00346, -2.32806, -2.01384, -2.27276, -2.02015, -2.21672, -2.02227)
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="RightArm" type="Node2D" parent="FanArt/layer1" node_paths=PackedStringArray("polygon", "line")]
|
||||||
|
position = Vector2(66.7614, 143.412)
|
||||||
|
script = ExtResource("4_i2hyy")
|
||||||
|
polygon = NodePath("Fill")
|
||||||
|
stroke_color = Color(0, 0, 0, 1)
|
||||||
|
stroke_width = 3.0
|
||||||
|
line_joint_mode = 2
|
||||||
|
line = NodePath("Stroke")
|
||||||
|
curve = SubResource("Curve2D_7ab47")
|
||||||
|
update_curve_at_runtime = true
|
||||||
|
arc_list = SubResource("Resource_0hrpn")
|
||||||
|
|
||||||
|
[node name="Stroke" type="Line2D" parent="FanArt/layer1/RightArm"]
|
||||||
|
points = PackedVector2Array(1.8011, -2.20657, 1.24355, 7.71343, 1.32512, 10.2287, -1.39583, 10.6001, -3.7978, 10.7335, -6.3566, 10.6149, -5.94998, 7.44551, -5.25493, 4.79384, -4.38158, 2.63662, -3.44008, 0.950637, -2.54057, -0.287369, -1.79319, -1.10064, -1.51097, -1.35526, -1.30809, -1.51241, -1.2407, -1.55534, -1.21627, -1.56806, -1.19831, -1.575, -1.18702, -1.57621, -1.18263, -1.57174, -1.18536, -1.56163, -1.1954, -1.54593)
|
||||||
|
width = 3.0
|
||||||
|
default_color = Color(0, 0, 0, 1)
|
||||||
|
joint_mode = 2
|
||||||
|
sharp_limit = 80.0
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="Fill" type="Polygon2D" parent="FanArt/layer1/RightArm"]
|
||||||
|
color = Color(0.819608, 0.219608, 0.294118, 0.981982)
|
||||||
|
polygon = PackedVector2Array(1.8011, -2.20657, 1.24355, 7.71343, 1.32512, 10.2287, -1.39583, 10.6001, -3.7978, 10.7335, -6.3566, 10.6149, -5.94998, 7.44551, -5.25493, 4.79384, -4.38158, 2.63662, -3.44008, 0.950637, -2.54057, -0.287369, -1.79319, -1.10064, -1.51097, -1.35526, -1.30809, -1.51241, -1.2407, -1.55534, -1.21627, -1.56806, -1.19831, -1.575, -1.18702, -1.57621, -1.18263, -1.57174, -1.18536, -1.56163, -1.1954, -1.54593)
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="RemoteTransform2D" type="RemoteTransform2D" parent="FanArt/layer1/RightArm"]
|
||||||
|
position = Vector2(-3, 11.9167)
|
||||||
|
remote_path = NodePath("../../RightHand")
|
||||||
|
|
||||||
|
[node name="Cape" type="Node2D" parent="FanArt/layer1" node_paths=PackedStringArray("polygon", "line")]
|
||||||
|
position = Vector2(77.3358, 152.561)
|
||||||
|
script = ExtResource("4_i2hyy")
|
||||||
|
polygon = NodePath("Fill")
|
||||||
|
stroke_color = Color(0, 0, 0, 1)
|
||||||
|
stroke_width = 3.0
|
||||||
|
begin_cap_mode = 2
|
||||||
|
end_cap_mode = 2
|
||||||
|
line_joint_mode = 2
|
||||||
|
line = NodePath("Stroke")
|
||||||
|
curve = SubResource("Curve2D_tdxpr")
|
||||||
|
update_curve_at_runtime = true
|
||||||
|
arc_list = SubResource("Resource_m74ci")
|
||||||
|
|
||||||
|
[node name="Stroke" type="Line2D" parent="FanArt/layer1/Cape"]
|
||||||
|
points = PackedVector2Array(-8.5744, -12.482, -6.32422, -12.7296, -5.45365, -12.743, -4.71705, -12.6972, -4.08761, -12.6032, -3.53856, -12.4716, -1.61024, -11.7878, -1.06119, -11.6316, -0.431751, -11.5031, 0.304853, -11.413, 1.17542, -11.3722, 3.4256, -11.482, 4.59761, -5.21889, 6.4256, 0.517999, 7.58559, 3.18911, 8.90956, 5.72866, 10.3975, 8.13666, 12.0495, 10.4131, 0.940884, 11.827, -4.91234, 12.2351, -11.2067, 12.202, -11.4716, 11.5457, -11.6765, 10.8895, -11.935, 9.57692, -12.04, 8.26438, -12.0495, 6.95184)
|
||||||
|
closed = true
|
||||||
|
width = 3.0
|
||||||
|
default_color = Color(0, 0, 0, 1)
|
||||||
|
joint_mode = 2
|
||||||
|
begin_cap_mode = 2
|
||||||
|
end_cap_mode = 2
|
||||||
|
sharp_limit = 80.0
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="Fill" type="Polygon2D" parent="FanArt/layer1/Cape"]
|
||||||
|
color = Color(0.819608, 0.219608, 0.294118, 0.981982)
|
||||||
|
polygon = PackedVector2Array(-8.5744, -12.482, -6.32422, -12.7296, -5.45365, -12.743, -4.71705, -12.6972, -4.08761, -12.6032, -3.53856, -12.4716, -1.61024, -11.7878, -1.06119, -11.6316, -0.431751, -11.5031, 0.304853, -11.413, 1.17542, -11.3722, 3.4256, -11.482, 4.59761, -5.21889, 6.4256, 0.517999, 7.58559, 3.18911, 8.90956, 5.72866, 10.3975, 8.13666, 12.0495, 10.4131, 0.940884, 11.827, -4.91234, 12.2351, -11.2067, 12.202, -11.4716, 11.5457, -11.6765, 10.8895, -11.935, 9.57692, -12.04, 8.26438, -12.0495, 6.95184)
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="LeftHand" type="Node2D" parent="FanArt/layer1" node_paths=PackedStringArray("polygon", "line")]
|
||||||
|
position = Vector2(82.3584, 154.333)
|
||||||
|
rotation = 0.015854
|
||||||
|
script = ExtResource("4_i2hyy")
|
||||||
|
polygon = NodePath("Fill")
|
||||||
|
stroke_color = Color(0, 0, 0, 1)
|
||||||
|
stroke_width = 3.0
|
||||||
|
line_joint_mode = 2
|
||||||
|
line = NodePath("Stroke")
|
||||||
|
curve = SubResource("Curve2D_g3rv6")
|
||||||
|
update_curve_at_runtime = true
|
||||||
|
arc_list = SubResource("Resource_d0jpf")
|
||||||
|
shape_type = 1
|
||||||
|
size = Vector2(6.61129, 4.04455)
|
||||||
|
rx = 1.08892
|
||||||
|
ry = 1.63338
|
||||||
|
|
||||||
|
[node name="Stroke" type="Line2D" parent="FanArt/layer1/LeftHand"]
|
||||||
|
points = PackedVector2Array(2.21672, -2.02227, 2.27276, -2.02015, 2.32806, -2.01384, 2.38256, -2.00346, 2.43619, -1.98909, 2.54054, -1.94884, 2.64059, -1.89392, 2.73578, -1.82514, 2.82556, -1.74333, 2.90939, -1.6493, 2.98671, -1.54388, 3.05699, -1.42789, 3.11968, -1.30214, 3.17422, -1.16747, 3.22007, -1.02469, 3.28352, -0.718085, 3.30564, -0.388895, 3.30564, 0.388895, 3.28352, 0.718085, 3.22007, 1.02469, 3.17422, 1.16747, 3.11968, 1.30214, 3.05699, 1.42789, 2.98671, 1.54388, 2.90939, 1.6493, 2.82556, 1.74333, 2.73578, 1.82514, 2.64059, 1.89392, 2.54054, 1.94884, 2.43618, 1.98909, 2.38256, 2.00346, 2.32806, 2.01384, 2.27276, 2.02015, 2.21672, 2.02227, -2.21672, 2.02227, -2.27276, 2.02015, -2.32806, 2.01384, -2.38256, 2.00346, -2.43619, 1.98909, -2.54054, 1.94884, -2.64059, 1.89392, -2.73578, 1.82514, -2.82556, 1.74333, -2.90939, 1.6493, -2.98671, 1.54388, -3.05699, 1.42789, -3.11968, 1.30214, -3.17422, 1.16747, -3.22007, 1.02469, -3.28352, 0.718085, -3.30564, 0.388895, -3.30564, -0.388895, -3.28352, -0.718085, -3.22007, -1.02469, -3.17422, -1.16747, -3.11968, -1.30214, -3.05699, -1.42789, -2.98671, -1.54388, -2.90939, -1.6493, -2.82556, -1.74333, -2.73578, -1.82514, -2.64059, -1.89392, -2.54054, -1.94884, -2.43618, -1.98909, -2.38256, -2.00346, -2.32806, -2.01384, -2.27276, -2.02015, -2.21672, -2.02227)
|
||||||
|
closed = true
|
||||||
|
width = 3.0
|
||||||
|
default_color = Color(0, 0, 0, 1)
|
||||||
|
joint_mode = 2
|
||||||
|
sharp_limit = 80.0
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="Fill" type="Polygon2D" parent="FanArt/layer1/LeftHand"]
|
||||||
|
color = Color(0.988235, 0.603922, 0.603922, 1)
|
||||||
|
polygon = PackedVector2Array(2.21672, -2.02227, 2.27276, -2.02015, 2.32806, -2.01384, 2.38256, -2.00346, 2.43619, -1.98909, 2.54054, -1.94884, 2.64059, -1.89392, 2.73578, -1.82514, 2.82556, -1.74333, 2.90939, -1.6493, 2.98671, -1.54388, 3.05699, -1.42789, 3.11968, -1.30214, 3.17422, -1.16747, 3.22007, -1.02469, 3.28352, -0.718085, 3.30564, -0.388895, 3.30564, 0.388895, 3.28352, 0.718085, 3.22007, 1.02469, 3.17422, 1.16747, 3.11968, 1.30214, 3.05699, 1.42789, 2.98671, 1.54388, 2.90939, 1.6493, 2.82556, 1.74333, 2.73578, 1.82514, 2.64059, 1.89392, 2.54054, 1.94884, 2.43618, 1.98909, 2.38256, 2.00346, 2.32806, 2.01384, 2.27276, 2.02015, 2.21672, 2.02227, -2.21672, 2.02227, -2.27276, 2.02015, -2.32806, 2.01384, -2.38256, 2.00346, -2.43619, 1.98909, -2.54054, 1.94884, -2.64059, 1.89392, -2.73578, 1.82514, -2.82556, 1.74333, -2.90939, 1.6493, -2.98671, 1.54388, -3.05699, 1.42789, -3.11968, 1.30214, -3.17422, 1.16747, -3.22007, 1.02469, -3.28352, 0.718085, -3.30564, 0.388895, -3.30564, -0.388895, -3.28352, -0.718085, -3.22007, -1.02469, -3.17422, -1.16747, -3.11968, -1.30214, -3.05699, -1.42789, -2.98671, -1.54388, -2.90939, -1.6493, -2.82556, -1.74333, -2.73578, -1.82514, -2.64059, -1.89392, -2.54054, -1.94884, -2.43618, -1.98909, -2.38256, -2.00346, -2.32806, -2.01384, -2.27276, -2.02015, -2.21672, -2.02227)
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="LeftArm" type="Node2D" parent="FanArt/layer1" node_paths=PackedStringArray("polygon", "line")]
|
||||||
|
position = Vector2(79.5669, 140.329)
|
||||||
|
script = ExtResource("4_i2hyy")
|
||||||
|
polygon = NodePath("Fill")
|
||||||
|
stroke_color = Color(0, 0, 0, 1)
|
||||||
|
stroke_width = 3.0
|
||||||
|
line_joint_mode = 2
|
||||||
|
line = NodePath("Stroke")
|
||||||
|
curve = SubResource("Curve2D_51t4y")
|
||||||
|
update_curve_at_runtime = true
|
||||||
|
arc_list = SubResource("Resource_li8ts")
|
||||||
|
|
||||||
|
[node name="Stroke" type="Line2D" parent="FanArt/layer1/LeftArm"]
|
||||||
|
points = PackedVector2Array(-0.0833435, -2.16666, 1.40855, -0.83372, 2.87885, 0.721419, 5.6478, 4.1948, 9.75121, 10.4696, 2.95197, 12.3641, 2.2247, 10.1895, 1.47248, 8.45501, 0.732901, 7.11422, 0.0435264, 6.12094, -0.558064, 5.4289, -1.03429, 4.99186, -1.34759, 4.76355, -1.46037, 4.69773)
|
||||||
|
width = 3.0
|
||||||
|
default_color = Color(0, 0, 0, 1)
|
||||||
|
joint_mode = 2
|
||||||
|
sharp_limit = 80.0
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="Fill" type="Polygon2D" parent="FanArt/layer1/LeftArm"]
|
||||||
|
color = Color(0.819608, 0.219608, 0.294118, 0.981982)
|
||||||
|
polygon = PackedVector2Array(-0.0833435, -2.16666, 1.40855, -0.83372, 2.87885, 0.721419, 5.6478, 4.1948, 9.75121, 10.4696, 2.95197, 12.3641, 2.2247, 10.1895, 1.47248, 8.45501, 0.732901, 7.11422, 0.0435264, 6.12094, -0.558064, 5.4289, -1.03429, 4.99186, -1.34759, 4.76355, -1.46037, 4.69773)
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="RemoteTransform2D" type="RemoteTransform2D" parent="FanArt/layer1/LeftArm"]
|
||||||
|
position = Vector2(6.75, 12.5833)
|
||||||
|
rotation = -0.279749
|
||||||
|
remote_path = NodePath("../../LeftHand")
|
||||||
|
|
||||||
|
[node name="Head" type="Node2D" parent="FanArt/layer1" node_paths=PackedStringArray("polygon", "line")]
|
||||||
|
position = Vector2(71.8393, 128.359)
|
||||||
|
script = ExtResource("4_i2hyy")
|
||||||
|
polygon = NodePath("Fill")
|
||||||
|
stroke_color = Color(0, 0, 0, 1)
|
||||||
|
stroke_width = 3.1
|
||||||
|
line = NodePath("Stroke")
|
||||||
|
curve = SubResource("Curve2D_row8l")
|
||||||
|
update_curve_at_runtime = true
|
||||||
|
arc_list = SubResource("Resource_gw0fs")
|
||||||
|
|
||||||
|
[node name="Stroke" type="Line2D" parent="FanArt/layer1/Head"]
|
||||||
|
points = PackedVector2Array(-9.78708, -8.52243, 12.2153, -8.52243, 12.2441, -8.63216, 12.2836, -8.74511, 12.3934, -8.97966, 12.5419, -9.22406, 12.7263, -9.47629, 13.1917, -9.99623, 13.7673, -10.5234, 15.1597, -11.535, 16.725, -12.3823, 17.5167, -12.7041, 18.2846, -12.9366, 19.0064, -13.0636, 19.343, -13.0826, 19.6598, -13.0692, 19.9538, -13.0213, 20.0915, -12.9838, 20.2224, -12.937, 20.3463, -12.8806, 20.4628, -12.8143, 20.5715, -12.738, 20.672, -12.6512, 20.7642, -12.5538, 20.8475, -12.4456, 20.9216, -12.3263, 20.9863, -12.1956, 21.0411, -12.0532, 21.0856, -11.899, 21.1197, -11.7327, 21.1428, -11.554, 21.1495, -11.433, 21.1468, -11.3125, 21.135, -11.1927, 21.1143, -11.0735, 21.0478, -10.8376, 20.9495, -10.6052, 20.8219, -10.3768, 20.6674, -10.1528, 20.4883, -9.9338, 20.287, -9.72021, 19.8275, -9.31121, 19.3079, -8.92964, 18.1647, -8.2641, 17.01, -7.75417, 15.9963, -7.43046, 15.59, -7.348, 15.4204, -7.32829, 15.2762, -7.32357, 15.2145, -7.32698, 15.16, -7.33431, 15.113, -7.34563, 15.074, -7.36099, 15.0431, -7.38046, 15.0206, -7.40409, 15.0069, -7.43195, 15.0023, -7.46409, 15.2492, 8.63489, 15.2481, 8.65738, 15.2442, 8.68091, 15.2374, 8.70542, 15.2279, 8.7309, 15.2006, 8.78463, 15.1626, 8.84183, 15.1142, 8.90226, 15.0556, 8.96568, 14.9088, 9.10046, 14.5045, 9.39486, 13.9666, 9.70909, 12.5574, 10.3333, 10.8159, 10.8457, -0.890249, 12.7859, -11.5157, 13.3975, -16.0475, 13.4397, -17.6596, 13.3735, -18.9009, 13.2329, -19.3978, 13.1308, -19.8203, 13.0055, -20.1745, 12.8554, -20.3279, 12.7707, -20.4666, 12.6791, -20.5912, 12.5806, -20.7025, 12.475, -20.8014, 12.3621, -20.8885, 12.2416, -20.9647, 12.1134, -21.0306, 11.9773, -21.135, 11.6806, -21.1495, 11.6012, -21.1494, 11.5199, -21.1353, 11.4368, -21.1076, 11.3519, -21.0667, 11.2654, -21.0132, 11.1773, -20.9474, 11.0878, -20.8699, 10.997, -20.6813, 10.8117, -20.4511, 10.6223, -19.8806, 10.2345, -18.4013, 9.44559, -16.6659, 8.68263, -11.8468, 6.93817, -12.5741, -6.96933, -12.9012, -6.99139, -13.3362, -7.05718, -14.4505, -7.31903, -15.7598, -7.75318, -17.1065, -8.35789, -17.7446, -8.72367, -18.3331, -9.13145, -18.8522, -9.58101, -19.0796, -9.82139, -19.2823, -10.0721, -19.4578, -10.3332, -19.6037, -10.6046, -19.7174, -10.8863, -19.7966, -11.1782, -19.8387, -11.4804, -19.8414, -11.7928, -19.8022, -12.1153, -19.7185, -12.448, -19.6683, -12.5843, -19.6075, -12.7096, -19.5364, -12.8241, -19.4555, -12.9281, -19.3651, -13.0218, -19.2654, -13.1055, -19.1569, -13.1793, -19.04, -13.2435, -18.9149, -13.2984, -18.782, -13.344, -18.4943, -13.4088, -18.1797, -13.4397, -17.841, -13.4385, -17.1026, -13.3472, -16.3015, -13.1495, -15.4602, -12.8599, -14.6011, -12.493, -12.9197, -11.5855, -11.437, -10.5435, -10.8264, -10.0086, -10.3329, -9.48368, -10.1371, -9.22958, -9.97897, -8.98345, -9.86136, -8.74713, -9.81863, -8.63321)
|
||||||
|
closed = true
|
||||||
|
width = 3.1
|
||||||
|
default_color = Color(0, 0, 0, 1)
|
||||||
|
sharp_limit = 80.0
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="Fill" type="Polygon2D" parent="FanArt/layer1/Head"]
|
||||||
|
color = Color(0.988235, 0.603922, 0.603922, 1)
|
||||||
|
polygon = PackedVector2Array(-9.78708, -8.52243, 12.2153, -8.52243, 12.2441, -8.63216, 12.2836, -8.74511, 12.3934, -8.97966, 12.5419, -9.22406, 12.7263, -9.47629, 13.1917, -9.99623, 13.7673, -10.5234, 15.1597, -11.535, 16.725, -12.3823, 17.5167, -12.7041, 18.2846, -12.9366, 19.0064, -13.0636, 19.343, -13.0826, 19.6598, -13.0692, 19.9538, -13.0213, 20.0915, -12.9838, 20.2224, -12.937, 20.3463, -12.8806, 20.4628, -12.8143, 20.5715, -12.738, 20.672, -12.6512, 20.7642, -12.5538, 20.8475, -12.4456, 20.9216, -12.3263, 20.9863, -12.1956, 21.0411, -12.0532, 21.0856, -11.899, 21.1197, -11.7327, 21.1428, -11.554, 21.1495, -11.433, 21.1468, -11.3125, 21.135, -11.1927, 21.1143, -11.0735, 21.0478, -10.8376, 20.9495, -10.6052, 20.8219, -10.3768, 20.6674, -10.1528, 20.4883, -9.9338, 20.287, -9.72021, 19.8275, -9.31121, 19.3079, -8.92964, 18.1647, -8.2641, 17.01, -7.75417, 15.9963, -7.43046, 15.59, -7.348, 15.4204, -7.32829, 15.2762, -7.32357, 15.2145, -7.32698, 15.16, -7.33431, 15.113, -7.34563, 15.074, -7.36099, 15.0431, -7.38046, 15.0206, -7.40409, 15.0069, -7.43195, 15.0023, -7.46409, 15.2492, 8.63489, 15.2481, 8.65738, 15.2442, 8.68091, 15.2374, 8.70542, 15.2279, 8.7309, 15.2006, 8.78463, 15.1626, 8.84183, 15.1142, 8.90226, 15.0556, 8.96568, 14.9088, 9.10046, 14.5045, 9.39486, 13.9666, 9.70909, 12.5574, 10.3333, 10.8159, 10.8457, -0.890249, 12.7859, -11.5157, 13.3975, -16.0475, 13.4397, -17.6596, 13.3735, -18.9009, 13.2329, -19.3978, 13.1308, -19.8203, 13.0055, -20.1745, 12.8554, -20.3279, 12.7707, -20.4666, 12.6791, -20.5912, 12.5806, -20.7025, 12.475, -20.8014, 12.3621, -20.8885, 12.2416, -20.9647, 12.1134, -21.0306, 11.9773, -21.135, 11.6806, -21.1495, 11.6012, -21.1494, 11.5199, -21.1353, 11.4368, -21.1076, 11.3519, -21.0667, 11.2654, -21.0132, 11.1773, -20.9474, 11.0878, -20.8699, 10.997, -20.6813, 10.8117, -20.4511, 10.6223, -19.8806, 10.2345, -18.4013, 9.44559, -16.6659, 8.68263, -11.8468, 6.93817, -12.5741, -6.96933, -12.9012, -6.99139, -13.3362, -7.05718, -14.4505, -7.31903, -15.7598, -7.75318, -17.1065, -8.35789, -17.7446, -8.72367, -18.3331, -9.13145, -18.8522, -9.58101, -19.0796, -9.82139, -19.2823, -10.0721, -19.4578, -10.3332, -19.6037, -10.6046, -19.7174, -10.8863, -19.7966, -11.1782, -19.8387, -11.4804, -19.8414, -11.7928, -19.8022, -12.1153, -19.7185, -12.448, -19.6683, -12.5843, -19.6075, -12.7096, -19.5364, -12.8241, -19.4555, -12.9281, -19.3651, -13.0218, -19.2654, -13.1055, -19.1569, -13.1793, -19.04, -13.2435, -18.9149, -13.2984, -18.782, -13.344, -18.4943, -13.4088, -18.1797, -13.4397, -17.841, -13.4385, -17.1026, -13.3472, -16.3015, -13.1495, -15.4602, -12.8599, -14.6011, -12.493, -12.9197, -11.5855, -11.437, -10.5435, -10.8264, -10.0086, -10.3329, -9.48368, -10.1371, -9.22958, -9.97897, -8.98345, -9.86136, -8.74713, -9.81863, -8.63321)
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="Nose" type="Node2D" parent="FanArt/layer1/Head" node_paths=PackedStringArray("polygon")]
|
||||||
|
position = Vector2(-16.8134, 11.133)
|
||||||
|
script = ExtResource("4_i2hyy")
|
||||||
|
polygon = NodePath("Fill")
|
||||||
|
curve = SubResource("Curve2D_loqdy")
|
||||||
|
update_curve_at_runtime = true
|
||||||
|
arc_list = SubResource("Resource_vpx2b")
|
||||||
|
shape_type = 2
|
||||||
|
size = Vector2(6.35, 2.64583)
|
||||||
|
rx = 3.175
|
||||||
|
ry = 1.32292
|
||||||
|
|
||||||
|
[node name="Fill" type="Polygon2D" parent="FanArt/layer1/Head/Nose"]
|
||||||
|
color = Color(0, 0, 0, 1)
|
||||||
|
polygon = PackedVector2Array(3.175, 0, 3.17087, 0.0680788, 3.15861, 0.135264, 3.13842, 0.201472, 3.1105, 0.266619, 3.07505, 0.330624, 3.03226, 0.393402, 2.98235, 0.454871, 2.9255, 0.514947, 2.7918, 0.630589, 2.63277, 0.739663, 2.45, 0.841505, 2.24508, 0.93545, 1.77519, 1.09699, 1.23587, 1.21896, 0.639887, 1.29604, 0, 1.32291, -0.639887, 1.29604, -1.23587, 1.21896, -1.77519, 1.09699, -2.24508, 0.93545, -2.45, 0.841505, -2.63277, 0.739663, -2.7918, 0.630589, -2.9255, 0.514947, -2.98235, 0.454871, -3.03226, 0.393402, -3.07505, 0.330624, -3.1105, 0.266619, -3.13842, 0.201472, -3.15861, 0.135264, -3.17087, 0.0680788, -3.175, 0, -3.17087, -0.0680788, -3.15861, -0.135264, -3.13842, -0.201472, -3.1105, -0.266619, -3.07505, -0.330624, -3.03226, -0.393402, -2.98235, -0.454871, -2.9255, -0.514947, -2.7918, -0.630589, -2.63277, -0.739663, -2.45, -0.841505, -2.24508, -0.93545, -1.77519, -1.09699, -1.23587, -1.21896, -0.639887, -1.29604, 0, -1.32291, 0.639887, -1.29604, 1.23587, -1.21896, 1.77519, -1.09699, 2.24508, -0.93545, 2.45, -0.841505, 2.63277, -0.739663, 2.7918, -0.630589, 2.9255, -0.514947, 2.98235, -0.454871, 3.03226, -0.393402, 3.07505, -0.330624, 3.1105, -0.266619, 3.13842, -0.201472, 3.15861, -0.135264, 3.17087, -0.0680788)
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="Mouth" type="Node2D" parent="FanArt/layer1/Head" node_paths=PackedStringArray("line")]
|
||||||
|
position = Vector2(-1.8317, 9.702)
|
||||||
|
script = ExtResource("4_i2hyy")
|
||||||
|
stroke_color = Color(0, 0, 0, 1)
|
||||||
|
stroke_width = 1.5875
|
||||||
|
line = NodePath("Stroke")
|
||||||
|
curve = SubResource("Curve2D_ojj3e")
|
||||||
|
update_curve_at_runtime = true
|
||||||
|
arc_list = SubResource("Resource_mg08f")
|
||||||
|
|
||||||
|
[node name="Stroke" type="Line2D" parent="FanArt/layer1/Head/Mouth"]
|
||||||
|
points = PackedVector2Array(2.91041, -1.4493, 2.90296, -1.24629, 2.88136, -1.0443, 2.84573, -0.844306, 2.79624, -0.647285, 2.73312, -0.454196, 2.65668, -0.26598, 2.56731, -0.0835546, 2.46542, 0.0921917, 2.35152, 0.260403, 2.22617, 0.420259, 2.08997, 0.570982, 1.94359, 0.711837, 1.78774, 0.842138, 1.62318, 0.961249, 1.45072, 1.06859, 1.27118, 1.16364, 1.08545, 1.24594, 0.894438, 1.31508, 0.699065, 1.37072, 0.500285, 1.4126, 0.299069, 1.44052, 0.0963949, 1.45433, -0.106748, 1.45397, -0.309372, 1.43943, -0.510488, 1.4108, -0.709117, 1.36821, -0.904291, 1.31187, -1.09506, 1.24205, -1.28049, 1.1591, -1.45969, 1.06341, -1.63177, 0.955451, -1.7959, 0.835753, -1.95129, 0.704898, -2.09717, 0.563522, -2.23283, 0.412315, -2.35761, 0.252013, -2.47091, 0.0833976, -2.57216, -0.0927107, -2.66089, -0.275453, -2.73665, -0.46394, -2.79908, -0.657253, -2.84788, -0.854449, -2.8828, -1.05457, -2.90367, -1.25664, -2.9104, -1.45967)
|
||||||
|
width = 1.5875
|
||||||
|
default_color = Color(0, 0, 0, 1)
|
||||||
|
sharp_limit = 80.0
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="RightEye" parent="FanArt/layer1/Head" instance=ExtResource("5_3gxsp")]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
position = Vector2(-7.39712, -0.674786)
|
||||||
|
|
||||||
|
[node name="LeftEye" parent="FanArt/layer1/Head" instance=ExtResource("5_3gxsp")]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
position = Vector2(9.25859, -0.465553)
|
||||||
|
|
||||||
|
[node name="Hair2" type="Node2D" parent="FanArt/layer1/Head" node_paths=PackedStringArray("polygon", "line")]
|
||||||
|
position = Vector2(1.19137, -13.1397)
|
||||||
|
rotation = -3.02566
|
||||||
|
script = ExtResource("4_i2hyy")
|
||||||
|
polygon = NodePath("Fill")
|
||||||
|
stroke_color = Color(0, 0, 0, 1)
|
||||||
|
stroke_width = 3.1
|
||||||
|
line = NodePath("Stroke")
|
||||||
|
curve = SubResource("Curve2D_3gxsp")
|
||||||
|
update_curve_at_runtime = true
|
||||||
|
arc_list = SubResource("Resource_vuvrq")
|
||||||
|
|
||||||
|
[node name="Stroke" type="Line2D" parent="FanArt/layer1/Head/Hair2"]
|
||||||
|
points = PackedVector2Array(7.96465, 7.6074, 8.3288, 7.63232, 8.69808, 7.62954, 9.07048, 7.59944, 9.44399, 7.5424, 10.1863, 7.34902, 10.9088, 7.05247, 11.5449, 6.68912, 12.072, 6.28792, 12.2976, 6.07565, 12.4993, 5.85694, 12.6783, 5.6328, 12.8357, 5.40424, 13.0902, 4.93787, 13.272, 4.4659, 13.39, 3.99638, 13.4533, 3.53738, 13.4709, 3.09694, 13.4517, 2.68313, 13.3395, 1.96764, 13.1889, 1.45537, 13.1218, 1.2956, 13.0943, 1.24332, 13.0825, 1.22453, 13.0722, 1.2108, 13.2499, 0.63655, 13.3697, 0.0585596, 13.432, -0.519471, 13.4367, -1.09384, 13.384, -1.66085, 13.2742, -2.21681, 13.1073, -2.758, 12.8836, -3.28074, 12.5959, -3.78996, 12.26, -4.25877, 11.8796, -4.68598, 11.4584, -5.07045, 11, -5.411, 10.5081, -5.70646, 9.98646, -5.95568, 9.43863, -6.15749, 8.86833, -6.31072, 8.27921, -6.4142, 7.67495, -6.46678, 7.05923, -6.46729, 6.4357, -6.41456, 5.80804, -6.30742, 5.17992, -6.14472, 4.555, -5.92528, 4.35279, -6.23597, 4.11364, -6.52166, 3.84094, -6.78009, 3.53805, -7.00899, 3.20835, -7.20608, 2.8552, -7.36909, 2.48199, -7.49575, 2.09208, -7.58379, 1.59369, -7.63232, 1.10408, -7.61538, 0.630486, -7.53574, 0.18015, -7.39622, -0.0340367, -7.30488, -0.239696, -7.19961, -0.435924, -7.08076, -0.621817, -6.94869, -0.796469, -6.80374, -0.958977, -6.64627, -1.10844, -6.47662, -1.24394, -6.29514, -1.4117, -6.53242, -1.59759, -6.74754, -1.80011, -6.93945, -2.01774, -7.1071, -2.24899, -7.24947, -2.49233, -7.3655, -2.74628, -7.45416, -3.00931, -7.51441, -3.26801, -7.54322, -3.52518, -7.54445, -3.77953, -7.51903, -4.02975, -7.46791, -4.27455, -7.39201, -4.51264, -7.29226, -4.74273, -7.1696, -4.96352, -7.02496, -5.17371, -6.85926, -5.37202, -6.67344, -5.55714, -6.46844, -5.72779, -6.24519, -5.88266, -6.00461, -6.02047, -5.74764, -6.13992, -5.47521, -6.23972, -5.18826, -7.3946, -5.07563, -8.57612, -4.83867, -9.73447, -4.48521, -10.8199, -4.02308, -11.3196, -3.75372, -11.7825, -3.46012, -12.2022, -3.14328, -12.5725, -2.80418, -12.8873, -2.44378, -13.0219, -2.2559, -13.1402, -2.06307, -13.2415, -1.86541, -13.3251, -1.66304, -13.3901, -1.45608, -13.4357, -1.24465, -13.4662, -0.981663, -13.4708, -0.718553, -13.4506, -0.455753, -13.4063, -0.1937, -13.3389, 0.0671696, -13.2493, 0.326422, -13.0072, 0.838329, -12.6871, 1.33854, -12.2965, 1.82356, -11.8424, 2.28992, -11.3323, 2.73412, -10.1729, 3.54214, -8.87629, 4.21973, -7.50071, 4.73902, -6.10427, 5.07213, -5.10017, 5.17898, -4.11623, 5.17183, -3.16665, 5.05513, -2.26561, 4.83333, -1.42731, 4.51086, -1.03612, 4.31326, -0.665943, 4.09216, -0.318547, 3.84811, 0.00429246, 3.58168, 0.300802, 3.2934, 0.569206, 2.98385, 0.94391, 3.58356, 1.39099, 4.12667, 1.90446, 4.60935, 2.47832, 5.02777, 3.10658, 5.3781, 3.78324, 5.6565, 4.50232, 5.85915, 5.25782, 5.9822, 5.47144, 6.30598, 5.72655, 6.59881, 6.02023, 6.85893, 6.34955, 7.08458, 6.71157, 7.27402, 7.10338, 7.42547, 7.52205, 7.53719)
|
||||||
|
closed = true
|
||||||
|
width = 3.1
|
||||||
|
default_color = Color(0, 0, 0, 1)
|
||||||
|
sharp_limit = 80.0
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="Fill" type="Polygon2D" parent="FanArt/layer1/Head/Hair2"]
|
||||||
|
color = Color(0.976471, 0.976471, 0.976471, 1)
|
||||||
|
polygon = PackedVector2Array(7.96465, 7.6074, 8.3288, 7.63232, 8.69808, 7.62954, 9.07048, 7.59944, 9.44399, 7.5424, 10.1863, 7.34902, 10.9088, 7.05247, 11.5449, 6.68912, 12.072, 6.28792, 12.2976, 6.07565, 12.4993, 5.85694, 12.6783, 5.6328, 12.8357, 5.40424, 13.0902, 4.93787, 13.272, 4.4659, 13.39, 3.99638, 13.4533, 3.53738, 13.4709, 3.09694, 13.4517, 2.68313, 13.3395, 1.96764, 13.1889, 1.45537, 13.1218, 1.2956, 13.0943, 1.24332, 13.0825, 1.22453, 13.0722, 1.2108, 13.2499, 0.63655, 13.3697, 0.0585596, 13.432, -0.519471, 13.4367, -1.09384, 13.384, -1.66085, 13.2742, -2.21681, 13.1073, -2.758, 12.8836, -3.28074, 12.5959, -3.78996, 12.26, -4.25877, 11.8796, -4.68598, 11.4584, -5.07045, 11, -5.411, 10.5081, -5.70646, 9.98646, -5.95568, 9.43863, -6.15749, 8.86833, -6.31072, 8.27921, -6.4142, 7.67495, -6.46678, 7.05923, -6.46729, 6.4357, -6.41456, 5.80804, -6.30742, 5.17992, -6.14472, 4.555, -5.92528, 4.35279, -6.23597, 4.11364, -6.52166, 3.84094, -6.78009, 3.53805, -7.00899, 3.20835, -7.20608, 2.8552, -7.36909, 2.48199, -7.49575, 2.09208, -7.58379, 1.59369, -7.63232, 1.10408, -7.61538, 0.630486, -7.53574, 0.18015, -7.39622, -0.0340367, -7.30488, -0.239696, -7.19961, -0.435924, -7.08076, -0.621817, -6.94869, -0.796469, -6.80374, -0.958977, -6.64627, -1.10844, -6.47662, -1.24394, -6.29514, -1.4117, -6.53242, -1.59759, -6.74754, -1.80011, -6.93945, -2.01774, -7.1071, -2.24899, -7.24947, -2.49233, -7.3655, -2.74628, -7.45416, -3.00931, -7.51441, -3.26801, -7.54322, -3.52518, -7.54445, -3.77953, -7.51903, -4.02975, -7.46791, -4.27455, -7.39201, -4.51264, -7.29226, -4.74273, -7.1696, -4.96352, -7.02496, -5.17371, -6.85926, -5.37202, -6.67344, -5.55714, -6.46844, -5.72779, -6.24519, -5.88266, -6.00461, -6.02047, -5.74764, -6.13992, -5.47521, -6.23972, -5.18826, -7.3946, -5.07563, -8.57612, -4.83867, -9.73447, -4.48521, -10.8199, -4.02308, -11.3196, -3.75372, -11.7825, -3.46012, -12.2022, -3.14328, -12.5725, -2.80418, -12.8873, -2.44378, -13.0219, -2.2559, -13.1402, -2.06307, -13.2415, -1.86541, -13.3251, -1.66304, -13.3901, -1.45608, -13.4357, -1.24465, -13.4662, -0.981663, -13.4708, -0.718553, -13.4506, -0.455753, -13.4063, -0.1937, -13.3389, 0.0671696, -13.2493, 0.326422, -13.0072, 0.838329, -12.6871, 1.33854, -12.2965, 1.82356, -11.8424, 2.28992, -11.3323, 2.73412, -10.1729, 3.54214, -8.87629, 4.21973, -7.50071, 4.73902, -6.10427, 5.07213, -5.10017, 5.17898, -4.11623, 5.17183, -3.16665, 5.05513, -2.26561, 4.83333, -1.42731, 4.51086, -1.03612, 4.31326, -0.665943, 4.09216, -0.318547, 3.84811, 0.00429246, 3.58168, 0.300802, 3.2934, 0.569206, 2.98385, 0.94391, 3.58356, 1.39099, 4.12667, 1.90446, 4.60935, 2.47832, 5.02777, 3.10658, 5.3781, 3.78324, 5.6565, 4.50232, 5.85915, 5.25782, 5.9822, 5.47144, 6.30598, 5.72655, 6.59881, 6.02023, 6.85893, 6.34955, 7.08458, 6.71157, 7.27402, 7.10338, 7.42547, 7.52205, 7.53719)
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="FanArt"]
|
||||||
|
root_node = NodePath("../..")
|
||||||
|
libraries = {
|
||||||
|
&"": SubResource("AnimationLibrary_w1jjx")
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Camera2D" type="Camera2D" parent="."]
|
||||||
|
position = Vector2(23, 31.6667)
|
||||||
|
zoom = Vector2(7, 7)
|
||||||
83
addons/curved_lines_2d/examples/gui.tscn
Normal file
4
addons/curved_lines_2d/examples/heart_icon.gd
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
extends Node2D
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
$AnimationPlayer.play("heart_beat")
|
||||||
1
addons/curved_lines_2d/examples/heart_icon.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://bq71tj10w4224
|
||||||
725
addons/curved_lines_2d/examples/heart_icon.tscn
Normal file
@@ -0,0 +1,725 @@
|
|||||||
|
[gd_scene load_steps=17 format=3 uid="uid://c6dfjd23olqhh"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://de3jpss66xjfh" path="res://addons/curved_lines_2d/scalable_vector_shape_2d.gd" id="1_0qe1d"]
|
||||||
|
[ext_resource type="Script" uid="uid://bq71tj10w4224" path="res://addons/curved_lines_2d/examples/heart_icon.gd" id="1_7bfrm"]
|
||||||
|
[ext_resource type="Script" uid="uid://dlbv4pit17dnu" path="res://addons/curved_lines_2d/scalable_arc.gd" id="3_0mo18"]
|
||||||
|
[ext_resource type="Script" uid="uid://dl1t88tthmwts" path="res://addons/curved_lines_2d/scalable_arc_list.gd" id="4_2kl3k"]
|
||||||
|
|
||||||
|
[sub_resource type="Curve2D" id="Curve2D_jr52a"]
|
||||||
|
_data = {
|
||||||
|
"points": PackedVector2Array(0, 0, 8.8368, 0, 110, 0, 0, -8.8368, 0, 0, 126, 16, 0, 0, 0, 8.8368, 126, 110, 8.8368, 0, 0, 0, 110, 126, 0, 0, -8.8368, 0, 16, 126, 0, 8.8368, 0, 0, 0, 110, 0, 0, 0, -8.8368, 0, 16, -8.8368, 0, 0, 0, 16, 0, 0, 0, 0, 0, 110, 0)
|
||||||
|
}
|
||||||
|
point_count = 9
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_0f505"]
|
||||||
|
script = ExtResource("4_2kl3k")
|
||||||
|
arcs = Array[ExtResource("3_0mo18")]([])
|
||||||
|
|
||||||
|
[sub_resource type="Curve2D" id="Curve2D_2027v"]
|
||||||
|
_data = {
|
||||||
|
"points": PackedVector2Array(0, 0, 29.2, -50, 0.973248, -28.9963, 94.8, -57.4, -88.8, -44.5, 0.617999, 42.92, -42.8, -54.2, 0, 0, 0.973248, -28.9963)
|
||||||
|
}
|
||||||
|
point_count = 3
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_tok2d"]
|
||||||
|
script = ExtResource("4_2kl3k")
|
||||||
|
arcs = Array[ExtResource("3_0mo18")]([])
|
||||||
|
|
||||||
|
[sub_resource type="Gradient" id="Gradient_ygkck"]
|
||||||
|
colors = PackedColorArray(0.60933, 0.60933, 0.60933, 1, 1, 1, 1, 1)
|
||||||
|
|
||||||
|
[sub_resource type="GradientTexture2D" id="GradientTexture2D_gpl51"]
|
||||||
|
gradient = SubResource("Gradient_ygkck")
|
||||||
|
width = 100
|
||||||
|
height = 89
|
||||||
|
|
||||||
|
[sub_resource type="Curve2D" id="Curve2D_bi08n"]
|
||||||
|
_data = {
|
||||||
|
"points": PackedVector2Array(0, 0, 21.7271, 20.9769, 13.3388, -11.7091, 14.937, 28.6102, -14.937, -28.6102, -14.6612, 16.2909, -10.3688, -18.3229, 0, 0, 13.3388, -11.7091)
|
||||||
|
}
|
||||||
|
point_count = 3
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_35n4y"]
|
||||||
|
script = ExtResource("4_2kl3k")
|
||||||
|
arcs = Array[ExtResource("3_0mo18")]([])
|
||||||
|
|
||||||
|
[sub_resource type="Gradient" id="Gradient_42wa7"]
|
||||||
|
offsets = PackedFloat32Array(0, 0.529197)
|
||||||
|
colors = PackedColorArray(0.313726, 0.572549, 1, 1, 0.117647, 0.494118, 0.831373, 0)
|
||||||
|
|
||||||
|
[sub_resource type="GradientTexture2D" id="GradientTexture2D_2eynm"]
|
||||||
|
gradient = SubResource("Gradient_42wa7")
|
||||||
|
width = 38
|
||||||
|
height = 46
|
||||||
|
fill = 1
|
||||||
|
fill_from = Vector2(0.542735, 0.320513)
|
||||||
|
fill_to = Vector2(0.957265, 1)
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_7bfrm"]
|
||||||
|
resource_name = "heart_beat"
|
||||||
|
loop_mode = 2
|
||||||
|
step = 0.5
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("Heart:curve:point_0/position")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(0.973248, -28.9963), Vector2(1.25, -16.75)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("Heart:curve:point_0/out")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(29.2, -50), Vector2(38.7768, 0.7463)]
|
||||||
|
}
|
||||||
|
tracks/2/type = "value"
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/path = NodePath("Heart:curve:point_1/position")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(0.617999, 42.92), Vector2(2, 27)]
|
||||||
|
}
|
||||||
|
tracks/3/type = "value"
|
||||||
|
tracks/3/imported = false
|
||||||
|
tracks/3/enabled = true
|
||||||
|
tracks/3/path = NodePath("Heart:curve:point_1/in")
|
||||||
|
tracks/3/interp = 1
|
||||||
|
tracks/3/loop_wrap = true
|
||||||
|
tracks/3/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(94.8, -57.4), Vector2(31.132, -0.919998)]
|
||||||
|
}
|
||||||
|
tracks/4/type = "value"
|
||||||
|
tracks/4/imported = false
|
||||||
|
tracks/4/enabled = true
|
||||||
|
tracks/4/path = NodePath("Heart:curve:point_1/out")
|
||||||
|
tracks/4/interp = 1
|
||||||
|
tracks/4/loop_wrap = true
|
||||||
|
tracks/4/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(-88.8, -44.5), Vector2(-31.132, 0.919998)]
|
||||||
|
}
|
||||||
|
tracks/5/type = "value"
|
||||||
|
tracks/5/imported = false
|
||||||
|
tracks/5/enabled = true
|
||||||
|
tracks/5/path = NodePath("Heart:curve:point_2/position")
|
||||||
|
tracks/5/interp = 1
|
||||||
|
tracks/5/loop_wrap = true
|
||||||
|
tracks/5/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(0.973248, -28.9963), Vector2(1.25, -16.75)]
|
||||||
|
}
|
||||||
|
tracks/6/type = "value"
|
||||||
|
tracks/6/imported = false
|
||||||
|
tracks/6/enabled = true
|
||||||
|
tracks/6/path = NodePath("Heart:curve:point_2/in")
|
||||||
|
tracks/6/interp = 1
|
||||||
|
tracks/6/loop_wrap = true
|
||||||
|
tracks/6/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(-42.8, -54.2), Vector2(-38.7768, -0.7463)]
|
||||||
|
}
|
||||||
|
tracks/7/type = "value"
|
||||||
|
tracks/7/imported = false
|
||||||
|
tracks/7/enabled = true
|
||||||
|
tracks/7/path = NodePath("Heart/Fill:color")
|
||||||
|
tracks/7/interp = 1
|
||||||
|
tracks/7/loop_wrap = true
|
||||||
|
tracks/7/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0.278431, 0.54902, 0.74902, 1), Color(0.756863, 0.54902, 0.74902, 1)]
|
||||||
|
}
|
||||||
|
tracks/8/type = "value"
|
||||||
|
tracks/8/imported = false
|
||||||
|
tracks/8/enabled = true
|
||||||
|
tracks/8/path = NodePath("Heart/ScalableVectorShape2D:curve:point_0/position")
|
||||||
|
tracks/8/interp = 1
|
||||||
|
tracks/8/loop_wrap = true
|
||||||
|
tracks/8/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(13.3388, -11.7091), Vector2(26.2659, 31.7503)]
|
||||||
|
}
|
||||||
|
tracks/9/type = "value"
|
||||||
|
tracks/9/imported = false
|
||||||
|
tracks/9/enabled = true
|
||||||
|
tracks/9/path = NodePath("Heart/ScalableVectorShape2D:curve:point_0/out")
|
||||||
|
tracks/9/interp = 1
|
||||||
|
tracks/9/loop_wrap = true
|
||||||
|
tracks/9/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(21.7271, 20.9769), Vector2(16.3979, 15.8317)]
|
||||||
|
}
|
||||||
|
tracks/10/type = "value"
|
||||||
|
tracks/10/imported = false
|
||||||
|
tracks/10/enabled = true
|
||||||
|
tracks/10/path = NodePath("Heart/ScalableVectorShape2D:curve:point_1/position")
|
||||||
|
tracks/10/interp = 1
|
||||||
|
tracks/10/loop_wrap = true
|
||||||
|
tracks/10/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(-14.6612, 16.2909), Vector2(-3.46613, 40.8997)]
|
||||||
|
}
|
||||||
|
tracks/11/type = "value"
|
||||||
|
tracks/11/imported = false
|
||||||
|
tracks/11/enabled = true
|
||||||
|
tracks/11/path = NodePath("Heart/ScalableVectorShape2D:curve:point_1/in")
|
||||||
|
tracks/11/interp = 1
|
||||||
|
tracks/11/loop_wrap = true
|
||||||
|
tracks/11/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(14.937, 28.6102), Vector2(11.2732, 21.5927)]
|
||||||
|
}
|
||||||
|
tracks/12/type = "value"
|
||||||
|
tracks/12/imported = false
|
||||||
|
tracks/12/enabled = true
|
||||||
|
tracks/12/path = NodePath("Heart/ScalableVectorShape2D:curve:point_1/out")
|
||||||
|
tracks/12/interp = 1
|
||||||
|
tracks/12/loop_wrap = true
|
||||||
|
tracks/12/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(-14.937, -28.6102), Vector2(-11.2732, -21.5927)]
|
||||||
|
}
|
||||||
|
tracks/13/type = "value"
|
||||||
|
tracks/13/imported = false
|
||||||
|
tracks/13/enabled = true
|
||||||
|
tracks/13/path = NodePath("Heart/ScalableVectorShape2D:curve:point_2/position")
|
||||||
|
tracks/13/interp = 1
|
||||||
|
tracks/13/loop_wrap = true
|
||||||
|
tracks/13/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(13.3388, -11.7091), Vector2(26.2659, 31.7503)]
|
||||||
|
}
|
||||||
|
tracks/14/type = "value"
|
||||||
|
tracks/14/imported = false
|
||||||
|
tracks/14/enabled = true
|
||||||
|
tracks/14/path = NodePath("Heart/ScalableVectorShape2D:curve:point_2/in")
|
||||||
|
tracks/14/interp = 1
|
||||||
|
tracks/14/loop_wrap = true
|
||||||
|
tracks/14/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(-10.3688, -18.3229), Vector2(-7.82554, -13.8287)]
|
||||||
|
}
|
||||||
|
tracks/15/type = "value"
|
||||||
|
tracks/15/imported = false
|
||||||
|
tracks/15/enabled = true
|
||||||
|
tracks/15/path = NodePath("Heart/ScalableVectorShape2D/Polygon2D:color")
|
||||||
|
tracks/15/interp = 1
|
||||||
|
tracks/15/loop_wrap = true
|
||||||
|
tracks/15/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.55, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0.690196), Color(1, 1, 1, 0)]
|
||||||
|
}
|
||||||
|
tracks/16/type = "value"
|
||||||
|
tracks/16/imported = false
|
||||||
|
tracks/16/enabled = true
|
||||||
|
tracks/16/path = NodePath("Heart/Stroke:default_color")
|
||||||
|
tracks/16/interp = 1
|
||||||
|
tracks/16/loop_wrap = true
|
||||||
|
tracks/16/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0.129412, 0.145098, 0.196078, 1), Color(0.31, 0.2263, 0.30721, 1)]
|
||||||
|
}
|
||||||
|
tracks/17/type = "value"
|
||||||
|
tracks/17/imported = false
|
||||||
|
tracks/17/enabled = true
|
||||||
|
tracks/17/path = NodePath("Heart/Stroke:width")
|
||||||
|
tracks/17/interp = 1
|
||||||
|
tracks/17/loop_wrap = true
|
||||||
|
tracks/17/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.75, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [6.0, 10.0, 8.0]
|
||||||
|
}
|
||||||
|
tracks/18/type = "value"
|
||||||
|
tracks/18/imported = false
|
||||||
|
tracks/18/enabled = true
|
||||||
|
tracks/18/path = NodePath(".:curve:point_0/position")
|
||||||
|
tracks/18/interp = 1
|
||||||
|
tracks/18/loop_wrap = true
|
||||||
|
tracks/18/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(110, 0), Vector2(110, 0)]
|
||||||
|
}
|
||||||
|
tracks/19/type = "value"
|
||||||
|
tracks/19/imported = false
|
||||||
|
tracks/19/enabled = true
|
||||||
|
tracks/19/path = NodePath(".:curve:point_0/out")
|
||||||
|
tracks/19/interp = 1
|
||||||
|
tracks/19/loop_wrap = true
|
||||||
|
tracks/19/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(8.8368, 0), Vector2(8.8368, 0)]
|
||||||
|
}
|
||||||
|
tracks/20/type = "value"
|
||||||
|
tracks/20/imported = false
|
||||||
|
tracks/20/enabled = true
|
||||||
|
tracks/20/path = NodePath(".:curve:point_1/position")
|
||||||
|
tracks/20/interp = 1
|
||||||
|
tracks/20/loop_wrap = true
|
||||||
|
tracks/20/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(126, 16), Vector2(126, 16)]
|
||||||
|
}
|
||||||
|
tracks/21/type = "value"
|
||||||
|
tracks/21/imported = false
|
||||||
|
tracks/21/enabled = true
|
||||||
|
tracks/21/path = NodePath(".:curve:point_1/in")
|
||||||
|
tracks/21/interp = 1
|
||||||
|
tracks/21/loop_wrap = true
|
||||||
|
tracks/21/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(0, -8.8368), Vector2(0, -8.8368)]
|
||||||
|
}
|
||||||
|
tracks/22/type = "value"
|
||||||
|
tracks/22/imported = false
|
||||||
|
tracks/22/enabled = true
|
||||||
|
tracks/22/path = NodePath(".:curve:point_1/out")
|
||||||
|
tracks/22/interp = 1
|
||||||
|
tracks/22/loop_wrap = true
|
||||||
|
tracks/22/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(0, 0), Vector2(-14.3333, 36.3333)]
|
||||||
|
}
|
||||||
|
tracks/23/type = "value"
|
||||||
|
tracks/23/imported = false
|
||||||
|
tracks/23/enabled = true
|
||||||
|
tracks/23/path = NodePath(".:curve:point_2/position")
|
||||||
|
tracks/23/interp = 1
|
||||||
|
tracks/23/loop_wrap = true
|
||||||
|
tracks/23/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(126, 110), Vector2(126, 110)]
|
||||||
|
}
|
||||||
|
tracks/24/type = "value"
|
||||||
|
tracks/24/imported = false
|
||||||
|
tracks/24/enabled = true
|
||||||
|
tracks/24/path = NodePath(".:curve:point_2/in")
|
||||||
|
tracks/24/interp = 1
|
||||||
|
tracks/24/loop_wrap = true
|
||||||
|
tracks/24/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(0, 0), Vector2(-14.3333, -26.3333)]
|
||||||
|
}
|
||||||
|
tracks/25/type = "value"
|
||||||
|
tracks/25/imported = false
|
||||||
|
tracks/25/enabled = true
|
||||||
|
tracks/25/path = NodePath(".:curve:point_2/out")
|
||||||
|
tracks/25/interp = 1
|
||||||
|
tracks/25/loop_wrap = true
|
||||||
|
tracks/25/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(0, 8.8368), Vector2(0, 8.8368)]
|
||||||
|
}
|
||||||
|
tracks/26/type = "value"
|
||||||
|
tracks/26/imported = false
|
||||||
|
tracks/26/enabled = true
|
||||||
|
tracks/26/path = NodePath(".:curve:point_3/position")
|
||||||
|
tracks/26/interp = 1
|
||||||
|
tracks/26/loop_wrap = true
|
||||||
|
tracks/26/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(110, 126), Vector2(110, 126)]
|
||||||
|
}
|
||||||
|
tracks/27/type = "value"
|
||||||
|
tracks/27/imported = false
|
||||||
|
tracks/27/enabled = true
|
||||||
|
tracks/27/path = NodePath(".:curve:point_3/in")
|
||||||
|
tracks/27/interp = 1
|
||||||
|
tracks/27/loop_wrap = true
|
||||||
|
tracks/27/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(8.8368, 0), Vector2(8.8368, 0)]
|
||||||
|
}
|
||||||
|
tracks/28/type = "value"
|
||||||
|
tracks/28/imported = false
|
||||||
|
tracks/28/enabled = true
|
||||||
|
tracks/28/path = NodePath(".:curve:point_3/out")
|
||||||
|
tracks/28/interp = 1
|
||||||
|
tracks/28/loop_wrap = true
|
||||||
|
tracks/28/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(0, 0), Vector2(-29.3333, -17.6667)]
|
||||||
|
}
|
||||||
|
tracks/29/type = "value"
|
||||||
|
tracks/29/imported = false
|
||||||
|
tracks/29/enabled = true
|
||||||
|
tracks/29/path = NodePath(".:curve:point_4/position")
|
||||||
|
tracks/29/interp = 1
|
||||||
|
tracks/29/loop_wrap = true
|
||||||
|
tracks/29/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(16, 126), Vector2(16, 126)]
|
||||||
|
}
|
||||||
|
tracks/30/type = "value"
|
||||||
|
tracks/30/imported = false
|
||||||
|
tracks/30/enabled = true
|
||||||
|
tracks/30/path = NodePath(".:curve:point_4/in")
|
||||||
|
tracks/30/interp = 1
|
||||||
|
tracks/30/loop_wrap = true
|
||||||
|
tracks/30/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(0, 0), Vector2(33.3333, -17.6667)]
|
||||||
|
}
|
||||||
|
tracks/31/type = "value"
|
||||||
|
tracks/31/imported = false
|
||||||
|
tracks/31/enabled = true
|
||||||
|
tracks/31/path = NodePath(".:curve:point_4/out")
|
||||||
|
tracks/31/interp = 1
|
||||||
|
tracks/31/loop_wrap = true
|
||||||
|
tracks/31/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(-8.8368, 0), Vector2(-8.8368, 0)]
|
||||||
|
}
|
||||||
|
tracks/32/type = "value"
|
||||||
|
tracks/32/imported = false
|
||||||
|
tracks/32/enabled = true
|
||||||
|
tracks/32/path = NodePath(".:curve:point_5/position")
|
||||||
|
tracks/32/interp = 1
|
||||||
|
tracks/32/loop_wrap = true
|
||||||
|
tracks/32/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(0, 110), Vector2(0, 110)]
|
||||||
|
}
|
||||||
|
tracks/33/type = "value"
|
||||||
|
tracks/33/imported = false
|
||||||
|
tracks/33/enabled = true
|
||||||
|
tracks/33/path = NodePath(".:curve:point_5/in")
|
||||||
|
tracks/33/interp = 1
|
||||||
|
tracks/33/loop_wrap = true
|
||||||
|
tracks/33/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(0, 8.8368), Vector2(0, 8.8368)]
|
||||||
|
}
|
||||||
|
tracks/34/type = "value"
|
||||||
|
tracks/34/imported = false
|
||||||
|
tracks/34/enabled = true
|
||||||
|
tracks/34/path = NodePath(".:curve:point_5/out")
|
||||||
|
tracks/34/interp = 1
|
||||||
|
tracks/34/loop_wrap = true
|
||||||
|
tracks/34/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(0, 0), Vector2(18, -27.3333)]
|
||||||
|
}
|
||||||
|
tracks/35/type = "value"
|
||||||
|
tracks/35/imported = false
|
||||||
|
tracks/35/enabled = true
|
||||||
|
tracks/35/path = NodePath(".:curve:point_6/position")
|
||||||
|
tracks/35/interp = 1
|
||||||
|
tracks/35/loop_wrap = true
|
||||||
|
tracks/35/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(0, 16), Vector2(0, 16)]
|
||||||
|
}
|
||||||
|
tracks/36/type = "value"
|
||||||
|
tracks/36/imported = false
|
||||||
|
tracks/36/enabled = true
|
||||||
|
tracks/36/path = NodePath(".:curve:point_6/in")
|
||||||
|
tracks/36/interp = 1
|
||||||
|
tracks/36/loop_wrap = true
|
||||||
|
tracks/36/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(0, 0), Vector2(18, 35.3333)]
|
||||||
|
}
|
||||||
|
tracks/37/type = "value"
|
||||||
|
tracks/37/imported = false
|
||||||
|
tracks/37/enabled = true
|
||||||
|
tracks/37/path = NodePath(".:curve:point_6/out")
|
||||||
|
tracks/37/interp = 1
|
||||||
|
tracks/37/loop_wrap = true
|
||||||
|
tracks/37/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(0, -8.8368), Vector2(0, -8.8368)]
|
||||||
|
}
|
||||||
|
tracks/38/type = "value"
|
||||||
|
tracks/38/imported = false
|
||||||
|
tracks/38/enabled = true
|
||||||
|
tracks/38/path = NodePath(".:curve:point_7/position")
|
||||||
|
tracks/38/interp = 1
|
||||||
|
tracks/38/loop_wrap = true
|
||||||
|
tracks/38/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(16, 0), Vector2(16, 0)]
|
||||||
|
}
|
||||||
|
tracks/39/type = "value"
|
||||||
|
tracks/39/imported = false
|
||||||
|
tracks/39/enabled = true
|
||||||
|
tracks/39/path = NodePath(".:curve:point_7/in")
|
||||||
|
tracks/39/interp = 1
|
||||||
|
tracks/39/loop_wrap = true
|
||||||
|
tracks/39/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(-8.8368, 0), Vector2(-8.8368, 0)]
|
||||||
|
}
|
||||||
|
tracks/40/type = "value"
|
||||||
|
tracks/40/imported = false
|
||||||
|
tracks/40/enabled = true
|
||||||
|
tracks/40/path = NodePath(".:curve:point_7/out")
|
||||||
|
tracks/40/interp = 1
|
||||||
|
tracks/40/loop_wrap = true
|
||||||
|
tracks/40/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(0, 0), Vector2(30, 25)]
|
||||||
|
}
|
||||||
|
tracks/41/type = "value"
|
||||||
|
tracks/41/imported = false
|
||||||
|
tracks/41/enabled = true
|
||||||
|
tracks/41/path = NodePath(".:curve:point_8/position")
|
||||||
|
tracks/41/interp = 1
|
||||||
|
tracks/41/loop_wrap = true
|
||||||
|
tracks/41/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(110, 0), Vector2(110, 0)]
|
||||||
|
}
|
||||||
|
tracks/42/type = "value"
|
||||||
|
tracks/42/imported = false
|
||||||
|
tracks/42/enabled = true
|
||||||
|
tracks/42/path = NodePath(".:curve:point_8/in")
|
||||||
|
tracks/42/interp = 1
|
||||||
|
tracks/42/loop_wrap = true
|
||||||
|
tracks/42/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(0, 0), Vector2(-32.6667, 25)]
|
||||||
|
}
|
||||||
|
tracks/43/type = "value"
|
||||||
|
tracks/43/imported = false
|
||||||
|
tracks/43/enabled = true
|
||||||
|
tracks/43/path = NodePath("Heart/Fill:texture:gradient:colors")
|
||||||
|
tracks/43/interp = 1
|
||||||
|
tracks/43/loop_wrap = true
|
||||||
|
tracks/43/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.47, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [PackedColorArray(0.60933, 0.60933, 0.60933, 1, 1, 1, 1, 1), PackedColorArray(0.60933, 0.60933, 0.60933, 1, 0, 0, 0, 1, 1, 1, 1, 1), PackedColorArray(0.60933, 0.60933, 0.60933, 1, 0, 0, 0, 1, 1, 1, 1, 1)]
|
||||||
|
}
|
||||||
|
tracks/44/type = "value"
|
||||||
|
tracks/44/imported = false
|
||||||
|
tracks/44/enabled = true
|
||||||
|
tracks/44/path = NodePath("Heart/Fill:texture:gradient:offsets")
|
||||||
|
tracks/44/interp = 1
|
||||||
|
tracks/44/loop_wrap = true
|
||||||
|
tracks/44/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.47, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [PackedFloat32Array(0, 1), PackedFloat32Array(0, 0.503953, 1), PackedFloat32Array(0, 0.503953, 1)]
|
||||||
|
}
|
||||||
|
tracks/45/type = "value"
|
||||||
|
tracks/45/imported = false
|
||||||
|
tracks/45/enabled = true
|
||||||
|
tracks/45/path = NodePath("Heart/Fill:texture:fill_from")
|
||||||
|
tracks/45/interp = 1
|
||||||
|
tracks/45/loop_wrap = true
|
||||||
|
tracks/45/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.47, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(0, 0), Vector2(0, 0), Vector2(0.664692, -0.211429)]
|
||||||
|
}
|
||||||
|
tracks/46/type = "value"
|
||||||
|
tracks/46/imported = false
|
||||||
|
tracks/46/enabled = true
|
||||||
|
tracks/46/path = NodePath("Heart/Fill:texture:fill_to")
|
||||||
|
tracks/46/interp = 1
|
||||||
|
tracks/46/loop_wrap = true
|
||||||
|
tracks/46/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.47, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(1, 0), Vector2(1, 0), Vector2(0.46501, 1.12571)]
|
||||||
|
}
|
||||||
|
tracks/47/type = "value"
|
||||||
|
tracks/47/imported = false
|
||||||
|
tracks/47/enabled = true
|
||||||
|
tracks/47/path = NodePath("Fill:color")
|
||||||
|
tracks/47/interp = 1
|
||||||
|
tracks/47/loop_wrap = true
|
||||||
|
tracks/47/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0.211765, 0.239216, 0.321569, 1), Color(0.2, 0.08, 0.134, 1)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_7bfrm"]
|
||||||
|
_data = {
|
||||||
|
&"heart_beat": SubResource("Animation_7bfrm")
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Node2D" type="Node2D"]
|
||||||
|
script = ExtResource("1_7bfrm")
|
||||||
|
|
||||||
|
[node name="Rectangle" type="Node2D" parent="." node_paths=PackedStringArray("polygon", "line")]
|
||||||
|
position = Vector2(-254, -260)
|
||||||
|
scale = Vector2(4, 4)
|
||||||
|
script = ExtResource("1_0qe1d")
|
||||||
|
polygon = NodePath("Fill")
|
||||||
|
line = NodePath("Stroke")
|
||||||
|
curve = SubResource("Curve2D_jr52a")
|
||||||
|
update_curve_at_runtime = true
|
||||||
|
arc_list = SubResource("Resource_0f505")
|
||||||
|
|
||||||
|
[node name="Fill" type="Polygon2D" parent="Rectangle"]
|
||||||
|
show_behind_parent = true
|
||||||
|
color = Color(0.211765, 0.239216, 0.321569, 1)
|
||||||
|
polygon = PackedVector2Array(110, 0, 111.636, 0.0826035, 113.225, 0.325053, 114.758, 0.719307, 116.228, 1.25733, 117.627, 1.93106, 118.946, 2.73248, 120.178, 3.65354, 121.314, 4.6862, 122.346, 5.82241, 123.268, 7.05414, 124.069, 8.37334, 124.743, 9.77197, 125.281, 11.242, 125.675, 12.7754, 125.917, 14.3641, 126, 16, 126, 110, 125.917, 111.636, 125.675, 113.225, 125.281, 114.758, 124.743, 116.228, 124.069, 117.627, 123.268, 118.946, 122.346, 120.178, 121.314, 121.314, 120.178, 122.346, 118.946, 123.268, 117.627, 124.069, 116.228, 124.743, 114.758, 125.281, 113.225, 125.675, 111.636, 125.917, 110, 126, 16, 126, 14.3641, 125.917, 12.7754, 125.675, 11.242, 125.281, 9.77197, 124.743, 8.37334, 124.069, 7.05414, 123.268, 5.82241, 122.346, 4.6862, 121.314, 3.65354, 120.178, 2.73248, 118.946, 1.93106, 117.627, 1.25733, 116.228, 0.719307, 114.758, 0.325053, 113.225, 0.0826035, 111.636, 0, 110, 0, 16, 0.0826035, 14.3641, 0.325053, 12.7754, 0.719307, 11.242, 1.25733, 9.77197, 1.93106, 8.37334, 2.73248, 7.05414, 3.65354, 5.82241, 4.6862, 4.6862, 5.82241, 3.65354, 7.05414, 2.73248, 8.37334, 1.93106, 9.77197, 1.25733, 11.242, 0.719307, 12.7754, 0.325053, 14.3641, 0.0826035, 16, 0)
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="Stroke" type="Line2D" parent="Rectangle"]
|
||||||
|
show_behind_parent = true
|
||||||
|
points = PackedVector2Array(110, 0, 111.636, 0.0826035, 113.225, 0.325053, 114.758, 0.719307, 116.228, 1.25733, 117.627, 1.93106, 118.946, 2.73248, 120.178, 3.65354, 121.314, 4.6862, 122.346, 5.82241, 123.268, 7.05414, 124.069, 8.37334, 124.743, 9.77197, 125.281, 11.242, 125.675, 12.7754, 125.917, 14.3641, 126, 16, 126, 110, 125.917, 111.636, 125.675, 113.225, 125.281, 114.758, 124.743, 116.228, 124.069, 117.627, 123.268, 118.946, 122.346, 120.178, 121.314, 121.314, 120.178, 122.346, 118.946, 123.268, 117.627, 124.069, 116.228, 124.743, 114.758, 125.281, 113.225, 125.675, 111.636, 125.917, 110, 126, 16, 126, 14.3641, 125.917, 12.7754, 125.675, 11.242, 125.281, 9.77197, 124.743, 8.37334, 124.069, 7.05414, 123.268, 5.82241, 122.346, 4.6862, 121.314, 3.65354, 120.178, 2.73248, 118.946, 1.93106, 117.627, 1.25733, 116.228, 0.719307, 114.758, 0.325053, 113.225, 0.0826035, 111.636, 0, 110, 0, 16, 0.0826035, 14.3641, 0.325053, 12.7754, 0.719307, 11.242, 1.25733, 9.77197, 1.93106, 8.37334, 2.73248, 7.05414, 3.65354, 5.82241, 4.6862, 4.6862, 5.82241, 3.65354, 7.05414, 2.73248, 8.37334, 1.93106, 9.77197, 1.25733, 11.242, 0.719307, 12.7754, 0.325053, 14.3641, 0.0826035, 16, 0)
|
||||||
|
closed = true
|
||||||
|
width = 4.0
|
||||||
|
default_color = Color(0.129412, 0.145098, 0.196078, 1)
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="Heart" type="Node2D" parent="Rectangle" node_paths=PackedStringArray("polygon", "line")]
|
||||||
|
position = Vector2(63.5, 65)
|
||||||
|
script = ExtResource("1_0qe1d")
|
||||||
|
polygon = NodePath("Fill")
|
||||||
|
line = NodePath("Stroke")
|
||||||
|
curve = SubResource("Curve2D_2027v")
|
||||||
|
update_curve_at_runtime = true
|
||||||
|
arc_list = SubResource("Resource_tok2d")
|
||||||
|
|
||||||
|
[node name="Fill" type="Polygon2D" parent="Rectangle/Heart"]
|
||||||
|
show_behind_parent = true
|
||||||
|
color = Color(0.278431, 0.54902, 0.74902, 1)
|
||||||
|
texture = SubResource("GradientTexture2D_gpl51")
|
||||||
|
texture_offset = Vector2(49.9895, 46.9503)
|
||||||
|
texture_rotation = -0.488692
|
||||||
|
polygon = PackedVector2Array(0.973248, -28.9963, 3.81036, -33.352, 6.82277, -37.059, 9.97457, -40.1395, 13.2299, -42.6159, 16.5527, -44.5104, 18.2283, -45.2463, 19.9073, -45.8452, 21.5852, -46.3097, 23.2576, -46.6426, 24.9199, -46.8468, 26.5677, -46.925, 28.1966, -46.88, 29.8019, -46.7145, 31.3792, -46.4315, 32.9241, -46.0335, 34.4319, -45.5235, 35.8984, -44.9043, 37.3189, -44.1785, 38.689, -43.349, 40.0041, -42.4185, 41.2599, -41.3899, 43.5752, -39.0494, 45.5991, -36.3498, 47.2956, -33.3131, 48.6288, -29.9619, 49.5629, -26.3183, 50.0618, -22.4045, 50.0898, -18.243, 49.6108, -13.8558, 48.5891, -9.26542, 46.9886, -4.49398, 44.7735, 0.436201, 41.9079, 5.50286, 38.3559, 10.6837, 34.0815, 15.9565, 29.0489, 21.299, 16.5653, 32.1038, 0.617999, 42.92, -14.482, 34.1835, -26.6175, 24.8304, -31.6371, 20.0018, -35.9917, 15.1141, -39.7068, 10.1988, -42.8077, 5.28776, -45.32, 0.412537, -47.2688, -4.39518, -48.6798, -9.10373, -49.5782, -13.6814, -49.9895, -18.0967, -49.939, -22.3177, -49.4521, -26.3129, -48.5544, -30.0507, -47.2711, -33.4992, -45.6276, -36.6269, -44.6787, -38.0606, -43.6494, -39.4022, -42.5427, -40.6478, -41.3618, -41.7933, -40.11, -42.8349, -38.7903, -43.7686, -37.406, -44.5904, -35.9602, -45.2964, -34.4562, -45.8825, -32.897, -46.345, -31.2859, -46.6797, -29.626, -46.8828, -27.9205, -46.9503, -26.1727, -46.8782, -24.3855, -46.6625, -22.5624, -46.2994, -20.7063, -45.7848, -18.8205, -45.1148, -14.9725, -43.2927, -11.0437, -40.8015, -7.05955, -37.6094, -3.04543, -33.6849)
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="Stroke" type="Line2D" parent="Rectangle/Heart"]
|
||||||
|
show_behind_parent = true
|
||||||
|
points = PackedVector2Array(0.973248, -28.9963, 3.81036, -33.352, 6.82277, -37.059, 9.97457, -40.1395, 13.2299, -42.6159, 16.5527, -44.5104, 18.2283, -45.2463, 19.9073, -45.8452, 21.5852, -46.3097, 23.2576, -46.6426, 24.9199, -46.8468, 26.5677, -46.925, 28.1966, -46.88, 29.8019, -46.7145, 31.3792, -46.4315, 32.9241, -46.0335, 34.4319, -45.5235, 35.8984, -44.9043, 37.3189, -44.1785, 38.689, -43.349, 40.0041, -42.4185, 41.2599, -41.3899, 43.5752, -39.0494, 45.5991, -36.3498, 47.2956, -33.3131, 48.6288, -29.9619, 49.5629, -26.3183, 50.0618, -22.4045, 50.0898, -18.243, 49.6108, -13.8558, 48.5891, -9.26542, 46.9886, -4.49398, 44.7735, 0.436201, 41.9079, 5.50286, 38.3559, 10.6837, 34.0815, 15.9565, 29.0489, 21.299, 16.5653, 32.1038, 0.617999, 42.92, -14.482, 34.1835, -26.6175, 24.8304, -31.6371, 20.0018, -35.9917, 15.1141, -39.7068, 10.1988, -42.8077, 5.28776, -45.32, 0.412537, -47.2688, -4.39518, -48.6798, -9.10373, -49.5782, -13.6814, -49.9895, -18.0967, -49.939, -22.3177, -49.4521, -26.3129, -48.5544, -30.0507, -47.2711, -33.4992, -45.6276, -36.6269, -44.6787, -38.0606, -43.6494, -39.4022, -42.5427, -40.6478, -41.3618, -41.7933, -40.11, -42.8349, -38.7903, -43.7686, -37.406, -44.5904, -35.9602, -45.2964, -34.4562, -45.8825, -32.897, -46.345, -31.2859, -46.6797, -29.626, -46.8828, -27.9205, -46.9503, -26.1727, -46.8782, -24.3855, -46.6625, -22.5624, -46.2994, -20.7063, -45.7848, -18.8205, -45.1148, -14.9725, -43.2927, -11.0437, -40.8015, -7.05955, -37.6094, -3.04543, -33.6849)
|
||||||
|
closed = true
|
||||||
|
width = 6.0
|
||||||
|
default_color = Color(0.129412, 0.145098, 0.196078, 1)
|
||||||
|
joint_mode = 2
|
||||||
|
begin_cap_mode = 2
|
||||||
|
end_cap_mode = 2
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="ScalableVectorShape2D" type="Node2D" parent="Rectangle/Heart" node_paths=PackedStringArray("polygon")]
|
||||||
|
position = Vector2(27.75, -24)
|
||||||
|
rotation = 0.785015
|
||||||
|
scale = Vector2(0.564941, 0.868743)
|
||||||
|
script = ExtResource("1_0qe1d")
|
||||||
|
polygon = NodePath("Polygon2D")
|
||||||
|
curve = SubResource("Curve2D_bi08n")
|
||||||
|
update_curve_at_runtime = true
|
||||||
|
arc_list = SubResource("Resource_35n4y")
|
||||||
|
shape_hint_color = Color(0.196078, 0.803922, 0.196078, 0.27451)
|
||||||
|
metadata/_custom_type_script = "uid://de3jpss66xjfh"
|
||||||
|
|
||||||
|
[node name="Polygon2D" type="Polygon2D" parent="Rectangle/Heart/ScalableVectorShape2D"]
|
||||||
|
show_behind_parent = true
|
||||||
|
texture = SubResource("GradientTexture2D_2eynm")
|
||||||
|
texture_offset = Vector2(18.5124, 19.1769)
|
||||||
|
polygon = PackedVector2Array(13.3388, -11.7091, 15.2125, -9.70198, 16.769, -7.62344, 18.0223, -5.48791, 18.9864, -3.30984, 19.6753, -1.10369, 20.1029, 1.11611, 20.2833, 3.3351, 20.2304, 5.53884, 19.9583, 7.71288, 19.4808, 9.84278, 18.812, 11.9141, 17.9659, 13.9123, 16.9565, 15.8231, 15.7977, 17.632, 14.5034, 19.3244, 13.0878, 20.8861, 11.5648, 22.3024, 9.94837, 23.5591, 8.25247, 24.6415, 6.49111, 25.5354, 4.67827, 26.2262, 2.82794, 26.6995, 0.954094, 26.9408, -0.929278, 26.9357, -1.87017, 26.8363, -2.8082, 26.6698, -3.74161, 26.4345, -4.66867, 26.1285, -5.58763, 25.7502, -6.49673, 25.2976, -8.27837, 24.1624, -9.99963, 22.7086, -11.6465, 20.9217, -13.205, 18.7873, -14.6612, 16.2909, -15.9245, 13.6414, -16.9222, 11.0603, -17.6671, 8.55233, -18.1719, 6.12199, -18.4494, 3.77392, -18.5124, 1.51271, -18.3736, -0.657024, -18.0459, -2.73069, -17.5418, -4.70367, -16.8743, -6.57138, -16.0561, -8.32921, -15.0999, -9.97255, -14.0185, -11.4968, -12.8247, -12.8974, -11.5312, -14.1696, -10.1509, -15.309, -8.69637, -16.3109, -7.18048, -17.1707, -5.61599, -17.8837, -4.01564, -18.4455, -2.39221, -18.8513, -0.758465, -19.0967, 0.872844, -19.1769, 2.48895, -19.0874, 4.07708, -18.8236, 5.62449, -18.3808, 7.11839, -17.7545, 8.54605, -16.9401, 9.89467, -15.933, 11.1515, -14.7285, 12.3038, -13.3221)
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="Camera2D" type="Camera2D" parent="."]
|
||||||
|
|
||||||
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
|
root_node = NodePath("../Rectangle")
|
||||||
|
libraries = {
|
||||||
|
&"": SubResource("AnimationLibrary_7bfrm")
|
||||||
|
}
|
||||||
BIN
addons/curved_lines_2d/examples/pinball/butterfly.scn
Normal file
26
addons/curved_lines_2d/examples/pinball/chasing_light.gd
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
extends CharacterBody2D
|
||||||
|
|
||||||
|
@onready var navigation_agent := $NavigationAgent2D
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
set_physics_process(false)
|
||||||
|
call_deferred("on_nav_serv_ready")
|
||||||
|
|
||||||
|
|
||||||
|
func on_nav_serv_ready():
|
||||||
|
await get_tree().physics_frame
|
||||||
|
set_physics_process(true)
|
||||||
|
|
||||||
|
|
||||||
|
func _physics_process(_delta: float) -> void:
|
||||||
|
var pinball = get_tree().get_first_node_in_group("pinballs")
|
||||||
|
if not is_instance_valid(pinball):
|
||||||
|
return
|
||||||
|
var target_pos : Vector2 = pinball.position
|
||||||
|
navigation_agent.target_position = target_pos
|
||||||
|
var current_agent_position = global_position
|
||||||
|
var next_path_position = navigation_agent.get_next_path_position()
|
||||||
|
velocity = current_agent_position.direction_to(next_path_position) * 600
|
||||||
|
navigation_agent.set_velocity_forced(velocity)
|
||||||
|
move_and_slide()
|
||||||
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://cqncbgw8tm4cf
|
||||||
31
addons/curved_lines_2d/examples/pinball/chasing_light.tscn
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
[gd_scene load_steps=5 format=3 uid="uid://de7qp86gcbt0j"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://cqncbgw8tm4cf" path="res://chasing_light.gd" id="1_5swdf"]
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id="CircleShape2D_qxspa"]
|
||||||
|
radius = 18.0
|
||||||
|
|
||||||
|
[sub_resource type="Gradient" id="Gradient_xagdg"]
|
||||||
|
offsets = PackedFloat32Array(0, 0.727273)
|
||||||
|
colors = PackedColorArray(1, 1, 1, 1, 0, 0, 0, 1)
|
||||||
|
|
||||||
|
[sub_resource type="GradientTexture2D" id="GradientTexture2D_tuwup"]
|
||||||
|
gradient = SubResource("Gradient_xagdg")
|
||||||
|
fill = 1
|
||||||
|
fill_from = Vector2(0.5, 0.5)
|
||||||
|
|
||||||
|
[node name="ChasingLight" type="CharacterBody2D"]
|
||||||
|
z_index = -1
|
||||||
|
collision_layer = 2
|
||||||
|
collision_mask = 2
|
||||||
|
motion_mode = 1
|
||||||
|
script = ExtResource("1_5swdf")
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
|
shape = SubResource("CircleShape2D_qxspa")
|
||||||
|
|
||||||
|
[node name="PointLight2D" type="PointLight2D" parent="."]
|
||||||
|
energy = 2.0
|
||||||
|
texture = SubResource("GradientTexture2D_tuwup")
|
||||||
|
|
||||||
|
[node name="NavigationAgent2D" type="NavigationAgent2D" parent="."]
|
||||||
26
addons/curved_lines_2d/examples/pinball/flipper.gd
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
extends Node2D
|
||||||
|
|
||||||
|
@export var flipping_up := false
|
||||||
|
@export var min_rotation := 0.0
|
||||||
|
@export var max_rotation := 45.0
|
||||||
|
@export var base_acceleration := 3.0
|
||||||
|
|
||||||
|
var acceleration = 0.0
|
||||||
|
|
||||||
|
func _physics_process(delta: float) -> void:
|
||||||
|
if flipping_up:
|
||||||
|
if $AnimatableBody2D.rotation > deg_to_rad(min_rotation) + 0.01:
|
||||||
|
if acceleration == 0:
|
||||||
|
acceleration = 2 * base_acceleration
|
||||||
|
$AnimatableBody2D.rotation -= acceleration * delta
|
||||||
|
acceleration += base_acceleration
|
||||||
|
else:
|
||||||
|
$AnimatableBody2D.rotation = deg_to_rad(min_rotation)
|
||||||
|
acceleration = 0.0
|
||||||
|
else:
|
||||||
|
if $AnimatableBody2D.rotation < deg_to_rad(max_rotation) - 0.01:
|
||||||
|
$AnimatableBody2D.rotation += acceleration * delta
|
||||||
|
acceleration = base_acceleration * 4
|
||||||
|
else:
|
||||||
|
$AnimatableBody2D.rotation = deg_to_rad(max_rotation)
|
||||||
|
acceleration = 0.0
|
||||||
1
addons/curved_lines_2d/examples/pinball/flipper.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://dl0gawkliv8ak
|
||||||
40
addons/curved_lines_2d/examples/pinball/flipper.tscn
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
[gd_scene load_steps=7 format=3 uid="uid://c4qvvoxq5w28e"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://dl0gawkliv8ak" path="res://addons/curved_lines_2d/examples/pinball/flipper.gd" id="1_k5dyu"]
|
||||||
|
[ext_resource type="Script" uid="uid://de3jpss66xjfh" path="res://addons/curved_lines_2d/scalable_vector_shape_2d.gd" id="1_mhtlv"]
|
||||||
|
[ext_resource type="Script" uid="uid://dlbv4pit17dnu" path="res://addons/curved_lines_2d/scalable_arc.gd" id="2_k5dyu"]
|
||||||
|
[ext_resource type="Script" uid="uid://dl1t88tthmwts" path="res://addons/curved_lines_2d/scalable_arc_list.gd" id="3_muof8"]
|
||||||
|
|
||||||
|
[sub_resource type="Curve2D" id="Curve2D_0bqc8"]
|
||||||
|
_data = {
|
||||||
|
"points": PackedVector2Array(0, 0, 24, 24, 192, -31.5, 40, 0.5, -17.6736, 0, 0, 32.5, 0, 17.6736, 0, -17.6736, -32, 0, -17.6736, 0, 0, 0, 0, -31.5, 0, 0, 0, 0, 192, -31.5)
|
||||||
|
}
|
||||||
|
point_count = 5
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_r6cs1"]
|
||||||
|
script = ExtResource("3_muof8")
|
||||||
|
arcs = Array[ExtResource("2_k5dyu")]([])
|
||||||
|
|
||||||
|
[node name="Flipper" type="Node2D"]
|
||||||
|
script = ExtResource("1_k5dyu")
|
||||||
|
metadata/_edit_horizontal_guides_ = [-33.0]
|
||||||
|
|
||||||
|
[node name="AnimatableBody2D" type="AnimatableBody2D" parent="."]
|
||||||
|
position = Vector2(0, -0.5)
|
||||||
|
rotation = 0.785398
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="AnimatableBody2D"]
|
||||||
|
polygon = PackedVector2Array(192, -31.5, 192.98, -30.3631, 193.674, -29.2034, 194.091, -28.0222, 194.238, -26.8207, 194.123, -25.6003, 193.753, -24.3623, 193.137, -23.1081, 192.281, -21.8389, 191.194, -20.556, 189.883, -19.2608, 186.621, -16.6388, 182.556, -13.9832, 177.75, -11.3047, 152.344, -0.571289, 120, 9.6875, 50.25, 26.0859, 20.7188, 30.8779, 0, 32.5, -3.27189, 32.3292, -6.44926, 31.8284, -9.516, 31.0152, -12.456, 29.9072, -15.2533, 28.5219, -17.8917, 26.8768, -20.3552, 24.9895, -22.6276, 22.8776, -24.6929, 20.5585, -26.535, 18.0499, -28.1379, 15.3693, -29.4853, 12.5342, -30.5614, 9.56214, -31.3499, 6.47074, -31.8348, 3.27751, -32, 0, -31.8348, -3.26628, -31.3499, -6.42777, -30.5614, -9.46986, -29.4853, -12.3779, -28.1379, -15.1374, -26.535, -17.7335, -24.6929, -20.1518, -22.6276, -22.3776, -20.3552, -24.3963, -17.8917, -26.1932, -15.2533, -27.7538, -12.456, -29.0635, -9.516, -30.1075, -6.44926, -30.8714, -3.27189, -31.3404, 0, -31.5)
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="Circle" type="Node2D" parent="AnimatableBody2D" node_paths=PackedStringArray("polygon", "collision_object")]
|
||||||
|
script = ExtResource("1_mhtlv")
|
||||||
|
polygon = NodePath("Fill")
|
||||||
|
collision_object = NodePath("..")
|
||||||
|
curve = SubResource("Curve2D_0bqc8")
|
||||||
|
arc_list = SubResource("Resource_r6cs1")
|
||||||
|
|
||||||
|
[node name="Fill" type="Polygon2D" parent="AnimatableBody2D/Circle"]
|
||||||
|
polygon = PackedVector2Array(192, -31.5, 192.98, -30.3631, 193.674, -29.2034, 194.091, -28.0222, 194.238, -26.8207, 194.123, -25.6003, 193.753, -24.3623, 193.137, -23.1081, 192.281, -21.8389, 191.194, -20.556, 189.883, -19.2608, 186.621, -16.6388, 182.556, -13.9832, 177.75, -11.3047, 152.344, -0.571289, 120, 9.6875, 50.25, 26.0859, 20.7188, 30.8779, 0, 32.5, -3.27189, 32.3292, -6.44926, 31.8284, -9.516, 31.0152, -12.456, 29.9072, -15.2533, 28.5219, -17.8917, 26.8768, -20.3552, 24.9895, -22.6276, 22.8776, -24.6929, 20.5585, -26.535, 18.0499, -28.1379, 15.3693, -29.4853, 12.5342, -30.5614, 9.56214, -31.3499, 6.47074, -31.8348, 3.27751, -32, 0, -31.8348, -3.26628, -31.3499, -6.42777, -30.5614, -9.46986, -29.4853, -12.3779, -28.1379, -15.1374, -26.535, -17.7335, -24.6929, -20.1518, -22.6276, -22.3776, -20.3552, -24.3963, -17.8917, -26.1932, -15.2533, -27.7538, -12.456, -29.0635, -9.516, -30.1075, -6.44926, -30.8714, -3.27189, -31.3404, 0, -31.5)
|
||||||
|
metadata/_edit_lock_ = true
|
||||||