diff --git a/content/news.json b/content/news.json index 40c76b6a9..cc157731c 100644 --- a/content/news.json +++ b/content/news.json @@ -5,7 +5,7 @@ "layout": "vertical", "insert_after": "splash_screen", "text": [ - {"text": "Welcome to Blockbench 4.10", "type": "h2"}, + {"text": "Welcome to Blockbench 4.10", "type": "h3"}, {"text": "The Knife Tool Update!", "type": "h1"}, {"text": "Check out the [full changelog](https://github.com/JannisX11/blockbench/releases/tag/v4.10.0)!"} ], diff --git a/css/dialogs.css b/css/dialogs.css index 0d76fb989..ad9d0b660 100644 --- a/css/dialogs.css +++ b/css/dialogs.css @@ -1890,10 +1890,12 @@ li.validator_dialog_problem.validator_warning > i { color: var(--color-warning); margin: 3px 4px; + flex-shrink: 0; } li.validator_dialog_problem.validator_error > i { color: var(--color-error); margin: 3px 4px; + flex-shrink: 0; } li.validator_dialog_problem span { flex-grow: 1; diff --git a/css/setup.css b/css/setup.css index 2d65847a1..7b2eb97fa 100644 --- a/css/setup.css +++ b/css/setup.css @@ -299,6 +299,7 @@ -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow: hidden; + flex-shrink: 0; } i.fa_big { font-size: 18px; diff --git a/css/start_screen.css b/css/start_screen.css index b2b8b24fc..5988b1391 100644 --- a/css/start_screen.css +++ b/css/start_screen.css @@ -21,6 +21,7 @@ } #start_screen button { margin-right: 4px; + margin-top: 4px; } #start_screen .recent_project { margin: 2px 0; @@ -183,6 +184,7 @@ div.start_screen_right > ul { max-height: 470px; padding-right: 5px; + overflow-x: hidden; overflow-y: auto; grid-template-columns: repeat(auto-fit, minmax(170px ,1fr)); grid-gap: 5px; @@ -207,8 +209,10 @@ } #start_screen div.graphic.graphic_icon i { font-size: 40px; - width: 12px; - margin-top: 6px; + width: 42px; + max-width: unset; + margin-top: 4px; + margin-right: -20px; } #start_screen .start_screen_graphic_description { bottom: 15px; diff --git a/js/animations/keyframe.js b/js/animations/keyframe.js index 107fb536c..212ab6675 100644 --- a/js/animations/keyframe.js +++ b/js/animations/keyframe.js @@ -589,6 +589,7 @@ class Keyframe { function updateKeyframeValue(axis, value, data_point) { Timeline.selected.forEach(function(kf) { if (axis == 'uniform' && kf.channel == 'scale') kf.uniform = true; + if (data_point && !kf.data_points[data_point]) return; kf.set(axis, value, data_point); }) if (!['effect', 'locator', 'script'].includes(axis)) { @@ -603,8 +604,8 @@ function updateKeyframeSelection() { } let has_expressions = false; if (kf.transform) { - has_expressions = !!kf.data_points.find(point => { - return !isStringNumber(point.x) || !isStringNumber(point.y) ||! isStringNumber(point.z); + has_expressions = !!kf.data_points.find((point, i) => { + return kf.getArray(i).find(v => typeof v == 'string'); }) } if (has_expressions != kf.has_expressions) { @@ -1200,6 +1201,15 @@ BARS.defineActions(function() { time = (time + Animation.selected.length/2) % (Animation.selected.length + 0.001); } time = Timeline.snapTime(time); + if (Math.epsilon(time, Animation.selected.length, 0.004) && formResult.offset && !occupied_times.includes(0)) { + // Copy keyframe to start + occupied_times.push(0); + let new_kf = opposite_animator.createKeyframe(old_kf, 0, channel, false, false) + if (new_kf) { + new_kf.flip(0); + new_keyframes.push(new_kf); + } + } if (occupied_times.includes(time)) return; occupied_times.push(time); let new_kf = opposite_animator.createKeyframe(old_kf, time, channel, false, false) @@ -1454,6 +1464,17 @@ Interface.definePanels(function() { } } return channel; + }, + firstKeyframe() { + let data_point_length = 0; + let keyframe; + for (let kf of this.keyframes) { + if (kf.data_points.length > data_point_length) { + keyframe = kf; + data_point_length = kf.data_points.length; + } + } + return keyframe; } }, template: ` @@ -1466,7 +1487,7 @@ Interface.definePanels(function() {
-