Selecting bars in the WebGL Globe (Google) - three.js

We all know http://www.chromeexperiments.com/globe/ WebGL experiments and I really got interested in what they did there.
What they do there is they build bars on a globe based on GPS (JSON format) information. Pretty cool in itself.
While waiting on three.js library documentation getting more complete I'd like to ask a question. How would I implement a method that would investigate which bar was ie. clicked?
Thanks in advance,
Karpo

You would need to put the bars in a group if they aren't already.. (the meshes)
You would need to use Projector and Ray to determin the clicked object:
http://mrdoob.github.com/three.js/examples/webgl_interactive_cubes.html
And from here on it would be pretty easy.. you would need a way to distinguish between the bars somehow...maybe with the mesh's 'name' attribute..

Depending on the amount of bars I'd use the ray on the globe and select the bar via latitude and longitude, which is much faster. Also it does not rely on user's capabilities to click tiny bars.

Related

Kendo chart - zoom ruins the axis values

I'm trying to create a scattered chart with Angular-Kendo,
and have some challenges with zooming.
The current challenge is that upon zoom in by area selection with the mouse.
It does the zoom perfectly, besides the fact that it ruins the axis numbers.
I created an example [not angular oriented, but very clear].
Simple example - you can try to zoom with mouse drag.
Already tried the [labels]= "{format: '{0: n3}'}", etc... but it didn't work...
Thanks for any help.
The solution I found for this very painful item is:
using kendo-chart-x-axis instead of category-axis :-)

Konva js viewport support?

I am currently using Fabric JS but I dont like the layer/group implementation there but beside of layers fabric js has something useful I cannot find in konva js at the moment: viewports. How much work would it to implement zooming to a certain point (most often the mouse cursor) and also emit mouse events with transformed coordinates?
Use case: I would like to zoom in on a the top most layer and use drawing tools to draw on the zoomed area, so the mouse event coordinates need to fit accordingly.
Thank you :)!
I managed to get it working just by using some demo code and one coordinate scaling, great!

Cesium labels on a polyline (similiar to a textpath)?

I would like to recreate bent country labels according to the area of the country.
In d3 (or SVG) I can construct a polyline and then use a textpath to have text along it. Example: https://www.w3.org/TR/SVG2/images/text/text-path-startoffset.svg
Is it possible in Cesium to do something similar?
In Leaflet it is implemented like that: http://makinacorpus.github.io/Leaflet.TextPath/
There's no native support for that in the current version of Cesium. It may be mentioned on a wishlist or on a roadmap somewhere, but there are no short-term plans that I know of to add it to Cesium.
Even so, you may be able to find a workaround. For example, SVGs can be used as texturemap image sources in Cesium, so you could possibly use D3 to produce curved text on-the-fly and load the results into a Cesium billboard image or even a Cesium Globe inlay image. It would probably take some experimenting to figure out how to actually wire this up and how well it would work.

How to make a sort of scratchboard in flash?

I was wondering if someone could teach me how to make a scene in flash where you have an image on top of the other, and you can scratch the top one off to show what's below.
Kinda like those prize cards where you have to scratch the silver thing to see if there's a prize below.
Anyone has any idea if this is even possible in flash?
Yes it's possible, here is one example. I'm sure there are others.
The concept is that you use a mask to hide the image. Then use a mouse move event listener to draw on the mask as the user mouses over the object. Parts of the mask that have something on them (ie: the stuff you're drawing in the mouse move listener) will then reveal the underlying object that was being masked.

Creating 3D rotatable text using blender

Hi i need to create a rotatable 3d "c"(alphabet c)shaped object,i.e a logo kind of thing using blender 3d tool,i tried using text in blender but its not giving the feel of 3d object please help me out from this.thanks in advance.
You might want to hit tab to enter edit mode, select the faces to extrude(can hit "a" to select all), hit "e" key and move the mouse to extrude this text shape. Obviously render having added a light to the scene. (in case you are rendering it) And add a camera if you are not using the default one, and rotate it, or the object, so it renders other than a frontal view, to make it look more like a "3D object"
There's not yet an stack exchange site for 3d modeling questions (sadly, although one is being voted ) , so this question might fit better in Superuser. Anyway you need to explain the problem with more detail, or accuracy :)

Resources