Update models

master
Ian Mancini 4 years ago
parent 41713bf016
commit ad2596c30e

BIN
packages/client/public/model/plaza.glb (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

@ -1,7 +1,6 @@
import { Box } from '@chakra-ui/core'
import { Physics } from '@react-three/cannon'
import { PointerLockControls, Sky } from '@react-three/drei'
import { Environment } from '@react-three/drei/Environment'
import {
Bloom,
DepthOfField,
@ -24,11 +23,10 @@ const Museo: React.FC = () => {
<Plaza />
<Physics
gravity={[0, 0, 0]}
iterations={10}
iterations={2}
step={1 / 60}
size={10}
broadphase="SAP"
axisIndex={1}
broadphase="Naive"
defaultContactMaterial={{
friction: 0,
restitution: 0,
@ -48,19 +46,20 @@ const Museo: React.FC = () => {
rayleigh={2.9}
/>
<Suspense fallback={null}>
<EffectComposer>
<EffectComposer multisampling={16}>
<DepthOfField
focusDistance={0}
focalLength={0.15}
bokehScale={2}
height={480}
bokehScale={2.5}
width={window.innerWidth / 2}
height={window.innerHeight / 2}
/>
<Vignette eskil={false} offset={0.1} darkness={0.8} />
<Bloom
luminanceThreshold={0.7}
luminanceSmoothing={0.9}
height={300}
opacity={3}
opacity={1}
/>
</EffectComposer>
</Suspense>

@ -71,7 +71,7 @@ const Player = (props: SphereProps) => {
.applyEuler(camera.rotation)
if (forward || backward || left || right) {
api.velocity.set(direction.x, -2, direction.z)
api.velocity.set(direction.x, -SPEED / 2, direction.z)
} else {
api.velocity.set(0, 0, 0)
}

@ -1,13 +1,10 @@
/*
auto-generated by: https://github.com/pmndrs/gltfjsx
*/
import React, { useRef } from 'react'
import { useGLTF } from '@react-three/drei/useGLTF'
import { useCubeTexture } from '@react-three/drei'
export default function Model(props) {
const group = useRef()
const { nodes, materials } = useGLTF('/model/plaza.glb')
const { nodes, materials, scene, ...rest } = useGLTF('/model/plaza.glb')
const envMap = useCubeTexture(
['px.png', 'nx.png', 'py.png', 'ny.png', 'pz.png', 'nz.png'],
@ -16,845 +13,9 @@ export default function Model(props) {
materials.metal_glass.envMap = envMap
return (
<>
<group ref={group} {...props}>
<group position={[1.74, 1.21, -17.68]} scale={[4.95, 3.08, 4.95]}>
<mesh material={materials.marble} geometry={nodes.Circle002_0.geometry} />
<mesh
material={materials.metal_glass}
geometry={nodes['Circle.002_1_1'].geometry}
/>
<mesh material={materials.dirt} geometry={nodes['Circle.002_2_2'].geometry} />
<group ref={group} {...props} dispose={null}>
<primitive object={scene} dispose={null} />
</group>
<mesh
material={materials.metal_glass}
geometry={nodes.arti_logo.geometry}
position={[1.76, 4.63, -22.92]}
rotation={[1.22, 0, 0]}
/>
<mesh
material={materials.marble}
geometry={nodes.logo_holder.geometry}
position={[1.76, 4.63, -22.98]}
rotation={[Math.PI / 2, 0, 0]}
scale={[1.45, 1.45, 1.45]}
/>
<group position={[1.67, 1.05, -2.56]}>
<mesh material={materials.sidewalk} geometry={nodes.street_1_0.geometry} />
<mesh material={materials.cordon} geometry={nodes.street_2_1.geometry} />
<mesh material={materials.asfalt} geometry={nodes.street_3_2.geometry} />
</group>
<group position={[1.73, 1.23, 8.19]}>
<mesh material={materials.grass} geometry={nodes.Plane001_0.geometry} />
<mesh material={materials.dirt} geometry={nodes['Plane.001_1_1'].geometry} />
</group>
<group position={[1.74, 1.23, 5.99]}>
<mesh material={materials.marble} geometry={nodes.cerca_mesh_0.geometry} />
<mesh
material={materials.green_metal}
geometry={nodes.cerca_mesh_1_1.geometry}
/>
</group>
<group position={[3.9, 1.96, 32.88]}>
<mesh material={materials.marble} geometry={nodes.fuente_mesh_0.geometry} />
<mesh material={materials.water} geometry={nodes.fuente_mesh_1_1.geometry} />
</group>
<group position={[1.74, 1.23, 5.99]}>
<mesh material={materials.marble} geometry={nodes.Cube001_0.geometry} />
<mesh
material={materials.green_metal}
geometry={nodes['Cube.001_1_1'].geometry}
/>
</group>
<mesh
material={materials.metal}
geometry={nodes.hamacas.geometry}
position={[-8.76, 1.14, 41.32]}
rotation={[0, 0.44, 0]}
/>
<mesh
material={materials.metal}
geometry={nodes.tobogan.geometry}
position={[-2.87, 1.56, 44.11]}
rotation={[0, 1.23, 0]}
/>
<mesh
material={materials.marble}
geometry={nodes.stairs.geometry}
position={[16.93, 1.28, 47.71]}
rotation={[0, 0.7, 0]}
/>
<group position={[3.88, 1.23, 8.19]} scale={[0.52, 0.52, 0.52]}>
<mesh material={materials.black_metal} geometry={nodes.lamp_mesh_0.geometry} />
<mesh
material={materials['Material.001']}
geometry={nodes.lamp_mesh_1_1.geometry}
/>
</group>
<group position={[-0.74, 1.23, 14.7]} scale={[0.52, 0.52, 0.52]}>
<mesh material={materials.black_metal} geometry={nodes.lamp_mesh_0.geometry} />
<mesh
material={materials['Material.001']}
geometry={nodes.lamp_mesh_1_1.geometry}
/>
</group>
<group position={[9.95, 1.23, 22.25]} scale={[0.52, 0.52, 0.52]}>
<mesh material={materials.black_metal} geometry={nodes.lamp_mesh_0.geometry} />
<mesh
material={materials['Material.001']}
geometry={nodes.lamp_mesh_1_1.geometry}
/>
</group>
<group position={[-10.51, 1.23, 26.5]} scale={[0.52, 0.52, 0.52]}>
<mesh material={materials.black_metal} geometry={nodes.lamp_mesh_0.geometry} />
<mesh
material={materials['Material.001']}
geometry={nodes.lamp_mesh_1_1.geometry}
/>
</group>
<group position={[-10.45, 1.23, 37.21]} scale={[0.52, 0.52, 0.52]}>
<mesh material={materials.black_metal} geometry={nodes.lamp_mesh_0.geometry} />
<mesh
material={materials['Material.001']}
geometry={nodes.lamp_mesh_1_1.geometry}
/>
</group>
<group
position={[5.22, 1.23, 46.12]}
rotation={[0, 0, 0]}
scale={[0.52, 0.52, 0.52]}
>
<mesh material={materials.black_metal} geometry={nodes.lamp_mesh_0.geometry} />
<mesh
material={materials['Material.001']}
geometry={nodes.lamp_mesh_1_1.geometry}
/>
</group>
<group position={[18.58, 1.23, 44.21]} scale={[0.52, 0.52, 0.52]}>
<mesh material={materials.black_metal} geometry={nodes.lamp_mesh_0.geometry} />
<mesh
material={materials['Material.001']}
geometry={nodes.lamp_mesh_1_1.geometry}
/>
</group>
<group position={[17.99, 1.23, 33.81]} scale={[0.52, 0.52, 0.52]}>
<mesh material={materials.black_metal} geometry={nodes.lamp_mesh_0.geometry} />
<mesh
material={materials['Material.001']}
geometry={nodes.lamp_mesh_1_1.geometry}
/>
</group>
<group position={[15.98, 2.06, 16.67]} scale={[0.22, 0.22, 0.22]}>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type2_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type2_1_1.geometry}
/>
</group>
<group
position={[22.05, 2.06, 24.28]}
rotation={[0, -0.96, 0]}
scale={[0.26, 0.26, 0.26]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type2_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type2_1_1.geometry}
/>
</group>
<group
position={[23.87, 2.06, 46.97]}
rotation={[-Math.PI, 0.5, -Math.PI]}
scale={[0.31, 0.31, 0.31]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type2_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type2_1_1.geometry}
/>
</group>
<group
position={[12.23, 2.06, 54.7]}
rotation={[0, 0.46, 0]}
scale={[0.3, 0.3, 0.3]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type2_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type2_1_1.geometry}
/>
</group>
<group
position={[-5.28, 2.06, 52.57]}
rotation={[Math.PI, -1.11, Math.PI]}
scale={[0.38, 0.38, 0.38]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type2_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type2_1_1.geometry}
/>
</group>
<group
position={[-18.09, 2.06, 35.88]}
rotation={[-Math.PI, 1.09, -Math.PI]}
scale={[0.32, 0.32, 0.32]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type2_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type2_1_1.geometry}
/>
</group>
<group
position={[-14.78, 2.06, 13.7]}
rotation={[Math.PI, -0.47, Math.PI]}
scale={[0.33, 0.33, 0.33]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type2_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type2_1_1.geometry}
/>
</group>
<group
position={[37.86, 2.06, 14.53]}
rotation={[0, -0.96, 0]}
scale={[0.36, 0.36, 0.36]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type2_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type2_1_1.geometry}
/>
</group>
<group
position={[42.77, 2.06, 43.25]}
rotation={[0, 1.08, 0]}
scale={[0.36, 0.36, 0.36]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type2_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type2_1_1.geometry}
/>
</group>
<group
position={[34.67, 2.06, 67.05]}
rotation={[0, -0.79, 0]}
scale={[0.36, 0.36, 0.36]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type2_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type2_1_1.geometry}
/>
</group>
<group
position={[-21.15, 2.06, 64.7]}
rotation={[-3.14, 1.19, -3.14]}
scale={[0.36, 0.36, 0.36]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type2_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type2_1_1.geometry}
/>
</group>
<group
position={[-38.93, 2.06, 22.77]}
rotation={[0, 0.58, 0]}
scale={[0.48, 0.48, 0.48]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type2_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type2_1_1.geometry}
/>
</group>
<group
position={[-37.82, 2.06, 53.64]}
rotation={[-Math.PI, 0.92, -Math.PI]}
scale={[0.29, 0.29, 0.29]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type2_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type2_1_1.geometry}
/>
</group>
<group
position={[-12.86, 2.05, 48.27]}
rotation={[0, 1.02, 0]}
scale={[0.48, 0.48, 0.48]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type2_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type2_1_1.geometry}
/>
</group>
<group
position={[-43.48, 2.05, 73.17]}
rotation={[-3.14, -1.23, 3.14]}
scale={[0.41, 0.41, 0.41]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type2_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type2_1_1.geometry}
/>
</group>
<group
position={[0.75, 2.06, 71.09]}
rotation={[-Math.PI, 0.28, -Math.PI]}
scale={[0.38, 0.38, 0.38]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type2_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type2_1_1.geometry}
/>
</group>
<group position={[-19.97, 2.06, 22.05]} scale={[0.25, 0.25, 0.25]}>
<mesh material={materials.wood} geometry={nodes.Cube008_0.geometry} />
<mesh material={materials.leaves} geometry={nodes['Cube.008_1_1'].geometry} />
</group>
<group
position={[-31.53, 2.06, 32.77]}
rotation={[-Math.PI, 1.19, -Math.PI]}
scale={[0.26, 0.26, 0.26]}
>
<mesh material={materials.wood} geometry={nodes.Cube008_0.geometry} />
<mesh material={materials.leaves} geometry={nodes['Cube.008_1_1'].geometry} />
</group>
<group
position={[-19.93, 2.06, 46.88]}
rotation={[3.14, -0.15, -3.14]}
scale={[0.25, 0.25, 0.25]}
>
<mesh material={materials.wood} geometry={nodes.Cube008_0.geometry} />
<mesh material={materials.leaves} geometry={nodes['Cube.008_1_1'].geometry} />
</group>
<group
position={[0.65, 2.06, 53.59]}
rotation={[0, -0.99, 0]}
scale={[0.25, 0.25, 0.25]}
>
<mesh material={materials.wood} geometry={nodes.Cube008_0.geometry} />
<mesh material={materials.leaves} geometry={nodes['Cube.008_1_1'].geometry} />
</group>
<group
position={[22.52, 2.06, 57.64]}
rotation={[-Math.PI, -0.58, -Math.PI]}
scale={[0.25, 0.25, 0.25]}
>
<mesh material={materials.wood} geometry={nodes.Cube008_0.geometry} />
<mesh material={materials.leaves} geometry={nodes['Cube.008_1_1'].geometry} />
</group>
<group
position={[34.72, 2.06, 46.72]}
rotation={[0, -0.75, 0]}
scale={[0.31, 0.31, 0.31]}
>
<mesh material={materials.wood} geometry={nodes.Cube008_0.geometry} />
<mesh material={materials.leaves} geometry={nodes['Cube.008_1_1'].geometry} />
</group>
<group
position={[28.33, 2.06, 35.81]}
rotation={[0, -1.56, 0]}
scale={[0.2, 0.2, 0.2]}
>
<mesh material={materials.wood} geometry={nodes.Cube008_0.geometry} />
<mesh material={materials.leaves} geometry={nodes['Cube.008_1_1'].geometry} />
</group>
<group
position={[9.86, 2.06, 66.88]}
rotation={[0, -0.52, 0]}
scale={[0.3, 0.3, 0.3]}
>
<mesh material={materials.wood} geometry={nodes.Cube008_0.geometry} />
<mesh material={materials.leaves} geometry={nodes['Cube.008_1_1'].geometry} />
</group>
<group
position={[-7.56, 2.06, 61.91]}
rotation={[-Math.PI, 1.25, -Math.PI]}
scale={[0.3, 0.3, 0.3]}
>
<mesh material={materials.wood} geometry={nodes.Cube008_0.geometry} />
<mesh material={materials.leaves} geometry={nodes['Cube.008_1_1'].geometry} />
</group>
<group
position={[-29.94, 2.06, 46.43]}
rotation={[0, -1.54, 0]}
scale={[0.43, 0.43, 0.43]}
>
<mesh material={materials.wood} geometry={nodes.Cube008_0.geometry} />
<mesh material={materials.leaves} geometry={nodes['Cube.008_1_1'].geometry} />
</group>
<group
position={[27.42, 2.06, 16.19]}
rotation={[0, 1.4, 0]}
scale={[0.22, 0.22, 0.22]}
>
<mesh material={materials.wood} geometry={nodes.Cube008_0.geometry} />
<mesh material={materials.leaves} geometry={nodes['Cube.008_1_1'].geometry} />
</group>
<group
position={[-6.12, 2.06, 18.7]}
rotation={[0, 1.4, 0]}
scale={[0.21, 0.21, 0.21]}
>
<mesh material={materials.wood} geometry={nodes.Cube008_0.geometry} />
<mesh material={materials.leaves} geometry={nodes['Cube.008_1_1'].geometry} />
</group>
<group
position={[-18.34, 2.05, 55.81]}
rotation={[3.14, -1.45, 3.14]}
scale={[0.31, 0.31, 0.31]}
>
<mesh material={materials.wood} geometry={nodes.Cube008_0.geometry} />
<mesh material={materials.leaves} geometry={nodes['Cube.008_1_1'].geometry} />
</group>
<group
position={[34.61, 2.06, 30.68]}
rotation={[0, 0.08, 0]}
scale={[0.31, 0.31, 0.31]}
>
<mesh material={materials.wood} geometry={nodes.Cube008_0.geometry} />
<mesh material={materials.leaves} geometry={nodes['Cube.008_1_1'].geometry} />
</group>
<group
position={[6.72, 2.06, 53.77]}
rotation={[-Math.PI, -0.47, -Math.PI]}
scale={[0.23, 0.23, 0.23]}
>
<mesh material={materials.wood} geometry={nodes.Cube008_0.geometry} />
<mesh material={materials.leaves} geometry={nodes['Cube.008_1_1'].geometry} />
</group>
<group position={[-25.85, 2.06, 14.73]} scale={[0.22, 0.22, 0.22]}>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type4_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type4_1_1.geometry}
/>
</group>
<group
position={[-18.58, 2.06, 28.07]}
rotation={[0, -0.78, 0]}
scale={[0.15, 0.15, 0.15]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type4_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type4_1_1.geometry}
/>
</group>
<group
position={[-22.21, 3.87, 40.68]}
rotation={[0, -0.55, 0]}
scale={[0.15, 0.15, 0.15]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type4_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type4_1_1.geometry}
/>
</group>
<group
position={[-27.51, 2.06, 25.62]}
rotation={[0, -1.04, 0]}
scale={[0.15, 0.15, 0.15]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type4_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type4_1_1.geometry}
/>
</group>
<group
position={[-29.46, 2.06, 55.87]}
rotation={[Math.PI, -0.86, Math.PI]}
scale={[0.18, 0.18, 0.18]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type4_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type4_1_1.geometry}
/>
</group>
<group
position={[-13.65, 2.06, 59.88]}
rotation={[Math.PI, -0.86, Math.PI]}
scale={[0.15, 0.15, 0.15]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type4_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type4_1_1.geometry}
/>
</group>
<group
position={[3.17, 2.06, 62.84]}
rotation={[-Math.PI, 1.49, -Math.PI]}
scale={[0.2, 0.2, 0.2]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type4_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type4_1_1.geometry}
/>
</group>
<group
position={[20.96, 2.06, 64.77]}
rotation={[0, 0.29, 0]}
scale={[0.18, 0.18, 0.18]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type4_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type4_1_1.geometry}
/>
</group>
<group
position={[31.21, 2.06, 51.28]}
rotation={[-Math.PI, 0.11, -Math.PI]}
scale={[0.21, 0.21, 0.21]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type4_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type4_1_1.geometry}
/>
</group>
<group
position={[34.76, 2.06, 39.77]}
rotation={[0, 1.29, 0]}
scale={[0.14, 0.14, 0.14]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type4_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type4_1_1.geometry}
/>
</group>
<group
position={[22.9, 2.06, 38.98]}
rotation={[-Math.PI, 0.85, -Math.PI]}
scale={[0.2, 0.2, 0.2]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type4_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type4_1_1.geometry}
/>
</group>
<group
position={[22.69, 2.06, 30.17]}
rotation={[0, 1.27, 0]}
scale={[0.15, 0.15, 0.15]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type4_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type4_1_1.geometry}
/>
</group>
<group
position={[29.66, 2.06, 24.54]}
rotation={[0, 1.27, 0]}
scale={[0.21, 0.21, 0.21]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type4_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type4_1_1.geometry}
/>
</group>
<group
position={[43.4, 2.06, 23.06]}
rotation={[0, 1.27, 0]}
scale={[0.15, 0.15, 0.15]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type4_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type4_1_1.geometry}
/>
</group>
<group
position={[42.16, 2.06, 58.52]}
rotation={[0, 0.08, 0]}
scale={[0.23, 0.23, 0.23]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type4_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type4_1_1.geometry}
/>
</group>
<group
position={[21.39, 2.06, 72.23]}
rotation={[-Math.PI, 1.07, -Math.PI]}
scale={[0.32, 0.32, 0.32]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type4_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type4_1_1.geometry}
/>
</group>
<group
position={[-6.51, 2.06, 72.22]}
rotation={[0, -0.13, 0]}
scale={[0.32, 0.32, 0.32]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type4_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type4_1_1.geometry}
/>
</group>
<group
position={[-37.11, 2.06, 33.55]}
rotation={[0, -1.28, 0]}
scale={[0.32, 0.32, 0.32]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type4_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type4_1_1.geometry}
/>
</group>
<group
position={[-27.67, 2.05, 59.96]}
rotation={[0, 0.71, 0]}
scale={[0.18, 0.18, 0.18]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type4_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type4_1_1.geometry}
/>
</group>
<group
position={[13.71, 1.23, 48.82]}
rotation={[-Math.PI, 0.85, -Math.PI]}
scale={[0.15, 0.15, 0.15]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type4_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type4_1_1.geometry}
/>
</group>
<mesh
material={materials.leaves}
geometry={nodes.tree054.geometry}
position={[-15.45, 2.07, 25.91]}
rotation={[0, 1.23, 0]}
scale={[0.17, 0.17, 0.17]}
/>
<mesh
material={materials.leaves}
geometry={nodes.tree055.geometry}
position={[-19.55, 2.07, 42.35]}
rotation={[0, -0.97, 0]}
scale={[0.23, 0.23, 0.23]}
/>
<mesh
material={materials.leaves}
geometry={nodes.tree056.geometry}
position={[-2.37, 2.08, 62.43]}
rotation={[-Math.PI, 0.47, -Math.PI]}
scale={[0.29, 0.29, 0.29]}
/>
<mesh
material={materials.leaves}
geometry={nodes.tree057.geometry}
position={[26.08, 2.08, 56.59]}
rotation={[-Math.PI, -0.77, -Math.PI]}
scale={[0.35, 0.35, 0.35]}
/>
<mesh
material={materials.leaves}
geometry={nodes.tree058.geometry}
position={[18.37, 2.07, 23.06]}
rotation={[-Math.PI, 0.42, -Math.PI]}
scale={[0.18, 0.18, 0.18]}
/>
<mesh
material={materials.leaves}
geometry={nodes.tree059.geometry}
position={[-4.64, 2.07, 9.26]}
rotation={[-Math.PI, 0.21, -Math.PI]}
scale={[0.24, 0.24, 0.24]}
/>
<mesh
material={materials.leaves}
geometry={nodes.tree060.geometry}
position={[-26.37, 2.07, 50.36]}
rotation={[0, -1.2, 0]}
scale={[0.24, 0.24, 0.24]}
/>
<mesh
material={materials.leaves}
geometry={nodes.tree067.geometry}
position={[31.21, 2.07, 28.95]}
rotation={[0, -1.32, 0]}
scale={[0.22, 0.22, 0.22]}
/>
<mesh
material={materials.leaves}
geometry={nodes.tree068.geometry}
position={[32.27, 2.07, 44.07]}
rotation={[0, -0.55, 0]}
scale={[0.26, 0.26, 0.26]}
/>
<mesh
material={materials.leaves}
geometry={nodes.tree069.geometry}
position={[9.03, 2.08, 75.58]}
rotation={[-Math.PI, 0.13, -Math.PI]}
scale={[0.35, 0.35, 0.35]}
/>
<mesh
material={materials.leaves}
geometry={nodes.tree070.geometry}
position={[-35.22, 2.08, 68.19]}
rotation={[-0.02, 1.54, 0.02]}
scale={[0.46, 0.46, 0.46]}
/>
<mesh
material={materials.leaves}
geometry={nodes.tree003.geometry}
position={[-23.02, 2.08, 11.39]}
rotation={[-Math.PI, 1.04, -Math.PI]}
scale={[0.3, 0.3, 0.3]}
/>
<mesh
material={materials.leaves}
geometry={nodes.tree062.geometry}
position={[-34.79, 2.28, 16.97]}
scale={[0.22, 0.22, 0.22]}
/>
<mesh
material={materials.leaves}
geometry={nodes.tree063.geometry}
position={[-9.68, 2.27, 51.99]}
rotation={[3.14, -0.66, 3.14]}
scale={[0.22, 0.22, 0.22]}
/>
<mesh
material={materials.leaves}
geometry={nodes.tree064.geometry}
position={[25.47, 2.28, 37.14]}
rotation={[Math.PI, -0.66, Math.PI]}
scale={[0.18, 0.18, 0.18]}
/>
<mesh
material={materials.leaves}
geometry={nodes.tree065.geometry}
position={[3.83, 2.24, 54.96]}
rotation={[-Math.PI, 0.21, -Math.PI]}
scale={[0.18, 0.18, 0.18]}
/>
<mesh
material={materials.leaves}
geometry={nodes.tree066.geometry}
position={[12.42, 2.24, 63.79]}
rotation={[-Math.PI, 1.06, -Math.PI]}
scale={[0.18, 0.18, 0.18]}
/>
<mesh
material={materials.leaves}
geometry={nodes.tree074.geometry}
position={[-24.35, 2.06, 33.83]}
scale={[0.22, 0.22, 0.22]}
/>
<mesh
material={materials.leaves}
geometry={nodes.tree075.geometry}
position={[-39.05, 2.06, 41.36]}
scale={[0.22, 0.22, 0.22]}
/>
<mesh
material={materials.leaves}
geometry={nodes.tree076.geometry}
position={[18.59, 2.06, 61.16]}
rotation={[-Math.PI, 0.34, -Math.PI]}
scale={[0.3, 0.3, 0.3]}
/>
<mesh
material={materials.leaves}
geometry={nodes.tree077.geometry}
position={[-15.49, 2.06, 69.98]}
rotation={[-Math.PI, 1.12, -Math.PI]}
scale={[0.44, 0.44, 0.44]}
/>
<mesh
material={materials.leaves}
geometry={nodes.tree078.geometry}
position={[22.29, 2.06, 10.03]}
rotation={[-Math.PI, 1.12, -Math.PI]}
scale={[0.32, 0.32, 0.32]}
/>
<mesh
material={materials.leaves}
geometry={nodes.tree079.geometry}
position={[44.19, 2.06, 32.3]}
rotation={[-Math.PI, 1.12, -Math.PI]}
scale={[0.27, 0.27, 0.27]}
/>
<mesh
material={materials.leaves}
geometry={nodes.tree080.geometry}
position={[14.82, 2.06, 12.69]}
rotation={[-Math.PI, 1.12, -Math.PI]}
scale={[0.2, 0.2, 0.2]}
/>
<mesh
material={materials.leaves}
geometry={nodes.tree081.geometry}
position={[32.32, 2.06, 60.58]}
rotation={[-Math.PI, 1.12, -Math.PI]}
scale={[0.27, 0.27, 0.27]}
/>
<mesh
material={materials.leaves}
geometry={nodes.tree082.geometry}
position={[36.49, 2.06, 34.34]}
rotation={[-Math.PI, 1.12, -Math.PI]}
scale={[0.27, 0.27, 0.27]}
/>
<group
position={[-15.46, 2.06, 8.63]}
rotation={[-Math.PI, -0.01, -Math.PI]}
scale={[0.29, 0.29, 0.29]}
>
<mesh material={materials.wood} geometry={nodes.tree_mesh_type1_0.geometry} />
<mesh
material={materials.leaves}
geometry={nodes.tree_mesh_type1_1_1.geometry}
/>
</group>
<mesh
material={materials.wood}
geometry={nodes.trunk_mesh.geometry}
position={[16.02, 1.19, 46.32]}
rotation={[1.76, -0.48, 0.4]}
scale={[0.3, 0.3, 0.3]}
/>
<group
position={[45.09, 2.06, 72.04]}
rotation={[0, -0.33, 0]}
scale={[0.36, 0.36, 0.36]}
>
<mesh material={materials.wood} geometry={nodes.Cube018_0.geometry} />
<mesh material={materials.leaves} geometry={nodes['Cube.018_1_1'].geometry} />
</group>
</group>
</>
)
}

@ -4,13 +4,13 @@ auto-generated by: https://github.com/pmndrs/gltfjsx
import React, { useRef } from 'react'
import { useGLTF } from '@react-three/drei/useGLTF'
import * as THREE from 'three'
import { useTrimesh } from '@react-three/cannon'
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader'
import { useTrimesh } from '@react-three/cannon'
type GLTFResult = GLTF & {
nodes: {
collision_mesh_park: THREE.Mesh
collision_mesh: THREE.Mesh
}
materials: {
collision: THREE.MeshStandardMaterial
@ -21,9 +21,12 @@ export default function Model(props: JSX.IntrinsicElements['group']) {
const group = useRef<THREE.Group>()
const { nodes } = useGLTF('/model/plaza_collision.glb') as GLTFResult
const material = new THREE.MeshBasicMaterial({ wireframe: true, color: 0xffff00 })
const material = new THREE.MeshBasicMaterial({
wireframe: true,
color: 0xffff00,
})
const geometry = nodes.collision_mesh_park.geometry as THREE.BufferGeometry
const geometry = nodes.collision_mesh.geometry as THREE.BufferGeometry
if (geometry.index === null) return null
@ -33,20 +36,20 @@ export default function Model(props: JSX.IntrinsicElements['group']) {
// @ts-ignore
const [ref] = useTrimesh(() => ({
type: 'Static',
position: [1.75, 1.5, 8.2],
position: [1.73, 1.23, 8.19],
args: [vertices, indices],
}))
return (
<group ref={group} {...props}>
<group ref={group} {...props} dispose={null}>
<mesh
ref={ref}
material={material}
geometry={nodes.collision_mesh_park.geometry}
geometry={nodes.collision_mesh.geometry}
visible={false}
/>
</group>
)
}
useGLTF.preload('/model/plaza_collision.glb')
useGLTF.preload('/model/collision_mesh.glb')

Loading…
Cancel
Save