20,741
edits
No edit summary |
No edit summary |
||
Line 11: | Line 11: | ||
== Background == | == Background == | ||
== Development == | |||
== Components == | |||
=== MFD === | |||
Top level helper class managing all related components. | |||
=== ImageSource === | |||
An ImageSource will be an invisible Canvas representing the video/graphics output of a display. | |||
<syntaxhighlight lang="nasal"> | |||
var ImageSource = { | |||
new: func(x,y) { | |||
var m = {parents:[ImageSource]}; | |||
m.canvas = canvas.new({ | |||
"name": "ImageSource-"~name, | |||
"size": [x, y], | |||
"view": [x, y], | |||
"mipmapping": 1 | |||
}); | |||
return m; | |||
}, | |||
del: func() { | |||
}, | |||
}; | |||
</syntaxhighlight> | |||
=== Screen === | |||
A Screen will merely be a placeholder for another Canvas referenced via canvas:// - so that arbitrary placements can be used to display a MFD screen. | |||
<syntaxhighlight lang="nasal"> | |||
var Screen = { | |||
new: func() { | |||
}, | |||
attach: func(source) { | |||
}, | |||
del: func() { | |||
}, | |||
}; | |||
</syntaxhighlight> | |||
=== ImageSourceSelector === | |||
A helper class to manage multiple image sources and hook them up to screens - i.e. for allowing MFDs to be shown on different screens. | |||
<syntaxhighlight lang="nasal"> | |||
</syntaxhighlight> | |||
== Screen Shots == | == Screen Shots == | ||
[[Category:Canvas]] | [[Category:Canvas]] | ||
[[Category:Farmin]] | [[Category:Farmin]] |