Papervision3Dで動的にマテリアルを張り替える方法
動的にマテリアルの中身を変えたい時はreplaceMaterialByName()を使う。第2引数で張り替えたい個所を指定する。CubeやPlaneの各面を全部変えたい時は”all”にする。
var do3d:DisplayObject3D; do3d.replaceMaterialByName(new ColorMaterial(0xFF66CC, 0.5), "front");
動的にマテリアルの中身を変えたい時はreplaceMaterialByName()を使う。第2引数で張り替えたい個所を指定する。CubeやPlaneの各面を全部変えたい時は”all”にする。
var do3d:DisplayObject3D; do3d.replaceMaterialByName(new ColorMaterial(0xFF66CC, 0.5), "front");