Three.js Y 坐标可以向下而不是向上吗? [英] Can Three.js Y coordinates go down instead of up?

查看:42
本文介绍了Three.js Y 坐标可以向下而不是向上吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种简单的方法可以更改 Three.js 坐标系,以便 Y 值在屏幕向下而不是向上移动时增加?

Is there an easy way to change the Three.js coordinate system so that Y values increase as they move down the screen instead of up?

我必须编写一些同时适用于 SVG 和 Three.js 的代码.如果我不需要一直翻转 Y 坐标就好了.(而且代码已经在 SVG 中有效,所以我更愿意坚持 SVG 的递增 Y 均值向下约定.)

I have to write some code that works in both SVG and Three.js. It'd be nice if I didn't need to keep flipping the Y coordinates. (And the code already works in SVG, so I'd prefer to stick to SVG's increasing-Y-means-down convention.)

推荐答案

没有.Three.js 基于右手坐标系.如果正 y 在向下"方向,那么坐标系将是左手坐标系.

No. three.js is based on a right-handed coordinate system. If positive-y were in the 'down' direction, then the coordinate system would be a left-handed one.

你将不得不在应用层继续适应.

You are going to have to continue to adapt at the application layer.

three.js r.57

three.js r.57

这篇关于Three.js Y 坐标可以向下而不是向上吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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