NSArray * images = @[[UIImage imageNamed:@"art.scnassets/zp.png"], [UIImage imageNamed:@"art.scnassets/xp.png"], [UIImage imageNamed:@"art.scnassets/zn.png"], [UIImage imageNamed:@"art.scnassets/xn.png"], [UIImage imageNamed:@"art.scnassets/yp.png"], [UIImage imageNamed:@"art.scnassets/yn.png"]]; NSMutableArray * materials = [NSMutableArray array]; for (int i = 0; i < images.count; i++) { SCNMaterial * m = [SCNMaterial material]; m.diffuse.contents = images[i]; [materials addObject:m]; } SCNBox * boxGeo = [SCNBox boxWithWidth:8 height:8 length:8 chamferRadius:0]; boxGeo.materials = materials; SCNNode * boxNode = [SCNNode nodeWithGeometry:boxGeo];
1/27/15
Scene Kit 3D Cube Map
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment