这是一个简单的问题。如何在 x3dom 形状上放置渐变?我有这个:
<shape>
<appearance>
<material diffuseColor='green'></material>
</appearance>
<box height="1" />
</shape>
这是一个简单的问题。如何在 x3dom 形状上放置渐变?我有这个:
<shape>
<appearance>
<material diffuseColor='green'></material>
</appearance>
<box height="1" />
</shape>
不幸的是,在大多数原始形状上它是不可能的,我在 x3d 列表 http://www.web3d.org/x3d/publiclists/x3dpublic_list_archives/0504/msg00104.html上找到了这个线程
这是你如何在圆柱体上做到这一点注意像素纹理,那就是肉和土豆:
<X3D>
<Scene>
<NavigationInfo headlight='FALSE' type='"EXAMINE" "ANY"' />
<DirectionalLight ambientIntensity='0.5' direction='1 -0.5 -1' />
<Viewpoint DEF='VP1' position='0 0 10' orientation='0 1 0 0' fieldOfView='0.785398' description = "Front" />
<Transform translation='0 0 0'>
<Shape>
<Appearance>
<Material/>
<PixelTexture image='1 2 3 0xFF0000 0x0000FF' repeatS='FALSE' repeatT='FALSE' />
</Appearance>
<Cylinder height='4' />
</Shape>
</Transform>
</Scene>
</X3D>