Coder Social home page Coder Social logo

Comments (8)

gabotechs avatar gabotechs commented on August 23, 2024

The limit is not given by this library, it is more related with your hardware specifications. An 8Mb file is relatively small, that should work perfectly. Do you have any steps to replicate the problem?

is there a way to support 3MF, OBJ files?

This library only supports STL, there is no plans for adding support for other file formats

from react-stl-viewer.

LidorCubee3D avatar LidorCubee3D commented on August 23, 2024

I didn't do something special, it happend both URL and local file. It happens on 2 different PCs and smartphones. If you try, you can use a big file? Let's say 40mb. is it working well for you?
I tried now to run "npm run storybook" on your repo and I can see a 100MB file is working fine (bit laggy, but working).
Maybe you have an idea what is causing my problem?

from react-stl-viewer.

gabotechs avatar gabotechs commented on August 23, 2024

It is very likely something related to your STL file, I have also stepped into problems with corrupted STL files. Maybe your file is not a STL even if it says *.stl? is there any STL file that you could share in order to replicate?

from react-stl-viewer.

LidorCubee3D avatar LidorCubee3D commented on August 23, 2024

it happens on multiple STLs. and it works well on your storybook localhost. so I do not know where is my problem...
I tried both 1.0.8v and 2.0.4v. I am attaching a link to google drive with the STLs
https://drive.google.com/drive/folders/1fPUk4Vn3R119R9wjdpf1UekrsSSgg_Nc?usp=sharing

from react-stl-viewer.

gabotechs avatar gabotechs commented on August 23, 2024

Your examples work well, so it should be something related with your implementation. Can you share the snippet of code that you are using for displaying the viewer? The problem is most likely there.

from react-stl-viewer.

LidorCubee3D avatar LidorCubee3D commented on August 23, 2024

`

                            <div>
                                <StlViewer
                                    style={style}
                                    // shadows
                                    // url={URL.createObjectURL(selectedFile)} //THIS IS FOR VERSION 2.0.4
                                    // url={"https://cdn.thingiverse.com/assets/a4/c2/db/e9/ff/20131015WV1Feet.stl"} //THIS IS FOR TESTING FROM URL
                                    file={selectedFile} //THIS IS THE FILE FROM REACT USESTATE
                                    color={stlViewerColor}
                                    onError={er=>console.log(er)}
                                />
                            </div`

I am using version 1.0.8, but the same thing is occurs in 2.0.4
Edit: I just noticed, that if I am changing the props after the context is lost, it suddenly appears well. (props like color or style). something is very weird

from react-stl-viewer.

gabotechs avatar gabotechs commented on August 23, 2024

That looks like a state management issue in the React component, I recommend to double check the code that handles state changes from selectedFile variable. In any case there is nothing we can do in this library to handle that.

from react-stl-viewer.

LidorCubee3D avatar LidorCubee3D commented on August 23, 2024

Thank you for your help :) . you can close the issue.

from react-stl-viewer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.