Comparing version 1.0.8 to 1.0.9
@@ -111,3 +111,3 @@ 'use strict'; | ||
if (!hovering.has(eventObject) && handlers.onHover.has(eventObject)) { | ||
if (it.inputSource && !hovering.has(eventObject) && handlers.onHover.has(eventObject)) { | ||
var _handlers$onHover$get; | ||
@@ -142,7 +142,10 @@ | ||
}); | ||
return /*#__PURE__*/React.createElement(XRContext.Provider, { | ||
value: { | ||
var value = React.useMemo(function () { | ||
return { | ||
controllers: controllers, | ||
addInteraction: addInteraction | ||
} | ||
}; | ||
}, [controllers, addInteraction]); | ||
return /*#__PURE__*/React.createElement(XRContext.Provider, { | ||
value: value | ||
}, props.children); | ||
@@ -149,0 +152,0 @@ } |
import _objectWithoutPropertiesLoose from '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose'; | ||
import _extends from '@babel/runtime/helpers/esm/extends'; | ||
import React__default, { createContext, useState, useRef, useCallback, useEffect, createElement, useContext, useMemo, Fragment } from 'react'; | ||
import React__default, { createContext, useState, useRef, useCallback, useEffect, useMemo, createElement, useContext, Fragment } from 'react'; | ||
import { Raycaster, Color, Matrix4 } from 'three'; | ||
@@ -97,3 +97,3 @@ import { XRControllerModelFactory } from 'three/examples/jsm/webxr/XRControllerModelFactory'; | ||
if (!hovering.has(eventObject) && handlers.onHover.has(eventObject)) { | ||
if (it.inputSource && !hovering.has(eventObject) && handlers.onHover.has(eventObject)) { | ||
var _handlers$onHover$get; | ||
@@ -128,7 +128,8 @@ | ||
}); | ||
const value = useMemo(() => ({ | ||
controllers, | ||
addInteraction | ||
}), [controllers, addInteraction]); | ||
return /*#__PURE__*/createElement(XRContext.Provider, { | ||
value: { | ||
controllers, | ||
addInteraction | ||
} | ||
value: value | ||
}, props.children); | ||
@@ -135,0 +136,0 @@ } |
{ | ||
"name": "react-xr", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"main": "dist/index.cjs.js", | ||
@@ -5,0 +5,0 @@ "module": "dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54683
1279