Skip to content

Commit

Permalink
fix(composer): enable new features for SceneViewer (#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheilaXu committed Nov 16, 2022
1 parent a106e77 commit 631953a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion packages/scene-composer/src/SceneViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { v4 as uuid } from 'uuid';
import { isEqual } from 'lodash';
import styled from 'styled-components';

import { KnownComponentType, SceneViewerProps } from './interfaces';
import { COMPOSER_FEATURES, KnownComponentType, SceneViewerProps } from './interfaces';
import { SceneComposerInternal, useSceneComposerApi } from './components/SceneComposerInternal';

const SceneComposerContainer = styled.div`
Expand Down Expand Up @@ -64,6 +64,15 @@ export const SceneViewer: React.FC<SceneViewerProps> = ({ sceneComposerId, confi
config={{
...(config || {}),
mode: 'Viewing',
featureConfig: {
[COMPOSER_FEATURES.SceneHierarchyRedesign]: true,
[COMPOSER_FEATURES.SceneHierarchySearch]: true,
[COMPOSER_FEATURES.SceneHierarchyReorder]: true,
[COMPOSER_FEATURES.SubModelSelection]: true,
[COMPOSER_FEATURES.ENHANCED_EDITING]: true,
[COMPOSER_FEATURES.CameraView]: true,
[COMPOSER_FEATURES.OpacityRule]: true,
},
}}
onSceneLoaded={onSceneLoaded}
{...props}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ exports[`SceneViewer should render correctly 1`] = `
data-testid="webgl-root"
>
<div
config="{\\"mode\\":\\"Viewing\\"}"
config="{\\"mode\\":\\"Viewing\\",\\"featureConfig\\":{\\"SceneHierarchyRedesign\\":true,\\"SceneHierarchySearch\\":true,\\"SceneHierarchyReorder\\":true,\\"SubModelSelection\\":true,\\"ENHANCED_EDITING\\":true,\\"CameraView\\":true,\\"OpacityRule\\":true}}"
data-mocked="SceneComposerInternal"
onSceneLoaded={[Function]}
sceneComposerId="123"
Expand Down

0 comments on commit 631953a

Please sign in to comment.