We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tools-16PrimitivePoints.js
"varying vec4 v_color; void main() { float d = distance(gl_PointCoord, vec2(0.5,0.5)); if(d < 0.5){ gl_FragColor = v_color; }else{ discard; } } ";
找了半天没有找到这个 distance 到底从哪里来的
The text was updated successfully, but these errors were encountered:
在Expression.js
function distance(call, left, right) { if (typeof left === 'number' && typeof right === 'number') { return Math.abs(left - right); } else if (left instanceof Cartesian2 && right instanceof Cartesian2) { return Cartesian2.distance(left, right); } else if (left instanceof Cartesian3 && right instanceof Cartesian3) { return Cartesian3.distance(left, right); } else if (left instanceof Cartesian4 && right instanceof Cartesian4) { return Cartesian4.distance(left, right); } throw new RuntimeError('Function "' + call + '" requires vector or number arguments of matching types. Arguments are ' + left + ' and ' + right + '.'); }
Sorry, something went wrong.
distance是webgl中glsl语言内置函数
No branches or pull requests
Tools-16PrimitivePoints.js
"varying vec4 v_color;
void main()
{
float d = distance(gl_PointCoord, vec2(0.5,0.5));
if(d < 0.5){
gl_FragColor = v_color;
}else{
discard;
}
}
";
找了半天没有找到这个 distance 到底从哪里来的
The text was updated successfully, but these errors were encountered: