#VRML V2.0 utf8 WorldInfo { title "Mirror Image" info [ "2001/1/23 by GoGoGo" "http://www1.plala.or.jp/Studio_GoGoGo/" ] } NavigationInfo {type "EXAMINE" headlight FALSE} Viewpoint {description "front"} DirectionalLight {direction 1 0 -1} DirectionalLight {direction -1 0 -1} DirectionalLight {direction 0 1 -1} DirectionalLight {direction 0 -1 -1} #PROTO オブジェ PROTO Obj [ exposedField MFVec3f point [ 0 -1 2, 2 -1 0, 0 -0.5 1, 0 0.5 1, 3 2 0, 0 0.5 -1 ] exposedField MFRotation keyValueOI [ 0 1 0 0, 0 1 0 2, 0 1 0 4, -1 1 0 1, 1 -1 0 3, 0 1 0 0 ] field SFBool ccw TRUE ] { DEF obj Transform { children [ Shape { appearance Appearance { material Material { diffuseColor 1 1 1 specularColor 1 1 1 transparency 0.2 shininess 0.4 } } geometry IndexedFaceSet { coord Coordinate {point IS point} coordIndex [ 0 4 3 -1 0 1 4 -1 1 5 4 -1 1 2 5 -1 2 0 3 5 -1 2 1 0 -1 3 4 5 -1 ] color Color { color [0 1 1, 0 0 1, 1 0 1, 0 1 1, 0 1 0, 1 0 1] } ccw IS ccw } } ] } DEF OI OrientationInterpolator { key [0 0.2 0.4 0.6 0.8 1] keyValue IS keyValueOI } DEF TIMER TimeSensor {cycleInterval 6 loop TRUE} ROUTE TIMER.fraction_changed TO OI.set_fraction ROUTE OI.value_changed TO obj.set_rotation } #右オブジェ Obj {} #左オブジェ DEF objL Obj {ccw FALSE} #左オブジェのX座標と回転方向を正負反転するスクリプト Script { field SFNode objL USE objL directOutput TRUE url "javascript: function initialize() { for(i=0;i