Skip to content

Commit 8ba8772

Browse files
committed
Merge branch 'master' into gh-pages
2 parents ff58ef0 + 733d9fd commit 8ba8772

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+988
-422
lines changed

.github/workflows/stale.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
stale:
1313
runs-on: ubuntu-latest
1414
permissions:
15+
actions: write
1516
issues: write
1617
pull-requests: write
1718
steps:

css/dialogs.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@
201201
flex-wrap: wrap;
202202
}
203203
.dialog_bar.form_bar.full_width_dialog_bar > label {
204-
width: 100% !important;
204+
min-width: 95%;
205205
}
206206
.dialog_bar.form_bar .half {
207207
flex-grow: 1;

css/panels.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,8 @@
672672
padding-left: 5px;
673673
pointer-events: none;
674674
color: inherit;
675+
-webkit-text-fill-color: unset;
676+
opacity: 1; /* required on iOS */
675677
}
676678
input.cube_name.renaming {
677679
pointer-events: auto;

css/setup.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,14 @@
157157
font-family: 'Material Icons';
158158
font-style: normal;
159159
font-weight: 400;
160-
src: url(../font/material-icons.woff2?4) format('woff');
160+
src: url(../font/material-icons.woff2) format('woff');
161161
}
162162
@font-face {
163163
font-family: 'icomoon';
164164
font-weight: normal;
165165
font-style: normal;
166-
src: url('../font/icomoon.ttf?wxwksw') format('truetype'),
167-
url('../font/icomoon.woff?wxwksw') format('woff');
166+
src: url('../font/icomoon.ttf') format('truetype'),
167+
url('../font/icomoon.woff') format('woff');
168168
}
169169

170170
/*Icons*/

css/window.css

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,15 @@
4444
background-size: 128px;
4545
background-position: center;
4646
--menu-bar-height: 30px;
47+
--status-bar-height: 26px;
4748
}
4849
#work_screen {
4950
--toolbar-height: 40px;
5051
position: relative;
5152
display: grid;
5253
overflow: hidden;
5354
grid-template-columns: 332px auto 314px;
54-
grid-template-rows: var(--toolbar-height) minmax(200px, 5000px) 26px;
55+
grid-template-rows: var(--toolbar-height) minmax(200px, 5000px) var(--status-bar-height);
5556
grid-template-areas:
5657
"left_bar toolbar toolbar"
5758
"left_bar center right_bar"
@@ -424,13 +425,14 @@
424425
/*Mobile*/
425426
body.is_mobile {
426427
--menu-bar-height: 38px;
428+
--status-bar-height: 31px;
427429
}
428430
body.is_mobile #page_wrapper {
429431
border: none;
430432
}
431433
body.is_mobile #work_screen {
432434
display: grid;
433-
grid-template-rows: auto minmax(200px, 5000px) 26px 38px !important;
435+
grid-template-rows: auto minmax(200px, 5000px) var(--status-bar-height) 38px !important;
434436
grid-template-areas:
435437
"toolbar"
436438
"center"
@@ -441,7 +443,7 @@
441443
}
442444
body.is_mobile.is_landscape #work_screen {
443445
grid-template-columns: auto 48px !important;
444-
grid-template-rows: auto minmax(200px, 5000px) 26px !important;
446+
grid-template-rows: auto minmax(200px, 5000px) var(--status-bar-height) !important;
445447
grid-template-areas:
446448
"toolbar panel_selector"
447449
"center panel_selector"
@@ -882,6 +884,7 @@
882884
#status_bar {
883885
position: relative;
884886
display: flex;
887+
align-items: center;
885888
background: var(--color-ui);
886889
overflow: hidden;
887890
}

index.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@
4848
error_element.innerText = `${message}\nIn .${file.split(location.origin).join('')}:${line}`
4949
}
5050
}
51+
window.factoryResetAndReload = function() {
52+
let lang_key = 'menu.help.developer.reset_storage.confirm';
53+
let result = window.confirm((window.tl && tl(lang_key) != lang_key) ? tl(lang_key) : 'Are you sure you want to reset Blockbench to factory settings? This will delete all custom settings, keybindings and installed plugins.');
54+
if (result) {
55+
localStorage.clear();
56+
if ('Blockbench' in window) Blockbench.addFlag('no_localstorage_saving');
57+
console.log('Cleared Local Storage');
58+
window.location.reload(true);
59+
}
60+
}
5161
</script>
5262
<div id="loading_error_message" style="display: none;">
5363
<div>An error occurred while loading Blockbench</div>
@@ -209,6 +219,8 @@ <h3><i class="material-icons icon">keyboard</i><span class="tl">keybindings.reco
209219
document.getElementById('loading_error_message').style.display = 'block'
210220
if (window.require) {
211221
require('@electron/remote').getCurrentWindow().webContents.openDevTools();
222+
} else if (window.openDevTools) {
223+
window.openDevTools();
212224
}
213225
} else {
214226
document.getElementById('loading_error_message').innerHTML = 'No loading errors...'

js/animations/animation_controllers.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import Wintersky from 'wintersky';
22
import { openMolangEditor } from './molang_editor';
33
import { clipboard, currentwindow, dialog, fs, ipcRenderer } from '../native_apis';
44
import { Filesystem } from '../file_system';
5+
import { Easings } from '../lib/easing';
56

67
export class AnimationControllerState {
78
constructor(controller, data = 0) {

js/animations/keyframe.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1230,7 +1230,7 @@ BARS.defineActions(function() {
12301230
let kfs = original_keyframes.filter(kf => kf.channel == channel && kf.animator == animator);
12311231
if (!kfs.length) return;
12321232
if (!opposite_animator) {
1233-
let name = flipNameOnAxis({name: animator.name}, 0);
1233+
let name = flipNameOnAxis({name: animator.name}, 0, null, animator.name);
12341234
let opposite_bone = all_animatable_nodes.find(g => g.name == name);
12351235
if (!opposite_bone) {
12361236
console.log(`Animation Flipping: Unable to find opposite bone for ${animator.name}`)

js/animations/molang.js

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1708,6 +1708,143 @@ export function sortAutocompleteResults(results, incomplete) {
17081708
id: 'hermite_blend',
17091709
arguments: ['0_to_1'],
17101710
})
1711+
.addQuery({
1712+
id: 'min_angle',
1713+
arguments: ['angle'],
1714+
})
1715+
.addQuery({
1716+
id: 'sign',
1717+
arguments: ['vaule'],
1718+
})
1719+
.addQuery({
1720+
id: 'copy_sign',
1721+
arguments: ['value', 'sign'],
1722+
})
1723+
.addQuery({
1724+
id: 'inverse_lerp',
1725+
arguments: ['start', 'end', 'value'],
1726+
})
1727+
.addQuery({
1728+
id: 'ease_in_quad',
1729+
arguments: ['start', 'end', '0_to_1'],
1730+
})
1731+
.addQuery({
1732+
id: 'ease_out_quad',
1733+
arguments: ['start', 'end', '0_to_1'],
1734+
})
1735+
.addQuery({
1736+
id: 'ease_in_out_quad',
1737+
arguments: ['start', 'end', '0_to_1'],
1738+
})
1739+
.addQuery({
1740+
id: 'ease_in_cubic',
1741+
arguments: ['start', 'end', '0_to_1'],
1742+
})
1743+
.addQuery({
1744+
id: 'ease_out_cubic',
1745+
arguments: ['start', 'end', '0_to_1'],
1746+
})
1747+
.addQuery({
1748+
id: 'ease_in_out_cubic',
1749+
arguments: ['start', 'end', '0_to_1'],
1750+
})
1751+
.addQuery({
1752+
id: 'ease_in_quart',
1753+
arguments: ['start', 'end', '0_to_1'],
1754+
})
1755+
.addQuery({
1756+
id: 'ease_out_quart',
1757+
arguments: ['start', 'end', '0_to_1'],
1758+
})
1759+
.addQuery({
1760+
id: 'ease_in_out_quart',
1761+
arguments: ['start', 'end', '0_to_1'],
1762+
})
1763+
.addQuery({
1764+
id: 'ease_in_quint',
1765+
arguments: ['start', 'end', '0_to_1'],
1766+
})
1767+
.addQuery({
1768+
id: 'ease_out_quint',
1769+
arguments: ['start', 'end', '0_to_1'],
1770+
})
1771+
.addQuery({
1772+
id: 'ease_in_out_quint',
1773+
arguments: ['start', 'end', '0_to_1'],
1774+
})
1775+
.addQuery({
1776+
id: 'ease_in_sine',
1777+
arguments: ['start', 'end', '0_to_1'],
1778+
})
1779+
.addQuery({
1780+
id: 'ease_out_sine',
1781+
arguments: ['start', 'end', '0_to_1'],
1782+
})
1783+
.addQuery({
1784+
id: 'ease_in_out_sine',
1785+
arguments: ['start', 'end', '0_to_1'],
1786+
})
1787+
.addQuery({
1788+
id: 'ease_in_expo',
1789+
arguments: ['start', 'end', '0_to_1'],
1790+
})
1791+
.addQuery({
1792+
id: 'ease_out_expo',
1793+
arguments: ['start', 'end', '0_to_1'],
1794+
})
1795+
.addQuery({
1796+
id: 'ease_in_out_expo',
1797+
arguments: ['start', 'end', '0_to_1'],
1798+
})
1799+
.addQuery({
1800+
id: 'ease_in_circ',
1801+
arguments: ['start', 'end', '0_to_1'],
1802+
})
1803+
.addQuery({
1804+
id: 'ease_out_circ',
1805+
arguments: ['start', 'end', '0_to_1'],
1806+
})
1807+
.addQuery({
1808+
id: 'ease_in_out_circ',
1809+
arguments: ['start', 'end', '0_to_1'],
1810+
})
1811+
.addQuery({
1812+
id: 'ease_in_bounce',
1813+
arguments: ['start', 'end', '0_to_1'],
1814+
})
1815+
.addQuery({
1816+
id: 'ease_out_bounce',
1817+
arguments: ['start', 'end', '0_to_1'],
1818+
})
1819+
.addQuery({
1820+
id: 'ease_in_out_bounce',
1821+
arguments: ['start', 'end', '0_to_1'],
1822+
})
1823+
.addQuery({
1824+
id: 'ease_in_back',
1825+
arguments: ['start', 'end', '0_to_1'],
1826+
})
1827+
.addQuery({
1828+
id: 'ease_out_back',
1829+
arguments: ['start', 'end', '0_to_1'],
1830+
})
1831+
.addQuery({
1832+
id: 'ease_in_out_back',
1833+
arguments: ['start', 'end', '0_to_1'],
1834+
})
1835+
.addQuery({
1836+
id: 'ease_in_elastic',
1837+
arguments: ['start', 'end', '0_to_1'],
1838+
})
1839+
.addQuery({
1840+
id: 'ease_out_elastic',
1841+
arguments: ['start', 'end', '0_to_1'],
1842+
})
1843+
.addQuery({
1844+
id: 'ease_in_out_elastic',
1845+
arguments: ['start', 'end', '0_to_1'],
1846+
})
1847+
17111848
)
17121849
.addNamespace(
17131850
new MolangAutocomplete.Namespace({

js/boot_loader.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,12 @@ localStorage.setItem('last_version', Blockbench.version);
170170

171171
setStartScreen(true);
172172

173+
if (Blockbench.isMobile) {
174+
// Reselect tool to update transform toolbar in status bar on mobile
175+
Toolbox.selected = null;
176+
BarItems.move_tool.select();
177+
}
178+
173179
document.getElementById('page_wrapper').classList.remove('invisible');
174180

175181
Blockbench.setup_successful = true;

0 commit comments

Comments
 (0)