mirror of
https://github.com/litruv/PNGTuber-Plus.git
synced 2026-07-25 11:06:01 +10:00
Compare commits
5 Commits
v2025.07.2
...
v2025.07.2
| Author | SHA1 | Date | |
|---|---|---|---|
| 085d6a21a0 | |||
| 99d2d3f508 | |||
| dad22ece22 | |||
| 52496df10e | |||
| 29b903fadd |
29
.github/workflows/build-windows.yml
vendored
29
.github/workflows/build-windows.yml
vendored
@@ -136,34 +136,38 @@ jobs:
|
|||||||
|
|
||||||
# Generate commit history since last tag (or all commits if no tag)
|
# Generate commit history since last tag (or all commits if no tag)
|
||||||
$commitRange = if ($latestTag) { "$latestTag..HEAD" } else { "HEAD" }
|
$commitRange = if ($latestTag) { "$latestTag..HEAD" } else { "HEAD" }
|
||||||
$commitHistory = ""
|
|
||||||
|
|
||||||
# Get commits with format: short hash, subject, author
|
# Get commits with format: short hash, subject, author
|
||||||
$commits = & git log $commitRange --pretty=format:"%h|%s|%an" --no-merges
|
$commits = & git log $commitRange --pretty=format:"%h|%s|%an" --no-merges
|
||||||
|
|
||||||
|
# Build commit history as a single string
|
||||||
|
$commitHistory = ""
|
||||||
|
|
||||||
if ($commits) {
|
if ($commits) {
|
||||||
$commitHistory = "`n`n## Changes Since Last Release`n"
|
$commitHistory += "`n`n## Changes Since Last Release`n`n"
|
||||||
|
|
||||||
$commits | ForEach-Object {
|
$commits | ForEach-Object {
|
||||||
$parts = $_ -split '\|', 3
|
$parts = $_ -split '\|', 3
|
||||||
$hash = $parts[0]
|
$hash = $parts[0]
|
||||||
$subject = $parts[1]
|
$subject = $parts[1] -replace '"', '""'
|
||||||
$author = $parts[2]
|
$author = $parts[2]
|
||||||
$commitUrl = "https://github.com/${{ github.repository }}/commit/$hash"
|
$commitUrl = "https://github.com/${{ github.repository }}/commit/$hash"
|
||||||
$commitHistory += "- [$hash]($commitUrl) $subject (by $author)`n"
|
$commitHistory += "- [$hash]($commitUrl) $subject`n"
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$commitHistory = "`n`n## Changes Since Last Release`nNo new commits since last release.`n"
|
$commitHistory += "`n`n## Changes Since Last Release`n`nNo new commits since last release.`n"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Escape special characters for GitHub output
|
|
||||||
$commitHistoryEscaped = $commitHistory -replace '"', '\"' -replace '`', '\`'
|
|
||||||
|
|
||||||
# Set outputs for use in next steps
|
# Set outputs for use in next steps
|
||||||
echo "tag=$tag" >> $env:GITHUB_OUTPUT
|
echo "tag=$tag" >> $env:GITHUB_OUTPUT
|
||||||
echo "release_name=$releaseName" >> $env:GITHUB_OUTPUT
|
echo "release_name=$releaseName" >> $env:GITHUB_OUTPUT
|
||||||
echo "short_sha=$shortSha" >> $env:GITHUB_OUTPUT
|
echo "short_sha=$shortSha" >> $env:GITHUB_OUTPUT
|
||||||
echo "build_number=$buildNumber" >> $env:GITHUB_OUTPUT
|
echo "build_number=$buildNumber" >> $env:GITHUB_OUTPUT
|
||||||
echo "commit_history=$commitHistoryEscaped" >> $env:GITHUB_OUTPUT
|
|
||||||
|
# Use heredoc syntax for multiline commit history
|
||||||
|
Add-Content -Path $env:GITHUB_OUTPUT -Value "commit_history<<EOF"
|
||||||
|
Add-Content -Path $env:GITHUB_OUTPUT -Value $commitHistory
|
||||||
|
Add-Content -Path $env:GITHUB_OUTPUT -Value "EOF"
|
||||||
- name: Download Windows Build
|
- name: Download Windows Build
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
@@ -181,10 +185,6 @@ jobs:
|
|||||||
body: |
|
body: |
|
||||||
Automated build of PNGTuber Plus
|
Automated build of PNGTuber Plus
|
||||||
|
|
||||||
**Build Information:**
|
|
||||||
- Build Number: ${{ steps.release_info.outputs.build_number }}
|
|
||||||
- Commit: [${{ steps.release_info.outputs.short_sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }})
|
|
||||||
- Branch: ${{ github.ref_name }}
|
|
||||||
${{ steps.release_info.outputs.commit_history }}
|
${{ steps.release_info.outputs.commit_history }}
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
@@ -192,9 +192,6 @@ jobs:
|
|||||||
2. Run the executable - no installation required!
|
2. Run the executable - no installation required!
|
||||||
3. For StreamDeck integration, download the plugin from [here](https://github.com/BoyneGames/streamdeck-godot-plugin/releases/tag/1.0.0)
|
3. For StreamDeck integration, download the plugin from [here](https://github.com/BoyneGames/streamdeck-godot-plugin/releases/tag/1.0.0)
|
||||||
|
|
||||||
## Credits
|
|
||||||
- Original project by [kaiakairos](https://github.com/kaiakairos/PNGTuber-Plus)
|
|
||||||
- Microphone improvements by [k0ffinz](https://github.com/k0ffinz/PNGTuber-Plus)
|
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
|
|
||||||
|
|||||||
2
.vscode/tasks.json
vendored
2
.vscode/tasks.json
vendored
@@ -4,7 +4,7 @@
|
|||||||
{
|
{
|
||||||
"label": "Build PNGTuber-Plus",
|
"label": "Build PNGTuber-Plus",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "cd c:\\DEV\\Sync\\PNGTuber-Plus && .\\build-windows.bat",
|
"command": "cd c:\\DEV\\Sync\\PNGTuber-Plus; .\\build-windows.bat",
|
||||||
"group": "build"
|
"group": "build"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -29,6 +29,13 @@ Supports combos like Ctrl+Shift+Alt+Cmd. For people with more keybinds than fing
|
|||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
### ↗️ Middle Mouse Button Panning
|
||||||
|
|
||||||
|
Hold MMB in the editor to pan around the scene, it'll reset when you go back to live.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
### 🎤 Microphone Fixes
|
### 🎤 Microphone Fixes
|
||||||
|
|
||||||
Merged in [k0ffinz’s](https://github.com/k0ffinz/PNGTuber-Plus) audio tweaks:
|
Merged in [k0ffinz’s](https://github.com/k0ffinz/PNGTuber-Plus) audio tweaks:
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ func _process(delta):
|
|||||||
heldSprite.z += 1
|
heldSprite.z += 1
|
||||||
heldSprite.setZIndex()
|
heldSprite.setZIndex()
|
||||||
pushUpdate("Moved sprite layer.")
|
pushUpdate("Moved sprite layer.")
|
||||||
if main.editMode:
|
if main and main.editMode:
|
||||||
if Input.is_action_just_pressed("reparent"):
|
if Input.is_action_just_pressed("reparent"):
|
||||||
reparentMode = !reparentMode
|
reparentMode = !reparentMode
|
||||||
Global.chain.enable(reparentMode)
|
Global.chain.enable(reparentMode)
|
||||||
@@ -115,7 +115,7 @@ func _process(delta):
|
|||||||
reparentMode = false
|
reparentMode = false
|
||||||
Global.chain.enable(reparentMode)
|
Global.chain.enable(reparentMode)
|
||||||
|
|
||||||
if main.editMode:
|
if main and main.editMode:
|
||||||
if reparentMode:
|
if reparentMode:
|
||||||
RenderingServer.set_default_clear_color(Color.POWDER_BLUE)
|
RenderingServer.set_default_clear_color(Color.POWDER_BLUE)
|
||||||
else:
|
else:
|
||||||
@@ -126,7 +126,7 @@ func _process(delta):
|
|||||||
scrollSprites()
|
scrollSprites()
|
||||||
|
|
||||||
|
|
||||||
if !main.fileSystemOpen:
|
if !main or main.fileSystemOpen:
|
||||||
|
|
||||||
if Input.is_action_just_pressed("refresh"):
|
if Input.is_action_just_pressed("refresh"):
|
||||||
refresh()
|
refresh()
|
||||||
@@ -222,7 +222,7 @@ func scrollSprites():
|
|||||||
if Input.is_action_pressed("control"):
|
if Input.is_action_pressed("control"):
|
||||||
return
|
return
|
||||||
|
|
||||||
if !main.editMode:
|
if !main or !main.editMode:
|
||||||
return
|
return
|
||||||
|
|
||||||
if main.fileSystemOpen:
|
if main.fileSystemOpen:
|
||||||
|
|||||||
@@ -43,6 +43,12 @@ var bounceOnCostumeChange = false
|
|||||||
#Zooming
|
#Zooming
|
||||||
var scaleOverall = 100
|
var scaleOverall = 100
|
||||||
|
|
||||||
|
#Camera Panning
|
||||||
|
var isPanning = false
|
||||||
|
var initialPanPosition = Vector2.ZERO
|
||||||
|
var initialCameraOffset = Vector2.ZERO
|
||||||
|
var cameraOffset = Vector2.ZERO
|
||||||
|
|
||||||
var bounceChange = 0.0
|
var bounceChange = 0.0
|
||||||
|
|
||||||
#IMPORTANT
|
#IMPORTANT
|
||||||
@@ -130,7 +136,7 @@ func _ready():
|
|||||||
|
|
||||||
var s = get_viewport().get_visible_rect().size
|
var s = get_viewport().get_visible_rect().size
|
||||||
origin.position = s*0.5
|
origin.position = s*0.5
|
||||||
camera.position = origin.position
|
updateCameraPosition()
|
||||||
|
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
var hold = origin.get_parent().position.y
|
var hold = origin.get_parent().position.y
|
||||||
@@ -152,6 +158,43 @@ func _process(delta):
|
|||||||
|
|
||||||
followShadow()
|
followShadow()
|
||||||
|
|
||||||
|
## Handle input events, especially for camera panning
|
||||||
|
func _input(event):
|
||||||
|
# Handle middle mouse button for camera panning/reset
|
||||||
|
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_MIDDLE:
|
||||||
|
if editMode:
|
||||||
|
if event.pressed:
|
||||||
|
# Start panning in edit mode
|
||||||
|
isPanning = true
|
||||||
|
initialPanPosition = event.global_position
|
||||||
|
initialCameraOffset = cameraOffset
|
||||||
|
else:
|
||||||
|
# Stop panning
|
||||||
|
isPanning = false
|
||||||
|
else:
|
||||||
|
if event.pressed:
|
||||||
|
# Reset camera in view mode
|
||||||
|
resetCameraPosition()
|
||||||
|
|
||||||
|
# Handle mouse movement during panning
|
||||||
|
elif editMode and event is InputEventMouseMotion and isPanning:
|
||||||
|
var totalDelta = event.global_position - initialPanPosition
|
||||||
|
|
||||||
|
# Calculate new camera offset from initial position plus total movement
|
||||||
|
cameraOffset = initialCameraOffset - totalDelta
|
||||||
|
|
||||||
|
# Update camera position immediately
|
||||||
|
var s = get_viewport().get_visible_rect().size
|
||||||
|
camera.position = origin.position + cameraOffset
|
||||||
|
|
||||||
|
# Update UI positions
|
||||||
|
controlPanel.position = camera.position + (s/(camera.zoom*2.0))
|
||||||
|
tutorial.position = controlPanel.position
|
||||||
|
editControls.position = camera.position - (s/(camera.zoom*2.0))
|
||||||
|
viewerArrows.position = editControls.position
|
||||||
|
pushUpdates.position.y = controlPanel.position.y
|
||||||
|
pushUpdates.position.x = editControls.position.x
|
||||||
|
|
||||||
func followShadow():
|
func followShadow():
|
||||||
# Shadow disabled for selected sprites
|
# Shadow disabled for selected sprites
|
||||||
shadow.visible = false
|
shadow.visible = false
|
||||||
@@ -189,14 +232,8 @@ func onWindowSizeChange():
|
|||||||
lines.position = s*0.5
|
lines.position = s*0.5
|
||||||
lines.drawLine()
|
lines.drawLine()
|
||||||
|
|
||||||
camera.position = origin.position
|
updateCameraPosition()
|
||||||
controlPanel.position = camera.position + (s/(camera.zoom*2.0))
|
|
||||||
tutorial.position = controlPanel.position
|
|
||||||
editControls.position = camera.position - (s/(camera.zoom*2.0))
|
|
||||||
viewerArrows.position = editControls.position
|
|
||||||
spriteList.position.x = s.x - 233
|
spriteList.position.x = s.x - 233
|
||||||
pushUpdates.position.y = controlPanel.position.y
|
|
||||||
pushUpdates.position.x = editControls.position.x
|
|
||||||
|
|
||||||
func zoomScene():
|
func zoomScene():
|
||||||
#Handles Zooming
|
#Handles Zooming
|
||||||
@@ -224,11 +261,43 @@ func changeZoom():
|
|||||||
pushUpdates.scale = newZoom
|
pushUpdates.scale = newZoom
|
||||||
Global.mouse.scale = newZoom
|
Global.mouse.scale = newZoom
|
||||||
|
|
||||||
|
# Update UI positions to account for new zoom level
|
||||||
|
# Force update even during panning since zoom affects UI positioning calculations
|
||||||
|
var s = get_viewport().get_visible_rect().size
|
||||||
|
controlPanel.position = camera.position + (s/(camera.zoom*2.0))
|
||||||
|
tutorial.position = controlPanel.position
|
||||||
|
editControls.position = camera.position - (s/(camera.zoom*2.0))
|
||||||
|
viewerArrows.position = editControls.position
|
||||||
|
pushUpdates.position.y = controlPanel.position.y
|
||||||
|
pushUpdates.position.x = editControls.position.x
|
||||||
|
|
||||||
$ControlPanel/ZoomLabel.modulate.a = 6.0
|
$ControlPanel/ZoomLabel.modulate.a = 6.0
|
||||||
$ControlPanel/ZoomLabel.text = "Zoom : " + str(scaleOverall) + "%"
|
$ControlPanel/ZoomLabel.text = "Zoom : " + str(scaleOverall) + "%"
|
||||||
|
|
||||||
Global.pushUpdate("Set zoom to " + str(scaleOverall) + "%")
|
Global.pushUpdate("Set zoom to " + str(scaleOverall) + "%")
|
||||||
onWindowSizeChange()
|
|
||||||
|
## Update camera position with current offset
|
||||||
|
func updateCameraPosition():
|
||||||
|
var s = get_viewport().get_visible_rect().size
|
||||||
|
|
||||||
|
# Only update if not currently panning to avoid conflicts
|
||||||
|
if !isPanning:
|
||||||
|
camera.position = origin.position + cameraOffset
|
||||||
|
|
||||||
|
# Update UI element positions relative to new camera position
|
||||||
|
controlPanel.position = camera.position + (s/(camera.zoom*2.0))
|
||||||
|
tutorial.position = controlPanel.position
|
||||||
|
editControls.position = camera.position - (s/(camera.zoom*2.0))
|
||||||
|
viewerArrows.position = editControls.position
|
||||||
|
pushUpdates.position.y = controlPanel.position.y
|
||||||
|
pushUpdates.position.x = editControls.position.x
|
||||||
|
|
||||||
|
## Reset camera position to center
|
||||||
|
func resetCameraPosition():
|
||||||
|
cameraOffset = Vector2.ZERO
|
||||||
|
isPanning = false
|
||||||
|
updateCameraPosition()
|
||||||
|
Global.pushUpdate("Camera reset to center.")
|
||||||
|
|
||||||
#When the user speaks!
|
#When the user speaks!
|
||||||
func onSpeak():
|
func onSpeak():
|
||||||
@@ -243,6 +312,10 @@ func swapMode():
|
|||||||
editMode = !editMode
|
editMode = !editMode
|
||||||
Global.pushUpdate("Toggled editing mode.")
|
Global.pushUpdate("Toggled editing mode.")
|
||||||
|
|
||||||
|
# Reset camera when entering view mode
|
||||||
|
if !editMode:
|
||||||
|
resetCameraPosition()
|
||||||
|
|
||||||
get_viewport().transparent_bg = !editMode
|
get_viewport().transparent_bg = !editMode
|
||||||
if Global.backgroundColor.a != 0.0:
|
if Global.backgroundColor.a != 0.0:
|
||||||
get_viewport().transparent_bg = false
|
get_viewport().transparent_bg = false
|
||||||
@@ -365,6 +438,13 @@ func _on_load_dialog_file_selected(path):
|
|||||||
Saving.settings["lastAvatar"] = path
|
Saving.settings["lastAvatar"] = path
|
||||||
Global.spriteList.updateData()
|
Global.spriteList.updateData()
|
||||||
|
|
||||||
|
# Update opacity shaders for all loaded sprites after they're all created
|
||||||
|
await get_tree().process_frame # Wait for all sprites to be fully initialized
|
||||||
|
var allSprites = get_tree().get_nodes_in_group("saved")
|
||||||
|
for sprite in allSprites:
|
||||||
|
if sprite.has_method("updateOpacity"):
|
||||||
|
sprite.updateOpacity()
|
||||||
|
|
||||||
Global.pushUpdate("Loaded avatar at: " + path)
|
Global.pushUpdate("Loaded avatar at: " + path)
|
||||||
|
|
||||||
onWindowSizeChange()
|
onWindowSizeChange()
|
||||||
@@ -504,6 +584,10 @@ func _on_duplicate_button_pressed():
|
|||||||
origin.add_child(sprite)
|
origin.add_child(sprite)
|
||||||
sprite.position = Global.heldSprite.position + Vector2(16,16)
|
sprite.position = Global.heldSprite.position + Vector2(16,16)
|
||||||
|
|
||||||
|
# Update opacity shader for the duplicated sprite
|
||||||
|
await get_tree().process_frame # Wait for sprite to be fully initialized
|
||||||
|
sprite.updateOpacity()
|
||||||
|
|
||||||
Global.heldSprite = sprite
|
Global.heldSprite = sprite
|
||||||
|
|
||||||
Global.spriteList.updateData()
|
Global.spriteList.updateData()
|
||||||
|
|||||||
@@ -136,6 +136,11 @@ control={
|
|||||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194326,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194326,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
mouse_middle={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":3,"canceled":false,"pressed":false,"double_click":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
saveImages={
|
saveImages={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":76,"key_label":0,"unicode":108,"location":0,"echo":false,"script":null)
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":76,"key_label":0,"unicode":108,"location":0,"echo":false,"script":null)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ func _ready():
|
|||||||
Global.mouse = self
|
Global.mouse = self
|
||||||
|
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
if Global.main.editMode:
|
if Global.main and Global.main.editMode:
|
||||||
if text != "":
|
if text != "":
|
||||||
label.text = text
|
label.text = text
|
||||||
visible = true
|
visible = true
|
||||||
|
|||||||
@@ -269,7 +269,7 @@ func setZIndex():
|
|||||||
sprite.z_index = z
|
sprite.z_index = z
|
||||||
|
|
||||||
func talkBlink():
|
func talkBlink():
|
||||||
var faded = 0.2 * int(Global.main.editMode)
|
var faded = 0.2 * int(Global.main and Global.main.editMode)
|
||||||
var value = (showOnTalk + (showOnBlink*3)) + (int(Global.speaking)*10) + (int(Global.blink)*20)
|
var value = (showOnTalk + (showOnBlink*3)) + (int(Global.speaking)*10) + (int(Global.blink)*20)
|
||||||
var yes = [0,10,20,30,1,21,12,32,3,13,4,15,26,36,27,38].has(int(value))
|
var yes = [0,10,20,30,1,21,12,32,3,13,4,15,26,36,27,38].has(int(value))
|
||||||
var baseAlpha = max(int(yes), faded)
|
var baseAlpha = max(int(yes), faded)
|
||||||
|
|||||||
Reference in New Issue
Block a user