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.17 to 0.0.18

25

dist/index.cjs.js

@@ -19,2 +19,3 @@ 'use strict';

var postprocessing = require('postprocessing');
var StatsImpl = _interopDefault(require('stats.js'));
var DRACOLoader = require('three/examples/jsm/loaders/DRACOLoader');

@@ -327,2 +328,25 @@ var Sky$1 = require('three/examples/jsm/objects/Sky');

function Stats(_ref) {
var _ref$showPanel = _ref.showPanel,
showPanel = _ref$showPanel === void 0 ? 0 : _ref$showPanel;
var _useState = React.useState(function () {
return new StatsImpl();
}),
stats = _useState[0];
React.useEffect(function () {
stats.showPanel(showPanel);
document.body.appendChild(stats.dom);
return function () {
return document.body.removeChild(stats.dom);
};
}, []);
return reactThreeFiber.useFrame(function (state) {
stats.begin();
state.gl.render(state.scene, state.camera);
stats.end();
}, 1);
}
function draco(url) {

@@ -367,4 +391,5 @@ if (url === void 0) {

exports.StandardEffects = StandardEffects;
exports.Stats = Stats;
exports.TrackballControls = TrackballControls;
exports.TransformControls = TransformControls;
exports.draco = draco;

19

dist/index.js

@@ -11,2 +11,3 @@ import _extends from '@babel/runtime/helpers/esm/extends';

import { SMAAImageLoader, EffectComposer, RenderPass, SMAAEffect, NormalPass, SSAOEffect, BlendFunction, BloomEffect, KernelSize, EffectPass } from 'postprocessing';
import StatsImpl from 'stats.js';
import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader';

@@ -288,2 +289,18 @@ import { Sky as Sky$1 } from 'three/examples/jsm/objects/Sky';

function Stats({
showPanel = 0
}) {
const [stats] = useState(() => new StatsImpl());
useEffect(() => {
stats.showPanel(showPanel);
document.body.appendChild(stats.dom);
return () => document.body.removeChild(stats.dom);
}, []);
return useFrame(state => {
stats.begin();
state.gl.render(state.scene, state.camera);
stats.end();
}, 1);
}
function draco(url = '/draco-gltf/') {

@@ -315,2 +332,2 @@ return loader => {

export { Detailed, MapControls, OrbitControls, PerspectiveCamera, PositionalAudio, Sky, StandardEffects, TrackballControls, TransformControls, draco };
export { Detailed, MapControls, OrbitControls, PerspectiveCamera, PositionalAudio, Sky, StandardEffects, Stats, TrackballControls, TransformControls, draco };

2

dist/Stats.d.ts

@@ -1,3 +0,3 @@

export default function Stats({ showPanel }: {
export declare function Stats({ showPanel }: {
showPanel?: number | undefined;
}): null;
{
"name": "drei",
"version": "0.0.17",
"version": "0.0.18",
"description": "useful add-ons for react-three-fiber",

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

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