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

three-stdlib

Package Overview
Dependencies
Maintainers
3
Versions
237
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

three-stdlib

stand-alone library of threejs examples

  • 2.30.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
285K
decreased by-1.54%
Maintainers
3
Weekly downloads
 
Created

What is three-stdlib?

The three-stdlib package is a collection of utilities, helpers, and extensions for the three.js library. It provides additional functionality to simplify common tasks and extend the capabilities of three.js, making it easier to create complex 3D scenes and interactions.

What are three-stdlib's main functionalities?

Controls

The three-stdlib package includes various control utilities like OrbitControls, which allow users to easily navigate and interact with 3D scenes using mouse or touch inputs.

const { OrbitControls } = require('three-stdlib');
const controls = new OrbitControls(camera, renderer.domElement);
controls.update();

Loaders

It provides loaders for different 3D file formats, such as GLTFLoader for loading GLTF models, making it easier to import and use 3D assets in your scenes.

const { GLTFLoader } = require('three-stdlib');
const loader = new GLTFLoader();
loader.load('path/to/model.gltf', (gltf) => {
  scene.add(gltf.scene);
});

Post-processing

The package includes tools for post-processing effects, such as EffectComposer, which allows you to apply various visual effects like bloom, depth of field, and more to your rendered scenes.

const { EffectComposer } = require('three-stdlib');
const composer = new EffectComposer(renderer);
const renderPass = new RenderPass(scene, camera);
composer.addPass(renderPass);
const bloomPass = new UnrealBloomPass();
composer.addPass(bloomPass);
composer.render();

Geometries

It offers additional geometry types, such as RoundedBoxGeometry, which are not available in the core three.js library, allowing for more complex and varied shapes in your 3D scenes.

const { RoundedBoxGeometry } = require('three-stdlib');
const geometry = new RoundedBoxGeometry(1, 1, 1, 4, 0.1);
const material = new THREE.MeshStandardMaterial({ color: 0x00ff00 });
const mesh = new THREE.Mesh(geometry, material);
scene.add(mesh);

Other packages similar to three-stdlib

Keywords

FAQs

Package last updated on 01 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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