lore-engine
Advanced tools
Comparing version 1.0.20 to 1.0.21
{ | ||
"name": "lore-engine", | ||
"version": "1.0.20", | ||
"version": "1.0.21", | ||
"description": "A WebGL based 3D data visualization engine.", | ||
@@ -5,0 +5,0 @@ "main": "./app.js", |
@@ -30,2 +30,3 @@ //@ts-check | ||
this.isVisible = true; | ||
this.stale = false; | ||
} | ||
@@ -97,2 +98,11 @@ | ||
hide() { | ||
this.isVisible = false; | ||
} | ||
show() { | ||
this.isVisible = true; | ||
this.stale = true; | ||
} | ||
draw(renderer) { | ||
@@ -107,7 +117,7 @@ if (!this.isVisible) return; | ||
// Update the modelView and projection matrices | ||
if (renderer.camera.isProjectionMatrixStale) { | ||
if (renderer.camera.isProjectionMatrixStale || this.stale) { | ||
this.shader.uniforms.projectionMatrix.setValue(renderer.camera.getProjectionMatrix()); | ||
} | ||
if (renderer.camera.isViewMatrixStale) { | ||
if (renderer.camera.isViewMatrixStale || this.stale) { | ||
let modelViewMatrix = Matrix4f.multiply(renderer.camera.viewMatrix, this.modelMatrix); | ||
@@ -119,4 +129,2 @@ this.shader.uniforms.modelViewMatrix.setValue(modelViewMatrix.entries); | ||
// How exactly does the binding work?? | ||
// What will happen if I want to draw a second geometry? | ||
for (let prop in this.attributes) { | ||
@@ -127,2 +135,3 @@ this.attributes[prop].bind(this.gl); | ||
this.gl.drawArrays(this.drawMode, 0, this.size()); | ||
this.stale = false; | ||
} | ||
@@ -129,0 +138,0 @@ } |
@@ -60,3 +60,4 @@ //@ts-check | ||
this._dblclickHandler = function (e) { | ||
if (e.e.mouse.state.middle || e.e.mouse.state.right) { | ||
if (e.e.mouse.state.middle || e.e.mouse.state.right || | ||
!that.target.geometry.isVisible) { | ||
return; | ||
@@ -80,3 +81,4 @@ } | ||
this._mousemoveHandler = function (e) { | ||
if (e.e.mouse.state.left || e.e.mouse.state.middle || e.e.mouse.state.right) { | ||
if (e.e.mouse.state.left || e.e.mouse.state.middle || | ||
e.e.mouse.state.right || !that.target.geometry.isVisible) { | ||
return; | ||
@@ -110,2 +112,6 @@ } | ||
this._updatedHandler = function () { | ||
if (!that.target.geometry.isVisible) { | ||
return; | ||
} | ||
for (let i = 0; i < that.selected.length; i++) { | ||
@@ -112,0 +118,0 @@ that.selected[i].screenPosition = that.renderer.camera.sceneToScreen(that.selected[i].position, renderer); |
@@ -782,2 +782,16 @@ //@ts-check | ||
/** | ||
* Hide the geometry associated with this pointHelper. | ||
*/ | ||
show() { | ||
this.geometry.show(); | ||
} | ||
/** | ||
* Show the geometry associated with this pointHelper. | ||
*/ | ||
hide() { | ||
this.geometry.hide(); | ||
} | ||
/** | ||
* Remove eventhandlers from associated controls. | ||
@@ -784,0 +798,0 @@ */ |
Sorry, the diff of this file is too big to display
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 not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42298671
20575