From 9bc365bc16fe30374fa7ccbcc959f1f66c8666b9 Mon Sep 17 00:00:00 2001 From: "Wang, Jiyao" Date: Mon, 21 May 2018 13:23:40 -0400 Subject: [PATCH] speed up the rendering of assembly using instancing method --- src/icn3d/draw/impostor.js | 4 ++++ src/icn3d/draw/instancing.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/icn3d/draw/impostor.js b/src/icn3d/draw/impostor.js index 82ed8a43..d5b533b3 100644 --- a/src/icn3d/draw/impostor.js +++ b/src/icn3d/draw/impostor.js @@ -1,3 +1,7 @@ +/** + * @author Jiyao Wang / https://github.com/ncbi/icn3d + */ + iCn3D.prototype.setParametersForShader = function () { var me = this; var modelViewMatrix = new THREE.Uniform( new THREE.Matrix4() ) .onUpdate( function( object ){ diff --git a/src/icn3d/draw/instancing.js b/src/icn3d/draw/instancing.js index c4e80455..38dde325 100644 --- a/src/icn3d/draw/instancing.js +++ b/src/icn3d/draw/instancing.js @@ -1,3 +1,7 @@ +/** + * @author Jiyao Wang / https://github.com/ncbi/icn3d + */ + iCn3D.prototype.positionFromGeometry = function( mesh ){ var geometry = mesh.geometry;