Sia

Suggestion on dynamic shape generation

Recommended Posts

I'm researching about creating a visual " algebra geometry " desktop game-oriented app for students which the user can create 2D primitive shapes and parametric shape patterns with help of numeric-nodes. the similar application would be something like " grasshopper "  plugin for  " rhino 3d ". In parametric patterns user may create some thing around 1000 to 1500 user-defined shapes which each shape:
- has its own animation for vertices, position, rotation
- may response to mouse interactions
- has its own color or texture and stroke
- will be generated dynamically in runtime base on user input

also I have to code a mini node base editor . I've seen and study web-techs and precious libs and frameworks like Pixi and searched alot about best practices. I have some questions and I'll be grateful if you help me to find the answers:
- is web-techs suitable for the application?
- according to what I absorbed from API docs, PIXI.Graphics is designed for none-continues changing shapes so should I instead extend PIXI.Mesh or the Graphics does the job? what is the best way of creating such a shape?
- should the custom-shape class be my biggest concern or there are other performance related things I need to take care of?
- any further suggestion ?


thanks   🙂

07-15-2020000001.jpg

Share this post


Link to post
Share on other sites

You can copy Graphics and improve it. There are many adjustments that can be made to styles. You can even make custom shader where styles will be handled in uniforms , so you dont have to rebuild buffers each time you change style. 

If you dont know webgl internals that all isnt possible, and all specialists are busy at the moment, you have no other option than to learn source code.

Also, anti-anliasing will be a problem if you start applying filters on shapes, I have a solution for that already, https://github.com/gameofbombs/pixi-blit , but, again, if you didnt make a habit to look in pixijs internals - it wont help you.

Share this post


Link to post
Share on other sites
2 hours ago, ivan.popelyshev said:

You can copy Graphics and improve it. There are many adjustments that can be made to styles. You can even make custom shader where styles will be handled in uniforms , so you dont have to rebuild buffers each time you change style. 

If you dont know webgl internals that all isnt possible, and all specialists are busy at the moment, you have no other option than to learn source code.

Also, anti-anliasing will be a problem if you start applying filters on shapes, I have a solution for that already, https://github.com/gameofbombs/pixi-blit , but, again, if you didnt make a habit to look in pixijs internals - it wont help you.

Hi dear Ivan , thanks for the reply and the great link .

By copying you mean editing Pixi's Graphics class source code ?

The only reason I mentioned Mesh class was avoiding Graphics.clear() on redraw but then I have to write all the path functionalities like moveTo and lineTo for Mesh object am I right?

I'm kinda ok with glsl , actually it's addictive .

Edited by Sia

Share this post


Link to post
Share on other sites

By copying you mean editing Pixi's Graphics class source code ?


You can take that folder, copy in your project, rename the class and do what you want with it.

as for glsl, there are special tricks for graphics :) https://www.pixiplayground.com/#/edit/wu4-HcklTXNsrTiE6y9O7

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.