-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
607 additions
and
224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 45 additions & 10 deletions
55
src/components/model-viewer/ModelViewerInternal.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,66 @@ | ||
|
||
.root { | ||
position: relative; | ||
.wrapper { | ||
display: inline-flex; | ||
flex-direction: row; | ||
|
||
--modelviewer-width: auto; | ||
--modelviewer-height: auto; | ||
--modelviewer-aspect-ratio: auto; | ||
width: var(--modelviewer-width); | ||
height: var(--modelviewer-height); | ||
|
||
background: rgb(0 0 0 / 20%); | ||
background-color: var(--color--scene-background); | ||
border-radius: 16px; | ||
} | ||
|
||
.loading .controls { | ||
display: none; | ||
} | ||
|
||
.controls { | ||
flex: 0 1 auto; | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
.controls button { | ||
appearance: none; | ||
border: none; | ||
background: none; | ||
} | ||
|
||
.controls button img { | ||
width: 32px; | ||
height: 32px; | ||
opacity: 0.8; | ||
} | ||
|
||
.controls button:hover img { | ||
opacity: 1; | ||
} | ||
|
||
.controls button:active img { | ||
opacity: 0.6; | ||
} | ||
|
||
.controls button:disabled img { | ||
opacity: 0.2; | ||
} | ||
|
||
.root { | ||
position: relative; | ||
} | ||
|
||
.root > img { | ||
position: absolute; | ||
width: var(--modelviewer-width); | ||
height: var(--modelviewer-height); | ||
} | ||
|
||
.viewport { | ||
display: inline-block; | ||
width: var(--modelviewer-width); | ||
height: var(--modelviewer-height); | ||
} | ||
|
||
.root, .root > img, .root > .viewport { | ||
width: calc(min(100%, var(--modelviewer-width))) !important; | ||
width: var(--modelviewer-width); | ||
height: auto !important; | ||
aspect-ratio: var(--modelviewer-aspect-ratio); | ||
overflow: hidden; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import css from "./recipe.module.css"; | ||
import RecipeIngredient from "./RecipeIngredient"; | ||
import RecipeArrow from "./RecipeArrow"; | ||
import { ChargerRecipeInfo, useGuide } from "../../data/Guide.ts"; | ||
import MinecraftFrame from "../MinecraftFrame.tsx"; | ||
import ItemIcon from "../ItemIcon.tsx"; | ||
|
||
export interface ChargerRecipeProps { | ||
recipe: ChargerRecipeInfo; | ||
} | ||
|
||
function ChargerRecipe({ recipe }: ChargerRecipeProps) { | ||
const guide = useGuide(); | ||
const resultItem = guide.getItemInfo(recipe.resultItem); | ||
|
||
return ( | ||
<MinecraftFrame> | ||
<div className={css.recipeBoxLayout}> | ||
<div> | ||
<ItemIcon nolink id="charger" /> Charger: {resultItem.displayName} | ||
</div> | ||
<RecipeIngredient itemIds={recipe.ingredient} /> | ||
<RecipeArrow /> | ||
<RecipeIngredient itemIds={[recipe.resultItem]} /> | ||
</div> | ||
</MinecraftFrame> | ||
); | ||
} | ||
|
||
export default ChargerRecipe; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.