Add version check
This commit is contained in:
parent
c5a1c89a09
commit
a61978bb64
1 changed files with 34 additions and 14 deletions
|
@ -79,13 +79,23 @@ var canvas_livery = {
|
||||||
resolution = maxSupportedRes;
|
resolution = maxSupportedRes;
|
||||||
me.targets[name].resolution = maxSupportedRes;
|
me.targets[name].resolution = maxSupportedRes;
|
||||||
}
|
}
|
||||||
me.targets[name].canvas = canvas.new({
|
var (major, minor, patch) = split(".", getprop("/sim/version/flightgear"));
|
||||||
"name": name,
|
if (num(major) == 2020 and num(minor) < 4) {
|
||||||
"size": [resolution, resolution],
|
me.targets[name].canvas = canvas.new({
|
||||||
"view": [resolution, resolution],
|
"name": name,
|
||||||
"mipmapping": 1,
|
"size": [resolution, resolution],
|
||||||
"anisotropy": 32.0
|
"view": [resolution, resolution],
|
||||||
});
|
"mipmapping": 1,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
me.targets[name].canvas = canvas.new({
|
||||||
|
"name": name,
|
||||||
|
"size": [resolution, resolution],
|
||||||
|
"view": [resolution, resolution],
|
||||||
|
"mipmapping": 1,
|
||||||
|
"anisotropy": 32.0
|
||||||
|
});
|
||||||
|
}
|
||||||
foreach (var object; objects) {
|
foreach (var object; objects) {
|
||||||
me.targets[name].canvas.addPlacement({"node": object});
|
me.targets[name].canvas.addPlacement({"node": object});
|
||||||
}
|
}
|
||||||
|
@ -158,13 +168,23 @@ var canvas_livery_update = {
|
||||||
resolution = maxSupportedRes;
|
resolution = maxSupportedRes;
|
||||||
me.targets[name].resolution = maxSupportedRes;
|
me.targets[name].resolution = maxSupportedRes;
|
||||||
}
|
}
|
||||||
me.targets[name].canvas = canvas.new({
|
var (major, minor, patch) = split(".", getprop("/sim/version/flightgear"));
|
||||||
"name": name,
|
if (num(major) == 2020 and num(minor) < 4) {
|
||||||
"size": [resolution, resolution],
|
me.targets[name].canvas = canvas.new({
|
||||||
"view": [resolution, resolution],
|
"name": name,
|
||||||
"mipmapping": 1,
|
"size": [resolution, resolution],
|
||||||
"anisotropy": 32.0
|
"view": [resolution, resolution],
|
||||||
});
|
"mipmapping": 1,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
me.targets[name].canvas = canvas.new({
|
||||||
|
"name": name,
|
||||||
|
"size": [resolution, resolution],
|
||||||
|
"view": [resolution, resolution],
|
||||||
|
"mipmapping": 1,
|
||||||
|
"anisotropy": 32.0
|
||||||
|
});
|
||||||
|
}
|
||||||
foreach (var object; objects) {
|
foreach (var object; objects) {
|
||||||
me.targets[name].canvas.addPlacement({"module-id": me.module_id, "type": "scenery-object", "node": object});
|
me.targets[name].canvas.addPlacement({"module-id": me.module_id, "type": "scenery-object", "node": object});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue