vector3d
02.07.2012, 21:37
Нужно наложить на кубик 6-ть разных jpg-ов. [away3d-core-fp11_4_0_0_beta.swc]
кто ни будь знает как это сделать?
var filteredShadowMapMethod:SoftShadowMapMethod = new SoftShadowMapMethod(sunLight);
filteredShadowMapMethod.epsilon = 0.005;
var meshMaterial:TextureMaterial = new TextureMaterial(new BitmapTexture(new BitmapData(2, 2, false, 0xFF0000)), true, true);
meshMaterial.lightPicker = lightPicker;
meshMaterial.shadowMethod = filteredShadowMapMethod;
meshMaterial.ambient = 0.5;
var cubeTextures:Array = [ new ColorMaterial(0xFF4444), //Куб
new ColorMaterial(0x44FF44),
new ColorMaterial(0x4444FF),
new ColorMaterial(0xFFFF44),
new ColorMaterial(0x44FFFF),
new ColorMaterial(0xFF44FF) ];
boxBody = new Vector.<RigidBody>();
for (var i:int = 0; i < 5; i++)
{
boxBody[i] = physics.createCube(meshMaterial, 60, 50, 80 );//????????
//Cube(Away3dMesh(cube.skin).mesh).cubeMaterials.left = cubeTextures[0];
boxBody[i](Away3D4Mesh(boxBody[i].skin).mesh).cubeMaterials.left = cubeTextures[0];//как????
// boxBody[i](Away3D4Mesh(boxBody[i].skin).mesh).cubeMaterials.right = cubeTextures[1];
// boxBody[i](Away3D4Mesh(boxBody[i].skin).mesh).cubeMaterials.front = cubeTextures[2];
// boxBody[i](Away3D4Mesh(boxBody[i].skin).mesh).cubeMaterials.back = cubeTextures[3];
// boxBody[i](Away3D4Mesh(boxBody[i].skin).mesh).cubeMaterials.top = cubeTextures[4];
// boxBody[i](Away3D4Mesh(boxBody[i].skin).mesh).cubeMaterials.bottom = cubeTextures[5];
boxBody[i].mass = 2;
boxBody[i].moveTo(new Vector3D(0, 10 + (50 * i + 50), 0));
}
кто ни будь знает как это сделать?
var filteredShadowMapMethod:SoftShadowMapMethod = new SoftShadowMapMethod(sunLight);
filteredShadowMapMethod.epsilon = 0.005;
var meshMaterial:TextureMaterial = new TextureMaterial(new BitmapTexture(new BitmapData(2, 2, false, 0xFF0000)), true, true);
meshMaterial.lightPicker = lightPicker;
meshMaterial.shadowMethod = filteredShadowMapMethod;
meshMaterial.ambient = 0.5;
var cubeTextures:Array = [ new ColorMaterial(0xFF4444), //Куб
new ColorMaterial(0x44FF44),
new ColorMaterial(0x4444FF),
new ColorMaterial(0xFFFF44),
new ColorMaterial(0x44FFFF),
new ColorMaterial(0xFF44FF) ];
boxBody = new Vector.<RigidBody>();
for (var i:int = 0; i < 5; i++)
{
boxBody[i] = physics.createCube(meshMaterial, 60, 50, 80 );//????????
//Cube(Away3dMesh(cube.skin).mesh).cubeMaterials.left = cubeTextures[0];
boxBody[i](Away3D4Mesh(boxBody[i].skin).mesh).cubeMaterials.left = cubeTextures[0];//как????
// boxBody[i](Away3D4Mesh(boxBody[i].skin).mesh).cubeMaterials.right = cubeTextures[1];
// boxBody[i](Away3D4Mesh(boxBody[i].skin).mesh).cubeMaterials.front = cubeTextures[2];
// boxBody[i](Away3D4Mesh(boxBody[i].skin).mesh).cubeMaterials.back = cubeTextures[3];
// boxBody[i](Away3D4Mesh(boxBody[i].skin).mesh).cubeMaterials.top = cubeTextures[4];
// boxBody[i](Away3D4Mesh(boxBody[i].skin).mesh).cubeMaterials.bottom = cubeTextures[5];
boxBody[i].mass = 2;
boxBody[i].moveTo(new Vector3D(0, 10 + (50 * i + 50), 0));
}