Checkpoint open-bottom page stack
This commit is contained in:
@@ -51,6 +51,7 @@ const BOOK_PROFILE = {
|
|||||||
coverThickness: 0.03,
|
coverThickness: 0.03,
|
||||||
raisedHingeY: 0.056,
|
raisedHingeY: 0.056,
|
||||||
paperContactOffset: 0.0012,
|
paperContactOffset: 0.0012,
|
||||||
|
singlePageCoverGap: 0.006,
|
||||||
bundleSpacing: 0.014
|
bundleSpacing: 0.014
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -699,7 +700,7 @@ function createSinglePageBodyLines(line) {
|
|||||||
const bundleCount = Math.max(4, Math.round(pageCount / 10));
|
const bundleCount = Math.max(4, Math.round(pageCount / 10));
|
||||||
const supportPoints = line.points.map((point) => ({
|
const supportPoints = line.points.map((point) => ({
|
||||||
x: point.x,
|
x: point.x,
|
||||||
y: Math.max(coverTopYAtX(point.x) + coverClearance(bundleCount), point.y - BOOK_PROFILE.bundleSpacing)
|
y: Math.max(coverTopYAtX(point.x) + coverClearance(bundleCount) + BOOK_PROFILE.singlePageCoverGap, point.y - BOOK_PROFILE.bundleSpacing)
|
||||||
}));
|
}));
|
||||||
return [
|
return [
|
||||||
{ ...line, points: supportPoints, endpoint: supportPoints[supportPoints.length - 1] },
|
{ ...line, points: supportPoints, endpoint: supportPoints[supportPoints.length - 1] },
|
||||||
@@ -732,17 +733,10 @@ function createLoftedLineBody(lines, depth) {
|
|||||||
indices.push(front[row + 1][last], back[row + 1][last], back[row][last]);
|
indices.push(front[row + 1][last], back[row + 1][last], back[row][last]);
|
||||||
}
|
}
|
||||||
for (let col = 0; col < smoothLines[0].length - 1; col += 1) {
|
for (let col = 0; col < smoothLines[0].length - 1; col += 1) {
|
||||||
const bottomRow = 0;
|
|
||||||
const topRow = smoothLines.length - 1;
|
const topRow = smoothLines.length - 1;
|
||||||
indices.push(front[bottomRow][col], front[bottomRow][col + 1], back[bottomRow][col]);
|
|
||||||
indices.push(front[bottomRow][col + 1], back[bottomRow][col + 1], back[bottomRow][col]);
|
|
||||||
indices.push(front[topRow][col], back[topRow][col], front[topRow][col + 1]);
|
indices.push(front[topRow][col], back[topRow][col], front[topRow][col + 1]);
|
||||||
indices.push(front[topRow][col + 1], back[topRow][col], back[topRow][col + 1]);
|
indices.push(front[topRow][col + 1], back[topRow][col], back[topRow][col + 1]);
|
||||||
}
|
}
|
||||||
for (let row = 0; row < smoothLines.length - 1; row += 1) {
|
|
||||||
indices.push(front[row][0], back[row][0], front[row + 1][0]);
|
|
||||||
indices.push(front[row + 1][0], back[row][0], back[row + 1][0]);
|
|
||||||
}
|
|
||||||
const geometry = new THREE.BufferGeometry();
|
const geometry = new THREE.BufferGeometry();
|
||||||
geometry.setIndex(indices);
|
geometry.setIndex(indices);
|
||||||
geometry.setAttribute('position', new THREE.Float32BufferAttribute(positions, 3));
|
geometry.setAttribute('position', new THREE.Float32BufferAttribute(positions, 3));
|
||||||
|
|||||||
Reference in New Issue
Block a user