three.js单击网格表面纹理颜色

时间:2015-05-05 07:35:46

标签: three.js

我的球形网格有彩色纹理。

var Material = new THREE.MeshBasicMaterial( {                             

               blending   : THREE.NormalBlending,
               transparent: true,
               map   : THREE.ImageUtils.loadTexture( "texture.jpg" ),
               opacity    : 0.3,

                                            } );


       sphere = new THREE.Mesh( new THREE.SphereGeometry( (100), 32, 32 ), Material );
       scene.add( sphere );

获取点击的点:

var raycaster = new THREE.Raycaster();
     raycaster.setFromCamera( mouse, camera );
     var intersects = raycaster.intersectObjects( cameradestinations, true );


    if ( intersects.length > 0 ) {                         
          var mypoint = intersects[0].point   
                                 }

如何在点击的点mypoint中获取当前纹理颜色?

0 个答案:

没有答案