Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
gkjohnson committed Jun 17, 2024
1 parent d039917 commit 5c0bff8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion example/metadata.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
font-size: 12px;
}

#meshFeatures, #structuralMetadata {
#info, #meshFeatures, #structuralMetadata {

display: inline-block;
background-color: rgba( 0, 0, 0, 0.5 );
Expand All @@ -55,6 +55,7 @@
</head>
<body>
<div id="container">
<div><div id="info">Demonstration of the Mesh Features and<br/>Structural Metadata glTF extensions.</div></div>
<div><div id="meshFeatures"></div></div>
<div><div id="structuralMetadata"></div></div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions example/metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -431,14 +431,14 @@ function updateMetaDataDisplay() {
material.setFromMeshFeatures( meshFeatures, featureIndex );
material.highlightFeatureId = null;

} else if ( hoveredInfo === null || features[ featureIndex ] === null ) {
} else if ( hoveredInfo === null ) {

material.disableFeatureDisplay();

} else {

material.setFromMeshFeatures( meshFeatures, featureIndex );
material.highlightFeatureId = features[ featureIndex ];
material.highlightFeatureId = features[ featureIndex ] || - 1;

}

Expand Down
2 changes: 1 addition & 1 deletion example/src/MeshFeaturesMaterial.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const MeshFeaturesMaterialMixin = base => class extends base {

set highlightFeatureId( v ) {

if ( v < 0 || v === null || v === undefined ) {
if ( v === null || v === undefined ) {

this.uniforms.highlightFeatureId.value = null;
this.setDefine( 'USE_HIGHLIGHT_FEATURE', 0 );
Expand Down

0 comments on commit 5c0bff8

Please sign in to comment.