Skip to content
This repository was archived by the owner on Aug 21, 2024. It is now read-only.

Commit c20d1fd

Browse files
authored
Remove studio obj3d type (#9179)
* mvp for removing objs * license * i18n
1 parent a002407 commit c20d1fd

35 files changed

+472
-1319
lines changed

packages/client-core/i18n/en/editor.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,13 @@
181181
"info": "Takes a screenshot of your scene at the current view."
182182
}
183183
},
184+
"materialProperties": {
185+
"title": "Material",
186+
"info": "Access and edit detailed information about materials in the scene."
187+
},
184188
"properties": {
185189
"title": "Properties",
186-
"info": "Propeties let you access and edit detailed information about objects in your scene.",
190+
"info": "Propeties let you access and edit detailed information about objects in the scene.",
187191
"lbl-visible": "Visible",
188192
"lbl-preventBake": "Prevent Bake",
189193
"lbl-dynamicLoad": "Load Children Dynamically",

packages/client-core/src/components/InstanceChat/index.module.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,7 @@
218218
flex-direction: column;
219219
padding: 0 10px;
220220
margin-bottom: 5px;
221-
overflow-y: auto;
222-
overflow-x: clip;
221+
overflow: clip auto;
223222

224223
@media (max-width: 1024px) {
225224
margin: 15px 15px 20px;

packages/client-core/src/components/UserMediaWindow/index.module.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,7 @@
190190
padding: 8px;
191191
border-radius: 50px;
192192
display: flex;
193-
justify-content: center;
194-
align-content: center;
193+
place-content: center center;
195194
width: 30px;
196195
}
197196
}

packages/client/src/pages/styles.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,7 @@
275275
body {
276276
overflow: hidden;
277277
color: var(--textColor);
278-
overscroll-behavior-y: contain;
279-
overscroll-behavior-x: none;
278+
overscroll-behavior: none contain;
280279
background-color: var(--mainBackground);
281280
}
282281

packages/editor/src/classes/EditorCameraState.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ Ethereal Engine. All Rights Reserved.
2525

2626
import { Vector3 } from 'three'
2727

28-
import { EntityOrObjectUUID } from '@etherealengine/engine/src/ecs/functions/EntityTree'
28+
import { Entity } from '@etherealengine/engine/src/ecs/classes/Entity'
2929
import { defineState } from '@etherealengine/hyperflux'
3030

3131
export const EditorCameraState = defineState({
3232
name: 'EditorCameraState',
3333
initial: {
3434
zoomDelta: 0,
35-
focusedObjects: [] as EntityOrObjectUUID[],
35+
focusedObjects: [] as Entity[],
3636
isPanning: false,
3737
cursorDeltaX: 0,
3838
cursorDeltaY: 0,

packages/editor/src/components/EditorContainer.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ import { GraphPanelTitle } from './graph/GraphPanelTitle'
7979
import HierarchyPanelContainer from './hierarchy/HierarchyPanelContainer'
8080
import { HierarchyPanelTitle } from './hierarchy/HierarchyPanelTitle'
8181
import { PanelDragContainer, PanelIcon, PanelTitle } from './layout/Panel'
82+
import MaterialProperties, { MaterialPropertyTitle } from './materials/MaterialEditor'
8283
import MaterialLibraryPanel from './materials/MaterialLibraryPanel'
8384
import { MaterialLibraryPanelTitle } from './materials/MaterialLibraryPanelTitle'
8485
import PropertiesPanelContainer from './properties/PropertiesPanelContainer'
@@ -491,6 +492,11 @@ const defaultLayout: LayoutData = {
491492
id: 'graphPanel',
492493
title: <GraphPanelTitle />,
493494
content: <GraphPanel />
495+
},
496+
{
497+
id: 'graphPanel',
498+
title: <MaterialPropertyTitle />,
499+
content: <MaterialProperties />
494500
}
495501
]
496502
}

packages/editor/src/components/hierarchy/HeirarchyTreeWalker.ts

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,15 @@ All portions of the code written by the Ethereal Engine team are Copyright © 20
2323
Ethereal Engine. All Rights Reserved.
2424
*/
2525

26-
import { Object3D } from 'three'
27-
2826
import { Entity } from '@etherealengine/engine/src/ecs/classes/Entity'
2927
import { getComponent, hasComponent } from '@etherealengine/engine/src/ecs/functions/ComponentFunctions'
30-
import { EntityOrObjectUUID, EntityTreeComponent } from '@etherealengine/engine/src/ecs/functions/EntityTree'
28+
import { EntityTreeComponent } from '@etherealengine/engine/src/ecs/functions/EntityTree'
3129

3230
export type HeirarchyTreeNodeType = {
3331
depth: number
34-
entityNode: EntityOrObjectUUID
32+
entity: Entity
3533
childIndex: number
3634
lastChild: boolean
37-
/**
38-
* @param obj3d is used for exploding models, it will eventually be replaced when
39-
* the scene graph is implemented on the ECS instead of threejs
40-
*/
41-
obj3d?: Object3D
4235
isLeaf?: boolean
4336
isCollapsed?: boolean
4437
selected?: boolean
@@ -53,18 +46,18 @@ export type HeirarchyTreeCollapsedNodeType = { [key: number]: boolean }
5346
* @param {entityNode} collapsedNodes
5447
*/
5548
export function* heirarchyTreeWalker(
56-
treeNode: EntityOrObjectUUID,
57-
selectedEntities: (Entity | string)[],
49+
treeNode: Entity,
50+
selectedEntities: Entity[],
5851
collapsedNodes: HeirarchyTreeCollapsedNodeType
5952
): Generator<HeirarchyTreeNodeType> {
6053
if (!treeNode) return
6154

6255
const stack = [] as HeirarchyTreeNodeType[]
6356

64-
stack.push({ depth: 0, entityNode: treeNode, childIndex: 0, lastChild: true })
57+
stack.push({ depth: 0, entity: treeNode, childIndex: 0, lastChild: true })
6558

6659
while (stack.length !== 0) {
67-
const { depth, entityNode, childIndex, lastChild } = stack.pop() as HeirarchyTreeNodeType
60+
const { depth, entity: entityNode, childIndex, lastChild } = stack.pop() as HeirarchyTreeNodeType
6861
const isCollapsed = collapsedNodes[entityNode]
6962

7063
const entityTreeComponent = getComponent(entityNode as Entity, EntityTreeComponent)
@@ -73,7 +66,7 @@ export function* heirarchyTreeWalker(
7366
isLeaf: entityTreeComponent.children.length === 0,
7467
isCollapsed,
7568
depth,
76-
entityNode,
69+
entity: entityNode,
7770
selected: selectedEntities.includes(entityNode),
7871
active: selectedEntities.length > 0 && entityNode === selectedEntities[selectedEntities.length - 1],
7972
childIndex,
@@ -87,7 +80,7 @@ export function* heirarchyTreeWalker(
8780
if (node) {
8881
stack.push({
8982
depth: depth + 1,
90-
entityNode: entityTreeComponent.children[i],
83+
entity: entityTreeComponent.children[i],
9184
childIndex: i,
9285
lastChild: i === 0
9386
})

0 commit comments

Comments
 (0)