#VRML V2.0 utf8 #Prototype of cpu. PROTO CPU [ exposedField SFInt32 state 1 exposedField SFVec3f translation 0 0 0 ] { EXTERNPROTO GLASS[] "glass.wrl" EXTERNPROTO BEAD[field SFColor color] "bead.wrl" Transform { translation IS translation children [ Shape { geometry Box { size 1 1 0.5 } appearance Appearance { material GLASS {} } } Switch { whichChoice IS state choice [ Shape { geometry Box { size 0.6 0.4 0.2 } appearance Appearance { material BEAD {color 0 1 0 } } } Shape { geometry Box { size 0.6 0.4 0.2 } appearance Appearance { material BEAD {color 1 0 0 } } } ] } ] } } CPU { state 0 translation 0 0 1 } CPU { state 1 translation 0 1 0 }