Comments (4)
I think normal onPointerOver
events are a better fit for this use case. on[X]Change
are currently really just listeners for the respective signals used under the hood to have the respective conditional properties
from uikit.
I should've been more precise in requesting this only for onHoverChange
, onActiveChange
and onFocusChange
and not all conditionals. The Interactivity tutorial states that all UI elements can receive events like other r3f elements but extends it with hover
and active
. That implication makes it natural to include the pointer events into these. Then the Event Properties could document on[Hover/Active/Focus]Change
while hover
, active
, and focus
remain in the conditionals.
from uikit.
onHoverChange etc should imo not receive an event because that leads people to believe onHoverChange is a combination of onPointerOver & onPointerOut. However, the hover state is much more complex as it tracks the amount of pointer that are currently hovering and only changes the hover state if the amount is or is not greater than 0.
Your example use case is not fitting here, because in a case where the user is hovering with 1 pointer where no additional button is pressed and then also hovering with another pointer (e.g. controller) with a specific button pressed onHoverChange is only executed initially and only the initial event would be provided. Therefore the developer would not be notified of the second pointer and its event. This illustrates my point where I fear that people can confuse onHoverChange etc with the actual pointer event which is what should be used for your presented use case.
If you find a use case where having the initial and last event for the hover etc. change is necassary, please let me know :)
from uikit.
That makes sense, thank you for the clarification.
from uikit.
Related Issues (20)
- Build for CommonJS? HOT 6
- Feature Request: Add Vanilla Three.js Output Option to HTML23 App
- Examples and Fonts not found HOT 6
- Strange Spacing with Custom Fonts
- Input unfocus function
- Spaces don't affect the Input flex box
- Strange flashing when remounting images HOT 1
- Expanding the available conditionals HOT 9
- accept HTMLVideoElement as src for the Video component HOT 2
- Support number for input types HOT 2
- Autocompletion for input elements HOT 1
- Pulling in Addons.js instead of linking to dependencies directly
- show whitespaces at beginning of lines of text HOT 2
- clipping plane lags behind HOT 1
- text selection supporting dragging outside
- Input element causes gap to appear at bottom of page (Firefox) HOT 1
- React Native failed ios build @react-three/uikit HOT 1
- Scrolling for column-reverse & row-reverse flex-direction
- Issues with the vanilla docs HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uikit.