提交 ea9923b2 编写于 作者: F Fernando Serrano

GLTF2Loader: add support for points primitive

上级 49aba74e
......@@ -1181,6 +1181,7 @@ THREE.GLTF2Loader = ( function () {
LINEAR: 9729,
REPEAT: 10497,
SAMPLER_2D: 35678,
POINTS: 0,
LINES: 1,
LINE_LOOP: 2,
LINE_STRIP: 3,
......@@ -2419,6 +2420,10 @@ THREE.GLTF2Loader = ( function () {
mesh = new THREE.LineLoop( geometry, material );
} else if ( primitive.mode === WEBGL_CONSTANTS.POINTS ) {
mesh = new THREE.Points( geometry, material );
} else {
throw new Error( 'THREE.GLTF2Loader: Primitive mode unsupported: ', primitive.mode );
......@@ -2788,6 +2793,10 @@ THREE.GLTF2Loader = ( function () {
child = new THREE.Line( originalGeometry, material );
break;
case 'Points':
child = new THREE.Points( originalGeometry, material );
break;
default:
child = new THREE.Mesh( originalGeometry, material );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册