This repository was archived by the owner on Apr 24, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdevelopment_node_Inline.html
More file actions
169 lines (137 loc) · 5.93 KB
/
development_node_Inline.html
File metadata and controls
169 lines (137 loc) · 5.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Mobile Widgets</title>
<link rel="stylesheet" href="style/style.css" />
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
<script type="text/javascript" src="js/StructureElts.js"></script>
<script type="text/javascript" src="js/Structure.js"></script>
<script type="text/javascript" src="js/DocElements.js"></script>
</head>
<body>
<script type="text/javascript">
<!--
idCurrentPage = "development_node_Inline";
beginPage();
//-->
</script>
<h1 class="title">Inline node</h1>
<script type="text/javascript">
<!--
addIndex();
//-->
</script>
<script type="text/javascript">addTitle("Interface", 1);</script>
<textarea wrap="off" readonly="readonly" rows="5" cols="80">
Inline {
MFString url []
MFString languages []
MFString use []
}
</textarea>
<br/>
<script type="text/javascript">addTitle("Description", 1);</script>
<p>
Display an external scene as it was defined at this point of the scene graph.
</p>
<p>
At M4M creation time, each item that is a path to a local and valid VRML file
triggers the compilation and inclusion of the resulting M4M file. The process is
recursive.<br/>
If the child scene, through the use of an Anchor node, changed itself, the name
of this new scene (including empty string) is set as first item of the url field.
</p>
<p>
In addition, Inline gives you the opportunity to select a language pack for the
scene that is inlined. The underlying internationalisation mechanism is quite
simple. When you design your scene (thus resulting into an M4M file), you can
specify special strings for will act as "localized" string. It mostly consists
in a token enclosed by special chars. This token will be used at runtime to
check a litteral definition in language pack. For instance you will use
"@[hello:]" in a VRML file and you will be able to specify that this should be
replaced at runtime by "bonjour" if the mobile interface is in french. If you
want to reuse this localized string, just omit the colon (":") like that
"@[hello]". When compiling the vrml files, all the localize strings are
identified and stored in a file named "default.lang" and stored at the root
level of your inlined scene. Do not edit this file as it is automatically
generated but rather duplicate it and fill it in with your translation. This
files consists in a list of all tokens (e.g. "hello:"). In your duplicate, just
add the translation after the colon like this "hello:bonjour tout le monde". You
will probably name this duplicate file using the language it represents but
always keep the ".lang" extension. To use your own language pack, specify them
in the field named "languages". Each further compilation process will keep track
of the synchronization between your files and default.lang so you will always
have up to date language packs.
</p>
<p>
You can use this mechanism to localize images but they must be all referenced in
the url field of an ImageTexture.
</p>
<br/>
<script type="text/javascript">addTitle("Fields", 1);</script>
<p>
<b>MFString url []</b> :<br/>
Only the first item is loaded to be displayed at runtime.<br/>
Other items are checked to search for scenes to compile and include at compile time.<br/>
The first item of the <b>url</b> field can contain several different values:
</p>
<ul>
<li>a local file (eg scene.m4m).</li>
<li>an online M4M file (eg http://myserver/scene.m4m).</li>
<li>a cached M4M file (eg cache://scene.m4m).</li>
<li>a M4M file included in the JAR of the MeMo (eg. jar://scene.m4m).</li>
</ul>
<p class="note warning">
<b>Warning:</b><br/>
Only use <span class="highlight">M4M</span> files in URL.<br/>
Don't use <span class="highlight">WRL</span> files ( cause problems during the
final M4M file creation).
</p>
<p>
<b>MFString languages []</b> :<br/>
Couples of country code and language files to use. The lang file must be a copy of the generated default.lang. If the entires do not match, warnings are issued.<br/>
For Instance, to specify that you want to use french.lang when for a french phone and english.lang for an english phone
</p>
<textarea wrap="off" readonly="readonly" rows="4" cols="80">
languages [
"EN" "english.lang"
"FR" "french.lang"
]
</textarea>
<p>
<b>MFString use []</b> :<br/>
Give a full control over which language is used. The first string will probably be always "auto" to specify that you want to match the phone settings with one of the language packs defined. A second string gives the default language to use if the phone has been set in an unknown language (at least one that does not appear in "languages")
</p>
<textarea wrap="off" readonly="readonly" rows="1" cols="80">
use ["auto" "EN"]
</textarea>
<br/>
<script type="text/javascript">addTitle("Example", 1);</script>
<textarea wrap="off" readonly="readonly" rows="15" cols="80">
#VRML V2.0 utf8
# Will trigger the compilation and inclusion of a file called myLocalScene.wrl, at compile time.
# Will display the content of the myLocalScene.m4m file at runtime.
Inline { url "myLocalScene.m4m" }
# Will trigger the download and display of the myOnlineScene.m4m at runtime.
Inline { url "http://myserver/myOnlineSence.m4m" }
# Will trigger the download, caching and display of the myCachedScene.m4m at runtime.
Inline { url "cache://myCachedScene.m4m,http://myserver/myCachedScene.m4m" }
# Will load and display the scene from the JAR
Inline { url "jar://myScene.m4m" }
</textarea>
<br/>
<script type="text/javascript">
<!--
addBackPageNavigator('widgets_development_nodes_ref', '');
//-->
</script>
<script type="text/javascript">
<!--
endPage();
//-->
</script>
</body>
</html>