Hi fellow wiki editors!

To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).

I have tried to keep the template short, but meaningful. /Johan G

Changes

Jump to: navigation, search

Howto:Canvas View Camera Element

6 bytes added, 16:24, 2 September 2017
Implementation details / for the reviewer
<syntaxhighlight lang="nasal">
var (width,height) = (512,512);
var ELEMENT_NAME = "viewcameraviewcam";
var display_view = func(view=0) {
var title = 'Canvas test:' ~ ELEMENT_NAME;
var window = canvas.Window.new([width,height],"dialog").set('title',title);
var child = root.createChild( ELEMENT_NAME );
# child.set("view-number", view);
} # display_view()
var totalViews = props.getNode("sim").getChildren("view");
print(size(totalViews));
display_view(view: 3);
var totalViews = props.getNode("sim").getChildren("view");forindex(var v;totalViews) { display_view(view: v);}</syntaxhighlight>
Aircraft developers can use the new Canvas '''view''' element simply by using the conventional approach to replace a static texture with a Canvas using a cockpit placement.
18,252
edits

Navigation menu