-
Notifications
You must be signed in to change notification settings - Fork 49
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
Volume is not calculated #32
Comments
Hi, sorry for the late response, you have to wait the model to load before calc its volume,
BTW. you don't need to load all of the libs above, only stl_viewer.min.js |
Hello thank you so much! I figured it out after a day so its okej :) I tried to access the volume setting through another domain called Bubble.io. i uploaded a file on that domain and tried to calculate its volume but when i run the code, i get an error saying that the web worker couldnt be constructed. Do you maybe know how to fix this issue? |
please post the log here (with Chrome do ctrl+shift+j) |
THE ERROR: run_debug.js:662 Element Volumecalculator(testing) A - The plugin STL parser (testing) / element Volume calculator (testing) threw the following error: Error: Failed to construct 'Worker': Script at 'https://9eaebe63011526167540ff8dae4c76e7.cdn.bubble.io/f1701339509235x335094444249260300/load_stl.min.js' cannot be accessed from origin 'https://api-testing-81257.bubbleapps.io'.
at StlViewer.load_from_stl_file (https://9eaebe63011526167540ff8dae4c76e7.cdn.bubble.io/f1701339509235x335094444249260300/stl_viewer.min.js:2:4288)
at StlViewer.load_model (https://9eaebe63011526167540ff8dae4c76e7.cdn.bubble.io/f1701339509235x335094444249260300/stl_viewer.min.js:2:3795) (please check your plugin's code) THE PLUGIN CODE:
<script src="//meta-q.cdn.bubble.io/---noworker.js"></script>
<script src="//meta-q.cdn.bubble.io/---/stl_viewer.min.js"></script>
<script src="//meta-q.cdn.bubble.io/--/three.min.js"></script>
<script src="//meta-q.cdn.bubble.io/--/OrbitControls.js"></script>
<div id="stl_cont" style="width:1350px;height:800px;margin:0 auto;background-color:#909090;"></div>
function(instance, context) {
function stl_loaded()
{
console.log(stl_viewer.get_model_info(0));
console.log(stl_viewer.get_vsj());
}
var stl_viewer=new StlViewer
(
document.getElementById("stl_cont")
,
{
model_loaded_callback:stl_loaded,
models:
[
{id:0, filename:"//meta-q.cdn.bubble.io/---/06_elsa_right_hand.stl"},
]
}
);
} |
It can't load some js files for some reason, try to load them manually: and set "load_three_files:false" at the init options |
Hello,
<title>Viewstl Javascript Plugin - Simple Example</title>i have noticed that the get_info function returns a null value. i believe that there is a problem with one of the libraries.
this is the code i've used to try and acess the volume and other info using the get_model_info() method.
The text was updated successfully, but these errors were encountered: