Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

drei

Package Overview
Dependencies
Maintainers
1
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

drei - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

18

dist/index.cjs.js

@@ -29,3 +29,4 @@ 'use strict';

camera = _useThree.camera,
gl = _useThree.gl;
gl = _useThree.gl,
invalidate = _useThree.invalidate;

@@ -37,2 +38,8 @@ reactThreeFiber.useFrame(function () {

});
React.useEffect(function () {
var _controls$current2, _controls$current3;
(_controls$current2 = controls.current) == null ? void 0 : _controls$current2.addEventListener('change', invalidate);
return (_controls$current3 = controls.current) == null ? void 0 : _controls$current3.removeEventListener('change', invalidate);
}, [controls.current]);
return /*#__PURE__*/React__default.createElement("orbitControlsImpl", _extends({

@@ -58,3 +65,4 @@ ref: mergeRefs([controls, ref]),

camera = _useThree.camera,
gl = _useThree.gl;
gl = _useThree.gl,
invalidate = _useThree.invalidate;

@@ -66,2 +74,8 @@ reactThreeFiber.useFrame(function () {

});
React.useEffect(function () {
var _controls$current2, _controls$current3;
(_controls$current2 = controls.current) == null ? void 0 : _controls$current2.addEventListener('change', invalidate);
return (_controls$current3 = controls.current) == null ? void 0 : _controls$current3.removeEventListener('change', invalidate);
}, [controls.current]);
return /*#__PURE__*/React__default.createElement("mapControlsImpl", _extends({

@@ -68,0 +82,0 @@ ref: mergeRefs([controls, ref]),

import _extends from '@babel/runtime/helpers/esm/extends';
import React, { forwardRef, useRef } from 'react';
import React, { forwardRef, useRef, useEffect } from 'react';
import { extend, useThree, useFrame } from 'react-three-fiber';

@@ -17,3 +17,4 @@ import { OrbitControls as OrbitControls$1, MapControls as MapControls$1 } from 'three/examples/jsm/controls/OrbitControls';

camera,
gl
gl,
invalidate
} = useThree();

@@ -25,2 +26,8 @@ useFrame(() => {

});
useEffect(() => {
var _controls$current2, _controls$current3;
(_controls$current2 = controls.current) == null ? void 0 : _controls$current2.addEventListener('change', invalidate);
return (_controls$current3 = controls.current) == null ? void 0 : _controls$current3.removeEventListener('change', invalidate);
}, [controls.current]);
return /*#__PURE__*/React.createElement("orbitControlsImpl", _extends({

@@ -41,3 +48,4 @@ ref: mergeRefs([controls, ref]),

camera,
gl
gl,
invalidate
} = useThree();

@@ -49,2 +57,8 @@ useFrame(() => {

});
useEffect(() => {
var _controls$current2, _controls$current3;
(_controls$current2 = controls.current) == null ? void 0 : _controls$current2.addEventListener('change', invalidate);
return (_controls$current3 = controls.current) == null ? void 0 : _controls$current3.removeEventListener('change', invalidate);
}, [controls.current]);
return /*#__PURE__*/React.createElement("mapControlsImpl", _extends({

@@ -51,0 +65,0 @@ ref: mergeRefs([controls, ref]),

2

package.json
{
"name": "drei",
"version": "0.0.7",
"version": "0.0.8",
"description": "useful add-ons for react-three-fiber",

@@ -5,0 +5,0 @@ "main": "dist/index.cjs.js",

@@ -5,4 +5,2 @@ [![Build Status](https://travis-ci.org/react-spring/drei.svg?branch=master)](https://travis-ci.org/react-spring/drei) [![npm version](https://badge.fury.io/js/drei.svg)](https://badge.fury.io/js/drei) ![npm](https://img.shields.io/npm/dt/drei.svg)

<br />
yarn add drei

@@ -14,4 +12,2 @@

<br />
### Exports

@@ -25,5 +21,5 @@

### Contributions
## Contributions
**PR's are more than welcome!** If you find yourself repeating set-up code often and if it's generic enough to be useful, add it here, everyone benefits.
If you find yourself repeating set-up code often and if it's generic enough, add it here, everyone benefits!

@@ -34,2 +30,3 @@ ### Requirements

- ForwardRefs if possible, so that objects can be referenced
- Invalidate frames on any movement
- Cleanup on unmount, no left-overs

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc