Skip to content

Commit

Permalink
Made some fixes to Hopefully fix the glitching avatar issue in Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Gemmstone committed May 2, 2024
1 parent 3c16a53 commit 52132e6
Show file tree
Hide file tree
Showing 4 changed files with 245 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
/.idea/
/Data/user_token.json
build.sh
build.bat
build.bat
tests.py
9 changes: 9 additions & 0 deletions Core/Viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,15 @@ def handle_runtime_html(self, soup, image_div, image_list):
for layer in sorted(image_list, key=lambda x: x['posZ']):
animation_idle_div = soup.new_tag('div', style=f"""
position: absolute !important;
z-index: {layer['posZ']};
""")
animation_idle_div['class'] = [
"idle_animation" if layer.get("animation_idle", True) else "ignore"
]

cursor_div = soup.new_tag('div', style=f"""
position: absolute !important;
z-index: {layer['posZ']};
left: calc(50% + {layer.get('posIdleX', 0)}px);
top: calc(50% + {layer.get('posIdleY', 0)}px);
""")
Expand All @@ -90,6 +92,7 @@ def handle_runtime_html(self, soup, image_div, image_list):

controller_buttons_div = soup.new_tag('div', style=f"""
position: absolute !important;
z-index: {layer['posZ']};
left: calc(50% + {layer.get('posIdleX', 0)}px);
top: calc(50% + {layer.get('posIdleY', 0)}px);
transform: rotate({layer.get('rotationIdle', 0)}deg);
Expand Down Expand Up @@ -117,6 +120,7 @@ def handle_runtime_html(self, soup, image_div, image_list):

guitar_buttons_div = soup.new_tag('div', style=f"""
position: absolute !important;
z-index: {layer['posZ']};
left: calc(50% + {layer.get('posIdleX', 0)}px);
top: calc(50% + {layer.get('posIdleY', 0)}px);
transform: rotate({layer.get('rotationIdle', 0)}deg);
Expand All @@ -137,6 +141,7 @@ def handle_runtime_html(self, soup, image_div, image_list):

controller_wheelX_div = soup.new_tag('div', style=f"""
position: absolute !important;
z-index: {layer['posZ']};
transform-origin: calc(50% + {layer.get('originX', 0)}px) calc(50% + {layer.get('originY', 0)}px);
transform: rotateZ(0deg);
""")
Expand All @@ -150,6 +155,7 @@ def handle_runtime_html(self, soup, image_div, image_list):

controller_wheelY_div = soup.new_tag('div', style=f"""
position: absolute !important;
z-index: {layer['posZ']};
transform-origin: calc(50% + {layer.get('originXzoom', layer.get('originX', 0))}px) calc(50% + {layer.get('originYzoom', layer.get('originY', 0))}px);
transform: rotateX(0deg) scale(100%);
""")
Expand All @@ -163,6 +169,7 @@ def handle_runtime_html(self, soup, image_div, image_list):

controller_wheelZ_div = soup.new_tag('div', style=f"""
position: absolute !important;
z-index: {layer['posZ']};
transform-origin: calc(50% + {layer.get('originXright', layer.get('originX', 0))}px) calc(50% + {layer.get('originYright', layer.get('originY', 0))}px);
transform: rotateY(0deg) rotateX(0deg);
""")
Expand All @@ -176,6 +183,7 @@ def handle_runtime_html(self, soup, image_div, image_list):

controller_wheelWhammy_div = soup.new_tag('div', style=f"""
position: absolute !important;
z-index: {layer['posZ']};
transform-origin: calc(50% + {layer.get('originXwhammy', 0)}px) calc(50% + {layer.get('originYwhammy', 0)}px);
transform: rotateZ(0deg);
""")
Expand All @@ -192,6 +200,7 @@ def handle_runtime_html(self, soup, image_div, image_list):

animation_talking_div = soup.new_tag('div', style=f"""
position: absolute !important;
z-index: {layer['posZ']};
{"opacity: 0" if layer['talking'] not in ['ignore', 'talking_closed'] else ""};
""")
animation_talking_div['class'] = [layer.get("talking", "ignore")]
Expand Down
Loading

0 comments on commit 52132e6

Please sign in to comment.