In my react app I have a babylonjs scene component created according to babylonjs's example code and also am using the axis code from this example where onSceneMounted in React example is basically the createScene from axis example. What I would like to do is to instead of placing the axis to the scene origin in scene space, I would like to show them in upper right corner, similar to how Unity editor does it.
The axes are always pinned to the upper right corner and are rotated according to the camera rotation.
Related
I am currently trying to draw a circle of a certain radius at the origin of my chart.
One of the ways I found to do that is to use the Circle component of React Native Svg (I don't know why, I wasn't able to use the one provided by Victory) but then its size and location are set in pixels. I also found that I could use a VictoryScatter and add a single data point at (0, 0), but then it's the same problem again. I also thought of computing the points of the circle with a specified resolution and then use a VictoryLine, but this component only goes from left to right.
Is there a way to draw a circle of a certain size in a chart ? Preferably only the border, but if it's filled it's okay too.
If that's not possible, is there an other library I could use to achieve this ?
I am working on react native application. I have set of array coordinates and we draw a direction arrow by using bearing angle calculations in Polyline paths. The problem is direction arrow collided with each other and Polyline path is not visible at all. I need to show markers in a specific distance. Normal distance calculation works fine in zoom out mode, but if I zoom in the map means all markers are collided with each other. I need to remove some markers while zoom in. Can some one help me how it can be sorted out.
I tried distance between first and last coordinates of the visible markers. and applied that value with already existing distance coordinate but it is not working.
I use OrbitControls to allow the users to rotate and pan the screen. However I want to be able to set the rotation around the Z axis for the OrthographicCamera that the OrbitControls. I am able to change the position and the OrbitControls seem to honor that when I switch to a different view and back. However when I change the rotation around the Z axis for the OrthoGraphic camera, everytime I use the mouse to pan or rotate objects it jumps to 0 rotation and starts from there. How do I fix this?
I'm trying to build a 3D earth with Wpf Viewport3D. I have created the earth and it works pretty good. Then I want to add a halo effect around the earth like this attached image:
.
Some recommend to use diffuse material for the globe model. Then build a slight larger globe model with emissive material and little opacity. But the effect is not very good. It affects the color of diffusion material like this:
How can I implement the effect like the first screenshot?
I've done exactly this by creating a ring, inner radius the same radius as the planet and an outer radius to relect the atmospheric depth. Oriented to 'face me'. Using texture coordinates into a LinearGradientBrush to have the atmosphere fade from sky blue to transparent black.
Alternatively, there are some fairly good PNGs around of semi-transparent cloud layers you could use on the slightly larger sphere.
I have a Viewport3D with a 3D model composed of multiple smaller components centered at the origin. I'm animating the PerspectiveCamera to rotate about the Y-axis using an AnimationClock created from a DoubleAnimation to create a rotating effect on the model. In addition, I have another rotateTransform3D assigned to the camera's transformgroup to enable the user to orbit around and zoom in-out of the model using the mouse.
I want to be able to translate each component as it is being selected to move in front of the rotating camera. However, I don't know how to get the position of the camera relative to the 3D model because the coordinate system of camera is being animated and transformed by the user's input.
Is there a way to get the offset between two coordinate systems?
Any help or suggestions would be appreciated.
Thanks,