Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
three-stdlib
Advanced tools
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.
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);
The three package is the core library for creating and displaying 3D graphics in the browser using WebGL. While three-stdlib extends its functionality, three.js itself provides the fundamental tools for 3D rendering, including scene management, cameras, lights, and basic geometries.
A-Frame is a web framework for building virtual reality (VR) experiences. It is built on top of three.js and provides an easy-to-use, declarative HTML-like syntax for creating 3D and VR scenes. While three-stdlib focuses on extending three.js, A-Frame abstracts it further to simplify VR development.
Babylon.js is a powerful, open-source 3D engine that provides a comprehensive set of tools for creating 3D applications, including support for WebGL, WebXR, and various 3D file formats. Compared to three-stdlib, Babylon.js is a standalone engine with its own ecosystem and features, offering an alternative to three.js and its extensions.
npm install three-stdlib
// Export collection
import * as STDLIB from 'three-stdlib'
// Flatbunbundle
import { OrbitControls, ... } from 'three-stdlib'
// Pick individual objects
import { OrbitControls } from 'three-stdlib/controls/OrbitControls'
This is a stand-alone of https://github.com/mrdoob/three.js/tree/dev/examples/jsm
Our main goals are:
But most importantly, allowing the people that use and rely on these primitives to hold a little stake, and to distribute the weight of maintaining it. Jsm/examples were always considered as something that you copy/paste into your project and adapt to your needs. But that is not how people use it.
Let's give jsm/examples the care it deserves!
FAQs
stand-alone library of threejs examples
The npm package three-stdlib receives a total of 267,842 weekly downloads. As such, three-stdlib popularity was classified as popular.
We found that three-stdlib demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.