repo: janusweb action: commit revision: path_from: revision_from: e9153fcb5db636ff44266b3093b106369da80b6b: path_to: revision_to:
commit e9153fcb5db636ff44266b3093b106369da80b6b Author: James BaicoianuDate: Fri Apr 6 01:17:06 2018 -0700 Detect material skinning based on mesh type diff --git a/scripts/object.js b/scripts/object.js
--- a/scripts/object.js
+++ b/scripts/object.js
@@ -301,12 +301,12 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
var hasalpha = this.hasalpha;
var remove = [];
var cloneMaterial = true;//(texture !== false);
- var useSkinning = this.animations && this.animations.length > 0;
this.objects['3d'].traverse(elation.bind(this, function(n) {
n.receiveShadow = this.shadow && this.shadow_receive;
n.castShadow = this.shadow && this.shadow_cast;
+ var useSkinning = n instanceof THREE.SkinnedMesh;
if (n.material) {
var materials = [];
if (elation.utils.isArray(n.material)) {
-----END OF PAGE-----