Skip to content

Commit

Permalink
fix(composer): black screen on Matterport scene
Browse files Browse the repository at this point in the history
fix(composer): show matterport section in Edit mode only
  • Loading branch information
mukeshsahay committed Mar 23, 2023
1 parent 0405bdc commit 70b4b7c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/scene-composer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
"lines": 76.32,
"statements": 75.63,
"functions": 75.34,
"branches": 61.11,
"branches": 61,
"branchesTrue": 100
}
}
Expand Down
2 changes: 2 additions & 0 deletions packages/scene-composer/src/components/WebGLCanvasManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const WebGLCanvasManager: React.FC = () => {
const { gl } = useThree();
const domRef = useRef<HTMLElement>(gl.domElement.parentElement);
const environmentPreset = getSceneProperty(KnownSceneProperty.EnvironmentPreset);
const matterportModelId = getSceneProperty(KnownSceneProperty.MatterportModelId);
const rootNodeRefs = document.rootNodeRefs;
const [startingPointerPosition, setStartingPointerPosition] = useState<THREE.Vector2>(new THREE.Vector2());

Expand Down Expand Up @@ -121,6 +122,7 @@ export const WebGLCanvasManager: React.FC = () => {
rotation={[THREE.MathUtils.degToRad(270), 0, 0]}
onPointerUp={onPointerUp}
onPointerDown={onPointerDown}
renderOrder={matterportModelId ? 1 : undefined}
>
<planeGeometry args={[1000, 1000]} />
<meshBasicMaterial colorWrite={false} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export const SettingsPanel: React.FC<SettingsPanelProps> = ({ valueDataBindingPr
</ExpandableInfoSection>
)}

{matterportEnabled && (
{matterportEnabled && isEditing && (
<ExpandableInfoSection
title={intl.formatMessage({
description: 'ExpandableInfoSection Title',
Expand Down

0 comments on commit 70b4b7c

Please sign in to comment.