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

Commit

Permalink
IR-2810: Redesign Compress Menu (#10469)
Browse files Browse the repository at this point in the history
* Redesign Compress Menu

* Add GLTFTransformProperties building block

And file name, resource URL field designs

* Add all transform params

* Fix TODOs

- Replace `useState` with `useHookstate`
- Use translations file instead of hardcoded strings

* remove log

* remove empty onChange

* ability to remove lod and saved preset

* prevent rerender error on file browser

* fix check error

* manually show compress modal using showPopover onclick

* revert text component

* fix check errors

---------

Co-authored-by: aditya-mitra <[email protected]>
  • Loading branch information
CITIZENDOT and aditya-mitra authored Jul 1, 2024
1 parent 41744bc commit 9d14023
Show file tree
Hide file tree
Showing 11 changed files with 427 additions and 600 deletions.
8 changes: 6 additions & 2 deletions packages/client-core/i18n/en/editor.json
Original file line number Diff line number Diff line change
Expand Up @@ -469,14 +469,18 @@
"lbl-interactionText": "Interaction Text",
"lbl-interactionType": "Interaction Type",
"transform": {
"lodLevels": "LOD Levels",
"lodLevelNumber": "LOD Level {{index}}",
"compress": "Compress",
"applyPresetConfirmation": "Would you like to apply this preset?",
"savePreset": "Save Preset",
"useDraco": "Use DRACO Mesh Compression",
"useMeshopt": "Use Meshoptimizer",
"useQuantization": "Use Mesh Quantization",
"textureFormat": "Image Format",
"modelFormat": "Model Format",
"resourceUri": "Resource URI",
"dst": "File Name",
"resourceUri": "Resource URL",
"dst": "File name",
"resampleAnimations": "Resample Animations",
"maxTextureSize": "Max Texture Size",
"simplifyRatio": "Simplify Ratio",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ import { ToolButton } from '../../toolbar/ToolButton'
import { AssetSelectionChangePropsType } from '../AssetsPreviewPanel'
import ImageCompressionPanel from '../ImageCompressionPanel'
import ImageConvertPanel from '../ImageConvertPanel'
import ModelCompressionPanel from '../ModelCompressionPanel'
import styles from '../styles.module.scss'
import { FileBrowserItem, FileTableWrapper, canDropItemOverFolder } from './FileBrowserGrid'
import { FilesViewModeSettings, FilesViewModeState, availableTableColumns } from './FileBrowserState'
Expand Down Expand Up @@ -692,14 +691,6 @@ const FileBrowserContentPanel: React.FC<FileBrowserContentPanelProps> = (props)
/>
)}

{openCompress.value && fileProperties.value && fileConsistsOfContentType(fileProperties.value, 'model') && (
<ModelCompressionPanel
openCompress={openCompress}
fileProperties={fileProperties as any}
onRefreshDirectory={refreshDirectory}
/>
)}

{openCompress.value && fileProperties.value && fileConsistsOfContentType(fileProperties.value, 'image') && (
<ImageCompressionPanel
openCompress={openCompress}
Expand Down
Loading

0 comments on commit 9d14023

Please sign in to comment.