代码拉取完成,页面将自动刷新
<!DOCTYPE html>
<html lang="en">
<head>
<title>Verge3D - uv mapping tests</title>
<meta charset=utf-8 />
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<style>
body {
background: #ffffff;
color: #000000;
text-align: center;
font-family: sans-serif;
}
h3 {
margin-top: 60px;
margin-bottom: 30px;
font-weight: normal;
}
canvas {
width: 100%;
}
</style>
</head>
<body>
<script type="module">
import * as v3d from '../build/v3d.module.js';
import { UVsDebug } from './jsm/utils/UVsDebug.js';
/*
* This is to help debug UVs problems in geometry,
* as well as allow a new user to visualize what UVs are about.
*/
function test(name, geometry) {
const d = document.createElement('div');
d.innerHTML = '<h3>' + name + '</h3>';
d.appendChild(UVsDebug(geometry));
document.body.appendChild(d);
}
const points = [];
for (let i = 0; i < 10; i++) {
points.push(new v3d.Vector2(Math.sin(i * 0.2) * 15 + 50, (i - 5) * 2));
}
//
test('new v3d.PlaneBufferGeometry(100, 100, 4, 4)', new v3d.PlaneBufferGeometry(100, 100, 4, 4));
test('new v3d.SphereBufferGeometry(75, 12, 6)', new v3d.SphereBufferGeometry(75, 12, 6));
test('new v3d.IcosahedronBufferGeometry(30, 1)', new v3d.IcosahedronBufferGeometry(30, 1));
test('new v3d.OctahedronBufferGeometry(30, 2)', new v3d.OctahedronBufferGeometry(30, 2));
test('new v3d.CylinderBufferGeometry(25, 75, 100, 10, 5)', new v3d.CylinderBufferGeometry(25, 75, 100, 10, 5));
test('new v3d.BoxBufferGeometry(100, 100, 100, 4, 4, 4)', new v3d.BoxBufferGeometry(100, 100, 100, 4, 4, 4));
test('new v3d.LatheBufferGeometry(points, 8)', new v3d.LatheBufferGeometry(points, 8));
test('new v3d.TorusBufferGeometry(50, 20, 8, 8)', new v3d.TorusBufferGeometry(50, 20, 8, 8));
test('new v3d.TorusKnotBufferGeometry(50, 10, 12, 6)', new v3d.TorusKnotBufferGeometry(50, 10, 12, 6));
</script>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。