initial commit
This commit is contained in:
1 parent
3634209a4e
commit
f4f6028a88
37 files changed
+1121
-9
No files matched your search
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
Auto-generated by: https://github.com/pmndrs/gltfjsx
|
||||
Command: npx gltfjsx@6.2.16 c:\Users\mouli\Downloads\mario_kart.glb -o c:\Users\mouli\Desktop\mario_kart.tsx --types
|
||||
Author: TheShibeLord (https://sketchfab.com/TheShibeLord)
|
||||
License: CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)
|
||||
Source: https://sketchfab.com/3d-models/mario-kart-66cc131575344ab69238ec5872f24927
|
||||
Title: Mario Kart
|
||||
*/
|
||||
|
||||
import * as THREE from 'three'
|
||||
import React, { useRef } from 'react'
|
||||
import { useGLTF } from '@react-three/drei'
|
||||
import { GLTF } from 'three-stdlib'
|
||||
|
||||
type GLTFResult = GLTF & {
|
||||
nodes: {
|
||||
mt_mario: THREE.Mesh
|
||||
mt_kart_Mario_S: THREE.Mesh
|
||||
mt_Kart_Mario_Tire_S: THREE.Mesh
|
||||
}
|
||||
materials: {
|
||||
mt_mario: THREE.MeshStandardMaterial
|
||||
mt_kart_Mario_S: THREE.MeshStandardMaterial
|
||||
mt_Kart_Mario_Tire_S: THREE.MeshStandardMaterial
|
||||
}
|
||||
animations: GLTFAction[]
|
||||
}
|
||||
|
||||
type ContextType = Record<string, React.ForwardRefExoticComponent<JSX.IntrinsicElements['mesh']>>
|
||||
|
||||
export function Model(props: JSX.IntrinsicElements['group']) {
|
||||
const { nodes, materials } = useGLTF('/mario_kart.glb') as GLTFResult
|
||||
return (
|
||||
<group {...props} dispose={null}>
|
||||
<group rotation={[-Math.PI / 2, 0, 0]}>
|
||||
<group rotation={[Math.PI / 2, 0, 0]}>
|
||||
<mesh geometry={nodes.mt_mario.geometry} material={materials.mt_mario} />
|
||||
<mesh geometry={nodes.mt_kart_Mario_S.geometry} material={materials.mt_kart_Mario_S} />
|
||||
<mesh geometry={nodes.mt_Kart_Mario_Tire_S.geometry} material={materials.mt_Kart_Mario_Tire_S} />
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
)
|
||||
}
|
||||
|
||||
useGLTF.preload('/mario_kart.glb')
|
||||
Reference in new issue
Block a user