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:
ENST Tutorial.
The second is a must have reference you should put in your bookmarks VRML reference:
Annotated VRML Book.
Yes. The console can be accessed using keys or touch screen shortcuts.
The console gives access to error messages from the player but also output from
your scripts using Browser.print ('mymessage');.
Press the three keys # * # or touch 4 times the upper-left corner of the screen to display it.
A black screen with green text should appear.
To navigate, just use the keypad or touch the screen near the borders.
To get some help press #.
You can hide the console pressing * or by touching the center of the screen.
This is because MeMo supposes an implicit Layer2D at the beginning of the cene and therefore an implicit 2D context.
Because there is no automatic background management (for optimization purposes).
Instead use a shape with a size identical to the screen one like in helloWorl.wrl.
Just here:
Just specify the name of the scene you want to include in the url field of an Inline (or Anchor) node like: Inline { url “subScene1.m4m” }
The compiler will automatically look for subScene1.wrl and will compile it. This is a recursive process and you can have as many levels of inclusion as you want.
Use InputSensor or KeySensor. They both use the same syntax: specify the key you want to sense in the URL field with the following meaning:
You can specify more than one char in the URL field.
when you want to change dynamically an image by script, you can call:
imageTexture.url[0] = imageTexture.url[1]; to assign image1.jpg as
the current texture to use.
This works like for images but for Inline or Anchor, just specify the scene name in the url field. If you do not want the Inline to be active from the beginning, just leave the first item blank (ex: Inline { url [ "" "scene1.m4m" ] }).
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 Inline nodes or by setting, in a script, the url field of a unique Inline.
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.
It is true that in this case the image or wrl names are not directly assigned to ImageTexture, Inline or Anchor. However, all String parameters to PROTO are automatically scanned for inclusion so everything is automatic for you.
By using an Anchor node with an empty ("") scene and "self" as parameter.
By listening to the url field of the Inline that referenced the suicided scene. In this case, the (parent) url field is modified to the value set by the (child) Anchor. This can be done by routing the url field to a script (ex: ROUTE INLINE.url TO SCRIPT.listenUrl)
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.
PNG, including translucent and GIF (but not animated).
By default a 2D context is opened, you can open another one (for clipping purposes by example) using Layer2D.
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).
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:
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"
There are the same than the up/down keys, defines with the KeySensor node.
However, mouse click events can be used thanks to the touchSensor node or the TouchCursor prototype.
It is limited to 5 digits ( 1 / 2^17 ). Math.floor(float f) could be useful to manipulate big values.
Modify your micro emulator setting during tests : Option > MIDlet network access
Check that JARs referenced in Windows > Preferences > Ant > Runtime and Windows > Preferences > Java > Installed JREs are the same. More info...
The Micro Emulator configuration file is available here:
Windows OS: C:\Documents and Settings\{user name}\.microemulator\config2.xml
Linux OS: /home/{user name}/.microemulator/config2.xml
Add these two lines on your Micro Emulator configuration file: