#VRML V2.0 utf8
#折り鶴
WorldInfo {
    title "Origami1"
    info ["99/9/20 by GoGoGo,
        http://www1.plala.or.jp/Studio_GoGoGo/"]
}
#99/12/14 Ver1.1 "Start, Again?" を常に正面に。その他細々とした調整
#ナビゲーション設定
NavigationInfo {
    avatarSize [0.25, 1.65, 0.6]
    headlight FALSE
    type ["EXAMINE","WALK"]
    speed 2.5
}

#視点設定
Transform {
    children [
        DEF VP1 Viewpoint {
            fieldOfView 1
            position 0 0 6.5
            description "front view"
        }
    ]
}
Transform {
    translation 0 0 6.5
    children [
        DEF VP2-1 Transform {
            translation 0 0 6.5
            children [
                DEF VP2-2 Viewpoint {
                    fieldOfView 1
                    position 0 0 6.5
                    description "circling"
                }
                #フォグ設定
                DEF setFog Fog {
                    color 0 0 0
                    fogType "LINEAR"
                    visibilityRange 60
                }
            ]
        }
    ]
}
DEF InitializeScript Script{
    eventOut SFBool set_bind
    url "javascript:
    function initialize(){
        set_bind=FALSE;
    }"
}
ROUTE InitializeScript.set_bind TO setFog.set_bind

Viewpoint {
    fieldOfView 1
    position 0 2.487 6.005
    orientation 1 0 0 -0.3925
    description "bird's-eye1"
}
Viewpoint {
    fieldOfView 1
    position 0 4.596 4.596
    orientation 1 0 0 -0.785
    description "bird's-eye2"
}
Viewpoint {
    fieldOfView 1
    position 0 6.005 2.487
    orientation 1 0 0 -1.1775
    description "bird's-eye3"
}
Viewpoint {
    fieldOfView 1
    position 0 6.5 0
    orientation 1 0 0 -1.57
    description "top view"
}

#光源設定
DirectionalLight {#左前より
    color 0.3 1 0.3
    direction 1 0 -1
    intensity 1
}
DirectionalLight {#右前より
    color 0.3 0.3 1
    direction -1 0 -1
    intensity 1
}
DirectionalLight {#左後より
    color 1 0 1
    direction 1 0 1
    intensity 0.8
}
DirectionalLight {#右後より
    color 0 1 1
    direction -1 0 1
    intensity 0.8
}
DirectionalLight {#上方より
    color 1 0 0
    direction 0 -1 0
    intensity 1
}
DirectionalLight {#下方より
    color 1 1 0
    direction 0 1 0
    intensity 1
}

#折り紙A###################################################################
DEF oriduruA Transform {
    translation 0 -2.5 0
    scale 3 3 3
    children [
        Shape {
            appearance Appearance {
                material DEF oriduruMaterialA Material {
                    diffuseColor 1 1 1
                    transparency 0.3
                }
            }
            geometry IndexedFaceSet {
                coord DEF paperPointA Coordinate {
                    point [
                        -1 0 1,
                        0 0 1,
                        1 0 1,
                        1 0 0,
                        1 0 -1,
                        0 0 -1,
                        -1 0 -1,
                        -1 0 0,
                        0 0 0,

                        0 0 0.5858,
                        0.5858 0 0,
                        0 0 -0.5858
                        -0.5858 0 0,

                        -0.2929 0 0.2929,
                        0.2929 0 0.2929,
                        0.2929 0 -0.2929,
                        -0.2929 0 -0.2929,
                    ]
                }
                coordIndex [
                    0, 1, 9, -1,
                    0, 9, 13, -1,
                    0, 13, 12, -1,
                    0, 12, 7, -1,
                    8, 12, 13, -1,
                    8, 13, 9, -1,

                    2, 9, 1, -1,
                    2, 14, 9, -1,
                    2, 10, 14, -1,
                    2, 3, 10, -1,
                    8, 9, 14, -1,
                    8, 14, 10, -1,

                    4, 10, 3, -1,
                    4, 15, 10, -1,
                    4, 11, 15, -1,
                    4, 5, 11, -1,
                    8, 10, 15, -1,
                    8, 15, 11, -1,

                    6, 11, 5, -1,
                    6, 16, 11, -1,
                    6, 12, 16, -1,
                    6, 7, 12, -1,
                    8, 11, 16, -1,
                    8, 16, 12, -1,
                ]
                solid FALSE
            }
        }
    ]
}

#折り紙B###################################################################
DEF oriduruB Transform {
    translation 0 -3 0
    scale 0.001 0.001 0.001
    children [
        Shape {
            appearance Appearance {
                material DEF oriduruMaterialB Material {
                    diffuseColor 1 1 1
                    transparency 1
                }
            }
            geometry IndexedFaceSet {
                coord DEF paperPointB Coordinate {
                    point [
                        -0.01 0 0,#0
                        0 1 0.01,
                        0 2 0.01,
                        0 1 0.01,
                        0.01 0 0,
                        0 1 -0.01,
                        0 2 -0.01,
                        0 1 -0.01,
                        0 1.4142 0,#8

                        -0.4142 1 0.007,#9
                        0.4142 1 0.007,#10
                        0.4142 1 -0.007,#11
                        -0.4142 1 -0.007,#12

                        -0.2688 1.3511 0.008, #13
                        0.2688 1.3511 0.008, #14
                        0.2688 1.3511 -0.008, #15
                        -0.2688 1.3511 -0.008, #16

                        -0.2346 1.1796 0, #17
                        0.2346 1.1796 0, #18
                        -0.1951 1 0, #19
                        0.1951 1 0, #20
                    ]
                }
                coordIndex [
                    0 13 9 -1,
                    0 1 2 13 -1,
                    4 14 2 3 -1,
                    4 10 14 -1,
                    4 15 11 -1,
                    4 5 6 15 -1,
                    0 16 6 7 -1,
                    0 12 16 -1,
                    8 17 19 20 18 -1
                ]
                solid FALSE
            }
        }
    ]
}

#折り紙C###################################################################
DEF ScaleChange Transform {
    children [
        DEF oriduruC Transform {
            translation 0 -3 0
            scale 0.001 0.001 0.001
            children [
                Shape {
                    appearance Appearance {
                        material DEF oriduruMaterialC Material {
                            diffuseColor 1 1 1
                            transparency 1
                        }
                    }
                    geometry IndexedFaceSet {
                        coord DEF paperPointC Coordinate {
                            point [
                                -0.01 0 0, #0
                                0.01 0 0, #1
                                0 1 0, #2
                                0 2 0.01, #3
                                0 2 -0.01, #4
                                0 1.4142 0, #5

                                -0.2688 1.3511 0.01, #6
                                0.2688 1.3511 0.01, #7
                                0.2688 1.3511 -0.01, #8
                                -0.2688 1.3511 -0.01, #9

                                -0.2346 1.1796 0.01, #10
                                0 1.1796 0.01, #11
                                0.2346 1.1796 0.01, #12
                                0.2346 1.1796 -0.01, #13
                                0 1.1796 -0.01, #14
                                -0.2346 1.1796 -0.01, #15

                                -0.184 0.924 0.01, #16
                                0.184 0.924 0.01, #17
                                0.184 0.924 -0.01, #18
                                -0.184 0.924 -0.01, #19

                                -0.01 1.3 0, #20
                                0.01 1.3 0, #21

                                0.01 0.3 0, #22
                                0.05 0.2498 0.01, #23
                                0.05 0.2498 -0.01, #24
                            ]
                        }
                        coordIndex [
                            0 2 16 -1,
                            1 22 23 -1,
                            22 2 17 23 -1,
                            1 22 24 -1,
                            22 2 18 24 -1,
                            0 2 19 -1,

                            2 11 10 16 -1,
                            2 11 12 17 -1,
                            2 14 13 18 -1,
                            2 14 15 19 -1,

                            11 3 6 10 -1,
                            11 3 7 12 -1,
                            14 4 8 13 -1,
                            14 4 9 15 -1,

                            11 5 10 -1,
                            11 5 12 -1,
                            14 5 13 -1,
                            14 5 15 -1,

                            2 10 20 -1,
                            2 12 21 -1,
                            2 13 21 -1,
                            2 15 20 -1,
                            20 10 5 -1,
                            21 12 5 -1,
                            21 13 5 -1,
                            20 15 5 -1,
                        ]
                        solid FALSE
                    }
                }
            ]
        }
    ]
}
#折り紙D###################################################################
DEF oriduruD Transform {
    translation 0 -4 0
    scale 0.001 0.001 0.001
    children [
        Shape {
            appearance Appearance {
                material DEF oriduruMaterialD Material {
                    diffuseColor 1 1 1
                    transparency 1
                    emissiveColor 0.2 0.2 0.2
                }
            }
            geometry IndexedFaceSet {
                coord DEF paperPointD Coordinate {
                    point [
                        -0.7071 1.7071 0, #0
                        0.7071 1.2828 0, #1
                        0 1 0, #2
                        0 1.494 0.908, #3
                        0 1.494 -0.908, #4
                        0 1.35 0, #5

                        -0.2688 1.2456 0.3084, #6
                        0.2688 1.2456 0.3084, #7
                        0.2688 1.2456 -0.3084, #8
                        -0.2688 1.2456 -0.3084, #9

                        -0.2346 1.1796 0.15, #10
                        0 1.1796 0.15, #11
                        0.2346 1.1796 0.15, #12
                        0.2346 1.1796 -0.15, #13
                        0 1.1796 -0.15, #14
                        -0.2346 1.1796 -0.15, #15

                        -0.184 0.924 0.07, #16
                        0.184 0.924 0.07, #17
                        0.184 0.924 -0.07, #18
                        -0.184 0.924 -0.07, #19

                        -0.12 1.29 0, #20
                        0.12 1.29 0, #21

                        0.495 1.495 0, #22
                        0.545 1.495 0.01 #23
                        0.545 1.495 -0.01 #24
                    ]
                }
                coordIndex [
                    0 2 16 -1,
                    1 22 23 -1,
                    22 2 17 23 -1,
                    1 22 24 -1,
                    22 2 18 24 -1,
                    0 2 19 -1,

                    2 11 10 16 -1,
                    2 11 12 17 -1,
                    2 14 13 18 -1,
                    2 14 15 19 -1,

                    3 6 10 12 7 -1,
                    4 8 13 15 9 -1,

                    5 10 12 -1,
                    5 13 15 -1,

                    2 10 20 -1,
                    2 12 21 -1,
                    2 13 21 -1,
                    2 15 20 -1,
                    20 10 5 -1,
                    21 12 5 -1,
                    21 13 5 -1,
                    20 15 5 -1,
                ]
                solid FALSE
                creaseAngle 45
            }
        }
    ]
}

#スタート文################################################################
#コンソール化
Transform {
    children [
        DEF ps_console ProximitySensor {
        center 0 0 0
        size 500 100 500
        }
        DEF console Transform {
            children [
                Transform {
                    translation 0 0 -6.5
                    children [
                        DEF words Transform {
                            translation 0 1 0.1
                            children [
                                DEF TSstart TouchSensor {
                                }
                                Shape {
                                    appearance Appearance {
                                        material Material {
                                            transparency 1
                                        }
                                    }
                                    geometry IndexedFaceSet {
                                        coord Coordinate {
                                            point [
                                                -1.5 -0.2 0.001,
                                                1.5 -0.2 0.001,
                                                1.5 0.6 0.001,
                                                -1.5 0.6 0.001,
                                                -1.5 -0.2 -0.001,
                                                1.5 -0.2 -0.001,
                                                1.5 0.6 -0.001,
                                                -1.5 0.6 -0.001
                                            ]
                                        }
                                        coordIndex [0 1 2 3 -1 7 6 5 4 -1]
                                    }
                                }
                                DEF SW Switch {
                                    whichChoice 0
                                    choice [
                                        Shape {
                                            appearance Appearance {
                                                material Material {
                                                    diffuseColor 1 1 1
                                                }
                                            }
                                            geometry Text {
                                                string ["Start"]
                                                fontStyle FontStyle {
                                                    family "Comic Sans MS"
                                                    justify "MIDDLE"
                                                    size 1
                                                }
                                            }
                                        }
                                    ]
                                }
                            ]
                        }
                        #再スタート文
                        Transform {
                            translation 0 1 0
                            children [
                                Shape {
                                    appearance Appearance {
                                        material DEF words2 Material {
                                            diffuseColor 1 1 1
                                            transparency 1
                                        }
                                    }
                                    geometry Text {
                                        string ["Again?"]
                                        fontStyle FontStyle {
                                            family "Comic Sans MS"
                                            justify "MIDDLE"
                                            size 0.5
                                        }
                                    }
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    ]
}

ROUTE ps_console.position_changed TO console.set_translation
ROUTE ps_console.orientation_changed TO console.set_rotation

DEF vanishWordsScript Script {
    eventIn SFBool isActive
    eventOut SFInt32 whichChoice
    url "javascript:
    function isActive(value) {
        whichChoice = -1;
    }"
}
ROUTE TSstart.isActive TO vanishWordsScript.isActive
ROUTE vanishWordsScript.whichChoice TO SW.set_whichChoice

#モーフィング設定A#########################################################
DEF morphTIMER1 TimeSensor {
    cycleInterval 25
}

DEF CIpaper1 CoordinateInterpolator {
    key [0.0 0.2 0.3 0.475 0.65 0.825 1.0]
    keyValue [
        #基本形
        -1 0 1,
        0 0 1,
        1 0 1,
        1 0 0,
        1 0 -1,
        0 0 -1,
        -1 0 -1,
        -1 0 0,
        0 0 0,

        0 0 0.5858,
        0.5858 0 0,
        0 0 -0.5858
        -0.5858 0 0,

        -0.2929 0 0.2929,
        0.2929 0 0.2929,
        0.2929 0 -0.2929,
        -0.2929 0 -0.2929,

        #ステップ1-1/2
        -0.01 0 0.01,
        0 0.7071 0.7071,
        0.01 0 0.01,
        0.7071 0.7071 0,
        0.01 0 -0.01,
        0 0.7071 -0.7071,
        -0.01 0 -0.01,
        -0.7071 0.7071 0,
        0 1.4142 0,

        0 1 0.4142,
        0.4142 1 0,
        0 1 -0.4142
        -0.4142 1 0,

        -0.003 1 0.003,
        0.003 1 0.003,
        0.003 1 -0.003,
        -0.003 1 -0.003,

        #ステップ1-2/2
        -0.01 0 0,
        -0.7071 0.7071 0.01,
        0 0 0.01,
        0.7071 0.7071 0.01,
        0.01 0 0,
        0.7071 0.7071 -0.01,
        0 0 -0.01,
        -0.7071 0.7071 -0.01,
        0 1.4142 0,

        -0.4142 1 0.007,
        0.4142 1 0.007,
        0.4142 1 -0.007
        -0.4142 1 -0.007,

        -0.003 1 0,
        0 1 0.003,
        0.003 1 0,
        0 1 -0.003,


        #ステップ2-1/4
        -0.01 0 0,
        -0.4142 0.8536 0.4142,
        0 1 1,
        0.4142 0.8536 0.4142,
        0.01 0 0,
        0.7071 0.7071 -0.01,
        0 0 -0.01,
        -0.7071 0.7071 -0.01,
        0 1.4142 0,

        -0.4142 1 0.007,
        0.4142 1 0.007,
        0.4142 1 -0.007
        -0.4142 1 -0.007,

        -0.003 1 0,
        0 1 0.003,
        0.003 1 0,
        0 1 -0.003,

        #ステップ2-2/4
        -0.01 0 0,
        0 1 0.01,
        0 2 0.01,
        0 1 0.01,
        0.01 0 0,
        0.7071 0.7071 -0.01,
        0 0 -0.01,
        -0.7071 0.7071 -0.01,
        0 1.4142 0,

        -0.4142 1 0.007,
        0.4142 1 0.007,
        0.4142 1 -0.007
        -0.4142 1 -0.007,

        -0.003 1 0,
        0 1 0.003,
        0.003 1 0,
        0 1 -0.003,

        #ステップ2-3/4
        -0.01 0 0,
        0 1 0.01,
        0 2 0.01,
        0 1 0.01,
        0.01 0 0,
        0.4142 0.8536 -0.4142,
        0 1 -1,
        -0.4142 0.8536 -0.4142,
        0 1.4142 0,

        -0.4142 1 0.007,
        0.4142 1 0.007,
        0.4142 1 -0.007
        -0.4142 1 -0.007,

        -0.003 1 0,
        0 1 0.003,
        0.003 1 0,
        0 1 -0.003,

        #ステップ2-4/4
        -0.01 0 0,
        0 1 0.01,
        0 2 0.01,
        0 1 0.01,
        0.01 0 0,
        0 1 -0.01,
        0 2 -0.01,
        0 1 -0.01,
        0 1.4142 0,

        -0.4142 1 0.007,
        0.4142 1 0.007,
        0.4142 1 -0.007
        -0.4142 1 -0.007,

        -0.003 1 0,
        0 1 0.003,
        0.003 1 0,
        0 1 -0.003,
    ]
}

ROUTE TSstart.touchTime TO morphTIMER1.set_startTime
ROUTE morphTIMER1.fraction_changed TO CIpaper1.set_fraction
ROUTE CIpaper1.value_changed TO paperPointA.set_point

#モーフィング設定B#########################################################
DEF morphTIMER2 TimeSensor {
    cycleInterval 42.5
}

DEF CIpaper2 CoordinateInterpolator {
    key [0.0 0.6 0.7 0.8 0.9 1.0]
    keyValue [
        #基本形
        -0.01 0 0,
        0 1 0.01,
        0 2 0.01,
        0 1 0.01,
        0.01 0 0,
        0 1 -0.01,
        0 2 -0.01,
        0 1 -0.01,
        0 1.4142 0,

        -0.4142 1 0.007, #9
        0.4142 1 0.007,
        0.4142 1 -0.007,
        -0.4142 1 -0.007,

        -0.2688 1.3511 0.008, #13
        0.2688 1.3511 0.008, #14
        0.2688 1.3511 -0.008, #15
        -0.2688 1.3511 -0.008, #16

        -0.2346 1.1796 0, #17
        0.2346 1.1796 0, #18
        -0.1951 1 0, #19
        0.1951 1 0, #20

        #基本形 維持
        -0.01 0 0,
        0 1 0.01,
        0 2 0.01,
        0 1 0.01,
        0.01 0 0,
        0 1 -0.01,
        0 2 -0.01,
        0 1 -0.01,
        0 1.4142 0,

        -0.4142 1 0.007, #9
        0.4142 1 0.007,
        0.4142 1 -0.007,
        -0.4142 1 -0.007,

        -0.2688 1.3511 0.008, #13
        0.2688 1.3511 0.008, #14
        0.2688 1.3511 -0.008, #15
        -0.2688 1.3511 -0.008, #16

        -0.2346 1.1796 0, #17
        0.2346 1.1796 0, #18
        -0.1951 1 0, #19
        0.1951 1 0, #20

        #ステップ3-1/4
        -0.01 0 0,
        0 1 0.01,
        0 2 0.01,
        0 1 0.01,
        0.01 0 0,
        0 1 -0.01,
        0 2 -0.01,
        0 1 -0.01,
        0 1.4142 0,

        -0.2071 1.042 0.2111, #9
        0.2071 1.042 0.2111,
        0.4142 1 -0.007,
        -0.4142 1 -0.007,

        -0.2688 1.3511 0.008, #13
        0.2688 1.3511 0.008, #14
        0.2688 1.3511 -0.008, #15
        -0.2688 1.3511 -0.008, #16

        -0.2346 1.1796 0, #17
        0.2346 1.1796 0, #18
        -0.1951 1 0, #19
        0.1951 1 0, #20

        #ステップ3-2/4
        -0.01 0 0,
        0 1 0.01,
        0 2 0.01,
        0 1 0.01,
        0.01 0 0,
        0 1 -0.01,
        0 2 -0.01,
        0 1 -0.01,
        0 1.4142 0,

        0 1.082 0.007,#9
        0 1.082 0.007,
        0.4142 1 -0.007,
        -0.4142 1 -0.007,

        -0.2688 1.3511 0.008, #13
        0.2688 1.3511 0.008, #14
        0.2688 1.3511 -0.008, #15
        -0.2688 1.3511 -0.008, #16

        -0.2346 1.1796 0, #17
        0.2346 1.1796 0, #18
        -0.1951 1 0, #19
        0.1951 1 0, #20

        #ステップ3-3/4
        -0.01 0 0,
        0 1 0.01,
        0 2 0.01,
        0 1 0.01,
        0.01 0 0,
        0 1 -0.01,
        0 2 -0.01,
        0 1 -0.01,
        0 1.4142 0,

        0 1.082 0.007,#9
        0 1.082 0.007,
        0.2071 1.041 -0.2111,
        -0.2071 1.041 -0.2111,

        -0.2688 1.3511 0.008, #13
        0.2688 1.3511 0.008, #14
        0.2688 1.3511 -0.008, #15
        -0.2688 1.3511 -0.008, #16

        -0.2346 1.1796 0, #17
        0.2346 1.1796 0, #18
        -0.1951 1 0, #19
        0.1951 1 0, #20

        #ステップ3-4/4
        -0.01 0 0,
        0 1 0.01,
        0 2 0.01,
        0 1 0.01,
        0.01 0 0,
        0 1 -0.01,
        0 2 -0.01,
        0 1 -0.01,
        0 1.4142 0,

        0 1.082 0.007, #9
        0 1.082 0.007,
        0 1.082 -0.007,
        0 1.082 -0.007,

        -0.2688 1.3511 0.008, #13
        0.2688 1.3511 0.008, #14
        0.2688 1.3511 -0.008, #15
        -0.2688 1.3511 -0.008, #16

        -0.2346 1.1796 0, #17
        0.2346 1.1796 0, #18
        -0.1951 1 0, #19
        0.1951 1 0, #20
    ]
}

ROUTE TSstart.touchTime TO morphTIMER2.set_startTime
ROUTE morphTIMER2.fraction_changed TO CIpaper2.set_fraction
ROUTE CIpaper2.value_changed TO paperPointB.set_point

#モーフィング設定C#########################################################
DEF morphTIMER3 TimeSensor {
    cycleInterval 65.4
}

DEF CIpaper3 CoordinateInterpolator {
    key [0.0 0.65 0.7 0.75 0.8 0.85 1.0]
    keyValue [
        #基本形
        -0.01 0 0, #0
        0.01 0 0, #1
        0 1 0, #2
        0 2 0.01, #3
        0 2 -0.01, #4
        0 1.4142 0, #5

        -0.2688 1.3511 0.01, #6
        0.2688 1.3511 0.01, #7
        0.2688 1.3511 -0.01, #8
        -0.2688 1.3511 -0.01, #9

        -0.2346 1.1796 0.01, #10
        0 1.1796 0.01, #11
        0.2346 1.1796 0.01, #12
        0.2346 1.1796 -0.01, #13
        0 1.1796 -0.01, #14
        -0.2346 1.1796 -0.01, #15

        -0.184 0.924 0.01, #16
        0.184 0.924 0.01, #17
        0.184 0.924 -0.01, #18
        -0.184 0.924 -0.01, #19

        -0.01 1.3 0, #20
        0.01 1.3 0, #21

        0.01 0.3 0, #22
        0.05 0.2498 0.01, #23
        0.05 0.2498 -0.01, #24

        #基本形 維持
        -0.01 0 0, #0
        0.01 0 0, #1
        0 1 0, #2
        0 2 0.01, #3
        0 2 -0.01, #4
        0 1.4142 0, #5

        -0.2688 1.3511 0.01, #6
        0.2688 1.3511 0.01, #7
        0.2688 1.3511 -0.01, #8
        -0.2688 1.3511 -0.01, #9

        -0.2346 1.1796 0.01, #10
        0 1.1796 0.01, #11
        0.2346 1.1796 0.01, #12
        0.2346 1.1796 -0.01, #13
        0 1.1796 -0.01, #14
        -0.2346 1.1796 -0.01, #15

        -0.184 0.924 0.01, #16
        0.184 0.924 0.01, #17
        0.184 0.924 -0.01, #18
        -0.184 0.924 -0.01, #19

        -0.01 1.3 0, #20
        0.01 1.3 0, #21

        0.01 0.3 0, #22
        0.05 0.2498 0.01, #23
        0.05 0.2498 -0.01, #24

        #ステップ4-1/4
        -1 0.6193 0, #0
        0.01 0 0, #1
        0 1 0, #2
        0 2 0.01, #3
        0 2 -0.01, #4
        0 1.4142 0, #5

        -0.01 1.3511 0.2688, #6
        0.2688 1.3511 0.01, #7
        0.2688 1.3511 -0.01, #8
        -0.01 1.3511 -0.2688, #9

        -0.01 1.1796 0.2364, #10
        0 1.1796 0.01, #11
        0.2346 1.1796 0.01, #12
        0.2346 1.1796 -0.01, #13
        0 1.1796 -0.01, #14
        -0.01 1.1796 -0.2364, #15

        -0.01 0.924 0.184, #16
        0.184 0.924 0.01, #17
        0.184 0.924 -0.01, #18
        -0.01 0.924 -0.184, #19

        -0.01 1.3 0, #20
        0.01 1.3 0, #21

        0.01 0.3 0, #22
        0.05 0.2498 0.01, #23
        0.05 0.2498 -0.01, #24

        #ステップ4-2/4
        -0.7071 1.7071 0, #0
        0.01 0 0, #1
        0 1 0, #2
        0 2 0.01, #3
        0 2 -0.01, #4
        0 1.4142 0, #5

        -0.2688 1.3511 0.01, #6
        0.2688 1.3511 0.01, #7
        0.2688 1.3511 -0.01, #8
        -0.2688 1.3511 -0.01, #9

        -0.2346 1.1796 0.01, #10
        0 1.1796 0.01, #11
        0.2346 1.1796 0.01, #12
        0.2346 1.1796 -0.01, #13
        0 1.1796 -0.01, #14
        -0.2346 1.1796 -0.01, #15

        -0.184 0.924 0.01, #16
        0.184 0.924 0.01, #17
        0.184 0.924 -0.01, #18
        -0.184 0.924 -0.01, #19

        -0.01 1.3 0, #20
        0.01 1.3 0, #21

        0.01 0.3 0, #22
        0.05 0.2498 0.01, #23
        0.05 0.2498 -0.01, #24

        #ステップ4-3/4
        -0.7071 1.7071 0, #0
        1 0.6414 0, #1
        0 1 0, #2
        0 2 0.01, #3
        0 2 -0.01, #4
        0 1.4142 0, #5

        -0.2688 1.3511 0.01, #6
        0.01 1.3511 0.2688, #7
        0.01 1.3511 -0.2688, #8
        -0.2688 1.3511 -0.01, #9

        -0.2346 1.1796 0.01, #10
        0 1.1796 0.01, #11
        0.01 1.1796 0.2364, #12
        0.01 1.1796 -0.2364, #13
        0 1.1796 -0.01, #14
        -0.2346 1.1796 -0.01, #15

        -0.184 0.924 0.01, #16
        0.01 0.924 0.184, #17
        0.01 0.924 -0.184, #18
        -0.184 0.924 -0.01, #19

        -0.01 1.3 0, #20
        0.01 1.3 0, #21

        0.7 0.749 0, #22
        0.75 0.795 0.05, #23
        0.75 0.795 -0.05, #24

        #ステップ4-4/4
        -0.7071 1.7071 0, #0
        0.7071 1.2828 0, #1
        0 1 0, #2
        0 2 0.01, #3
        0 2 -0.01, #4
        0 1.4142 0, #5

        -0.2688 1.3511 0.01, #6
        0.2688 1.3511 0.01, #7
        0.2688 1.3511 -0.01, #8
        -0.2688 1.3511 -0.01, #9

        -0.2346 1.1796 0.01, #10
        0 1.1796 0.01, #11
        0.2346 1.1796 0.01, #12
        0.2346 1.1796 -0.01, #13
        0 1.1796 -0.01, #14
        -0.2346 1.1796 -0.01, #15

        -0.184 0.924 0.01, #16
        0.184 0.924 0.01, #17
        0.184 0.924 -0.01, #18
        -0.184 0.924 -0.01, #19

        -0.01 1.3 0, #20
        0.01 1.3 0, #21

        0.495 1.495 0, #22
        0.545 1.495 0.01, #23
        0.545 1.495 -0.01, #24

        #ステップ5
        -0.7071 1.7071 0, #0
        0.7071 1.2828 0, #1
        0 1 0, #2
        0 1.494 0.908, #3
        0 1.494 -0.908, #4
        0 1.35 0, #5

        -0.2688 1.2456 0.3084, #6
        0.2688 1.2456 0.3084, #7
        0.2688 1.2456 -0.3084, #8
        -0.2688 1.2456 -0.3084, #9

        -0.2346 1.1796 0.15, #10
        0 1.1796 0.15, #11
        0.2346 1.1796 0.15, #12
        0.2346 1.1796 -0.15, #13
        0 1.1796 -0.15, #14
        -0.2346 1.1796 -0.15, #15

        -0.184 0.924 0.07, #16
        0.184 0.924 0.07, #17
        0.184 0.924 -0.07, #18
        -0.184 0.924 -0.07, #19

        -0.12 1.29 0, #20
        0.12 1.29 0, #21

        0.495 1.495 0, #22
        0.545 1.495 0.01, #23
        0.545 1.495 -0.01, #24
    ]
}

ROUTE TSstart.touchTime TO morphTIMER3.set_startTime
ROUTE morphTIMER3.fraction_changed TO CIpaper3.set_fraction
ROUTE CIpaper3.value_changed TO paperPointC.set_point

#モーフィング設定D#########################################################
DEF morphTIMER4 TimeSensor {
    cycleInterval 2
    loop TRUE
}

DEF CIpaper4 CoordinateInterpolator {
    key [0.0 0.3 0.6 0.8 1.0]
    keyValue [
        #翼上位置
        -0.7071 1.7071 0, #0
        0.7071 1.2828 0, #1
        0 1 0, #2
        0 1.494 0.908, #3
        0 1.494 -0.908, #4
        0 1.35 0, #5

        -0.2688 1.2456 0.3084, #6
        0.2688 1.2456 0.3084, #7
        0.2688 1.2456 -0.3084, #8
        -0.2688 1.2456 -0.3084, #9

        -0.2346 1.1796 0.15, #10
        0 1.1796 0.15, #11
        0.2346 1.1796 0.15, #12
        0.2346 1.1796 -0.15, #13
        0 1.1796 -0.15, #14
        -0.2346 1.1796 -0.15, #15

        -0.184 0.924 0.07, #16
        0.184 0.924 0.07, #17
        0.184 0.924 -0.07, #18
        -0.184 0.924 -0.07, #19

        -0.12 1.29 0, #20
        0.12 1.29 0, #21

        0.495 1.495 0, #22
        0.545 1.495 0.01, #23
        0.545 1.495 -0.01, #24

        #翼中位置
        -0.7071 1.7071 0, #0
        0.7071 1.2828 0, #1
        0 1 0, #2
        0 1.1796 0.9704, #3
        0 1.1796 -0.9704, #4
        0 1.35 0, #5

        -0.2688 1.1796 0.3214, #6
        0.2688 1.1796 0.3214, #7
        0.2688 1.1796 -0.3214, #8
        -0.2688 1.1796 -0.3214, #9

        -0.2346 1.1796 0.15, #10
        0 1.1796 0.15, #11
        0.2346 1.1796 0.15, #12
        0.2346 1.1796 -0.15, #13
        0 1.1796 -0.15, #14
        -0.2346 1.1796 -0.15, #15

        -0.184 0.924 0.07, #16
        0.184 0.924 0.07, #17
        0.184 0.924 -0.07, #18
        -0.184 0.924 -0.07, #19

        -0.12 1.29 0, #20
        0.12 1.29 0, #21

        0.495 1.495 0, #22
        0.545 1.495 0.01, #23
        0.545 1.495 -0.01, #24

        #翼下位置
        -0.7071 1.7071 0, #0
        0.7071 1.2828 0, #1
        0 1 0, #2
        0 0.865 0.908, #3
        0 0.865 -0.908, #4
        0 1.35 0, #5

        -0.2688 1.114 0.3084, #6
        0.2688 1.114 0.3084, #7
        0.2688 1.114 -0.3084, #8
        -0.2688 1.114 -0.3084, #9

        -0.2346 1.1796 0.15, #10
        0 1.1796 0.15, #11
        0.2346 1.1796 0.15, #12
        0.2346 1.1796 -0.15, #13
        0 1.1796 -0.15, #14
        -0.2346 1.1796 -0.15, #15

        -0.184 0.924 0.07, #16
        0.184 0.924 0.07, #17
        0.184 0.924 -0.07, #18
        -0.184 0.924 -0.07, #19

        -0.12 1.29 0, #20
        0.12 1.29 0, #21

        0.495 1.495 0, #22
        0.545 1.495 0.01, #23
        0.545 1.495 -0.01, #24

        #翼中位置
        -0.7071 1.7071 0, #0
        0.7071 1.2828 0, #1
        0 1 0, #2
        0 1.1796 0.9704, #3
        0 1.1796 -0.9704, #4
        0 1.35 0, #5

        -0.2688 1.2456 0.3214, #6
        0.2688 1.2456 0.3214, #7
        0.2688 1.2456 -0.3214, #8
        -0.2688 1.2456 -0.3214, #9

        -0.2346 1.1796 0.15, #10
        0 1.1796 0.15, #11
        0.2346 1.1796 0.15, #12
        0.2346 1.1796 -0.15, #13
        0 1.1796 -0.15, #14
        -0.2346 1.1796 -0.15, #15

        -0.184 0.924 0.07, #16
        0.184 0.924 0.07, #17
        0.184 0.924 -0.07, #18
        -0.184 0.924 -0.07, #19

        -0.12 1.29 0, #20
        0.12 1.29 0, #21

        0.495 1.495 0, #22
        0.545 1.495 0.01, #23
        0.545 1.495 -0.01, #24

        #翼上位置
        -0.7071 1.7071 0, #0
        0.7071 1.2828 0, #1
        0 1 0, #2
        0 1.494 0.908, #3
        0 1.494 -0.908, #4
        0 1.35 0, #5

        -0.2688 1.2456 0.3084, #6
        0.2688 1.2456 0.3084, #7
        0.2688 1.2456 -0.3084, #8
        -0.2688 1.2456 -0.3084, #9

        -0.2346 1.1796 0.15, #10
        0 1.1796 0.15, #11
        0.2346 1.1796 0.15, #12
        0.2346 1.1796 -0.15, #13
        0 1.1796 -0.15, #14
        -0.2346 1.1796 -0.15, #15

        -0.184 0.924 0.07, #16
        0.184 0.924 0.07, #17
        0.184 0.924 -0.07, #18
        -0.184 0.924 -0.07, #19

        -0.12 1.29 0, #20
        0.12 1.29 0, #21

        0.495 1.495 0, #22
        0.545 1.495 0.01, #23
        0.545 1.495 -0.01, #24
    ]
}

ROUTE TSstart.touchTime TO morphTIMER4.set_startTime
ROUTE morphTIMER4.fraction_changed TO CIpaper4.set_fraction
ROUTE CIpaper4.value_changed TO paperPointD.set_point

#折り紙の表示と移動/拡大###############################################
DEF SwitchTIMER TimeSensor {
    cycleInterval 115
}
DEF SIa ScalarInterpolator {
    key [0 0.2164 0.2184 1]
    keyValue [0.3, 0.3, 1, 1]
}
DEF SIb ScalarInterpolator {
    key [0 0.2164 0.2184 0.3686 0.3706 1]
    keyValue [1, 1, 0.3, 0.3, 1, 1]
}
DEF SIc ScalarInterpolator {
    key [0 0.3686 0.370 0.5687 0.6557, 1]
    keyValue [1, 1, 0.3, 0.3, 1, 1]
}
DEF SId ScalarInterpolator {
    key [0 0.5687 0.6557 0.900 0.990, 1]
    keyValue [1, 1, 0, 0, 1, 1]
}
DEF PIa PositionInterpolator {
    key [0 0.0652 0.1413 1]
    keyValue[0 -2.5 0, 0 -2.5 0, 0 -3 0, 0 -3 0]
}
DEF PIc PositionInterpolator {
    key [0 0.4265 0.4834 1]
    keyValue[0 -3 0, 0 -3 0, 0 -4 0, 0 -4 0]
}
DEF PIscale1 PositionInterpolator {
    key [0 0.4834 0.6557 1]
    keyValue [1 1 1, 1 1 1, 2 2 2, 0.001 0.001 0.001]
}
DEF PIscale2 PositionInterpolator {
    key [0 0.999 1]
    keyValue [3 3 3, 3 3 3, 0.001 0.001 0.001]
}
DEF CI ColorInterpolator {
    key [0 0.5687 0.6557 1]
    keyValue [0 0 0, 0 0 0, 1 1 1, 1 1 1]
}
DEF PIstart PositionInterpolator {
    key [0 0.001 0.990 1]
    keyValue [1 1 1, 0.001 0.001 0.001, 0.001 0.001 0.001, 1 1 1]
}
DEF SIrestart ScalarInterpolator {
    key [0 0.990 1]
    keyValue [1, 1, 0]
}
ROUTE TSstart.touchTime TO SwitchTIMER.startTime
ROUTE SwitchTIMER.fraction_changed TO SIa.set_fraction
ROUTE SwitchTIMER.fraction_changed TO SIb.set_fraction
ROUTE SwitchTIMER.fraction_changed TO SIc.set_fraction
ROUTE SwitchTIMER.fraction_changed TO SId.set_fraction
ROUTE SwitchTIMER.fraction_changed TO PIa.set_fraction
ROUTE SwitchTIMER.fraction_changed TO PIc.set_fraction
ROUTE SwitchTIMER.fraction_changed TO PIscale1.set_fraction
ROUTE SwitchTIMER.fraction_changed TO PIscale2.set_fraction
ROUTE SwitchTIMER.fraction_changed TO CI.set_fraction
ROUTE SwitchTIMER.fraction_changed TO PIstart.set_fraction
ROUTE SwitchTIMER.fraction_changed TO SIrestart.set_fraction
ROUTE SIa.value_changed TO oriduruMaterialA.set_transparency
ROUTE SIb.value_changed TO oriduruMaterialB.set_transparency
ROUTE SIc.value_changed TO oriduruMaterialC.set_transparency
ROUTE SId.value_changed TO oriduruMaterialD.set_transparency
ROUTE PIa.value_changed TO oriduruA.set_translation
ROUTE PIc.value_changed TO oriduruC.set_translation
ROUTE PIscale1.value_changed TO ScaleChange.set_scale
ROUTE PIscale2.value_changed TO oriduruA.set_scale
ROUTE PIscale2.value_changed TO oriduruB.set_scale
ROUTE PIscale2.value_changed TO oriduruC.set_scale
ROUTE PIscale2.value_changed TO oriduruD.set_scale
ROUTE CI.value_changed TO oriduruMaterialC.set_emissiveColor
ROUTE PIstart.value_changed TO words.set_scale
ROUTE SIrestart.value_changed TO words2.set_transparency
#視点移動##################################################################
DEF viewpointPI PositionInterpolator {
    key [0 0.5687 0.6556 1]
    keyValue [0 0 6.5, 0 0 6.5, 0 0 5.5, 0 0 5.5]
}
ROUTE SwitchTIMER.fraction_changed TO viewpointPI.set_fraction
ROUTE viewpointPI.value_changed TO VP1.set_position

#回転######################################################################
DEF RoundTIMER1 TimeSensor {
    cycleInterval 5
    loop TRUE
    enabled FALSE
}
DEF RoundTIMER2 TimeSensor {
    cycleInterval 20
    loop TRUE
}
DEF OIoriduru1 OrientationInterpolator {
    key [0 0.5 1]
    keyValue [0 -1 0 0, 0 -1 0 3.14, 0 -1 0 6.28]
}
DEF OIoriduru2 OrientationInterpolator {
    key [0 0.5 1]
    keyValue [0 -1 0 0, 0 -1 0 3.14, 0 -1 0 6.28]
}
DEF RoundScript Script {
    eventIn SFTime touchTime
    eventOut SFBool enabled
    url "javascript:
    function touchTime(value) {
        enabled = TRUE;
    }"
}
ROUTE TSstart.touchTime TO RoundScript.touchTime
ROUTE TSstart.touchTime TO RoundTIMER1.startTime
ROUTE RoundScript.enabled TO RoundTIMER1.enabled
ROUTE RoundTIMER1.fraction_changed TO OIoriduru1.set_fraction
ROUTE RoundTIMER2.fraction_changed TO OIoriduru2.set_fraction
ROUTE OIoriduru1.value_changed TO oriduruA.set_rotation
ROUTE OIoriduru1.value_changed TO oriduruB.set_rotation
ROUTE OIoriduru1.value_changed TO oriduruC.set_rotation
ROUTE OIoriduru2.value_changed TO oriduruD.set_rotation

#上下動####################################################################
DEF PId PositionInterpolator {
    key [0 0.1 0.2 0.35 0.5 0.65 0.8 0.9 1]
    keyValue[0 -4.0 0, 0 -4.07071 0, 0 -4.1 0,
             0 -4.07071 0, 0 -4.0 0, 0 -3.92929 0, 0 -3.9 0,
             0 -3.92929 0, 0 -4.0 0]
}
ROUTE morphTIMER4.fraction_changed TO PId.set_fraction
ROUTE PId.value_changed TO oriduruD.set_translation

#旋回視点##################################################################
DEF OIview1 OrientationInterpolator {
    key [0 0.5 1]
    keyValue [0 1 0 0, 0 1 0 -3.14, 0 1 0 -6.28]
}
DEF OIview2 OrientationInterpolator {
    key [0 0.5 1]
    keyValue [0 1 0 0, 0 1 0 3.14, 0 1 0 6.28]
}
ROUTE RoundTIMER2.fraction_changed TO OIview1.set_fraction
ROUTE RoundTIMER2.fraction_changed TO OIview2.set_fraction
ROUTE OIview1.value_changed TO VP2-1.set_rotation
ROUTE OIview2.value_changed TO VP2-2.set_orientation 
ROUTE VP2-2.isBound TO setFog.set_bind

#MIDI##################################################################
Sound {
    location 0 0 0
    maxBack 100
    maxFront 100
    minBack 100
    minFront 100
    intensity 1
    source DEF MIDI AudioClip {
        url ["origami1.mid"]
    }
}
ROUTE TSstart.touchTime TO MIDI.startTime

#END