-
Notifications
You must be signed in to change notification settings - Fork 439
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add models to
/create-profile
scenes (#1441)
* feat: add models to scene * refactor: use backend schemas * chore: compress guild pass models
- Loading branch information
1 parent
b79f500
commit 91e4c66
Showing
11 changed files
with
145 additions
and
62 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
52 changes: 52 additions & 0 deletions
52
src/app/(marketing)/create-profile/_components/BasicGuildPass.tsx
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,52 @@ | ||
/* | ||
Auto-generated by: https://github.com/pmndrs/gltfjsx | ||
Command: npx [email protected] basic_guild_pass.glb --transform --types | ||
Files: basic_guild_pass.glb [10.27MB] > /home/senkora/projects/guild.xyz/public/models/basic_guild_pass-transformed.glb [551.1KB] (95%) | ||
*/ | ||
|
||
import { useGLTF } from "@react-three/drei" | ||
import * as THREE from "three" | ||
import { GLTF } from "three-stdlib" | ||
|
||
type GLTFResult = GLTF & { | ||
nodes: { | ||
Curve: THREE.Mesh | ||
Curve001: THREE.Mesh | ||
Curve003: THREE.Mesh | ||
} | ||
materials: { | ||
SVGMat: THREE.MeshStandardMaterial | ||
"Material.001": THREE.MeshStandardMaterial | ||
"Material.002": THREE.MeshStandardMaterial | ||
} | ||
// animations: GLTFAction[] | ||
} | ||
|
||
export function Model(props: JSX.IntrinsicElements["group"]) { | ||
const { nodes, materials } = useGLTF( | ||
"models/basic_guild_pass-transformed.glb" | ||
) as GLTFResult | ||
return ( | ||
<group {...props} dispose={null}> | ||
<mesh | ||
geometry={nodes.Curve.geometry} | ||
material={materials.SVGMat} | ||
scale={6.649} | ||
/> | ||
<mesh | ||
geometry={nodes.Curve001.geometry} | ||
material={materials["Material.001"]} | ||
position={[-1.598, 0.015, 0.781]} | ||
scale={6.86} | ||
/> | ||
<mesh | ||
geometry={nodes.Curve003.geometry} | ||
material={materials["Material.002"]} | ||
position={[-0.597, 0.018, 0.315]} | ||
scale={6.104} | ||
/> | ||
</group> | ||
) | ||
} | ||
|
||
useGLTF.preload("models/basic_guild_pass-transformed.glb") |
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
52 changes: 52 additions & 0 deletions
52
src/app/(marketing)/create-profile/_components/GoldGuildPass.tsx
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,52 @@ | ||
/* | ||
Auto-generated by: https://github.com/pmndrs/gltfjsx | ||
Command: npx [email protected] gold_guild_pass.glb --transform --types | ||
Files: gold_guild_pass.glb [10.27MB] > /home/senkora/projects/guild.xyz/public/models/gold_guild_pass-transformed.glb [551.06KB] (95%) | ||
*/ | ||
|
||
import { useGLTF } from "@react-three/drei" | ||
import * as THREE from "three" | ||
import { GLTF } from "three-stdlib" | ||
|
||
type GLTFResult = GLTF & { | ||
nodes: { | ||
Curve: THREE.Mesh | ||
Curve001: THREE.Mesh | ||
Curve003: THREE.Mesh | ||
} | ||
materials: { | ||
"Material.003": THREE.MeshStandardMaterial | ||
"Material.001": THREE.MeshStandardMaterial | ||
"Material.004": THREE.MeshStandardMaterial | ||
} | ||
// animations: GLTFAction[]nimations: GLTFAction[] | ||
} | ||
|
||
export function Model(props: JSX.IntrinsicElements["group"]) { | ||
const { nodes, materials } = useGLTF( | ||
"models/gold_guild_pass-transformed.glb" | ||
) as GLTFResult | ||
return ( | ||
<group {...props} dispose={null}> | ||
<mesh | ||
geometry={nodes.Curve.geometry} | ||
material={materials["Material.003"]} | ||
scale={6.649} | ||
/> | ||
<mesh | ||
geometry={nodes.Curve001.geometry} | ||
material={materials["Material.001"]} | ||
position={[-1.598, 0.015, 0.781]} | ||
scale={6.86} | ||
/> | ||
<mesh | ||
geometry={nodes.Curve003.geometry} | ||
material={materials["Material.004"]} | ||
position={[-0.66, 0.003, 0.32]} | ||
scale={6.246} | ||
/> | ||
</group> | ||
) | ||
} | ||
|
||
useGLTF.preload("models/gold_guild_pass-transformed.glb") |
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
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
This file was deleted.
Oops, something went wrong.