Skip to content

Commit

Permalink
1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Gataquadrada committed May 14, 2022
1 parent 22d21de commit 9f54b8a
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@ A: Sure. You can open an issue here, or message me on [Discord](https://discord.

## Todo

- ⏹️ Zoom in and out with mouse scroll wheel.
- ⬜ Support for small movement when microphone is detected.
- ⬜ Support for loop through predefined frames when microphone is detected.
- ⬜ Support for second set of frames for mouth movement when microphone is detected.
- ⬜ Support for idle set of frames.
- 🟥 (Removed - Too Buggy) Zoom in and out with mouse scroll wheel.
- ✅ (1.1.1) Touch Portal plugin.
- ✅ (1.1) Party mode (be able to see someone else's character and frames).
- ✅ (0.3.0) Remove load from the player (make server send a base64 encoded image ready to use).
Expand Down
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const _VERSION = "1.1.1"
const _VERSION = "1.1.2"
var _PORT = 3000

var _FRAMES = {}
Expand Down
46 changes: 33 additions & 13 deletions resources/editor.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,31 @@
jQuery(($) => {
var stSocket
var _spritesheetFile = null
// var _zoomCurrent = 3
var stSocket = null
// const _zoomLevels = [0.15, 0.25, 0.5, 1, 1.5, 2, 2.15]
const _actionsDone = []
const spritesheetMain = $("#spritesheet_main")
const spritesheetBoxed = $("#spritesheet_boxed")
const resizeBox = $("#resize_box")
const snapshotIconBox = $("#snapshot_icon_box")
const framesContainer = $("#frames__container")
const tabsContainer = $("#tabs__container")
const tabsTitles = $("#tabs__titles")

/*
$(document).on('mousewheel', function(e) {
console.log(e.deltaX, e.deltaY, e.deltaFactor);
if( 0 < e.deltaY ){
// UP
}else{
// DOWN
}
});
*/

/*
* ST SOCKET
*/
function makeStSocket() {
stSocket = new WebSocket(`ws://127.0.0.1:${_PORT}`)

Expand Down Expand Up @@ -67,18 +92,9 @@ jQuery(($) => {
}

makeStSocket()

var _spritesheetFile = null
var _zoomCurrent = 3
const _zoomLevels = [0.15, 0.25, 0.5, 1, 1.5, 2, 2.15]
const _actionsDone = []
const spritesheetMain = $("#spritesheet_main")
const spritesheetBoxed = $("#spritesheet_boxed")
const resizeBox = $("#resize_box")
const snapshotIconBox = $("#snapshot_icon_box")
const framesContainer = $("#frames__container")
const tabsContainer = $("#tabs__container")
const tabsTitles = $("#tabs__titles")
/*
* /ST SOCKET
*/

/*
* TABS STUFF
Expand Down Expand Up @@ -661,6 +677,7 @@ jQuery(($) => {

if (data.ok) {
alert("Saved!")
window.location.href = `http://127.0.0.1:${_PORT}/editor.html`
} else {
alert("Error on save!")
}
Expand Down Expand Up @@ -813,6 +830,7 @@ jQuery(($) => {
resizeBox.mazeResize("100px", "100px")
spritesheetMain.mazeReposition(0, 0)
$(document).trigger("maze-editor-reset")
framesContainer.scrollTop(0).find(".frame:eq(0)").trigger("click")
tabsContainer.mazeSetTab("tabFrames")
}

Expand Down Expand Up @@ -852,6 +870,7 @@ jQuery(($) => {
resizeBox.mazeResize(frameW, frameH)
spritesheetMain.mazeReposition(framePX, framePY)
framesContainer.mazeFrameAdd({ name: frame.name })
tabsContainer.mazeSetTab("tabFrames")
})
}

Expand Down Expand Up @@ -968,6 +987,7 @@ jQuery(($) => {
spritesheetMain.mazeReposition(framePX, framePY)
framesContainer.mazeFrameAdd({ name: frame.name })
})
framesContainer.scrollTop(0).find(".frame:eq(0)").trigger("click")
},
error: function (err) {},
})
Expand Down
5 changes: 5 additions & 0 deletions resources/jquery.mousewheel.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions views/editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
content="no-cache, no-store, must-revalidate"
/>
<script>
const _PORT = ${port}
const _PORT = parseInt("${port}")
</script>
<script src="resources/jquery-3.6.0.min.js"></script>
<script src="resources/jquery-ui-1.13.1.custom/jquery-ui.min.js"></script>
<script src="resources/jquery.mousewheel.min.js"></script>
<link
rel="stylesheet"
href="resources/jquery-ui-1.13.1.custom/jquery-ui.min.css"
Expand All @@ -30,7 +31,7 @@
rel="stylesheet"
/>
</head>
<body class="editing">
<body>
<!-- VIEWER -->
<div id="viewer__container">
<div id="spritesheet_main" class="viewer__spritesheet">
Expand Down

0 comments on commit 9f54b8a

Please sign in to comment.