Apply texture to mp aircraft
Signed-off-by: fly <merspieler@airmail.cc>
This commit is contained in:
parent
dbadf6a74b
commit
c9f995db5c
1 changed files with 3 additions and 2 deletions
|
@ -701,13 +701,14 @@ var canvas_livery = {
|
||||||
# Class for Canvas based liveries
|
# Class for Canvas based liveries
|
||||||
#
|
#
|
||||||
var canvas_livery_update = {
|
var canvas_livery_update = {
|
||||||
init: func(liveriesdir, interval = 10.01, callback = nil, resolution=4096) {
|
init: func(liveriesdir, module_id, interval = 10.01, callback = nil, resolution=4096) {
|
||||||
var m = { parents: [canvas_livery_update, overlay_update.new()] };
|
var m = { parents: [canvas_livery_update, overlay_update.new()] };
|
||||||
m.parents[1].add(liveriesdir, "sim/model/livery/file", callback);
|
m.parents[1].add(liveriesdir, "sim/model/livery/file", callback);
|
||||||
m.parents[1].interval = interval;
|
m.parents[1].interval = interval;
|
||||||
m.liveriesdir = liveriesdir;
|
m.liveriesdir = liveriesdir;
|
||||||
m.resolution = resolution;
|
m.resolution = resolution;
|
||||||
m.targets = {};
|
m.targets = {};
|
||||||
|
m.module_id = module_id;
|
||||||
return m;
|
return m;
|
||||||
},
|
},
|
||||||
setResolution: func(resolution) {
|
setResolution: func(resolution) {
|
||||||
|
@ -739,7 +740,7 @@ var canvas_livery_update = {
|
||||||
# "anisotropy": 32.0
|
# "anisotropy": 32.0
|
||||||
});
|
});
|
||||||
foreach (var object; objects) {
|
foreach (var object; objects) {
|
||||||
me.targets[name].canvas.addPlacement({"node": object});
|
me.targets[name].canvas.addPlacement({"module-id": me.module_id, "type": "scenery-object", "node": object});
|
||||||
}
|
}
|
||||||
me.targets[name].groups["base"] = me.targets[name].canvas.createGroup("base");
|
me.targets[name].groups["base"] = me.targets[name].canvas.createGroup("base");
|
||||||
resStr = findTexByRes(me.liveriesdir, getprop(property), resolution);
|
resStr = findTexByRes(me.liveriesdir, getprop(property), resolution);
|
||||||
|
|
Loading…
Add table
Reference in a new issue