Paper.js Z-Index 和绑定对象 [英] Paper.js Z-Index and Binding Object

查看:50
本文介绍了Paper.js Z-Index 和绑定对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习 paper.js 并没有找到如何解决我的问题.请参阅我的应用程序测试:http://www.plugbox.com.br/reta.htm

I am studing paper.js and don´t found how resolve my problem. See my application test in: http://www.plugbox.com.br/reta.htm

红色圆圈只覆盖 Y 轴,蓝色圆圈只覆盖 X 轴,线的起点和终点跟随红色和蓝色点.

The red circle covers only the Y axis and blue circle covers only the X axis and the starting point and the end point of the line follow the red and blue points.

但是这条线在圆圈的前面.如何通过将z-index"线放置在点后面的图层中来设置它?

But the line is in front of circles. How do I set the "z-index" line by placing it in a layer behind the points?

另一个问题是:

例如,如何将第三个点放在线的中间并使其仅可拖动到线上?

How do I put a third point, for example, in the middle of the line and make it draggable only on the line?

谢谢!

推荐答案

但是这条线在圆圈的前面.如何设置z-index"线通过将其放置在点后面的图层中?

But the line is in front of circles. How do I set the "z-index" line by placing it in a layer behind the points?

每一项都有方法:
insertAbove(item)//将此项插入到指定项的上方.
insertBelow(item)//将此项插入到指定项的下方.
sendToBack()//将此项目发送到同一父项中所有其他项目的后面.

Every item has methods:
insertAbove(item) //Inserts this item above the specified item.
insertBelow(item) //Inserts this item below the specified item.
sendToBack() //Sends this item to the back of all other items within the same parent.

来源

这篇关于Paper.js Z-Index 和绑定对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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