Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

233
Visualizações
Add dynamic texture to model using three js and React Three Fiber and gltfjsx

I wanted to try three js and following this tutorial https://www.youtube.com/watch?v=xy_tbV4pC54, i was able to run it

enter image description here

What i wanted to do now is adding image texture on top of the model something like this

https://osorina.github.io/cup-demo/image/

enter image description here

i haven't tried any code because im still looking for a way to do it, some say that i need to use fabricjs but i cant find any helpful resource that suits my needs, hope someone here know how to do something like cup demo above.

Here's the sandbox https://codesandbox.io/s/floating-shoe-forked-qxjoj, thanks in advance

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

you can overwrite pre-defined props

import { useGLTF, useTexture } from '@react-three/drei'

function Model() {
  const { nodes, material } = useGLTF(...)
  const texture = useTexture("/texture.jpg")
  ...
  return (
    <group>
      <mesh geometry={...} material={...} material-map={texture} />

you can also flat out replace an existing material:

<mesh geometry={...}>
  <meshStandardMaterial map={texture} />
</mesh>

just be aware that textures need proper UV coordinates which are usually set in blender or the modelling software. you can't just put an imagine on something and expect it to just align.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda