archgine 1.0.38 → 1.0.39
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/lib/applications/app-cvs.d.ts +8 -3
- package/lib/applications/app-offscreen.d.ts +18 -4
- package/lib/applications/application.d.ts +15 -1
- package/lib/controls/orbit-controller.d.ts +2 -1
- package/lib/core/camera2.d.ts +2 -1
- package/lib/core/monitor.d.ts +13 -13
- package/lib/core/object2.d.ts +5 -5
- package/lib/core/ope-view.d.ts +5 -21
- package/lib/core/view.d.ts +13 -4
- package/lib/environment.worker.js +3 -1
- package/lib/extras/adapter.d.ts +44 -5
- package/lib/extras/svg-app.d.ts +0 -14
- package/lib/geometries/circle-geo2.d.ts +1 -1
- package/lib/geometries/geo2.d.ts +4 -4
- package/lib/geometries/polygon-geo2.d.ts +0 -1
- package/lib/geometries/polyline-geo2.d.ts +0 -1
- package/lib/helpers/geo-helper.d.ts +12 -0
- package/lib/helpers/mat-helper.d.ts +10 -0
- package/lib/helpers/merge-helper.d.ts +7 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.mjs +5629 -5139
- package/lib/index.umd.js +28 -28
- package/lib/interfaces.d.ts +20 -2
- package/lib/materials/mat2.d.ts +1 -1
- package/lib/math/box2.d.ts +1 -0
- package/lib/objects/shape2.d.ts +7 -2
- package/lib/renderer.worker.js +13659 -12435
- package/lib/renderers/buffer-renderer.d.ts +6 -2
- package/lib/renderers/cvs-renderer.d.ts +4 -2
- package/lib/renderers/render-lists.d.ts +4 -6
- package/lib/scenes/loading-scene.d.ts +0 -1
- package/lib/scenes/main-scene.d.ts +0 -3
- package/lib/shapes2/text.d.ts +3 -3
- package/lib/utils/svg.d.ts +8 -1
- package/package.json +1 -1
package/lib/interfaces.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IShape2Config } from './objects/shape2';
|
|
1
2
|
export type TTypedArray = Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array | Int8Array | Int16Array | Int32Array | BigUint64Array | BigInt64Array | Float32Array | Float64Array;
|
|
2
3
|
export type AnimationFunc = (frame?: IFrame) => boolean | void;
|
|
3
4
|
export interface IAnimationObjectGroup {
|
|
@@ -100,6 +101,7 @@ export interface IBox2 {
|
|
|
100
101
|
max: IVector2;
|
|
101
102
|
setFromPoints(points: IPoint2[]): this;
|
|
102
103
|
setFromMinMaxString(str: string, sp?: string): this;
|
|
104
|
+
expandByPoint(point: IPoint2): this;
|
|
103
105
|
expandByVector(vector: IPoint2): this;
|
|
104
106
|
expandByXY(x: number, y: number): this;
|
|
105
107
|
intersectsBox(box?: IBox2): boolean;
|
|
@@ -168,6 +170,8 @@ export interface ICamera2 extends IObject2 {
|
|
|
168
170
|
resize(): void;
|
|
169
171
|
set(l: number, r: number, t: number, b: number): void;
|
|
170
172
|
setByBox(box: IBox2): void;
|
|
173
|
+
setTRS(t?: IPoint2, r?: number, s?: number): void;
|
|
174
|
+
fromJSON(o: any): void;
|
|
171
175
|
update(): void;
|
|
172
176
|
getCameraPosition(): ICamera2Position;
|
|
173
177
|
}
|
|
@@ -278,6 +282,7 @@ export interface IGeometry2 extends IEventDispatcher {
|
|
|
278
282
|
copy(source: IGeometry2): IGeometry2;
|
|
279
283
|
}
|
|
280
284
|
export interface IMat2 {
|
|
285
|
+
name: string;
|
|
281
286
|
version: number;
|
|
282
287
|
fill?: string;
|
|
283
288
|
stroke?: string;
|
|
@@ -287,6 +292,7 @@ export interface IMat2 {
|
|
|
287
292
|
lineCap?: CanvasLineCap;
|
|
288
293
|
}
|
|
289
294
|
export interface IGeo2 {
|
|
295
|
+
name: string;
|
|
290
296
|
params: any;
|
|
291
297
|
version: number;
|
|
292
298
|
commands: IPath2Command[];
|
|
@@ -319,11 +325,15 @@ export interface IPath2Command {
|
|
|
319
325
|
phi2?: number;
|
|
320
326
|
}
|
|
321
327
|
export interface IShape2 extends IObject2 {
|
|
328
|
+
params?: IShape2Config;
|
|
322
329
|
geo: IGeo2;
|
|
323
330
|
mat: IMat2;
|
|
324
331
|
version: number;
|
|
325
332
|
render(ctx: IContext2D, commands?: IPath2Command[]): void;
|
|
326
333
|
}
|
|
334
|
+
export interface IText2 extends IShape2 {
|
|
335
|
+
textContent?: string;
|
|
336
|
+
}
|
|
327
337
|
export interface IGroup2 extends IObject2 {
|
|
328
338
|
isGroup: boolean;
|
|
329
339
|
dynamically: boolean;
|
|
@@ -454,9 +464,11 @@ export interface IMatrix3 {
|
|
|
454
464
|
premultiply(m: IMatrix3): this;
|
|
455
465
|
decompose(position: IVector2, rotation: IVector2, scaled: IVector2): void;
|
|
456
466
|
getRotation(rotation: IVector2): void;
|
|
467
|
+
getScale(scaled: IVector2): void;
|
|
457
468
|
getComponents(array: [number, number, number, number, number, number]): [number, number, number, number, number, number];
|
|
458
469
|
invert(): this;
|
|
459
470
|
toArray(array?: number[] | TTypedArray, offset?: number): number[] | TTypedArray;
|
|
471
|
+
fromArray(array: number[], offset?: number): this;
|
|
460
472
|
copy(m: IMatrix3): this;
|
|
461
473
|
}
|
|
462
474
|
export interface IObject2 extends IEventDispatcher {
|
|
@@ -577,6 +589,7 @@ export interface IRenderer2Config {
|
|
|
577
589
|
background?: string;
|
|
578
590
|
viewAreaLimit?: number;
|
|
579
591
|
autoClear?: boolean;
|
|
592
|
+
mergeRendering?: boolean;
|
|
580
593
|
usedCache?: boolean;
|
|
581
594
|
wireframe?: boolean;
|
|
582
595
|
showPoints?: boolean;
|
|
@@ -769,12 +782,17 @@ export interface ISystemManager {
|
|
|
769
782
|
}
|
|
770
783
|
export interface ITree {
|
|
771
784
|
label: string;
|
|
772
|
-
value:
|
|
785
|
+
value: any;
|
|
773
786
|
children?: ITree[];
|
|
774
787
|
}
|
|
775
788
|
export declare enum APP_ENUM {
|
|
776
789
|
INIT = "init",
|
|
777
790
|
LOAD = "load",
|
|
778
791
|
LOADED = "loaded",
|
|
779
|
-
|
|
792
|
+
GET_LAYERS = "getLayers",
|
|
793
|
+
TERMINATE = "terminate",
|
|
794
|
+
CAMERA_SYNC = "cameraSync",
|
|
795
|
+
CAMERA_CHANGED = "cameraChanged",
|
|
796
|
+
SCENES_CHANGED = "scenesChanged",
|
|
797
|
+
UPDATE_LAYERS_VISIBILITY = "updateLayersVisibility"
|
|
780
798
|
}
|
package/lib/materials/mat2.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export interface IMat2Config {
|
|
|
8
8
|
lineCap?: CanvasLineCap;
|
|
9
9
|
}
|
|
10
10
|
export declare class Mat2<Config extends IMat2Config> implements IMat2 {
|
|
11
|
-
|
|
11
|
+
name: string;
|
|
12
12
|
version: number;
|
|
13
13
|
constructor(config?: Config);
|
|
14
14
|
set needsUpdate(v: boolean);
|
package/lib/math/box2.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ export default class Box2 implements IBox2 {
|
|
|
48
48
|
setFromMinMaxString(str: string, sp?: string): this;
|
|
49
49
|
translate(offset: IPoint2): this;
|
|
50
50
|
toString(): string;
|
|
51
|
+
fromString(str: string): this;
|
|
51
52
|
union(box: IBox2): this;
|
|
52
53
|
validate(): boolean;
|
|
53
54
|
unproject(camera: ICamera2): this;
|
package/lib/objects/shape2.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IObject2Config, Object2 } from '../core/object2';
|
|
2
2
|
import { IGeo2Config } from '../geometries/geo2';
|
|
3
3
|
import { IMat2Config } from '../materials/mat2';
|
|
4
|
-
import { IBox2, IContext2D, IMat2,
|
|
4
|
+
import { IBox2, IContext2D, IGeo2, IMat2, IPath2Command, IShape2 } from '../interfaces';
|
|
5
5
|
export interface IShape2Config extends IObject2Config, IGeo2Config, IMat2Config {
|
|
6
6
|
renderOrder?: number;
|
|
7
7
|
usedCache?: boolean;
|
|
@@ -12,11 +12,16 @@ export interface IShape2Config extends IObject2Config, IGeo2Config, IMat2Config
|
|
|
12
12
|
export declare class Shape2 extends Object2 implements IShape2 {
|
|
13
13
|
name: string;
|
|
14
14
|
readonly isShape: boolean;
|
|
15
|
+
params?: IShape2Config;
|
|
16
|
+
wireframe: boolean;
|
|
15
17
|
geo: IGeo2;
|
|
16
18
|
mat: IMat2;
|
|
17
|
-
constructor(geo2?: IGeo2, mat2?: IMat2);
|
|
19
|
+
constructor(geo2?: IGeo2, mat2?: IMat2, config?: IShape2Config);
|
|
18
20
|
computeBoundingBox(): IBox2;
|
|
19
21
|
render(ctx: IContext2D, commands?: IPath2Command[]): void;
|
|
20
22
|
renderFill(ctx: IContext2D): void;
|
|
21
23
|
renderStroke(ctx: IContext2D): void;
|
|
24
|
+
/** @override */
|
|
25
|
+
clone(recursive?: boolean): IShape2;
|
|
26
|
+
copy(source: IShape2, recursive?: boolean): IShape2;
|
|
22
27
|
}
|