I'm trying to develop a card game with Flex, and I was wondering if there's a way to create an horizontal list (the cards that I have in my hand) having the elements overlapped, like you can see in this example made with openflux:
http://www.ryancampbell.com/flex/StackListExample/StackListExample.html
the thing that's missing here is the possibility to swap the cards with drag and drop.
Any ideas on what I could do to get a similar effect with an horizontallist based component?
If you are using Flex 4, its a pretty straightforward custom layout.
some links to get you started.
RIA
Adobe TV
Yo
I was looking at a 3D layout the other day for Five3D (an opensource 3d api), and saw an example of a Card game/layout that may give you some inspiration:
http://www.danielenstrom.com/solitaire/
Related
I have created a react app Which is very similar to office whiteboard. I would like to generate a thumbnail or card preview of each whiteboard and wondering how to go about it.
My initial thought was to just create a card component and render the shapes to that the same way I do for the real whiteboard. However, the points for each shape will be outside the stage and I can't think of how I can scale it down.
Any ideas?
Take a look at the official canvas thumbnail demo from Konva.
You can use a similar approach with react-konva.
Create a special component for the preview.
I think this approach will work better and probably more performant (depending on your app). You just need to create another Stage and draw all objects into it. It will be better if you can draw simplified versions of the shape, because the drawing is much smaller, so not all details are visible.
You will have to calculate your own scale ratio.
Use image preview
Instead of making a full components tree for the whiteboard, you can just export the main stage into an image and show it. You have to do reexport from time to time.
I had experience with Twitter Bootstrap and Foundation, and I personally think the only thing I want to use is their grid system. Other features are just bloated.
So I read about the prospect of a grid layout. All of the articles I found are oriented toward an 'artistic' explanation (golden ratio ect). I am a coder at heart, I need a clear & logical reason to use a grid layout (for example: 'columns can be easily stacked on top of each other on mobile screen, and expand horizontally on larger screens'). Can someone give me the pros and cons of applying a grid system to my website? Personally do you think using a grid system is good?
If the answer is yes, should I use a premade grid system like from Twitter Bootstrap/Foundation or just make one for my own? All of the other features are unnecessary for me an irrelevant to my problem.
Thanks! :D
I agree with #kunalbhat that this might not be the best area to ask this but since you did I will try to answer it.
The grids are designed allow for speed and adaptability. Speed in multiple senses. The first part of the speed is the speed of writing the code. You can easily get the layout you want when you are using the grid system and everything aligns correctly. You don't have to remember your tables and columns and col-spans, etc.
The second speed is modifying your code. Inevitably you will need to go back and make changes, with a grid this is easily to do. Changing a col-md-7 to a col-md-6 easily makes a little tweak in the layout of your page that can easily be tracked and performed.
You mentioned responsive design, both Bootstrap and Foundation have responsive grids. The grids will snap to different sizes based on the viewport size. However you have control as well. For example if you want something to take 1/12th the screen in desktop, 1/4th on a tablet, and 100% on a phone that is easily done with Bootstrap and Foundation, both have grid classes that target specific viewports.
The also provide visibility classes based on those viewports.
For the "bloated" part that is easily solved. Using SCSS you can easily only import portions of a library. For example for one project I was on I only imported the Grid and it was considerably smaller.
I happen to think that this is a SO question, simply because of one of the main cons of CSS grid systems: semantic.
I think semantic is important for a web developer and having a class named col-md-7 is not the most semantic thing to do.
But I like grids, because they are easy and quick to use, so I started to use LESS. Because it allows me to use variables and functions(mixins) in CSS, I can build my own grid system on my CSS rather then on my HTLM.
You can start on Frameless and customize your own 'classes'.
I've got a project where I need to be able to display video on all six sides side of a cube that moves and rotates in three dimensions, using Qt. I know the question is vague, but I'm completely new to graphics, so a high-level description of which classes I should look and how they should link together would be a lot of help. Should I use GLRenderer or the ordinary one? Is Qt even the right tool for the job?
What you could do, is use QtOpenGL to render the cube. Then you use video texturing.
Do you know any simple drawing libraries with align support (one component to other, also align to grid)
I would like to implement simple editor of wall configuration in the apartments, by the way.
Or, may be, there is no such component and is better to use Graphics class?
You can try http://www.rogue-development.com/objectHandles.html
I need to draw Line, Circle, and rectangle by mouse drag on canvas and then i need to to move and resize the drawn shapes.
How i can perform this in flex as i am new on this platform.
Please suggest me the method or refer any example with source to make it understand to me.
Please Help.
Thanks in Advance.
There is no such native feature in Flex. But, there are a couple of options, commercial and not:
http://www.rogue-development.com/objectHandles.html (free)
http://www.flashcomguru.com/components/flex_whiteboard/whiteboard_demo/ (payed)
You can do it by hand, if you wish, it's not very hard. I advice you to use Degrafa (http://degrafa.org/) for the actual drawing since it is way easier than native drawing API and it is opensource.