Three.JS, any idea to create sliding for Three.js? - slider

I am thinking to develop some tools for my prototype system. I saw a function in the following link and seems very useful for me as well. But I dont know how to implement it? any idea?
http://www.arcgis.com/home/item.html?id=9c0e319bfaff4d33a0fe2da97c2c3fd7
Thanks!!!

This may not be the most efficient solution, but you could create two viewports, both rendering the scene from the same camera, but before you render the viewport for the right-side half, set the visible flag of walls (and other Mesh objects as necessary) to false, and after rendering the right-side scene reset those flags to true. This wouldn't implement the slider, however.

Related

Why does my animation look completely different when rendering?

I have created an animation of a robot which when running does the animation the way I like it to. When I render it, certain objects like the arm of the object does not show. Any reason as to why this is?
show/hide_render icon:
Check if this little (Show/hide_render) icon is turned off for that specific mesh.

Draggable MapKit Annotations

I am working with MapKit on MacOS and trying to enable a draggable annotation that uses a custom image. I can successfully get the annotation to be draggable but it requires the user to be quite accurate with where they click and drag as the annotation image is larger than a conventional pin. Is there a simple way to expand the area so that any part of the image is draggable? Otherwise I imagine I will have to use some kind of NSGesture on the view to manually set the dragstate, but was hoping there might be an easier way!
Okay, I never managed to sort this to my satisfaction using Annotations. I’m not saying it can’t be done, maybe someone else can comment and leave pointers to help. But I eventually achieved what I wanted using overlays instead. So if someone stumbles on this question and has the same issue, you can make it work with a custom overlay rather than an annotation and you implement the dragging using a NSPanGestureRecognizer with translation for the movement.

Dynamic/scrollable container size in Cytoscape (+ cy.fit() issues)

So I've been giving Cytoscape a try recently. My project's goal is basically a collaborative graph that people will be able to add/remove nodes to/from, making it grow in the process. The graph will include many compound nodes.
Most of the examples I've seen use container div that takes 100% of the screen space. This is fine for "controlled" graphs but won't work in my case because its size is intended to be dynamic.
Here's a JSFiddle using the circle layout within a fixed 3000px/3000px container:
https://jsfiddle.net/Jeto143/zj8ed82a/5/
Is there any way to have the container size be dynamic as opposed to stating it explicitly? Or do I have to compute the new optimal container size each time somehow, and then call cy.resize()?
edit: actually, using 100%/100% into cy.fit() might just work no matter how large the network is gonna be, so please ignore this question is this is the case.
Is there a recommended layout for displaying large/unknown amounts of data in a non-hierarchical way that would "smartly" place nodes (including compound ones) in the most efficient way possible, all the while avoiding any overlap? (I guess that's a lot to ask...)
Why doesn't cy.fit() seem to be working in my example? I'm using it both at graph initialization and when CTRL+clicking nodes (to show closed neighborhood), but it doesn't seem to like the 3000x3000px container (seems better with 100%x100%).
edit: also ignore this question if you ignored 1., as again it seems fine with 100%/100%.
Any help/suggestions would be greatly appreciated.
Thank you very much in advance.
TLDR: It's (1).
Cytoscape has a pannable viewport, like a map. You can define the dimensions of the viewport (div) in CSS. What's displayed in the viewport is a function of the positions of the nodes, the zoom level, and the pan level -- just like what is visible in a map's viewport is a function of zoom, pan, and positions of points of interest.
So either you have to
(a) rethink your UI in terms of zoom and pan and use those in-built facilities in Cytoscape, or
(b) disable zoom and pan in Cytoscape (probably stay at (0, 0) at zoom 1) and let the user scroll the page as you add content to the graph and resize its container div to accommodate the new content.

How can I get shadows in blender game engine?

I'm making a very simple game in blender and for some reason shadows don't work. I tried every kind of light source, including objects with emisions. 'Cast shadow' and 'recieve shadow' check boxes are checked for ol the objects. I tryed all teh methods to dysplay objects. Is there an easy way to get shadows in the game?
Away to create shadows is like so:
-Switch Muiltitexture to GLSL
Now, you must understand that only certain lights cast shadows. I believe that the only two are the Sun, and Spotlight, however spotlight only casts partial.
While in GLSL Mode, you must change the Solid Mode to Textured Mode for lighting to work. Then, select the sun(angled at your prefered angle) and scroll down in the objects tab. Look for Shadows, and make sure the box is checked. Then play it. The Shadows should automatically appear in the Scene view as well because GLSL has support for realtime shadows.
WAY NUMBER 2:
Another way is to Bake a scene or object. This means that you place lighting in render mode, and capture all the lighting and textures(with lighting) and make a texture. This works really well, but doesn't have realtime shadows. Look it up for more imformation.
Hope this Helped!
In the Viewport press N and in the rendering options switch from multitexture to GLSL and then switch to Texture mode,
You don't have to tweak the settings. you can try this by creating a new blend file.
Hope this helps

Create an omnidirectional scrollview

I want to create an omnidirectional scrollview that works pretty much like the one in the "Wall of Sound" app. As in, the user should be able to pull into any direction and never get to an end. I want to keep the move to be smooth (and not see the pages change as you would in a standard scrollview). Does anyone know how that can be done? Or would I need OpenGL for that?
Create a 3x3 grid of views, each the size of the viewport. As the scrollview moves into another section, rearrange the views to constantly put the viewport in the center. In most cases 3x3 is sufficient, but if redrawing the views is expensive, you may want to use a larger grid (5x5 for instance). This requires that you have some mechanism for splitting up your full view into tiles.
You can implement the same thing using CALayer if you like. If you go that way, you should consider instead using CATiledLayer. See Matt Long's quick introduction on CIMGF.