20,741
edits
m (→Canvas Code: more intuitive to use a hash here ?) |
|||
Line 66: | Line 66: | ||
# vector with all images added (beginning at 0) | # vector with all images added (beginning at 0) | ||
var layers = | var layers = {}; | ||
# texture path | # texture path | ||
var path="Aircraft/EF2000/Models/"; | var path="Aircraft/EF2000/Models/"; | ||
foreach(var image; ['EF2000.png','EF2000-dirt.png']) { | foreach(var image; ['EF2000.png','EF2000-dirt.png']) { | ||
# Put a raster image into the canvas and save the image in a hash: layers['EF2000.png].setScale(0.2); | |||
layers[image] = root.createChild("image") | |||
# Put a raster image into the canvas | |||
root.createChild("image") | |||
.setFile( path~image ) | .setFile( path~image ) | ||
.setSize(2048,2048) | .setSize(2048,2048) | ||
} | } | ||