IComponentContext | Matterport SDK
Usage of the SDK constitutes your agreement with the Matterport SDK Agreement. Email developers@matterport.com with any questions.

Component Context
The context object contains the three.js module and the main aspects of the rendering engine.
The camera, scene, or renderer may will likely be replaced in the future with an sdk module.

function Cylinder() {
   this.onInit = function() {
     var THREE = this.context.three;
     var geometry = new THREE.CylinderGeometry( 5, 5, 20, 32 );
     var material = new THREE.MeshBasicMaterial( {color: 0xffff00} );
     var cylinder = new THREE.Mesh( geometry, material );
   };
}

Hierarchy

  • IComponentContext

Index

Properties

Properties

camera

camera: Camera

The main camera. It is read-only.
See https://threejs.org/docs/#api/en/cameras/Camera

renderer

renderer: WebGLRenderer

The showcase three.js renderer.
See https://threejs.org/docs/#api/en/renderers/WebGLRenderer

scene

scene: Scene

three

three: typeof THREE

The three.js module.