Correct parsers
This commit is contained in:
parent
7fe5d03a09
commit
0d0190fd8e
9 changed files with 437 additions and 169 deletions
|
@ -2,12 +2,15 @@ import {
|
|||
BufferAttribute,
|
||||
BufferGeometry,
|
||||
DoubleSide,
|
||||
FrontSide,
|
||||
Group,
|
||||
Mesh,
|
||||
MeshBasicMaterial,
|
||||
MeshStandardMaterial,
|
||||
} from "three";
|
||||
|
||||
import { uniforms } from "./uniforms";
|
||||
import { shader } from "./shader";
|
||||
|
||||
import { fetchTriangleIndices } from "./fetch-triangle-indices";
|
||||
import { fetchVertices } from "./fetch-vertices";
|
||||
import { TRIANGLE_INDICES_URL, VERTICES_URL } from "../config";
|
||||
|
@ -39,17 +42,23 @@ async function buildMesh(layerData: MappedFeature) {
|
|||
geometry.computeVertexNormals();
|
||||
geometry.computeBoundingBox();
|
||||
|
||||
const material = new MeshStandardMaterial(
|
||||
{
|
||||
color: color,
|
||||
metalness: 0.1,
|
||||
roughness: 0.75,
|
||||
flatShading: true,
|
||||
side: DoubleSide,
|
||||
// wireframe: false,
|
||||
}
|
||||
// this.uniforms.clipping
|
||||
);
|
||||
const material = new MeshStandardMaterial({
|
||||
color: color,
|
||||
metalness: 0.1,
|
||||
roughness: 0.75,
|
||||
flatShading: true,
|
||||
side: FrontSide,
|
||||
wireframe: false,
|
||||
});
|
||||
|
||||
// material.onBeforeCompile = (materialShader) => {
|
||||
// materialShader.uniforms.clippingLow = uniforms.clipping.clippingLow;
|
||||
// materialShader.uniforms.clippingHigh = uniforms.clipping.clippingHigh;
|
||||
// materialShader.uniforms.clippingScale = uniforms.clipping.clippingScale;
|
||||
|
||||
// materialShader.vertexShader = shader.vertexMeshStandard;
|
||||
// materialShader.fragmentShader = shader.fragmentClippingMeshStandard;
|
||||
// };
|
||||
|
||||
const mesh = new Mesh(geometry, material);
|
||||
mesh.name = name;
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue