PDA

View Full Version : database Image element



Feuermelder
October 29th, 2007, 17:55
I have been playing around with RealityServer for a coupla days and came upon a few difficulties where I simply could not find any solutions for...

Especially when dynamically adding image files for textures I cannot find a solution why the realityserver.exe is always dying on me.

I e.g. tried to change a file property (based on reality server tutorial cube 4) with the help of the JavaScript API:

db["file2:tex"].image.file = "myFile.jpg"

And realityserver died...

Further by creating a new element and trying to add a file, it simply dies:

db.create("Image", "myImage");
db["myImage"].file = "myFile.jpg"

and realityserver died again...

I obviously must have missed something...

Can anybody, who knows more about the Server or the .mi Syntax help me, how I can change the texture with a dynamically added picture. Or why those statements written above kill the realityserver...

Help is very much appreciated...

Feuermelder

ak
October 31st, 2007, 10:15
Sorry for the delay.
Could you please tell us which RealityServer version you were using when this behavior appeared?

Feuermelder
October 31st, 2007, 12:24
I have been using:

RealityServer® 2.0 Developer Edition

Thanks

ak
October 31st, 2007, 13:39
Hello,

For RealityServer® 2.0 Developer Edition we can make the following statements:



I e.g. tried to change a file property (based on reality server tutorial cube 4) with the help of the JavaScript API:
db["file2:tex"].image.file = "myFile.jpg"

As described in the user's guide (see folder 'doc' in the distribution), the texture filename is set with the property 'fileTextureName ' and not 'file':
"You access textures from the db property tree of the RealityServer JavaScript API as follows:
db["file1"].fileTextureName = db["file2:tex"];"



And realityserver died...

Dying is always a bad behavior and should not happen even when you try to access not supported properties ... :(

There will be a new RealityServer® Developer Edition very soon, where the dynamic content modification has been improved.

Feuermelder
October 31st, 2007, 13:58
Thank you, Ill give that a try...