Comparing version 0.0.5 to 0.0.6
@@ -15,3 +15,3 @@ 'use strict'; | ||
reactThreeFiber.extend({ | ||
OrbitControls: OrbitControls$1.OrbitControls | ||
OrbitControlsImpl: OrbitControls$1.OrbitControls | ||
}); | ||
@@ -21,5 +21,3 @@ function OrbitControls(props) { | ||
props = { | ||
enableDamping: true, | ||
dampingFactor: 0.1, | ||
rotateSpeed: 0.5 | ||
enableDamping: true | ||
}; | ||
@@ -35,5 +33,7 @@ } | ||
reactThreeFiber.useFrame(function () { | ||
return controls.current && controls.current.update(); | ||
var _controls$current; | ||
return (_controls$current = controls.current) == null ? void 0 : _controls$current.update(); | ||
}); | ||
return /*#__PURE__*/React__default.createElement("orbitControls", _extends({ | ||
return /*#__PURE__*/React__default.createElement("orbitControlsImpl", _extends({ | ||
ref: controls, | ||
@@ -45,3 +45,3 @@ args: [camera, gl.domElement] | ||
reactThreeFiber.extend({ | ||
MapControls: OrbitControls$1.MapControls | ||
MapControlsImpl: OrbitControls$1.MapControls | ||
}); | ||
@@ -51,5 +51,3 @@ function MapControls(props) { | ||
props = { | ||
enableDamping: true, | ||
dampingFactor: 0.05, | ||
screenSpacePanning: false | ||
enableDamping: true | ||
}; | ||
@@ -65,5 +63,7 @@ } | ||
reactThreeFiber.useFrame(function () { | ||
return controls.current && controls.current.update(); | ||
var _controls$current; | ||
return (_controls$current = controls.current) == null ? void 0 : _controls$current.update(); | ||
}); | ||
return /*#__PURE__*/React__default.createElement("mapControls", _extends({ | ||
return /*#__PURE__*/React__default.createElement("mapControlsImpl", _extends({ | ||
ref: controls, | ||
@@ -70,0 +70,0 @@ args: [camera, gl.domElement] |
@@ -8,8 +8,6 @@ import _extends from '@babel/runtime/helpers/esm/extends'; | ||
extend({ | ||
OrbitControls: OrbitControls$1 | ||
OrbitControlsImpl: OrbitControls$1 | ||
}); | ||
function OrbitControls(props = { | ||
enableDamping: true, | ||
dampingFactor: 0.1, | ||
rotateSpeed: 0.5 | ||
enableDamping: true | ||
}) { | ||
@@ -21,4 +19,8 @@ const controls = useRef(); | ||
} = useThree(); | ||
useFrame(() => controls.current && controls.current.update()); | ||
return /*#__PURE__*/React.createElement("orbitControls", _extends({ | ||
useFrame(() => { | ||
var _controls$current; | ||
return (_controls$current = controls.current) == null ? void 0 : _controls$current.update(); | ||
}); | ||
return /*#__PURE__*/React.createElement("orbitControlsImpl", _extends({ | ||
ref: controls, | ||
@@ -30,8 +32,6 @@ args: [camera, gl.domElement] | ||
extend({ | ||
MapControls: MapControls$1 | ||
MapControlsImpl: MapControls$1 | ||
}); | ||
function MapControls(props = { | ||
enableDamping: true, | ||
dampingFactor: 0.05, | ||
screenSpacePanning: false | ||
enableDamping: true | ||
}) { | ||
@@ -43,4 +43,8 @@ const controls = useRef(); | ||
} = useThree(); | ||
useFrame(() => controls.current && controls.current.update()); | ||
return /*#__PURE__*/React.createElement("mapControls", _extends({ | ||
useFrame(() => { | ||
var _controls$current; | ||
return (_controls$current = controls.current) == null ? void 0 : _controls$current.update(); | ||
}); | ||
return /*#__PURE__*/React.createElement("mapControlsImpl", _extends({ | ||
ref: controls, | ||
@@ -47,0 +51,0 @@ args: [camera, gl.domElement] |
/// <reference types="react" /> | ||
import { ReactThreeFiber } from 'react-three-fiber'; | ||
import { MapControls as MapControlsImpl } from 'three/examples/jsm/controls/OrbitControls'; | ||
declare type MapControlsT = ReactThreeFiber.Object3DNode<MapControlsImpl, typeof MapControlsImpl>; | ||
declare type MapControls = ReactThreeFiber.Object3DNode<MapControlsImpl, typeof MapControlsImpl>; | ||
declare global { | ||
namespace JSX { | ||
interface IntrinsicElements { | ||
mapControls: MapControlsT; | ||
mapControlsImpl: MapControls; | ||
} | ||
} | ||
} | ||
export declare function MapControls(props?: MapControlsT): JSX.Element; | ||
export declare function MapControls(props?: MapControls): JSX.Element; | ||
export {}; |
/// <reference types="react" /> | ||
import { ReactThreeFiber } from 'react-three-fiber'; | ||
import { OrbitControls as OrbitControlsImpl } from 'three/examples/jsm/controls/OrbitControls'; | ||
declare type OrbitControlsT = ReactThreeFiber.Object3DNode<OrbitControlsImpl, typeof OrbitControlsImpl>; | ||
declare type OrbitControls = ReactThreeFiber.Object3DNode<OrbitControlsImpl, typeof OrbitControlsImpl>; | ||
declare global { | ||
namespace JSX { | ||
interface IntrinsicElements { | ||
orbitControls: OrbitControlsT; | ||
orbitControlsImpl: OrbitControls; | ||
} | ||
} | ||
} | ||
export declare function OrbitControls(props?: OrbitControlsT): JSX.Element; | ||
export declare function OrbitControls(props?: OrbitControls): JSX.Element; | ||
export {}; |
{ | ||
"name": "drei", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "useful add-ons for react-three-fiber", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.cjs.js", |
@@ -19,2 +19,4 @@ [![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) | ||
- [x] MapControls, `<MapControls enableDamping ... />` | ||
- [x] TrackballControls, `<TrackballControls ... />` | ||
- [x] TransformControls, `<TransformControls ... >{child}</TransformControls>` | ||
- [x] draco, `useLoader(GLTFLoader, url, draco())` |
Sorry, the diff of this file is not supported yet
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
18158
20
415
22