Skip to content

Commit

Permalink
Deploying to gh-pages from @ 464b104 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
toji committed Jul 2, 2024
1 parent cb4c8ab commit 94ae8e2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
14 changes: 7 additions & 7 deletions sample/wireframe/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sample/wireframe/main.js.map

Large diffs are not rendered by default.

17 changes: 10 additions & 7 deletions sample/wireframe/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const settings = {
alphaThreshold: 0.5,
animate: true,
lines: true,
depthBias: 0.0,
depthBias: 1,
depthBiasSlopeScale: 0.5,
models: true,
};
Expand Down Expand Up @@ -328,23 +328,26 @@ gui.add(settings, 'barycentricCoordinatesBased').onChange(addRemoveGUI);
gui.add(settings, 'lines');
gui.add(settings, 'models');
gui.add(settings, 'animate');
gui.add(settings, 'depthBias', -1, 1, 0.05).onChange(rebuildLitPipeline);
gui
.add(settings, 'depthBiasSlopeScale', -1, 1, 0.05)
.onChange(rebuildLitPipeline);

const guis = [];
function addRemoveGUI() {
guis.forEach((g) => g.remove());
guis.length = 0;
if (settings.barycentricCoordinatesBased) {
guis.push(
gui.add(settings, 'thickness', 0.0, 10).onChange(updateThickness),
gui.add(settings, 'alphaThreshold', 0, 1).onChange(updateThickness)
);
} else {
guis.forEach((g) => g.remove());
guis.length = 0;
guis.push(
gui.add(settings, 'depthBias', -3, 3, 1).onChange(rebuildLitPipeline),
gui
.add(settings, 'depthBiasSlopeScale', -1, 1, 0.05)
.onChange(rebuildLitPipeline)
);
}
}
addRemoveGUI();

function updateThickness() {
objectInfos.forEach(({ lineUniformBuffer, lineUniformValues }) => {
Expand Down

0 comments on commit 94ae8e2

Please sign in to comment.