Update version to 4.0.0 beta

Improve support for beta version codes
This commit is contained in:
JannisX11 2021-07-31 15:54:50 +02:00
parent 547997c139
commit 9a3bdbcec7
4 changed files with 12 additions and 7 deletions

View File

@ -25,7 +25,7 @@
<script>
if (typeof module === 'object') {window.module = module; module = undefined;}//jQuery Fix
const isApp = typeof require !== 'undefined';
const appVersion = '3.9.2';
const appVersion = '4.0.0-beta.0';
window.onerror = (message, file, line) => {
if (typeof Blockbench != 'undefined' && Blockbench.setup_successful) return;

View File

@ -412,6 +412,7 @@ class Keyframe {
])
new Property(Keyframe, 'number', 'time')
new Property(Keyframe, 'number', 'color', {default: -1})
new Property(Keyframe, 'boolean', 'uniform', {condition: keyframe => keyframe.channel == 'scale', default: true})
new Property(Keyframe, 'string', 'interpolation', {default: 'linear'})
Keyframe.selected = [];
Keyframe.interpolation = {

View File

@ -1,14 +1,18 @@
//Blockbench
function compareVersions(string1/*new*/, string2/*old*/) {
// Is string1 newer than string2 ?
var arr1 = string1.split('.')
var arr2 = string2.split('.')
var arr1 = string1.split(/[.-]/);
var arr2 = string2.split(/[.-]/);
var i = 0;
var num1 = 0;
var num2 = 0;
while (i < arr1.length) {
num1 = parseInt(arr1[i])
num2 = parseInt(arr2[i])
while (i < Math.max(arr1.length, arr2.length)) {
num1 = arr1[i];
num2 = arr2[i];
if (num1 == 'beta') num1 = -1;
if (num2 == 'beta') num2 = -1;
num1 = parseInt(num1) || 0;
num2 = parseInt(num2) || 0;
if (num1 > num2) {
return true;
} else if (num1 < num2) {

View File

@ -1,7 +1,7 @@
{
"name": "Blockbench",
"description": "Model editing and animation software",
"version": "3.9.2",
"version": "4.0.0-beta.0",
"license": "GPL-3.0-or-later",
"author": {
"name": "JannisX11",