Skip to content
This repository was archived by the owner on Jan 31, 2023. It is now read-only.

Commit 17499f1

Browse files
Set transparency to get heatmap to display (#298)
* Set transparency to get heatmap to display * Adding Stefan as code owner
1 parent 99e864b commit 17499f1

4 files changed

Lines changed: 6 additions & 10 deletions

File tree

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
# the repo. Unless a later match takes precedence,
99
# @global-owner1 and @global-owner2 will be requested for
1010
# review when someone opens a pull request.
11-
* @Josh-Schifter @BaoTon @williamkbentley
11+
* @Josh-Schifter @BaoTon @williamkbentley @StefanRetief

src/frontend-samples/heatmap-decorator-sample/HeatmapDecorator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*--------------------------------------------------------------------------------------------*/
55
import { DecorateContext, Decorator, GraphicBranch, GraphicType, IModelApp, RenderGraphic, TextureImage } from "@itwin/core-frontend";
66
import { Geometry, Point3d, Range2d, Range3d, Transform } from "@itwin/core-geometry";
7-
import { ColorDef, ColorDefProps, Gradient, GraphicParams, ImageBuffer, ImageBufferFormat, RenderMaterial, RenderTexture, TextureMapping, ThematicGradientColorScheme, ThematicGradientMode, ThematicGradientSettings } from "@itwin/core-common";
7+
import { ColorDef, ColorDefProps, Gradient, GraphicParams, ImageBuffer, ImageBufferFormat, RenderMaterial, RenderTexture, TextureMapping, TextureTransparency, ThematicGradientColorScheme, ThematicGradientMode, ThematicGradientSettings } from "@itwin/core-common";
88
import { dispose } from "@itwin/core-bentley";
99

1010
/** This file contains the code that implements the heatmap decorator including
@@ -265,7 +265,7 @@ export default class HeatmapDecorator implements Decorator {
265265
return undefined;
266266

267267
/* Step 3: Convert the image buffer to a texture */
268-
const image: TextureImage = { source: imageBuffer };
268+
const image: TextureImage = { source: imageBuffer, transparency: TextureTransparency.Translucent };
269269
const texture = IModelApp.renderSystem.createTexture({ type: RenderTexture.Type.Normal, image });
270270

271271
if (undefined === texture)

src/frontend-samples/heatmap-decorator-sample/HeatmapDecoratorWidget.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ export const HeatmapDecoratorWidget: React.FunctionComponent = () => {
3737

3838
setRangeState(range);
3939
setHeightState(height);
40-
4140
}, []);
4241

4342
/** When the images are loaded, initalize the MarkerPin */

src/sampleManifest.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { getDisplayStylesSpec } from "frontend-samples/display-styles-sample/sam
1010
import { getScreenSpaceEffectsSpec } from "frontend-samples/screen-space-effects-sample/sampleSpec";
1111
import { getClassifierSpec } from "frontend-samples/classifier-sample/sampleSpec";
1212
import { getEmphasizeElementsSpec } from "./frontend-samples/emphasize-elements-sample/sampleSpec";
13-
// import { getHeatmapDecoratorSpec } from "./frontend-samples/heatmap-decorator-sample/sampleSpec";
13+
import { getHeatmapDecoratorSpec } from "./frontend-samples/heatmap-decorator-sample/sampleSpec";
1414
import { getImageExportSpec } from "./frontend-samples/image-export/sampleSpec";
1515
import { getMarkerPinSpec } from "./frontend-samples/marker-pin-sample/sampleSpec";
1616
import { getMultiViewportSpec } from "frontend-samples/multi-viewport-sample/sampleSpec";
@@ -25,7 +25,6 @@ import { getCrossProbingSpec } from "./frontend-samples/cross-probing-sample/sam
2525
import { getViewAttributesSpec } from "./frontend-samples/view-attributes-sample/sampleSpec";
2626
import { getViewClipSpec } from "./frontend-samples/view-clip-sample/sampleSpec";
2727
import { getZoomToElementsSpec } from "./frontend-samples/zoom-to-elements-sample/sampleSpec";
28-
// import { getReadSettingsSpec } from "./frontend-samples/read-settings-sample/sampleSpec";
2928
import { getRealityDataSpec } from "./frontend-samples/reality-data-sample/sampleSpec";
3029
import { getVolumeQuerySpec } from "./frontend-samples/volume-query-sample/sampleSpec";
3130
import { getHyperModelingSpec } from "./frontend-samples/hypermodeling-sample/sampleSpec";
@@ -99,7 +98,7 @@ export const sampleManifest: SampleSpecGroup[] = [{
9998
getDisplayStylesSpec(),
10099
getEmphasizeElementsSpec(),
101100
getExplodeSpec(),
102-
// getHeatmapDecoratorSpec(), Temporarily disabled until sample is fixed
101+
getHeatmapDecoratorSpec(),
103102
getHyperModelingSpec(),
104103
getImageExportSpec(),
105104
getIotAlertSpec(),
@@ -112,7 +111,7 @@ export const sampleManifest: SampleSpecGroup[] = [{
112111
getScreenSpaceEffectsSpec(),
113112
getSerializeViewSpec(),
114113
getShadowStudySpec(),
115-
// getSwipingComparisonSpec(), Temporarily disabled until sample is fixed
114+
// getSwipingComparisonSpec(),
116115
getThematicDisplaySpec(),
117116
getTooltipCustomizeSpec(),
118117
getViewClipSpec(),
@@ -171,11 +170,9 @@ export const sampleManifest: SampleSpecGroup[] = [{
171170
getChangedElementsSpec(),
172171
getClashReviewSpec(),
173172
getIssuesSpec(),
174-
// getReadSettingsSpec(), Temporarily disabled until sample is fixed
175173
getTransformationSpec(),
176174
getValidationSpec(),
177175
],
178-
179176
},
180177
];
181178

0 commit comments

Comments
 (0)