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
Author: Krishnaprasad C P
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
STLExporter
An exporter for the STL file format. STL files describe only the surface geometry of a three-dimensional object without any representation of color, texture or other common model attributes. The STL format specifies both ASCII and binary representations, with binary being more compact. STL files contain no scale information or indexes, and the units are arbitrary.… Continue reading STLExporter
Lut
Represents a lookup table for colormaps. It is used to determine the color values from a range of data values. Import Lut is an add-on, and must be imported explicitly. See Installation / Addons. import { Lut } from ‘three/addons/math/Lut.js’; Code Example const lut = new Lut( ‘rainbow’, 512 ); const color = lut.getColor( 0.5 );… Continue reading Lut
XREstimatedLight
XREstimatedLight uses WebXR’s light estimation to create a light probe, a directional light, and (optionally) an environment map that model the user’s real-world environment and lighting. As WebXR updates the light and environment estimation, XREstimatedLight automatically updates the light probe, directional light, and environment map. It’s important to specify light-estimation as an optional or required feature when… Continue reading XREstimatedLight
WebGLProgram
Constructor for the GLSL program sent to vertex and fragment shaders, including default uniforms and attributes. Built-in uniforms and attributes Vertex shader (unconditional): // = object.matrixWorld uniform mat4 modelMatrix; // = camera.matrixWorldInverse * object.matrixWorld uniform mat4 modelViewMatrix; // = camera.projectionMatrix uniform mat4 projectionMatrix; // = camera.matrixWorldInverse uniform mat4 viewMatrix; // = inverse transpose of modelViewMatrix… Continue reading WebGLProgram
FramebufferTexture
This class can only be used in combination with WebGLRenderer.copyFramebufferToTexture(). const pixelRatio = window.devicePixelRatio; const textureSize = 128 * pixelRatio; // instantiate a framebuffer texture const frameTexture = new FramebufferTexture( textureSize, textureSize ); // calculate start position for copying part of the frame data const vector = new Vector2(); vector.x = ( window.innerWidth * pixelRatio /… Continue reading FramebufferTexture
Texture
Create a texture to apply to a surface or as a reflection or refraction map. Note: After the initial use of a texture, its dimensions, format, and type cannot be changed. Instead, call .dispose() on the texture and instantiate a new one. Code Example // load a texture, set wrap mode to repeat const texture =… Continue reading Texture