typpo / spacekit

Javascript library for 3D space visualizations
https://typpo.github.io/spacekit/
MIT License
521 stars 39 forks source link

Background stars in the wrong position #73

Open lealea401 opened 11 months ago

lealea401 commented 11 months ago

Hello, I am using the Stars background generated by Spacekit. I noticed that the position of background stars is not correct. Stars are in the wrong position and/or duplicated. The arrangement suggests a 180-degrees error in the software. Could you suggest if I can somehow rotate the background to correct the star positions with respect to Earth?

typpo commented 10 months ago

Hi @lealea401,

Thanks for the report! Just checking, are you using createStars (rendered points) or createSkybox (rendered image)?

lealea401 commented 10 months ago

Hi @typpo ,

I am using createStars. I use createSkybox for rendering the Milky Way. Here it is the code:

        const vt = window['vt'];
        const camera = vt.getViewer().cameraControls;
        const scene = vt.getScene();
        const settings = VisualisationService.getSettings();
        const backColor = settings.objectsSettings.background.color;

        scene.background = new THREE.Color(backColor);
        scene.background.set( backColor );

        if (settings.objectsSettings.dsos.value) {
            vt.stars = vt.createStars();
        }

        if (settings.objectsSettings.milkyWayBackground.value) {
            vt.skybox = vt.createSkybox(Spacekit.SkyboxPresets.NASA_TYCHO);
        }