Skip to content

Commit

Permalink
feat: better results
Browse files Browse the repository at this point in the history
  • Loading branch information
JDihlmann committed Dec 21, 2023
1 parent eafe755 commit d36c96b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 23 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/github-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
# This is a basic workflow to help you get started with Actions

name: SAMURAI Deploy

# Controls when the workflow will run
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

Expand All @@ -28,9 +26,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v4

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Setup Node
uses: actions/setup-node@v2

- uses: actions/cache@v2
id: cache
with:
Expand All @@ -41,9 +45,6 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile --network-concurrency 1

- name: Build Remix
run: yarn build

- name: Build Static
run: yarn build_static

Expand Down
23 changes: 12 additions & 11 deletions app/components/relighter/relight_r3f.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const RelighterR3F: FunctionComponent<RelighterR3FProps> = ({ styling, children
const [selectedModel, setSelectedModel] = React.useState(0)
const [selectedHDR, setSelectedHDR] = React.useState(0)

const usable_hdrs = ["forest_slope", "lebombo", "photo_studio", "urban_alley"]
const usable_hdrs = ["lebombo", "photo_studio", "forest_slope", "urban_alley"]

const usable_assets = [
"tractor",
Expand All @@ -42,7 +42,7 @@ const RelighterR3F: FunctionComponent<RelighterR3FProps> = ({ styling, children
]

return (
<div className="flex flex-col justify-center items-center gap-2 pt-8">
<div className="flex flex-col justify-center items-center gap-2">
<div className="w-full h-20 grid grid-cols-fill gap-2 grid-flow-col ">
{usable_assets.map((asset, index) => (
<button
Expand Down Expand Up @@ -87,16 +87,17 @@ const RelighterR3F: FunctionComponent<RelighterR3FProps> = ({ styling, children
maxDistance={0.8}
/>
<Environment files={"hdris/" + usable_hdrs[selectedHDR] + ".hdr"} background blur={0.3} />
{usable_assets[selectedModel] == "tractor" && <Tractor />}
{usable_assets[selectedModel] == "remotecar" && <RemoteCar />}
{usable_assets[selectedModel] == "keywest" && <Keywest />}
{usable_assets[selectedModel] == "lion" && <Lion />}
{usable_assets[selectedModel] == "fireengine" && <Fireengine />}
{usable_assets[selectedModel] == "baldeagle" && <Baldeagle />}
{usable_assets[selectedModel] == "colored_box" && <ColoredBox />}
{usable_assets[selectedModel] == "dino_5" && <Dino5 />}
{usable_assets[selectedModel] == "hutmushroom" && <Hutmushroom />}

{usable_assets[selectedModel] == "tractor" && <Tractor rotation={[0, Math.PI * 0.8, 0]} />}
{usable_assets[selectedModel] == "remotecar" && <RemoteCar rotation={[0, Math.PI * 0.8, 0]} />}
{usable_assets[selectedModel] == "keywest" && <Keywest rotation={[0, Math.PI, 0]} />}
{usable_assets[selectedModel] == "lion" && <Lion rotation={[0, Math.PI * 0.8, 0]} />}
{usable_assets[selectedModel] == "baldeagle" && <Baldeagle rotation={[0, Math.PI * 0.9, 0]} />}
{usable_assets[selectedModel] == "fireengine" && <Fireengine rotation={[0, Math.PI * 0.8, 0]} />}
{usable_assets[selectedModel] == "pumpkin" && <Pumpkin />}
{usable_assets[selectedModel] == "dino_5" && <Dino5 rotation={[0, Math.PI * 1.5, 0]} />}
{usable_assets[selectedModel] == "hutmushroom" && <Hutmushroom rotation={[0, Math.PI * 1.1, 0]} />}
{usable_assets[selectedModel] == "colored_box" && <ColoredBox rotation={[0, Math.PI * 0.7, 0]} />}
</Canvas>
</div>

Expand Down

0 comments on commit d36c96b

Please sign in to comment.