question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

events with GLTF loaded objects

See original GitHub issue

Hello and thanks for this amazing package.

I need to capture mouse events when it’s hovering loaded 3D models, which works when I attach “onPointerOver” over a mesh, but not with a primitive just like so :

return gltf ? <a.primitive onPointerDown={e => console.log('hover')} object={gltf.scene} position={pos} /> : null;

(“hover” not firing)

Any ideas ?

Cheers

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
drcmdacommented, Jun 6, 2019

found a solution by making the main div the scrollwrapper and the canvas sticky. https://codesandbox.io/s/portfoliotest-f5t83

btw, gltf loader is finally a esm, took that one in story.js instead of the npm lib

0reactions
gregoiredelzonglecommented, Jun 6, 2019

Will do !

Read more comments on GitHub >

github_iconTop Results From Across the Web

events with GLTF loaded objects · Issue #111 - GitHub
I need to capture mouse events when it's hovering loaded 3D models, which works when I attach ... events with GLTF loaded objects...
Read more >
GLTFLoader – three.js docs
A loader for glTF 2.0 resources. glTF (GL Transmission Format) is an open format specification for efficient delivery and loading of 3D content....
Read more >
How to use onclick in React Threejs for a loaded GLTF object
The code below trickers a bug, saying TypeError: Cannot set property 'x' of undefined, when I click on the viewer.
Read more >
Three.js Loading a .GLTF File
gLTF is designed to do some things well that all those other formats don't do ... objLoader.load('resources/models/windmill/windmill.obj', (event) => ...
Read more >
Cloning And Animating Models Loaded From glTF Files
In this video, I'll show you how to create multiple clones from a loaded model. And also, how to animate the clones using...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found