3.25 Android M 设计规范(英文版)-Environment

3D world

The material environment is a 3D space, which means all objects have x, y, and z dimensions. The z-axis is perpendicularly aligned to the plane of the display, with the positive z-axis extending towards the viewer. Every sheet of material occupies a single position along the z-axis and has a standard 1dp thickness, equivalent toone pixel of thicknesson screens with a pixel density of 160.

On the web, the z-axis is used for layering and not for perspective. The 3D world is emulated by manipulating the y-axis.

3D space with x, y, and z axes

Light and shadow

Within the material environment, virtual lights illuminate the scene. Key lights create directional shadows, while ambient light creates soft shadows from all angles.

Shadows in the material environment are cast by these two light sources. In Android development, shadows occur when light sources are blocked by sheets of material at various positions along the z-axis. On the web, shadows are depicted by manipulating the y-axis only. The following example shows the card with a height of 6dp.

Shadow cast by key light

Shadow cast by ambient light

Combined shadow from key and ambient lights

你可能感兴趣的:(3.25 Android M 设计规范(英文版)-Environment)