📜 ⬆️ ⬇️

3d engine on js + canvas

I once stumbled upon a foreign article about a bright future Canvas and WebGL, and in this article there was a picture with a “3d teapot” drawn using canvas'a, it struck me right well, I realized that I had to do something like that, and did .

image


By adjusting for JavaScript performance, the z-buffer implemented at the polygon, not the pixel. Everything looks good as long as there is no mutual intersection of model penetration.
')
The model is exported directly from 3ds max, via an ASCII Scene Export.

image

It should work in all good recent browsers. I added “speedometer” or “FPSmometer” or “FPSmeter” to the demo, you understand - at the top right, “current FPS” is determined by the last 10 and renderers, and “average” across all renders from the very beginning of the script, within a few minutes the average value stops oscillating and shows the true value of the speed of the browser.

I have the following balance of power:

image

ie explorercanvas was used

- the lack of support for the canvas in the ie9 preview grieves me; according to the first impression, jit in it works very well.

What is the future of this technology? Someone sees this as a basis for future online games, someone has a competitor flash, someone has an unnecessary tag in html, what do you think? So far, the only use that I have found is to test the speed of browsers.

PS while WebGL is not used, but I plan to fasten it and compare the results.

UPD1: (browser versions)
Chrome 5.0.375.53 beta
FireFox 3.6.3
Opera 10.51

UPD2: (details)
image

UPD3: Habraeffekt with a whistle made vps, ... tightened the screws, kicked and he was back in the ranks.

UPD4: Added FF 3.7 Alpha 4 results
(thanks for the results in the comments, but I thought here, if I add them to the summary statistics, it will not reflect the real picture, because the iron is different for everyone - weaker / more powerful)

Source: https://habr.com/ru/post/93594/


All Articles