test texture
This commit is contained in:
parent
c638a6e91e
commit
e78fdfb079
|
@ -20,13 +20,13 @@ onMounted(() => {
|
|||
cameraStat.aspect = window.innerWidth / 600
|
||||
})
|
||||
const spot = reactive({
|
||||
x: 10, y: 10, z: 10, intensity: 100, distance: 10, color: 'red'
|
||||
x: 10, y: 10, z: 10, intensity: 10, distance: 10, color: 'red'
|
||||
})
|
||||
const directional = reactive({
|
||||
x: 20, y: 10, z: 10, intensity: 100, distance: 10, color: 'green'
|
||||
x: 20, y: 10, z: 10, intensity: 10, distance: 10, color: 'green'
|
||||
})
|
||||
const point = reactive({
|
||||
x: 30, y: 10, z: 10, intensity: 100, distance: 10, color: 'blue'
|
||||
x: 30, y: 10, z: 10, intensity: 10, distance: 10, color: 'blue'
|
||||
})
|
||||
</script>
|
||||
<template>
|
||||
|
@ -55,15 +55,16 @@ const point = reactive({
|
|||
<TresPerspectiveCamera v-bind="cameraStat" />
|
||||
<OrbitControls v-bind="controlsState" make-default />
|
||||
<Suspense>
|
||||
<Environment files='/hdrmaps/kloppenheim_06_4k.hdr' :background="true" />
|
||||
<!-- <Environment files='/hdrmaps/kloppenheim_06_4k.hdr' :background="true" /> -->
|
||||
</Suspense>
|
||||
<Suspense>
|
||||
<ModelParametric />
|
||||
</Suspense>
|
||||
<TresSpotLight v-bind="spot" :position="[spot.x, spot.y, spot.z]" cast-shadow v-light-helper />
|
||||
<TresDirectionalLight v-bind="directional" :position="[directional.x, directional.y, directional.z]" cast-shadow
|
||||
v-light-helper />
|
||||
<TresDirectionalLight v-bind="directional" :position="[directional.x, directional.y, directional.z]"
|
||||
cast-shadow v-light-helper />
|
||||
<TresPointLight v-bind="point" :position="[point.x, point.y, point.z]" cast-shadow v-light-helper />
|
||||
<TresAmbientLight />
|
||||
</TresCanvas>
|
||||
</ClientOnly>
|
||||
</div>
|
||||
|
|
|
@ -20,7 +20,7 @@ const pbrTexture = await useTexture({
|
|||
// matcap: '/textures/Ground039_4K-JPG_Color.jpg',
|
||||
// alphaMap: '/textures/myAlphaMapTexture.jpg'
|
||||
})
|
||||
const repeat = 10
|
||||
const repeat = 5
|
||||
for (const key in pbrTexture) {
|
||||
if (Object.prototype.hasOwnProperty.call(pbrTexture, key)) {
|
||||
const element = pbrTexture[key];
|
||||
|
@ -29,6 +29,7 @@ for (const key in pbrTexture) {
|
|||
element.wrapT = RepeatWrapping
|
||||
element.repeat.x = repeat
|
||||
element.repeat.y = repeat
|
||||
element.flipY = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -84,7 +85,8 @@ texture.needsUpdate = true;
|
|||
<TresGroup :translate-y="-3.25" name="base">
|
||||
<TresMesh receive-shadow :position-y="-0.5" name="ground">
|
||||
<TresCircleGeometry :args="[55, 32]" :rotate-x="-Math.PI * 0.5" />
|
||||
<TresMeshStandardMaterial v-bind="pbrTexture" />
|
||||
<TresMeshStandardMaterial :map="pbrTexture.map" :normal-map="pbrTexture.normalMap"
|
||||
:roughness-map="pbrTexture.roughnessMap" :ao-map="pbrTexture.aoMap" :metalness="0" :roughness="0" />
|
||||
</TresMesh>
|
||||
<TresMesh receive-shadow :position-y="-0.25" :position-x="10" name="ground">
|
||||
<TresCircleGeometry :args="[10]" :rotate-x="-Math.PI * 0.5" />
|
||||
|
|
Loading…
Reference in New Issue