查看: 2447|回复: 2
打印 上一主题 下一主题

Vectrosity线条工具扩展

[复制链接]

5552

主题

2

听众

8万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
11

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

跳转到指定楼层
楼主
发表于 2012-3-15 14:50:41 |只看该作者 |倒序浏览
Vectrosity

So you just want to draw some lines in Unity and are tired of struggling with the LineRenderer? You don't have Unity Pro or you find GL.LINES too limiting anyway? Welcome to Vectrosity! Draw all sorts of vectors, grids, graphs, and just plain lines, fast and easy. You can even make GameObjects behave like 3D vector objects with a couple lines of code.  Get Vectrosity now
•Works with Unity iPhone
•You can make hundreds or thousands of separate lines, each with their own color, with only one draw call.
•You only need to update lines when they change, so static lines take no extra CPU time.
•Continuously redrawing lines every frame is still fast, with low-end computers updating over half a million line segments per second.
•You can draw anti-aliased lines without needing FSAA (which doesn’t exist in current iPhone hardware), or make them glow without needing Pro-only full-screen image effects.
•Make 3D vector objects that behave like regular game objects. Can be used for various special effects, like the x-ray demo (right).
•Can draw points, too.
•Extensive user’s guide and reference guide to all functions.
•Includes a number of example scenes, and the complete project for the retro Tank Zone vector graphics game is included free!


How it works

Vectrosity uses a mesh-based solution, with a separate camera overlay. This is handled automatically and is transparent to you, the user. Once the line is drawn, it stays on-screen permanently until changed or removed. To start, just call
    Vector.SetCamera();
once to set everything up. Make some points in a Vector2 or Vector3 array, which can be any size up to around 16,000 elements (Vectrosity uses screen space for the coordinates):
    var linePoints = new Vector2[ Vector2(0, 0),

                                  Vector2(Screen.width-1, Screen.height-1) ];
Then make a VectorLine object, giving it a name, the points, a material, the line width in pixels, and an end cap length:


    var myLine = new VectorLine ("Line", linePoints, lineMaterial, 2, 0);
Then draw the line:
    Vector.DrawLine (myLine);
Presto, you have a 2-pixel-thick line that extends from one corner of the screen to the other. You can update the points and call Vector.DrawLine again whenever you like. You can also pass the transform of an object to DrawLine in order to move or rotate lines without having to recompute them.
This is just the start...there are lots more options and functions available to make things easy and to accomplish various effects. Vectrosity is written in C#, but you don’t have to know C# to use it, and the complete functionality is available in any language. Just make sure the Vectrosity classes are in the Standard Assets folder if you’re using Javascript or Boo.
  官网介绍:http://starscenesoftware.com/vectrosity.html
分享到: QQ好友和群QQ好友和群 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
转播转播0 分享淘帖0 收藏收藏0 支持支持0 反对反对0
回复

使用道具 举报

643

主题

1

听众

9937

积分

高级设计师

Rank: 6Rank: 6

纳金币
9935
精华
1

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

沙发
发表于 2012-3-16 17:55:40 |只看该作者
很多啊 看不懂
回复

使用道具 举报

797

主题

1

听众

1万

积分

资深设计师

Rank: 7Rank: 7Rank: 7

纳金币
5568
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

板凳
发表于 2012-3-16 19:39:01 |只看该作者

   
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

手机版|纳金网 ( 闽ICP备2021016425号-2/3

GMT+8, 2025-7-13 23:09 , Processed in 0.065912 second(s), 32 queries .

Powered by Discuz!-创意设计 X2.5

© 2008-2019 Narkii Inc.

回顶部