Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
Howto:Dynamic Liveries via Canvas
(view source)
Revision as of 20:54, 18 September 2014
4 bytes added
,
20:54, 18 September 2014
m
no edit summary
Line 121:
Line 121:
# hash with all layers/images added
# hash with all layers/images added
m.layers = {};
m.layers = {};
−
var
.basepath = path;
+
m
.basepath = path;
# return the new object to the caller
# return the new object to the caller
Line 137:
Line 137:
# Put a raster image into the canvas and save the image in a hash: layers['EF2000.png].hide();
# Put a raster image into the canvas and save the image in a hash: layers['EF2000.png].hide();
m.layers[image] = root.createChild("image")
m.layers[image] = root.createChild("image")
−
.setFile(
path
~image )
+
.setFile(
m.basepath
~image )
.setSize(2048,2048)
.setSize(2048,2048)
return m.layers[image];
return m.layers[image];
Hooray
Administrators
19,705
edits
Navigation menu
Personal tools
Create account
Log in
Namespaces
Howto
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Village pump
Help
Portals
User
Developer
Wiki
FlightGear
Website
Forum
Mailing lists
Bug tracker
Source
Scenery
Liveries
Build server
Tools
Upload file
Special pages
Printable version