Earcut

An implementation of the earcut polygon triangulation algorithm. The code is a port of mapbox/earcut. Methods .triangulate ( data, holeIndices, dim ) : Array data — A flat array of vertex coordinates. holeIndices — An array of hole indices if any. dim — The number of coordinates per vertex in the input array. Triangulates the given shape definition… Continue reading Earcut

PolarGridHelper

The PolarGridHelper is an object to define polar grids. Grids are two-dimensional arrays of lines. Code Example const radius = 10; const sectors = 16; const rings = 8; const divisions = 64; const helper = new THREE.PolarGridHelper( radius, sectors, rings, divisions ); scene.add( helper ); Constructor PolarGridHelper( radius : Number, sectors : Number, rings : Number, divisions… Continue reading PolarGridHelper

EXRExporter

An exporter for EXR. EXR ( Extended Dynamic Range) is an open format specification for professional-grade image storage format of the motion picture industry. The purpose of format is to accurately and efficiently represent high-dynamic-range scene-linear image data and associated metadata. The library is widely used in host application software where accuracy is critical, such as photorealistic rendering, texture… Continue reading EXRExporter

GLTFExporter

An exporter for glTF 2.0. glTF (GL Transmission Format) is an open format specification for efficient delivery and loading of 3D content. Assets may be provided either in JSON (.gltf) or binary (.glb) format. External files store textures (.jpg, .png) and additional binary data (.bin). A glTF asset may deliver one or more scenes, including meshes, materials, textures, skins, skeletons,… Continue reading GLTFExporter

OBJExporter

An exporter for the OBJ file format. OBJExporter is not able to export material data into MTL files so only geometry data are supported. Import OBJExporter is an add-on, and must be imported explicitly. See Installation / Addons. import { OBJExporter } from ‘three/addons/exporters/OBJExporter.js’; Code Example // Instantiate an exporter const exporter = new OBJExporter(); // Parse the… Continue reading OBJExporter

PLYExporter

An exporter for PLY. PLY (Polygon or Stanford Triangle Format) is a file format for efficient delivery and loading of simple, static 3D content in a dense format. Both binary and ascii formats are supported. PLY can store vertex positions, colors, normals and uv coordinates. No textures or texture references are saved. Import PLYExporter is an add-on,… Continue reading PLYExporter

Smooth Workflow for Web Integration of Generative AI in WebXR

WebXR enables immersive VR and AR experiences in the browser, and integrating Generative AI into these experiences can unlock dynamic content creation, personalized environments, and AI-driven interactions. This article outlines a smooth workflow for integrating Generative AI into WebXR applications using Three.js, WebGL, and cloud-based AI models.  — ## **1. Key Components of WebXR +… Continue reading Smooth Workflow for Web Integration of Generative AI in WebXR

Store Support for Three.js Products

This article provides guidance on managing store-related issues for products built with Three.js, including licensing, refunds, and troubleshooting common customer concerns.  ## **1. Licensing & Usage**  Three.js itself is an open-source library under the MIT license, but products built with it may have their own licensing terms. Ensure your store clearly states:  – The type… Continue reading Store Support for Three.js Products

Animating 3D Models in Three.js with Mixamo and GLTF

Introduction Animating 3D models in Three.js is a powerful way to bring interactive experiences to life. Mixamo, an online animation library by Adobe, provides high-quality character animations, while the GLTF format allows efficient model storage and rendering in Three.js. This article covers how to import, animate, and control Mixamo animations in Three.js using GLTF models.… Continue reading Animating 3D Models in Three.js with Mixamo and GLTF

Object Snapping in Three.js: A Detailed Guide

Introduction In Three.js, object snapping refers to automatically aligning objects to predefined positions when they come close. This behavior is particularly useful in applications like 3D modeling tools, puzzle games, and VR experiences where precise positioning is necessary. The provided JavaScript code implements an object snapping system using a list of predefined positions and a… Continue reading Object Snapping in Three.js: A Detailed Guide