49 lines
294 KiB
HTML
49 lines
294 KiB
HTML
<!DOCTYPE html>
|
|||
|
|
<html>
|
||
|
|
<head>
|
||
|
|
<meta charset="utf-8">
|
||
|
|
<script src="three_inline.js"></script>
|
||
|
|
<style>
|
||
|
|
body { margin: 0; background: #12151b; overflow: hidden; font-family: sans-serif; }
|
||
|
|
#c { width: 100vw; height: 100vh; }
|
||
|
|
#info { position: absolute; top: 10px; left: 10px; color: #fff; font-size: 14px; background: rgba(0,0,0,0.7); padding: 8px 12px; border-radius: 6px; }
|
||
|
|
</style>
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<div id="info">lingxi_6DUUEJ</div>
|
||
|
|
<canvas id="c"></canvas>
|
||
|
|
<script>
|
||
|
|
const d = {"v": [[-197.48, -185.49, 15.34], [-197.57, -185.44, 15.12], [-197.66, -185.32, 14.93], [-197.72, -185.16, 14.76], [-197.76, -184.97, 14.62], [-197.78, -184.74, 14.53], [-197.77, -184.5, 14.49], [-197.46, -185.5, 15.39], [-197.45, -185.5, 15.45], [-199.87, -185.5, 16.42], [-202.4, -185.5, 17.0], [-205.0, -185.5, 17.2], [-205.0, -184.5, 16.2], [-205.0, -184.76, 16.23], [-205.0, -185.0, 16.33], [-205.0, -185.21, 16.49], [-205.0, -185.37, 16.7], [-205.0, -185.47, 16.94], [-202.51, -184.5, 16.01], [-200.08, -184.5, 15.43], [-202.55, -184.76, 16.05], [-202.54, -185.0, 16.15], [-202.51, -185.21, 16.3], [-202.48, -185.37, 16.51], [-202.42, -185.49, 16.89], [-200.16, -184.76, 15.49], [-200.13, -185.0, 15.59], [-200.08, -185.21, 15.74], [-200.02, -185.37, 15.94], [-199.9, -185.49, 16.31], [-220.94, -188.5, -6.46], [-220.7, -188.47, -6.37], [-220.48, -188.37, -6.27], [-220.28, -188.21, -6.2], [-220.14, -188.0, -6.14], [-220.04, -187.76, -6.1], [-220.01, -187.5, -6.09], [-220.58, -187.5, -5.05], [-221.38, -187.5, -4.18], [-222.36, -187.5, -3.52], [-223.47, -187.5, -3.11], [-224.65, -187.5, -2.97], [-224.65, -188.5, -3.97], [-224.65, -188.47, -3.71], [-224.65, -188.37, -3.47], [-224.65, -188.21, -3.26], [-224.65, -188.0, -3.1], [-224.65, -187.76, -3.0], [-223.71, -188.5, -4.08], [-222.82, -188.5, -4.41], [-222.04, -188.5, -4.94], [-221.4, -188.5, -5.63], [-223.65, -188.47, -3.83], [-223.54, -188.21, -3.39], [-223.5, -188.0, -3.24], [-222.7, -188.47, -4.18], [-222.5, -188.21, -3.78], [-222.42, -188.0, -3.64], [-221.87, -188.47, -4.74], [-221.57, -188.21, -4.4], [-221.47, -188.0, -4.28], [-221.19, -188.47, -5.48], [-220.82, -188.21, -5.22], [-220.69, -188.0, -5.13], [-205.0, -178.5, 15.7], [-200.94, -178.5, 15.17], [-197.15, -178.5, 13.6], [-193.9, -178.5, 11.1], [-191.4, -178.5, 7.85], [-189.83, -178.5, 4.06], [-189.3, -178.5, 0.0], [-189.83, -178.5, -4.06], [-191.4, -178.5, -7.85], [-193.9, -178.5, -11.1], [-197.15, -178.5, -13.6], [-200.94, -178.5, -15.17], [-205.0, -178.5, -15.7], [-205.0, -179.0, 16.2], [-205.0, -179.0, -16.2], [-200.81, -179.0, -15.65], [-196.9, -179.0, -14.03], [-193.54, -179.0, -11.46], [-190.97, -179.0, -8.1], [-189.35, -179.0, -4.19], [-188.8, -179.0, -0.0], [-189.35, -179.0, 4.19], [-190.97, -179.0, 8.1], [-193.54, -179.0, 11.46], [-196.9, -179.0, 14.03], [-200.81, -179.0, 15.65], [-231.0, -181.5, -3.34], [-231.13, -181.5, -3.32], [-231.25, -181.5, -3.27], [-231.35, -181.5, -3.19], [-231.43, -181.5, -3.09], [-231.48, -181.5, -2.97], [-231.5, -181.5, -2.84], [-231.0, -182.0, -3.84], [-232.0, -182.0, -2.84], [-231.97, -182.0, -3.1], [-231.87, -182.0, -3.34], [-231.71, -182.0, -3.55], [-231.5, -182.0, -3.71], [-231.26, -182.0, -3.81], [-231.65, -181.75, -3.22], [-231.37, -181.75, -3.49], [-220.01, -182.0, -6.09], [-220.26, -181.94, -5.44], [-220.47, -181.76, -4.81], [-220.65, -181.5, -4.19], [-221.81, -181.5, -3.25], [-223.17, -181.5, -2.67], [-224.65, -181.5, -2.47], [-224.65, -182.0, -2.97], [-223.47, -182.0, -3.11], [-222.36, -182.0, -3.52], [-221.38, -182.0, -4.18], [-220.58, -182.0, -5.05], [-231.0, -184.69, 3.84], [-231.0, -182.0, 3.84], [-231.26, -182.0, 3.81], [-231.5, -182.0, 3.71], [-231.71, -182.0, 3.55], [-231.87, -182.0, 3.34], [-231.97, -182.0, 3.1], [-232.0, -182.0, 2.84], [-232.0, -184.21, 2.84], [-231.97, -184.22, 3.08], [-231.93, -184.24, 3.22], [-231.86, -184.27, 3.35], [-231.77, -184.31, 3.48], [-231.64, -184.36, 3.61], [-231.49, -184.43, 3.71], [-231.34, -184.5, 3.78], [-231.17, -184.59, 3.83], [-220.01, -187.5, -6.09], [-220.01, -182.0, -6.09], [-224.65, -182.0, -2.97], [-223.47, -182.0, -3.11], [-222.36, -182.0, -3.52], [-221.38, -182.0, -4.18], [-220.58, -182.0, -5.05], [-224.65, -187.5, -2.97], [-220.58, -187.5, -5.05], [-221.38, -187.5, -4.18], [-222.36, -187.5, -3.52], [-223.47, -187.5, -3.11], [-176.5, -212.9, 5.5], [-176.5, -213.45, 4.95], [-176.5, -213.45, 9.35], [-177.07, -213.45, 9.28], [-177.6, -213.45, 9.06], [-178.06, -213.45, 8.71], [-178.41, -213.45, 8.25], [-178.63, -213.45, 7.72], [-178.7, -213.45, 7.15], [-178.63, -213.45, 6.58], [-178.41, -213.45, 6.05], [-17
|
||
|
|
const cv = document.getElementById('c');
|
||
|
|
const rend = new THREE.WebGLRenderer({canvas: cv, antialias: true});
|
||
|
|
rend.setSize(1000, 750);
|
||
|
|
const sc = new THREE.Scene(); sc.background = new THREE.Color(0x12151b);
|
||
|
|
const cam = new THREE.PerspectiveCamera(40, 1000 / 750, 1, 1000);
|
||
|
|
sc.add(new THREE.HemisphereLight(0xffffff, 0x444444, 1.2));
|
||
|
|
const l1 = new THREE.DirectionalLight(0xffffff, 1.5); l1.position.set(200, 300, 400); sc.add(l1);
|
||
|
|
const l2 = new THREE.DirectionalLight(0x88bbff, 0.8); l2.position.set(-200, -100, -200); sc.add(l2);
|
||
|
|
const grid = new THREE.GridHelper(300, 20, 0x334455, 0x222b36); sc.add(grid);
|
||
|
|
|
||
|
|
const geo = new THREE.BufferGeometry();
|
||
|
|
const pos = new Float32Array(d.v.length * 3);
|
||
|
|
for (let i = 0; i < d.v.length; i++) { pos[i*3] = d.v[i][0]; pos[i*3+1] = d.v[i][1]; pos[i*3+2] = d.v[i][2]; }
|
||
|
|
const idx = new Uint32Array(d.t.length * 3);
|
||
|
|
for (let i = 0; i < d.t.length; i++) { idx[i*3] = d.t[i][0]; idx[i*3+1] = d.t[i][1]; idx[i*3+2] = d.t[i][2]; }
|
||
|
|
geo.setAttribute('position', new THREE.BufferAttribute(pos, 3));
|
||
|
|
geo.setIndex(new THREE.BufferAttribute(idx, 1));
|
||
|
|
geo.computeVertexNormals();
|
||
|
|
|
||
|
|
const mat = new THREE.MeshStandardMaterial({color: 0x2a75d3, metalness: 0.4, roughness: 0.4});
|
||
|
|
const m = new THREE.Mesh(geo, mat);
|
||
|
|
geo.computeBoundingSphere();
|
||
|
|
const bs = geo.boundingSphere;
|
||
|
|
m.position.sub(bs.center);
|
||
|
|
sc.add(m);
|
||
|
|
|
||
|
|
cam.position.set(bs.radius * 1.5, bs.radius * 1.3, bs.radius * 1.7);
|
||
|
|
cam.lookAt(0, 0, 0);
|
||
|
|
rend.render(sc, cam);
|
||
|
|
</script>
|
||
|
|
</body>
|
||
|
|
</html>
|