ThreeJS如何挑选物体的交点颜色 [英] ThreeJS How to pick the intersection point color of an object

查看:858
本文介绍了ThreeJS如何挑选物体的交点颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



有一些关于寻找脸部颜色的例子,但我的问题是如何获得颜色的纹理颜色交点,但在着色器代码之外。对象具有应用于其的纹理,并且颜色因对象的面部像素而异。



请提出一种获取点颜色的方法。



预先感谢

解决方案

我使用

解决了当前问题


  1. raycaster并找到脸色

  2. 然后检查颜色范围,如> ; Xval&& < Yval

正如我可能需要检查颜色变化并标记用户因此。感谢回复@Brakebein


I am trying ThreeJS ray caster to get the object intersection color.

There are examples on finding the face color but my problem is to get the texture color of the point of intersection but outside the shader code. Object has a texture applied to it and color varies from pixel to pixel on the face of object.

Please suggest a way to get the point color.

thanks in advance

解决方案

I solved my current problem by using

  1. raycaster and finding the face color
  2. and then check for the range of color like >Xval && <Yval

As in may case I need to just check for the color change and flag the user accordingly. Thank for the response @Brakebein

这篇关于ThreeJS如何挑选物体的交点颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆