I would like to implement a snap grid function in my pointer, but it seems when I zoom in or out, the grid distance changes. Is there a solution for this?
Here is the playground: https://playground.babylonjs.com/#VHW8N9#2
I created the grid using this
scene.pick(Math.round(scene.pointerX/100)*100, Math.round(scene.pointerY/100)*100)
I already found a solution for this in this playground, https://playground.babylonjs.com/#VHW8N9#3.
If someone is facing the same issue, this may help.
Related
i am actually trying to follow this tutorial: "How to create a HTML draggable and scrollable map with inertia using Phaser framework" (google it, www. emanueleferonato .com)
Im using Unity but i configured it "pixel perfect" so i can use directly pixels like in AS3 and flashdevelop.
I basically need to make a map for the game where the player can drag in the X axis of the map.
I have no clue of how to do it, also it should have acceleration and deceleration.
Edit:
As i say before, i am using a custom framework that does not allow components, or UI, it works like FlashDevelop and AS3, so imagine the answer is in AS3.
Thanks!
I recommend looking up Unity's UI documentation (AND TUTORIALS!) :D They have really good articles, and the forums are a great resource too.
Regarding your specific problem- Scroll Rect is what you are looking for. You can implement 2D dragging, along with acceleratoion, deceleration, and other kinds of UI physics (inertia, elasticity, etc.) with it.
Please look for tutorials if you're just beginning to dabble with these. I hope that helps!
I am coding a Googlemap Locator system showing your friends, similar to what Apple does with find my friends, However the markers on this system need to have the users profile images as per the visual below.
I am using http://gmap3.net/en/catalog/10-overlays/marker-41 jQuery plugin for the integration which is really just a simple way to integrate the googlemap, but has all the functionality of the API.
I have been reading the documentation for both the plugin and the Google API, however can't seem to pinpoint any way I can do this, I have seen this type of functionality before, so I'm sure it must be possible somehow. Any help on a way I can do this using gmap3 would be much appreciated.
Thanks in Advance
I found that I have a solution by using the shadow property for the back pointer and icon for the actual profile image. If that helps anyone else.
I'd like to use tooltips with the same design as the error/validation tooltips (rounded box with a tip pointing to the mouse's position).
Given the name "error/validation tooltips", it bothers me to use them as normal tooltips.I haven't found people having the same "principles" issue as myself..
So, is it that bad to use the error/validation tooltips as normal tooltips? And, if yes, what would be the easiest way to re-use its design without rewriting much code?
Hope it's clear enough :) And that you will be able to enlighten me somehow in this matter :)
Regards.
BS_C3
Good or Bad is subjective based on what you're trying to do and the design of your app. There is never a right a wrong answer to stuff like that.
To reuse that design, you have two options that I see.
The first is to set the styleName of your toolTip component to errorTip.
The second is open up the default.css in the Flex Framework directory and copy and paste the CSS for the errorTip into your own CSS file that you then use in your application.
These docs will be good reading on this issue.
Anyone can point me to free or commercial Ribbon component done for Adobe Flex or Aswing? I seen one at some point but for some reason cant find any now. (Please don't mention minddomo, since it has nothing to do do with my question).
Thank you.
A Ribbon implementation in Flex would be a lot different from the standard TabNavigator. You must consider groups within each tab, and dynamic buttons within each group, and group popups etc.
I know this isn't an answer, but I don't know how to reply to the previous answer. :)
I don't know of one. But, whenever anyone asks for one I ask this question:
What is the difference between a Ribbon and a TabNavigator with a button bar as the children?
I'd consider creating one for Flextras if anyone could explain what the difference was.
Believe it or not I need a way of displaying animated gifs in Flex 3. This guy has a component for sale but it's Flex 2 only: http://dougmccune.com/blog/2007/01/19/how-to-load-animated-gifs-using-adobe-flex-20/.
And I’ve implemented this example: http://www.bytearray.org/?p=95, but for larger gifs it’s very CPU intensive and causes the UI to hang.
Does anyone know of any alternative solutions? Failing that, I may have to look at re-factoring the second example to use pseudo-threading. Eugh.
i bought and used the mccune product but have now changed to flex 3. i found your question by searching for the same answer as you and have just come across this
http://flexology.wordpress.com/2008/09/30/loadinganimated_gif_in_flex/
Thanks for the response. The google code project in that link (http://code.google.com/p/as3gif/) is the same as the one on bytearray (http://www.bytearray.org/?p=95) which I implemented.
I knocked up a quick pseudo-threading example using this code and it's far too slow.
Looks like I will need to SWF the GIFs on the fly...
Does this help?
Edit: I've no idea how well that suggestion works on a larger GIF, but if you're still having issues, it might be worth importing the GIF into Flash and turning it into its own SWF.
Flex should be more than able to play that without any issues.
Check out swfmill for going for creating swf's. I believe they support animated gif's
http://swfmill.org/