Project Farmin: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
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]]

Revision as of 02:06, 4 February 2015

FARMINLogo.png
Started in 01/2015
Description Canvas and MapStructure based Flight deck Framework (see: Canvas Animation Framework/Canvas MFD Framework)
Maintainer(s) www2
Contributor(s) www2
Status Early Prototyping for the FG1000 PFD
Folders $FG_ROOT/Aircraft/Instruments-3d/Farmin
Topic branches:
fgdata [1]

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.

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() {
 },
};

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.

var Screen = {
 new: func() {
 },
 attach: func(source) {
 },
 del: func() {
 },
};

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.

Screen Shots