@@ -40,6 +40,7 @@ See [TS declarations](/index.d.ts) for more details.
40
40
41
41
``` javascript
42
42
import * as THREE from ' three' ;
43
+
43
44
import node3d from ' ../index.js' ;
44
45
const { init , addThreeHelpers } = node3d;
45
46
@@ -56,10 +57,9 @@ const material = new THREE.MeshBasicMaterial({ map: texture });
56
57
const mesh = new THREE.Mesh (geometry, material);
57
58
screen .scene .add (mesh);
58
59
59
- loop (() => {
60
- const time = Date .now ();
61
- mesh .rotation .x = time * 0.0005 ;
62
- mesh .rotation .y = time * 0.001 ;
60
+ loop ((now ) => {
61
+ mesh .rotation .x = now * 0.0005 ;
62
+ mesh .rotation .y = now * 0.001 ;
63
63
screen .draw ();
64
64
});
65
65
```
@@ -79,25 +79,25 @@ Example Notes:
79
79
80
80
## OpenGL Features
81
81
82
- 1 . This is real native OpenGL, and you have direct access to GL resource IDs. This may be
82
+ 1 . This is real ** native OpenGL** , and you have direct access to GL resource IDs. This may be
83
83
useful for resource sharing and compute interop (such as
84
84
[CUDA-GL interop](https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__OPENGL.html)).
85
- 1 . The flag ` isGles3 ` let's you use a GL ES 3 preset, which is closest to "real" WebGL.
85
+ 1 . The flag ` isGles3 ` lets you use a ** GL ES 3** preset, which is closest to "real" WebGL.
86
86
If set to `false`, WebGL stuff (such as three.js) will still work, but now with some hacks.
87
- However, if you are planning to use non-WebGL features (e.g. OpenGL 4.5 features),
87
+ However, if you are planning to use non-WebGL features (e.g. ** OpenGL 4.5** features),
88
88
you might want it off, and then select a specific context version manually.
89
89
1 . The flag ` isWebGL2 ` impacts how web libraries recognize the WebGL version.
90
90
But it doesn't really change the capabilities of the engine.
91
- 1 . Offscreen rendering is possible on Windows and Linux, as demonstrated by the tests
91
+ 1 . ** Offscreen rendering** is possible on Windows and Linux, as demonstrated by the tests
92
92
running in GitHub Actions. There are test cases that generate and compare screenshots,
93
93
and they do work in headless mode.
94
- 1 . OpenGL context sharing is enabled. You can obtain ` HDC, HWND, CTX ` for Windows and whatever
94
+ 1 . OpenGL ** context sharing** is enabled. You can obtain ` HDC, HWND, CTX ` for Windows and whatever
95
95
those are called on Linux and MacOS. See [glfw-raub](https://github.com/node-3d/glfw-raub).
96
96
97
97
98
98
## License
99
99
100
- You get this for free. Have fun!
100
+ ** You get this for free. Have fun!**
101
101
102
102
Some of the components have their separate licenses, but all of them may be used
103
103
commercially, without royalty.
0 commit comments