anim_center_0.wrl source
#VRML V2.0 utf8

EXTERNPROTO PositionInterpolator2D [
eventIn SFFloat set_fraction
exposedField MFFloat key
exposedField MFVec2f keyValue
eventOut SFVec2f value_changed
] "proto_pi2d.wrl"

Viewpoint {
position -5 0 5
orientation 0 -1 0 0.78
description "initial"
}

NavigationInfo {
type "EXAMINE"
}

# 背景
Background {
skyColor 1 1 1
}

# 箱
Shape {
appearance Appearance {
material Material {}
texture ImageTexture {
url "map.gif"
repeatS FALSE
repeatT FALSE
}
textureTransform DEF TT TextureTransform {}
}
geometry Box {}
}

# タイムセンサー
DEF TiS TimeSensor {
cycleInterval 25
loop TRUE
}

# 回転アニメーション
DEF SI ScalarInterpolator {
key [ 0.0 0.25 0.5 0.75 1.0 ]
keyValue [ 0.0 1.5708 3.1416 4.7124 6.2832 ]
}

# 中心移動アニメーション
DEF PI2D PositionInterpolator2D {
key [ 0.0 0.25 0.5 0.75 1.0 ]
keyValue [
-0.5 -0.9
-0.1 -0.5
-0.5 -0.9
-0.9 -0.5
-0.5 -0.9
]
}

ROUTE TiS.fraction_changed TO SI.set_fraction
ROUTE SI.value_changed TO TT.rotation
ROUTE TiS.fraction_changed TO PI2D.set_fraction
ROUTE PI2D.value_changed TO TT.center