Open Klee319 opened 11 months ago
You're going to need to provide significantly more information than this. The version you're using, the schematic file, how you're building the site, the code you're using, etc
Ideally a minimal reproduction. As-is there's nothing that can be done based on your report.
OK. Thank you for your reply. This is my environment of development Base language: Ruby 3.1.2 Framework: rails 7.0.5 ViwerVersion:4.8.1 minecraft jar file:1.20.2 I use webpack.
html.erb
<javascript_pack_tag "SchematicViwer"> <canvas id="schematicRenderer" , width="500," height="500"></canvas>
SchematicViwer.js
import {renderSchematic} from "@enginehub/schematicwebviwer" renderSchematic(document.querySelector('#schematicRenderer'), "./sample.schem", { size: 500, renderArrow: false, renderBars: false, corsBypassUrl: 'client.jar', });
Hello, I had this error, I solved it. This error happens because the html block where it is going to be drawn has not yet been loaded, but the scene is waiting to be created. What I did was isolate everything into a function that will create the scene after all the html is loaded.
@neunapp Thank you for your comment! I'll try it right away!
I am very interested in this library. While other web viewers had outdated support versions, this one seemed to support even the latest versions (as the commits are recent). However, I am facing the following error and am in trouble.