PageSourceSearch

https://threejson.org/core/builder/irregularGeometryBuilder.js

js threejson.org collected 2026-10-04 23:37:05 UTC 790 bytes, 22 lines download raw bytes

1import { createBufferMesh } from "./bufferMeshBuilder.js";
2import { createShapeExtrude } from "./shapeExtrudeBuilder.js";
3import { resolveIrregularGeometryRecord } from "./irregularShapeResolver.js";
4
5export { resolveIrregularGeometryRecord } from "./irregularShapeResolver.js";
6
7/**
8 * @param {object} record
9 * @param {import("three").Object3D} parent
10 * @returns {import("three").Mesh|null}
11 */
12export function createIrregularGeometry(record, parent) {
13  const resolved = resolveIrregularGeometryRecord(record);
14  if (!resolved) {
15    return null;
16  }
17  const objType = typeof resolved.objType === "string" ? resolved.objType.trim().toLowerCase() : "";
18  if (objType === "buffermesh") {
19    return createBufferMesh(resolved, parent);
20  }
21  return createShapeExtrude(resolved, parent);
22}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.