tela.js 1.2.1 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +12 -15
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -46,7 +46,7 @@ Playground usage:
46
46
  ((x * time) / width) % 1,
47
47
  ((y * time) / height) % 1
48
48
  )
49
- })
49
+ }).paint()
50
50
  }).play();
51
51
  document.body.appendChild(canvas.DOM);
52
52
 
@@ -70,7 +70,7 @@ loop(({ time, dt }) => {
70
70
  ((x * time) / width) % 1,
71
71
  ((y * time) / height) % 1
72
72
  )
73
- })
73
+ }).paint();
74
74
  })
75
75
  .play();
76
76
  ```
@@ -95,20 +95,19 @@ const FPS = 25;
95
95
  const maxVideoTime = 10; // time in seconds
96
96
 
97
97
  function animation({ time, image }) {
98
- return image.map((x, y) => {
99
- return Color.ofRGB(
100
- ((x * time) / width) % 1,
101
- ((y * time) / height) % 1
102
- )
103
- })
98
+ return image.map((x, y) => {
99
+ return Color.ofRGB(
100
+ ((x * time) / width) % 1,
101
+ ((y * time) / height) % 1
102
+ );
103
+ });
104
104
  }
105
105
 
106
106
  video(
107
- "hello_world.mp4",
108
- animation,
109
- { width, height, FPS }
110
- )
111
- .while(({ time }) => time < maxVideoTime);
107
+ "hello_world.mp4",
108
+ animation,
109
+ { width, height, FPS }
110
+ ).while(({ time }) => time < maxVideoTime);
112
111
  ```
113
112
 
114
113
  And run it: `node index.mjs` / `bun index.js`
@@ -149,8 +148,6 @@ You can find more examples of usage in:
149
148
 
150
149
  # TODOs
151
150
 
152
- - Fix parallel ray trace refresh bug
153
- - Parallel ray map
154
151
  - Serialize meshes not only triangles
155
152
  - Optimize data serialization in parallel ray tracer
156
153
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tela.js",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "author": "Pedroth",
5
5
  "repository": {
6
6
  "type": "git",