我正在尝试向 awe.js 项目添加文本,使用本教程我想出了一个尝试,https: //www.sitepoint.com/augmented-reality-in-the-browser-with-awe-js/ .
awe.projections.add({
id: 'text',
geometry: {shape: 'text', text: 'Hello World', font: 'times new roman', weight: 'normal', style: 'normal'},
rotation: {y: 45},
position: {x: -5, y: -31, z: -5},
material: {
type: 'phong',
color: 0xFF0000
}
}, {poi_id: 'marker'});
然后我对该主题进行了更多研究并尝试了不同的方式但仍然没有成功。
awe.pois.add({ id:'fixed_poi', position: { x:70, y:0, z:-250 }, visible: true });
awe.projections.add({
id:'fixed_projection',
geometry: { shape: 'text', text: "My Text", parameters:{font: 'optimer', size: 50}},
position: { x:0, y:0, z:0 },
rotation: { x:0, y:0, z:0 },
material:{ type: 'phong', color: 0xFFFFFF },
}, { poi_id: 'fixed_poi' });