Comments (2)
I'm not sure if I'm misunderstanding, but I think you could use something like pick
and omit from lodash https://lodash.com/docs/4.17.15#pick
import pick from "lodash.pick";
import omit from "lodash.omit";
const props = {
showX: true,
position: [1,2,3]
};
const transformOnlyPropNames = ["showX", "enabled"];
const transformProps = pick(props, transformOnlyPropNames); // {showX: true}
const objectProps = omit(props, transformOnlyPropNames); // {position: Array[3]}
https://codesandbox.io/s/magical-villani-zfzlo?file=/src/index.js:0-334
from drei.
merged the pr, published, too
from drei.
Related Issues (20)
- DragControls exposes Group as ref, which is inconsistent with other controls. Enabling and disabling this control with Group's ref is not possible.
- View.tsx does not respect "manual" attribute of Orthographic camera. HOT 1
- `useTexture(..., onLoad)` callback fires incorrectly
- `useTexture(..., onLoad)` callback receives incorrect values
- Support for React 19?
- ScrollControls on iOS
- GSplat Coordinates Convention
- Importing from different files creates multiple stores. HOT 1
- The onChange() function of the <Select/> component desynchronizes with the active state.
- Tunnel-rat breaks production build
- Gizmo Viewport unexpected behaviour when clicking on Y axis
- Missing Documentation : Preload component cannot be used together with useGLTF.preload()
- How to apply Gsap's ScrollTrigger to Scroll html? HOT 1
- PointerLockControls: Can't lock pointer back immediately after escape HOT 1
- DragControls Not Functioning Correctly
- Html displays content incorrectly HOT 1
- Docs Typo Issue
- Changing Environment File Causing Crash Due to Memory Overflow HOT 2
- Improving Loading Progress Accuracy for Large .glb Files HOT 1
- Rendering starts too late with frameloop demand and CameraControls transitions HOT 10
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 drei.