This repository has been 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
/
Copy pathfaq.html
436 lines (350 loc) · 13.6 KB
/
faq.html
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
<!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 = "faq";
beginPage();
//-->
</script>
<h1 class="title">faq</h1>
<script type="text/javascript">
<!--
addIndex();
//-->
</script>
<script type="text/javascript">addTitle("Internet", 1);</script>
<p>
There are a lot of documentation for VRML but not so much for MPEG-4. In addition to a
google search, the following site can be read first: Tutorial on MPEG-4 extensions:
<a href="http://gpac.sourceforge.net/tutorial/bifs_part1.htm">ENST Tutorial</a>.<br/>
The second is a must have reference you should put in your bookmarks VRML reference:
<a href="http://www.cs.vu.nl/~eliens/documents/vrml/reference/BOOK.HTM">Annotated VRML Book</a>.
</p>
<br/>
<script type="text/javascript">addTitle("General FAQ", 1);</script>
<!--
<h2>Why is M4M different from VRML or MPEG-4 and how do they differ ?</h2>
<p>
The format used by MeMo is very close to BIFS from MPEG-4, which includes VRML and
add new functionalities. An M4M file is more or less a container that includes binarised
VRML descriptions or protos, images and compiled scripts, all together.
</p>
<p class="note warning">
<b>Warning:</b><br/>
ENST, in the tutorial above, uses .bt as extension instead of wrl.
</p>
<br/>
-->
<!--
<h2>Why does the compiler complain about missing cygwin1.dll</h2>
<p>
because it has been compiled in this environment. Just copy the Cygwin1.dll provided in
the package along with compiler.exe
</p>
<br/>
-->
<!--
<h2>how can I get rid of post copying the M4M file after compilation ?</h2>
<p>
Just use the "-o directory" option of the compiler like in:<br/>
<b>./compiler -o C:\SonyEricsson\JavaME_SDK_CLDC\PC_Emulation\WTK2\appdb\SonyEricsson_JP7_176x220_Emu\filesystem\e%3A helloWorld.wrl</b>
</p>
<br/>
-->
<h2>Is there a console?</h2>
<p>
Yes. The console can be accessed using keys or touch screen shortcuts.<br/>
The console gives access to error messages from the player but also output from
your scripts using <b><a href="javascript_Browser.html">Browser</a>.print ('mymessage');</b>.
</p>
<p>
Press the three keys <b># * #</b> or touch 4 times the upper-left corner of the screen to display it.<br/>
A black screen with green text should appear.<br/>
To navigate, just use the keypad or touch the screen near the borders.<br/>
To get some help press <b>#</b>.<br/>
You can hide the console pressing <b>*</b> or by touching the center of the screen.<br/>
</p>
<br/>
<script type="text/javascript">addTitle("Content Creation FAQ", 1);</script>
<h2>Why cannot I see any pure VRML examples</h2>
<p>
This is because MeMo supposes an implicit
<a href="development_node_Layer2D.html">Layer2D</a> at the beginning of the
cene and therefore an implicit 2D context.<!-- [TODO Not display 3D part]To open a 3D context, enclose your
VRML source with a <a href="development_node_Layer3D.html">Layer3D</a> like below:
</p>
<textarea rows="5" cols="80" readonly="readonly" wrap="off">
Layer3D {
size 120 120
children[
<VRML SOURCE>
]
}
</textarea>
<br/>-->
<h2>Why doesn't the background refresh?</h2>
<p>
Because there is no automatic background management (for optimization purposes).<br/>
Instead use a shape with a size identical to the screen one like in <b>helloWorl.wrl</b>.
</p>
<br/>
<h2>Where can I find helloWorld.wrl and what does it do?</h2>
<p>
Just here:
</p>
<textarea rows="5" cols="80" readonly="readonly" wrap="off">
# by default, a Layer2D is used with a size identical to the screen one
Group { # will group two shapes at the same level
children [
Shape { # this shape will act as a background
appearance Appearance {
material Material2D { emissiveColor 0 0 0 } # draw in black
}
geometry Rectangle { size 240 320 } # a rectangle that covers the
# whole screen
}
Shape {
appearance Appearance {
material Material2D { emissiveColor 1 1 1 } # draw in white
}
geometry Text { # a simple string
string "Hello World"
}
}
]
}
</textarea>
<br/>
<h2>How do I include a sub scene?</h2>
<p>
Just specify the name of the scene you want to include in the url field of an
<a href="development_node_Inline.html">Inline</a> (or
<a href="development_node_Anchor.html">Anchor</a>) node like: Inline { url “subScene1.m4m” }
</p>
<p>
The compiler will automatically look for <b>subScene1.wrl</b> and will compile
it. This is a recursive process and you can have as many levels of inclusion as
you want.
</p>
<br/>
<!--
<h2>What is the difference between Transform and Transform2D?</h2>
<p>
<a href="development_node_Transform.html">Transform</a> works in a 3D space
(behind a <a href="development_node_Layer3D.html">Layer3D</a>) and
<a href="development_node_Transform2D.html">Transform2D</a> in a 2D space
(behing a <a href="development_node_Layer2D.html">Layer2D</a>).
</p>
<br/>
-->
<h2>How to get the keys from the keyboard?</h2>
<p>
Use <a href="development_node_InputSensor.html">InputSensor</a> or
<a href="development_node_KeySensor.html">KeySensor</a>. They both use the same
syntax: specify the key you want to sense in the URL field with the following meaning:
</p>
<ul>
<li>'A': left soft key</li>
<li>'B': right soft key</li>
<li>'E': Enter of fire key</li>
<li>'U': Up directional key</li>
<li>'D': Down directional key</li>
<li>'L': Left directional key</li>
<li>'R': Right directional key</li>
<li>'0', '1', '2', ... '9', '*', '#' : the corresponding keys</li>
</ul>
<p>
You can specify more than one char in the URL field.
</p>
<br/>
<h2>Ok, I know how to force inclusion of an image, but what is it for?</h2>
<p>
when you want to change dynamically an image by script, you can call:<br/>
<b>imageTexture.url[0] = imageTexture.url[1];</b> to assign <b>image1.jpg</b> as
the current texture to use.
</p>
<br/>
<h2>how to force inclusion of a M4M scene for further use?</h2>
<p>
This works like for images but for <a href="development_node_Inline.html">Inline</a>
or <a href="development_node_Anchor.html">Anchor</a>, just specify the scene
name in the url field. If you do not want the <a href="development_node_Inline.html">Inline</a>
to be active from the beginning, just leave the first item blank (ex: <b>Inline { url [ "" "scene1.m4m" ] }</b>).
</p>
<br/>
<h2>What are the benefits to use included M4M scenes?</h2>
<p>
You can split a big application in several sub scenes to save memory and creation time.
This may be mandatory if you use a lot of images. This can be done using a big Switch
containing a lot of <a href="development_node_Inline.html">Inline</a> nodes
or by setting, in a script, the url field of a unique <a href="development_node_Inline.html">Inline</a>.
</p>
<br/>
<h2>Why are PROTO reducing code size?</h2>
<p>
It is first because it uses less lines to call a PROTO than re-defining the code itself and
also because PROTO definition are included only once even if you reuse the PROTO in
multiple sub-scenes.
</p>
<br/>
<h2>How do I include sub-scenes and images when they are PROTO parameters?</h2>
<p>
It is true that in this case the image or wrl names are not directly assigned to
ImageTexture, <a href="development_node_Inline.html">Inline</a> or
<a href="development_node_Anchor.html">Anchor</a>. However, all String
parameters to PROTO are automatically scanned for inclusion so everything is
automatic for you.
</p>
<br/>
<h2>How can a sub-scene kill itself (and thus free resources)?</h2>
<p>
By using an <a href="development_node_Anchor.html">Anchor</a> node with an
empty ("") scene and "self" as parameter.
</p>
<br/>
<h2>How can a parent scene know that a scene just suicided?</h2>
<p>
By listening to the url field of the <a href="development_node_Inline.html">Inline</a>
that referenced the suicided scene. In this case, the (parent) <b>url</b> field
is modified to the value set by the (child)
<a href="development_node_Anchor.html">Anchor</a>. This can be done by
routing the url field to a script (ex: <b>ROUTE INLINE.url TO SCRIPT.listenUrl</b>)
</p>
<br/>
<h2>What is exactly the memory used by an image?</h2>
<p>
This size may vary upon the way the image is used. First, the encoded version of the
image is stored inside the M4M. Then when an image is used it is expanded in video
memory and the memory needed is width*height*4 bytes. This may be much more than
the encoded image. Further, in 2D mode, if you scale or rotate the image a copy of the
image is created to store the modified pixels.
</p>
<br/>
<h2>What are the supported formats for images?</h2>
<p>
PNG, including translucent and GIF (but not animated).
</p>
<br/>
<h2>How to open a 2D context for rendering 2D Nodes?</h2>
<p>
By default a 2D context is opened, you can open another one (for clipping purposes by
example) using <a href="development_node_Layer2D.html">Layer2D</a>.
</p>
<br/>
<!--
<h2>How to open a 3D context for rendering 3D Nodes?</h2>
<p>
You must explicitly use a <a href="development_node_Layer3D.html">Layer3D</a>.
</p>
<br/>
-->
<!--
<h2>How to include a VRML scene generated by an exported (i.e. 3DS Max)?</h2>
<p>
Just set the name of the file in an <a href="development_node_Inline.html">Inline</a>
node inside a <a href="development_node_Layer3D.html">Layer3D</a>.
</p>
<textarea rows="5" cols="80" readonly="readonly" wrap="off">
Layer3D { # Opens a 3D context
children [
Inline { # Includes an external 3D scenes
url "3DScene.m4m"
}
]
}
</textarea>
<br/>
-->
<h2>What are the main restriction of the <a href="development_node_Script.html">Script</a> node?</h2>
<p>
First the number of fields (and thus functions) is limited to 250. Further, the script
functions are compiled during the M4M creation process. The biggest limitation is that, for
efficiency reasons, you cannot use on the fly discovery of fields, everything must be
resolved at compile time. This means that you cannot directly iterate through an array
Nodes (see trick below).
</p>
<br/>
<h2>How to iterate through an MFNode?</h2>
<p>
This can be done only when all nodes inside the MFnode have the same type that is
known at compile time. The trick is to use an SFNode set to the target type and set this
SFNode to be an element of the MFNode:
</p>
<textarea rows="5" cols="80" readonly="readonly" wrap="off">
field MFNode array [ USE MATERIAL0 USE MATERIAL1 USE MATERIAL2 ]
field SFNode elem USE MATERIAL0
...
# set the red component value to 1 for all elements of array
for (var i = 0; i < array.length; i++) {
elem = array[i]; # elem must be set to an element of the same initial type
elem.emissiveColor.r = 1;
}
</textarea>
<br/>
<h2>How do I specify quote or double quotes in a script?</h2>
<p>
This is a trap because the string is evaluated twice: one at the VRML level and one at
the javascript level, so you have to double-backslash your quote like this: "a \\\' b" is first
evaluated to "a \' b" and passed to the javascript compiler that evaluate it in "a ' b"
</p>
<br/>
<h2>When I using the emulator, what's describes the mouse's wheel actions?</h2>
<p>
There are the same than the up/down keys, defines with the KeySensor node.<br/>
However, mouse click events can be used thanks to the touchSensor node or the TouchCursor prototype.
</p>
<br/>
<h2>What is the floating point?</h2>
<p>
It is limited to 5 digits ( 1 / 2^17 ). Math.floor(float f) could be useful to manipulate big values.
</p>
<br/>
<h2>How can I test my widget offline?</h2>
<p>
Modify your micro emulator setting during tests : Option > MIDlet network access
</p>
<br/>
<script type="text/javascript">addTitle(" Eclipse Plugin FAQ", 1);</script>
<h2>What is "Error starting modern compiler"?</h2>
<p>
Check that JARs referenced in <b>Windows > Preferences > Ant > Runtime
and Windows > Preferences > Java > Installed JREs</b> are the same.
<a href="http://www.pitr.net/index.php/2006/12/17/error-starting-modern-compiler/">More info...</a>
</p>
<br/>
<h2>How can I configure proxy settings for the micro emulator</h2>
<p>
The Micro Emulator configuration file is available here:<br/>
Windows OS: C:\Documents and Settings\{user name}\.microemulator\config2.xml<br/>
Linux OS: /home/{user name}/.microemulator/config2.xml<br/>
Add these two lines on your Micro Emulator configuration file:
</p>
<textarea rows="2" cols="80" readonly="readonly" wrap="off">
<system-property VALUE="{your proxy host}" NAME="http.proxyHost"/>
<system-property VALUE="{your proxy name}" NAME="http.proxyPort"/>
</textarea>
<br/>
<script type="text/javascript">
<!--
addBackPageNavigator ('deployment', '');
//-->
</script>
<script type="text/javascript">
<!--
endPage();
//-->
</script>
</body>
</html>