Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nothing is rendered using orthogonal projection #88

Open
muren400 opened this issue Mar 31, 2021 · 0 comments
Open

Nothing is rendered using orthogonal projection #88

muren400 opened this issue Mar 31, 2021 · 0 comments

Comments

@muren400
Copy link

muren400 commented Mar 31, 2021

Hi,

currently it's not really possible to set an orthogonal projection.

In camera.js in the function setModelBounds(bounds), the bounds array/vector ist cloned using vec3.clone().
Since bounds has six entries (minX, minY, minZ, maxX, maxY, maxZ) we lose some information and end up with three entries.
This results in an invalid projection matrix and the model can't be rendered.

setModelBounds(bounds) { // <-- takes an array with six entries
    this._modelBounds = [];

    this.perspective.setModelBounds(vec3.clone(bounds)); // <-- creates an array with three entries
    this.orthographic.setModelBounds(vec3.clone(bounds));

Thanks

@muren400 muren400 changed the title Nothing is rendered using orthogonal perspective Nothing is rendered using orthogonal projection Mar 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant