TransformControls snap scale - three.js

I am using the TransformControls from the examples and want to be able to have ability to have a setScaleSnap like the existing setRotationSnap and setTranslationSnap, was just wondering if anyone has added that and would be willing to share?

Related

Is It possible to render a realtime physic animation on a website?

I want to create an Interactive website, but I have doubts that It won't even run on decent computers.
Summary;
I want to create a bird simulation, from top view (Birds don't need to be detailed).
People will be able to drag the birds around, and the crowd will follow them, therefore every single bird must calculate something simultaneously. I wanted to make this in a Website so more people could interact with it. But if it's not possible before starting, I want to switch.
Yes, is possible in to build this with phaser.
If you want to see, phaser functions/features in action, I highly recommend checking out the offical phaser examples, they show most function/features in useful and testable examples.
Just go to https://phaser.io/examples, there you can find everything you will need, like drag-events, sprite animation, and many more.
And on the official page you can even find tutorials to get started with the development.
Just stick to Phaser 3, since this is the current and stable Version.

how to create basic stick figure type animation movies?

I want to make a simple animation movie with stick figures like this: http://www.youtube.com/watch?v=Kr_DGf77OhM
I am an indie coder so I am completely new to this. My goal is to be able to make simple marketing videos for my apps.
I want to know where to start - what tools should i be looking at? I do not want anything fancy - I just want to move around some stick figures and some images I have, and I can add voice to the movie.
I'm sure it is not as simple as I am thinking - but would appreciate some recommendations on where to start.

Set a country background to my Google Geomap

A few days ago I've explored geomaps and, however, it turned out to be easy to change the properties of the elements.
But I have two questions:
I'd like to add rivers and forests on the maps. So Ive considered to set a background image instead of the geomaps figure. But I can't find a way to get this one fixed. Is there a way to set a background picture for a country or region?
How can I change the shape of the "bubbles" when you select a city e.g. "London"? I'd like to change it to a square.
Thanks in advance for your help!
Unfortunately what you're looking for is not available in geocharts in their current implementation.
Using a background image is possible in the sense that you can use CSS to make all shapes in the map transparent, and use a background image in the div to make it appear as if the little circles are being drawn on a map with forest and rivers, but you will run in to two big hurdles:
Your map will need to be identical in size/layout to the Google Maps SVG
If Google ever changes the SVG they use (or the view/projection they use) you will need to edit yours too
This isn't ideal, obviously. You could work around it by creating custom javascript to write rivers and forests on your map, but that is going to be a huge headache (especially if you are using multiple maps/views).
As for the circles, you can't change them to squares without hacking the actual SVG in the background with javascript. While this is definitely possible (if you're really good with SVG/Javascript), it again isn't using any of the fancy features of geocharts, and is more just a custom solution that will have to be updated if/when google updates their API.
Rather than doing it that way, you may want to look in to the same implementation on google maps itself. That will allow you to use custom markers, draw custom shapes, etc. with a lot more flexibility (and a much more stable API).

How to locate position/coordinates of faces in photo through code?

I know about face.com and its cool API. But it only identifies the people in the photo. I really dont need that. I want to able to detect the position (as in x,y,width and height) of face(s) in a given 2d photo. If anyone know of an ongoing project, of available projects, please help me out with some links, tips and or advice. Deeply appreciate that. Thanks
Use OpenCV Face detector. It gives x,y,width,height

Sophisticated HTML5 Image Map?

I have an image of a living room, which I'm turning into a menu for a new site I'm working on. The idea is that you can click on certain items in the room, like a chair, desk, couch, etc and get taken to the desired page. I'm wondering if there is a clever way of doing this. Since the items are not simple shapes, I don't want to use a standard image map.
Thanks for you help!
I'm answering because a Google search brought me here...
Because you asked for a tool:
GIMP Has a really good Image map creation function.
Open your image in GIMP and select Filters > Web > ImageMap
From there you can create image maps by drawing on the image. Saving will generate HTML you can then tailor to your needs.
This tool looks to be a solid image mapper: http://www.image-maps.com/
I'd suggest doing this with a canvas and SVG's, it would make this quite a bit easier, and more professional.
As Korvin mentioned, doing this in SVG is probably the easiest option, because you can attach events to objects in SVG rather than having to manually specify a particular area in which to listen for events.
If you go this route, I recommend using the RaphaelJS library which has a nice syntax and the advantage of working in IE pre version 9. Here's a demo which, although it uses onmouseover instead of onclick, it might be close to what you're trying to achieve:
http://raphaeljs.com/australia.html

Resources