rapid-render 1.0.10 → 1.0.12

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.
package/README.md CHANGED
@@ -22,8 +22,6 @@
22
22
 
23
23
  Rapid is a focused WebGL 2D rendering engine for games and visual tools. lightweight at just **67 kB** (**~19.5 kB gzipped**) It handles the rendering layer while leaving your game architecture, update loop, and state management fully in your hands.
24
24
 
25
- > The documentation and demos are still being written.
26
-
27
25
  ## Highlights
28
26
 
29
27
  - **Rendering speed**
@@ -33,7 +31,7 @@ Rapid is a focused WebGL 2D rendering engine for games and visual tools. lightwe
33
31
  Add sprite and geometry effects through shader hooks while still using Rapid's normal renderer, transforms, textures, and draw APIs.
34
32
 
35
33
  - **Flexible transforms**
36
- Compose motion, hierarchy, camera behavior, and local drawing with multiple transform styles backed by a fast matrix engine.
34
+ Fast, flexible, matrix-powered transforms for motion and hierarchies. Retain the matrix tree after traversal; local changes update only affected subtrees. No rebuild required.
37
35
 
38
36
  - **A complete 2D toolkit**
39
37
  Draw sprites, lines, masks, particles, render textures, text, and custom geometry from one compact WebGL renderer.
@@ -101,8 +99,8 @@ We'd love to feature your work! Please [**Submit a Pull Request**](https://githu
101
99
  </a>
102
100
  </td>
103
101
  <td valign="top">
104
- <strong><a href="https://poki.com/zh/g/emoji-party">Emoji Party</a> by illusivegames</strong><br>
105
- A featured puzzle hit on Poki with over <strong>13,000+ player ratings</strong>. Rapid.js powers its snappy sprite animations and instant-play experience across hundreds of thousands of diverse mobile and desktop browsers.<br>
102
+ <strong><a href="https://poki.com/zh/g/emoji-party">Emoji Party</a> by illusivegames</strong><br>
103
+ A featured puzzle hit on Poki, surpassing <strong>6 million plays</strong>. Rapid.js powers its smooth rendering and instant-play experience across hundreds of thousands of diverse mobile and desktop browser environments.<br>
106
104
  </td>
107
105
  </tr>
108
106
  </table>
package/dist/draw.d.ts CHANGED
@@ -30,6 +30,10 @@ export interface IDrawParticleBatchOptions extends IDisplayOptions {
30
30
  flipX?: boolean;
31
31
  flipY?: boolean;
32
32
  reverseOrder?: boolean;
33
+ u0?: ArrayLike<number> | number;
34
+ v0?: ArrayLike<number> | number;
35
+ u1?: ArrayLike<number> | number;
36
+ v1?: ArrayLike<number> | number;
33
37
  }
34
38
  export interface ISpriteOptions extends IDrawOptions {
35
39
  texture: Texture;
@@ -219,7 +219,7 @@ export declare class MatrixStack {
219
219
  stepWorldM: DynamicArrayBuffer;
220
220
  /** Records actions (push/pop) taken during the traversal. */
221
221
  stepAction: DynamicArrayBuffer;
222
- /** Records the parent world matrix for each step (used by updateMatrix). */
222
+ /** Records the parent world matrix for each step (used by updateMatrixSubtree). */
223
223
  stepParentM: DynamicArrayBuffer;
224
224
  /** Buffer used during hierarchy traversal updates. */
225
225
  parentStack: DynamicArrayBuffer;
@@ -251,7 +251,7 @@ export declare class MatrixStack {
251
251
  * Evaluates and updates matrices from the given step. Used primarily for deferred transformation.
252
252
  * @param step - The initial step to update matrices from.
253
253
  */
254
- updateMatrix(step: number | {
254
+ updateMatrixSubtree(step: number | {
255
255
  step: number;
256
256
  }): void;
257
257
  /**
@@ -50,7 +50,7 @@ export interface IParticleAnimation {
50
50
  export interface IParticleOptions {
51
51
  /** Texture(s) to pick from. Pass a weighted tuple `[Texture, weight][]` for weighted random. */
52
52
  texture: Texture;
53
- shader: CustomGlShader;
53
+ shader?: CustomGlShader;
54
54
  /** Particle lifetime in seconds, or a [min, max] range. */
55
55
  life: number | [number, number];
56
56
  /** Animation / per-attribute configuration. */