我看到了一些访问 THREE.BoxGeometry 面的解决方案,如下所示:
var geometry = new THREE.BoxGeometry(n,n,n)
let faces = geometry.faces;
for (let face of faces) {
face.color.set(Math.random() * 0xffffff);
}
Run Code Online (Sandbox Code Playgroud)
faces
但当前 Three.js 版本 r129 中似乎不存在 -array ( Uncaught TypeError: faces is not iterable
)。
如何轻松为六个立方体面着色?
根据维基百科的这篇文章,低级算法的特征提取示例包括边缘检测,角点检测等.
但什么是高级算法?
我只从维基百科文章特征检测(计算机视觉)中找到了这个引用:
偶尔,当特征检测在计算上是昂贵的并且存在时间约束时,可以使用更高级别的算法来引导特征检测阶段,从而仅搜索图像的某些部分的特征.
你能举例说明其中一种更高级别的算法吗?
通过在父容器 'foo' 上设置 css 'height' 属性,计算出的内部元素的 'font-size' 会发生错误的变化。这只发生在 Chrome 移动设备上。
要对此进行测试,请尝试在 Chrome 下运行以下代码并在开发者控制台中选择任何移动设备:
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<title>Test</title>
<style>
.foo {
height: 600px;
color: white;
background: teal;
}
</style>
</head>
<body>
<section>
<h2>Header in first section</h2>
<p>Text with a normal size. Text with a normal size.</p>
</section>
<section class="foo">
<h2>Header in second section</h2>
<p>This text changes size when commenting out 'foo's height property in the Chrome developer console and mobile mode (e.g Galaxy S5) - but why?</p>
</section>
</body> …
Run Code Online (Sandbox Code Playgroud)