20,741
edits
(Switch to {{fgdata source}} to fix the broken Gitorious link.) |
|||
Line 8: | Line 8: | ||
For constructor see: [[Howto:Add_a_2D_canvas_instrument_to_your_aircraft#Initialize_a_Canvas|Initialize a Canvas]] | For constructor see: [[Howto:Add_a_2D_canvas_instrument_to_your_aircraft#Initialize_a_Canvas|Initialize a Canvas]] | ||
=== addPlacement === | === addPlacement === | ||
{{Note|It is possible to place a canvas on models in the scene. Tom has not tested if it also works for MP/AI aircraft but it should. The placement in scenery objects needs a different placement type to select also the model it should be placed on. For scenery objects a special placement exists: | |||
<syntaxhighlight lang="nasal"> | |||
var placement = { "module-id": _module_id, type: "scenery-object", <normal placement parameters like eg. node> }</syntaxhighlight> | |||
'_module_id' is a special variable which is only set in scenery object <load> handlers.<ref>{{cite web | |||
|url = https://sourceforge.net/p/flightgear/mailman/message/35093833/ | |||
|title = <nowiki> Re: [Flightgear-devel] Canvas in dynamically loaded scene models </nowiki> | |||
|author = <nowiki> Thomas Geymayer </nowiki> | |||
|date = May 17th, 2016 | |||
|added = May 17th, 2016 | |||
|script_version = 0.40 | |||
}}</ref> | |||
}} | |||
See: [[Howto:Add_a_2D_canvas_instrument_to_your_aircraft#Place_it_somewhere_on_your_aircraft|Place a Canvas]] | See: [[Howto:Add_a_2D_canvas_instrument_to_your_aircraft#Place_it_somewhere_on_your_aircraft|Place a Canvas]] | ||
=== setColorBackground === | === setColorBackground === | ||
'''Parameters:''' (r, g, b, a) | '''Parameters:''' (r, g, b, a) |