pictexbox_2.wrl source
#VRML V2.0 utf8

Viewpoint {}

NavigationInfo {
type "EXAMINE"
}

# 箱
Shape {
appearance Appearance {
texture DEF PT PixelTexture {}
}
geometry Box {}
}

# テクスチャー作成スクリプト
DEF Sc Script {
eventOut SFImage image
url "javascript:
function initialize () {

var ary = new MFInt32 ();
ary[0] = 0xFF0000; // red
ary[1] = 0x00FF00; // green
ary[2] = 0x0000FF; // blue
ary[3] = 0xFFFFFF; // white

image = new SFImage ( 2, 2, 3, ary );

}
"
}
ROUTE Sc.image TO PT.image