The simplest and possibly most common is the Google Cardboard style of VR which is basically a phone put into a face mask. This kind of VR has no controller so people have to come up with creative solutions for allowing user input. The most common solution is “look to select” where if the user… Continue reading VR – Look to Select
Author: Vishnu MR
LatheGeometry
Creates meshes with axial symmetry like vases. The lathe rotates around the Y axis. Code Example const points = []; for ( let i = 0; i < 10; i ++ ) { points.push( new THREE.Vector2( Math.sin( i * 0.2 ) * 10 + 5, ( i – 5 ) * 2 ) ); }… Continue reading LatheGeometry
carto/api-client
carto/api-client JavaScript (and TypeScript) client library for CARTO APIs and framework-agnostic CARTO + deck.gl applications. Includes: Widget APIs … TBD Installation Install @carto/api-client: npm install –save @carto/api-client Documentation Fetching data Import vectorTableSource, vectorQuerySource, and other data source functions from the @carto/api-client package. These are drop-in replacements for the equivalent functions from the @deck.gl/carto package, and the same data source may be used with any number of layers… Continue reading carto/api-client
Billboards
A CanvasTexture to make labels / badges on characters. Sometimes we’d like to make labels or other things that always face the camera. Three.js provides the Sprite and SpriteMaterial to make this happen. function makePerson(x, labelWidth, size, name, color) { const canvas = makeLabelCanvas(labelWidth, size, name); const texture = new THREE.CanvasTexture(canvas); // because our canvas is likely not a power of… Continue reading Billboards
Fragment Nodes
Essentially, a node is a placeholder for a unit of GPU computation, a representation of anything from a basic arithmetic operation, a lighting algorithm, a struct, a line of code, a shader, or a series of post-process passes. The specifics of how any given node works aren’t really important to understand. Nonetheless, they are the… Continue reading Fragment Nodes
Node-Based Workflow
In Polygonjs, you create 3D scenes by connecting nodes together. Some nodes help you generate geometries, others create materials, add behaviors to the scene objects, or handle user inputs. Each node does one thing and does it well. This allows you to create your scene in a non destructive workflow, where you can try ideas without impacting the rest of your… Continue reading Node-Based Workflow
glTF Transform
glTF Transform supports reading, editing, and writing 3D models in glTF 2.0 format. Unlike 3D modeling tools — which are ideal for artistic changes to geometry, materials, and animation — glTF Transform provides fast, reproducible, and lossless control of the low-level details in a 3D model. The API automatically manages array indices and byte offsets, which… Continue reading glTF Transform
MatCaps
MatCap (Material Capture, also known as LitSphere) are complete materials, including lighting and reflections, so you can add it to an object and not have any need for, well, lighting and reflections. MatCaps allows you to create a surface material and lighting environment simply by painting an object so that it looks like how you want your… Continue reading MatCaps
Fluid Engine
The general Architecture of the engine is as follows: it has a Fluid Simulator class, which you need to properly initialize before use, and deintialize before you switch out of the scene or close the game, and Fluid GPU Resrouce class, where you need to do the same. Once you have the initialization behind you, you can build a… Continue reading Fluid Engine
LightProbe
Light probes are an alternative way of adding light to a 3D scene. Unlike classical light sources (e.g. directional, point or spot lights), light probes do not emit light. Instead they store information about light passing through 3D space. During rendering, the light that hits a 3D object is approximated by using the data from… Continue reading LightProbe