Skip to content
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

Suggestion: Document for compatibility #12698

Closed
keqingrong opened this issue Nov 19, 2017 · 5 comments
Closed

Suggestion: Document for compatibility #12698

keqingrong opened this issue Nov 19, 2017 · 5 comments

Comments

@keqingrong
Copy link
Contributor

It would be nice to add a document for compatibility.

Here is my notes. I hope this can help somenoe as a reference.

three.js compatibility

Browser Support

three.js supports most modern browsers, including Internet Explorer 9 and above.

three.js provides WebGL, Canvas, SVG and CSS renderers. Different renderers may have different requirements of compatibility. In theory, three.js works on all browsers that support WebGL: Google Chrome 9+, Firefox 4+, Opera 15+, Safari 5.1+, Internet Explorer 11 and Microsoft Edge. More infomation can be found at Can I use WebGL?.

For Internet Explorer, the table below lists avaiable renderers.

Renderer IE Version
WebGLRenderer IE11+
CanvasRenderer IE9+
SVGRenderer IE9+
CSS3DRenderer IE10+
CSS2DRenderer IE9+

If you still need to support IE9, it's a good choice to use CanvasRenderer.

ECMAScript Language Features or Web APIs Used in three.js

Feature Use Scope Modules
Typed Array Source BufferAttribute, BufferGeometry
WebVR API Source WebVRManager
Blob Source FileLoader
performance Source Clock
requestAnimationFrame Source WebGLRenderer
Promise Examples GLTFLoader, GLTF2Loader, WEBVR
Web Workers Examples WWOBJLoader2
FileReader Examples GLTFExporter
URL API Examples GLTFLoader

Polyfills

Just import polyfills base on your requirements. Again, taking IE9 as an example, the following polyfills are necessary:

  • Typed Array
  • Blob
  • performance
  • requestAnimationFrame

Suggested polyfills

@Mugen87
Copy link
Collaborator

Mugen87 commented Nov 19, 2017

@keqingrong Thanks for your effort! Of course a compatibility overview is a useful thing and might be good orientation especially for beginners.

However, i do not vote for an "official" detailed compatibility overview since it is a lot of work to maintain a comprehensive document. Right now, it is already hard for the core contributors to keep the project fairly up to date. I do not like the idea to document even more stuff.

Besides, i see some critical statements in your post:

three.js supports most modern browsers, including Internet Explorer 9 and above.

I'm afraid this statement is misleading and produces wrong expectations. From my point of view, IE9 is not supported. Microsoft users should use at least IE11, the better option is Edge.

If you still need to support IE9, it's a good choice to use CanvasRenderer.

No sorry, this is not a good choice. CanvasRenderer only supports a small subset of WebGLRenderer's features.

ECMAScript Language Features or Web APIs Used in three.js

You've missed some JavaScript APIs that are actually used in the core like WebAudio. Besides, requestAnimationFrame is not only used in WebGLRenderer but e.g. in VideoTexture. Other API's that are used in the examples like PointerLock, TextDecoder or fetch are also not mentioned.

@mrdoob
Copy link
Owner

mrdoob commented Nov 22, 2017

I agree with @Mugen87. However, I would be open to include this if @keqingrong agrees to be the main maintainer of that page.

@Mugen87
Copy link
Collaborator

Mugen87 commented Nov 25, 2017

Fair enough.

@keqingrong What do you think about @mrdoob's suggestions?

@keqingrong
Copy link
Contributor Author

@Mugen87 I am sorry for my late reply and thank you for pointing out the existing problems in my post. It is not sufficiently rigorous and comprehensive, which also reflects that why we need a document or wiki.

Personally, I hate outdated browser and don't agree to support them. Unfortunately, in the company, the project I am working on need us to support IE9. We found that with some polyfills three.js can still work fine.😀

@mrdoob Thank you! Frankly speaking, I am bad at English, but I will try my best to refine it.

@mrdoob
Copy link
Owner

mrdoob commented Dec 1, 2017

Feel free to do a Pull Request then 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants