|
@@ -2120,6 +2120,24 @@ THREE.GLTFLoader = ( function () {
|
|
|
|
|
|
} else if ( primitive.mode === WEBGL_CONSTANTS.POINTS ) {
|
|
|
|
|
|
+ var cacheKey = 'PointsMaterial:' + material.uuid;
|
|
|
+
|
|
|
+ var pointsMaterial = scope.cache.get( cacheKey );
|
|
|
+
|
|
|
+ if ( ! pointsMaterial ) {
|
|
|
+
|
|
|
+ pointsMaterial = new THREE.PointsMaterial();
|
|
|
+ THREE.Material.prototype.copy.call( pointsMaterial, material );
|
|
|
+ pointsMaterial.color.copy( material.color );
|
|
|
+ pointsMaterial.map = material.map;
|
|
|
+ pointsMaterial.lights = false; // PointsMaterial doesn't support lights yet
|
|
|
+
|
|
|
+ scope.cache.add( cacheKey, pointsMaterial );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ material = pointsMaterial;
|
|
|
+
|
|
|
mesh = new THREE.Points( geometry, material );
|
|
|
|
|
|
} else {
|