rapid-render 1.0.6 → 1.0.7
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 +0 -1
- package/dist/draw.d.ts +1 -1
- package/dist/matrix-engine.d.ts +5 -5
- package/dist/rapid-render.js +690 -670
- package/dist/rapid-render.umd.cjs +19 -19
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -68,7 +68,6 @@ Performance Comparison: Rapid vs. Other Renderers and Game Engines
|
|
|
68
68
|
<p align="center">
|
|
69
69
|
<a href="https://nightre.github.io/Rapid.js/benchmark/">
|
|
70
70
|
<img src="./docs/benchmark/benchmark.png" alt="Benchmark Result">
|
|
71
|
-
<img src="./docs/benchmark/benchmark2.png" alt="Benchmark Result">
|
|
72
71
|
</a>
|
|
73
72
|
</p>
|
|
74
73
|
|
package/dist/draw.d.ts
CHANGED
|
@@ -60,7 +60,7 @@ export interface ICircleOptions extends IDrawOptions {
|
|
|
60
60
|
color?: Color;
|
|
61
61
|
segments?: number;
|
|
62
62
|
}
|
|
63
|
-
export declare const drawSpriteRaw: (rapid: Rapid, options: ISpriteOptions) => void;
|
|
63
|
+
export declare const drawSpriteRaw: (rapid: Rapid, options: ISpriteOptions, matrixIndex?: number) => void;
|
|
64
64
|
export declare const drawSprite: (rapid: Rapid, options: ISpriteOptions) => void;
|
|
65
65
|
export declare const drawParticles: (rapid: Rapid, options: IDrawParticleBatchOptions) => void;
|
|
66
66
|
export declare const drawGraphic: (rapid: Rapid, options: IGraphicOptions) => void;
|
package/dist/matrix-engine.d.ts
CHANGED
|
@@ -3,9 +3,7 @@ import { Vec2 } from './math';
|
|
|
3
3
|
import { Rapid } from './render';
|
|
4
4
|
export interface ITransformOptions {
|
|
5
5
|
/** Whether to push a save before applying transforms. Default: true. */
|
|
6
|
-
|
|
7
|
-
/** Called immediately after the save (if any). */
|
|
8
|
-
afterSave?: () => void;
|
|
6
|
+
modifyStack?: boolean;
|
|
9
7
|
x?: number;
|
|
10
8
|
y?: number;
|
|
11
9
|
position?: Vec2;
|
|
@@ -28,6 +26,7 @@ export declare class MatrixStore {
|
|
|
28
26
|
buffer: DynamicArrayBuffer;
|
|
29
27
|
/** The raw floating-point data of all matrices. */
|
|
30
28
|
data: Float32Array;
|
|
29
|
+
temporary: number;
|
|
31
30
|
/**
|
|
32
31
|
* Creates a new MatrixStore.
|
|
33
32
|
* @param capacity - The initial capacity of the matrix store (default is 10).
|
|
@@ -203,6 +202,7 @@ export declare class MatrixStore {
|
|
|
203
202
|
*/
|
|
204
203
|
setMatrix(index: number, f: Float32Array | number[]): void;
|
|
205
204
|
multiplyAffineInPlace(index: number, a: number, b: number, c: number, dValue: number, tx: number, ty: number): void;
|
|
205
|
+
multiplyAffine(indexIn: number, indexOut: number, a: number, b: number, c: number, dValue: number, tx: number, ty: number): void;
|
|
206
206
|
}
|
|
207
207
|
/**
|
|
208
208
|
* A highly performant MatrixStack useful for hierarchal scene graphs.
|
|
@@ -355,7 +355,7 @@ export declare class MatrixStack {
|
|
|
355
355
|
};
|
|
356
356
|
/**
|
|
357
357
|
* Applies a transform options object to the current matrix state.
|
|
358
|
-
* Optionally saves the matrix first
|
|
358
|
+
* Optionally saves the matrix first
|
|
359
359
|
*/
|
|
360
|
-
applyTransform(transform: ITransformOptions, width?: number, height?: number): void;
|
|
360
|
+
applyTransform(transform: ITransformOptions, width?: number, height?: number, customMatrix?: number): void;
|
|
361
361
|
}
|