你不能在ImageTexture設置字體大小。無論如何,這裏是創建一個紋理立方體(Box)並在其前面放置一個Text形狀的示例。
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "http://www.web3d.org/specifications/x3d-3.0.dtd">
<X3D>
<Scene>
<Group>
<Transform>
<Shape>
<Appearance>
<ImageTexture url='1.jpg'/>
</Appearance>
<Box/>
</Shape>
<Transform translation="0 0 1">
<Shape>
<Appearance>
<Material/>
</Appearance>
<Text string='"This is a text"'>
<FontStyle family='"SANS"' justify='"MIDDLE"' size="1.5" style="BOLD"/>
</Text>
</Shape>
</Transform>
</Transform>
</Group>
</Scene>
</X3D>
來源
2015-12-24 08:28:00
CpS
不要將整個內容設置爲粗體(直接在一行之下添加----使得它上面的文本看起來像標題)。另外,*它不工作*不是一個好問題陳述。你應該指出你期望它如何工作,並指出目前正在發生的事情。如果您收到任何錯誤消息,請將其作爲問題的一部分。 – Harry