Comments (8)
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.
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.
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.
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.
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.
`
<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.
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.
Thank you for your help :) . you can close the issue.
from react-stl-viewer.
Related Issues (20)
- i dont know if i have exactly the same problem, this is my error HOT 3
- Error when installed HOT 3
- Bundle size is too big HOT 4
- export 'ParametricGeometry' (imported as 'ParametricGeometry') was not found in 'three' HOT 1
- Update peer dependencies HOT 2
- Please add LICENSE file
- Problem working in build HOT 3
- ./node_modules/react-stl-viewer/lib/index.esm.js:3:0 Module not found: Can't resolve 'three' HOT 7
- Provide stl content from string HOT 2
- Error after installing react-stl-viewer HOT 4
- Can't display STL files by giving file's path HOT 2
- Lighting not working HOT 5
- Low quality render HOT 2
- Can I calculate the volume of the model? HOT 1
- Is there an example of updating the camera initial position? HOT 2
- Example usage in readme gives invalid typed array length error HOT 5
- Set orthogonal or perspective views HOT 4
- file prop support gone in version 2.0.0 HOT 2
- how I am accessing and changing the "interfaces"? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-stl-viewer.