Initial project import
This commit is contained in:
14
node_modules/@react-three/drei/core/DetectGPU.js
generated
vendored
Normal file
14
node_modules/@react-three/drei/core/DetectGPU.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import * as React from 'react';
|
||||
import { getGPUTier } from 'detect-gpu';
|
||||
import { suspend } from 'suspend-react';
|
||||
|
||||
const useDetectGPU = props => suspend(() => getGPUTier(props), ['useDetectGPU']);
|
||||
function DetectGPU({
|
||||
children,
|
||||
...options
|
||||
}) {
|
||||
const result = useDetectGPU(options);
|
||||
return /*#__PURE__*/React.createElement(React.Fragment, null, children == null ? void 0 : children(result));
|
||||
}
|
||||
|
||||
export { DetectGPU, useDetectGPU };
|
||||
Reference in New Issue
Block a user