christopherreay / thisEqualsThat_frontEnd

Online, collaborative pipeline for visualising information
GNU General Public License v3.0
6 stars 5 forks source link

Fix the distance ratio to make these huge images look good after translation #141

Open christopherreay opened 6 years ago

christopherreay commented 6 years ago

@ndebeiss

screenshot from 2017-10-03 11-18-12

Hey, Nicolas, can you tell me which number I need to change to get the kettles in the distance to be less over to the left for each row going backwards?

Ive tried: z:xInfinity, and z:yInfinity, but they dont seem to make adifference. Should they? This image is Huge its like 901 by 1142 pixels in size. this is the layout for the clone operation:

{ "translate3d" : {"x": 210, "y": 1200, "z": 0},
                                    "clone3d": {
                                        "row":        1,
                                        "x":          1300,
                                        "layer":      1000,
                                        "y":          -50,
                                        "z":          1300,
                                        "nb":         40
                                    },
                                  },

and this is the svg container that it they are in:

 $(document.createElementNS(d3.ns.prefix.svg, "svg"))
                                .attr("xmlns",        "http://www.w3.org/2000/svg")
                                .attr("xmlns:xlink",  "http://www.w3.org/1999/xlink")
                                .attr("xmlns:z",      "http://debeissat.nicolas.free.fr/svg3d/svg3d.rng")
                                .attr("width",        "100%")
                                .attr("height",       "100%")
                                .attr("z:xInfinite",  "50")
                                .attr("z:yInfinite",  "100")
                                .attr("z:zRatio",     "5")
christopherreay commented 6 years ago

OK, so what I did was use a much smaller image for the cloned kettles (60px) which works fine.

ndebeiss commented 6 years ago

There is an issue when calculating the director vector (I will rename it to "normal") of the group. Can you try with the last version, I added the commit : https://github.com/ndebeiss/svg3d/commit/cedd869b462b8898b0d0f091ec8dba0636fdd5d9