DEF-USE

Nathan J. Strange ([email protected])
Thu, 1 Jun 95 18:27:20 EST


I was thinking about how DEF-USE cannot span files

And I decided that more than anything I would really really like
to se something like the following in VRML1.1:

USE {name "url"} BOB

Would say if BOB is not defined then use the URL in name to do the following:

DEF BOB WWWInline {name "url"}
USE BOB

Also I'd like a scheme to referance the child nodes of a named node
so I could say:

DEF BOB Separator {
NAME mat Material { emmissiveColor 0.3 0.3 0.1}
Cone { height .4 bottomradius .2} }
USE BOB
ALT BOB.mat Material {emmissiveColor 0.4 0.4 0.7}
USE BOB

Where NAME would label the child node, but still exicute it
and ALT would replace the child node labled "mat" in BOB with
the node that followed

The syntax exactly as I proposed isn't probably the best solution
to this problem, But I think I would be very advantaeous to have
.wrl files containing a general description of an object say a "car"
and I could use the same file over and over again to make red cars
and blue cars, and cars with gold bummpers, and cars with steel
bumpers, etc.. It would also save bandwidth becaus a smart
browser could keep the same definition hanging around and modify it
over and over without having to download new versions....

In short, my wishes for VRML 1.1

-Some sort of DEF-USE or a replacement for DEF-USE that will span files

-The ability to alter a node, changing its children, deleting children
or adding children at certain spots....