Comments (9)
Digging a bit further, according to marcj/css-element-queries#309 one can replace ResizeSensor altogether with a very lightweight wrapper around ResizeObserver, which is built in to all modern browsers for quite some time. Since css-element-queries has a few PRs that have been open for 2-3 years, I don't expect to get it to change. Hence, with your consent and guidance, I'd like to remove it from x_ite one way or another. Please let me know whether you think it is still used/needed, in which case I will try to replace it with ResizeObserver, or whether I should simply try to prune ResizeSensor altogether. Thanks.
from x_ite.
P.S. Of course I could patch the x_ite bundle, and that is what I am doing for testing, but as you may or may not know, the Mozilla organization will refuse to sign extensions that patch any third-party libraries they use; all third-party libraries must be delivered exactly as released by the author. And without Mozilla's signature, extensions are not allowed to be installed in anyone's Firefox browser. That's why for my project to move forward, I really need to help produce an official version of the x_ite bundle that can be loaded in an extension.
from x_ite.
That's the first time I hear from ResizeObserver, but indeed we should use it now. :-)
ResizeSensor is used in src/x_ite/Browser/Rendering/X3DRenderingContext.js, which should then be replaced by ResizeObserver.
from x_ite.
Ah, not sure how I missed it in there. I will replace it with ResizeObserver and update my PR.
from x_ite.
Merged your PR yesterday and with a small adjustment it works very well. Thank you very much for your contribution.
from x_ite.
I don't know if it will become a problem for your project, but in the X_ITE source code there are some new Function ("...")
statements:
x_ite/src/lib/nurbs/src/evaluator.js
Line 399 in f2bf6bd
These code lines are essential for Script node and NURBS rendering.
from x_ite.
Thanks for fixing up my PR to remove ResizeSensor, it's very much appreciated and I look forward to the release.
As to your question about whether the Scripting and nurbs uses of new Function("....")
will cause problems for my project: I do think it means that if inside my extension I try to view x3d files that use Script nodes or NURBS, they will fail to execute. However, I have already verified (with my locally patched version of x_ite.mjs) that at least the large majority of files I am trying to display do not use these parts of X3D. And fortunately, the ban on Function("...code...")
is not against such an expression occurring, but rather against such an expression being executed. Eventually in my extension I will need to catch the errors that occur when it tries to execute a new Function("...")
and fail gracefully (maybe report to the user they are trying to view a file with script/nurbs and those are not supported), but that will be a much later polishing step since basically it is working now for the files I care about. Thanks!
from x_ite.
New version 8.12.5 with latest changes is out now.
from x_ite.
And working nicely for me in a Firefox extension, thank you.
from x_ite.
Related Issues (20)
- glTF fails texture encoding test HOT 6
- Sound stereo direction in VRML HOT 4
- NavigationInfo @type is a JSON String not a JSON array. Data from browser.toJSONString() HOT 7
- X_ITE fails to load additional modules from my local server when loaded as ES6 module HOT 6
- How are relative internal URLs resolved when x3d content is supplied by string? HOT 1
- Shaders nearly working HOT 4
- Question: Where is the user interface for interacting with the viewer documented? HOT 12
- Question: Is it possible to build nodes in JavaScript and add them to a scene? HOT 5
- TypeScript types for x_ite HOT 13
- Issue with model in X3D archives HOT 2
- Scientific data visualization HOT 6
- Weird shader effects, missing images, possibly due to reconfiguring Firewall, hostname, DNS servers HOT 1
- Custom elements issue with x_ite.mjs in Microsoft Edge? HOT 3
- npx sunrize [files] HOT 5
- X_ITE React implementation questions HOT 5
- "aspectRatio" not supported? HOT 4
- Despite no errors on the console, X_ITE shows no graphics HOT 10
- Use RENDERER on Firefox HOT 1
- ExternProtoDeclare not downloading? X3D checks in X3D-Edit. HOT 3
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 x_ite.