regl-worldview
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "regl-worldview", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "A reusable component for rendering 2D and 3D views using regl", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
@@ -265,4 +265,7 @@ // @flow | ||
render() { | ||
const { width, height, showDebug, keyMap, shiftKeys, style, cameraState } = this.props; | ||
const { width, height, showDebug, keyMap, shiftKeys, style, cameraState, onCameraStateChange } = this.props; | ||
const { worldviewContext } = this.state; | ||
// If we are supplied controlled camera state and no onCameraStateChange callback | ||
// then there is a 'fixed' camera from outside of worldview itself. | ||
const isFixedCamera = cameraState && !onCameraStateChange; | ||
const canvasHtml = ( | ||
@@ -286,4 +289,4 @@ <React.Fragment> | ||
<div style={{ position: "relative", overflow: "hidden", ...style }}> | ||
{/* skip rendering CameraListener if Worldview is controlled */} | ||
{cameraState ? ( | ||
{/* skip rendering CameraListener if Worldview has a fixed camera */} | ||
{isFixedCamera ? ( | ||
canvasHtml | ||
@@ -290,0 +293,0 @@ ) : ( |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
2291755
12950