提交 8e56415c 编写于 作者: T Takahiro

Add GLTFLoader PointsMaterial support

上级 8cd7106a
......@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册