Skip to content

Commit 3a784e7

Browse files
author
Mikalai Lazitski
committed
refactor: clean up comments and improve clarity in effect type definitions
- Removed redundant "converted from Quarks" comments across various type definition files to enhance clarity. - Standardized comment formatting for better readability and consistency in the codebase. - Ensured that all type definitions maintain a clear and concise description of their purpose.
1 parent 1d169c1 commit 3a784e7

9 files changed

Lines changed: 24 additions & 30 deletions

File tree

tools/src/effect/types/behaviors.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@ export type PerSolidParticleBehaviorFunction = (particle: SolidParticle) => void
5656
*/
5757
export type SystemBehaviorFunction = (system: ParticleSystem | SolidParticleSystem, behavior: Behavior) => void;
5858

59-
/**
60-
* behavior types (converted from Quarks)
61-
*/
6259
/**
6360
* Color function - unified structure for all color-related behaviors
6461
*/
@@ -202,4 +199,4 @@ export type Behavior =
202199
| ISizeBySpeedBehavior
203200
| IRotationBySpeedBehavior
204201
| IOrbitOverLifeBehavior
205-
| { type: string; [key: string]: unknown }; // Fallback for unknown behaviors
202+
| { type: string; [key: string]: unknown };

tools/src/effect/types/colors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { IGradientKey } from "./gradients";
22

33
/**
4-
* color types (converted from Quarks)
4+
* color types
55
*/
66
export interface IConstantColor {
77
type: "ConstantColor";

tools/src/effect/types/emitter.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,20 @@ import type { IShape } from "./shapes";
99
import type { Behavior } from "./behaviors";
1010

1111
/**
12-
* emission burst (converted from Quarks)
12+
* emission burst
1313
*/
1414
export interface IEmissionBurst {
1515
time: Value;
1616
count: Value;
1717
}
1818

1919
/**
20-
* Particle system configuration (converted from Quarks to native Babylon.js properties)
20+
* Particle system configuration
2121
*/
2222
export interface IParticleSystemConfig {
2323
version?: string;
2424
systemType: "solid" | "base";
2525

26-
// === Native Babylon.js properties (converted from Quarks Value) ===
27-
2826
// Life & Size
2927
minLifeTime?: number;
3028
maxLifeTime?: number;

tools/src/effect/types/gradients.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* gradient key (converted from Quarks)
2+
* gradient key
33
*/
44
export interface IGradientKey {
55
time?: number;

tools/src/effect/types/hierarchy.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { IParticleSystemConfig } from "./emitter";
33
import type { IMaterial, ITexture, IImage, IGeometry } from "./resources";
44

55
/**
6-
* transform (converted from Quarks, left-handed coordinate system)
6+
* transform
77
*/
88
export interface ITransform {
99
position: Vector3;
@@ -12,7 +12,7 @@ export interface ITransform {
1212
}
1313

1414
/**
15-
* group (converted from Quarks)
15+
* group
1616
*/
1717
export interface IGroup {
1818
uuid: string;
@@ -22,7 +22,7 @@ export interface IGroup {
2222
}
2323

2424
/**
25-
* emitter (converted from Quarks)
25+
* emitter
2626
*/
2727
export interface IEmitter {
2828
uuid: string;
@@ -36,8 +36,7 @@ export interface IEmitter {
3636
}
3737

3838
/**
39-
* data (converted from Quarks)
40-
* Contains the converted structure with groups, emitters, and resources
39+
* data
4140
*/
4241
export interface IData {
4342
root: IGroup | IEmitter | null;

tools/src/effect/types/resources.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
11
import { Color3 } from "@babylonjs/core/Maths/math.color";
22

33
/**
4-
* Material (converted from Quarks, ready for Babylon.js)
4+
* Material
55
*/
66
export interface IMaterial {
77
uuid: string;
88
type?: string;
9-
color?: Color3; // Converted from hex/array to Color3
9+
color?: Color3;
1010
opacity?: number;
1111
transparent?: boolean;
1212
depthWrite?: boolean;
1313
side?: number;
14-
blending?: number; // Converted to Babylon.js constants
14+
blending?: number;
1515
map?: string; // Texture UUID reference
1616
}
1717

1818
/**
19-
* Texture (converted from Quarks, ready for Babylon.js)
19+
* Texture
2020
*/
2121
export interface ITexture {
2222
uuid: string;
2323
image?: string; // Image UUID reference
24-
wrapU?: number; // Converted to Babylon.js wrap mode
25-
wrapV?: number; // Converted to Babylon.js wrap mode
24+
wrapU?: number;
25+
wrapV?: number;
2626
uScale?: number; // From repeat[0]
2727
vScale?: number; // From repeat[1]
2828
uOffset?: number; // From offset[0]
2929
vOffset?: number; // From offset[1]
3030
uAng?: number; // From rotation
3131
coordinatesIndex?: number; // From channel
32-
samplingMode?: number; // Converted from Three.js filters to Babylon.js sampling mode
32+
samplingMode?: number;
3333
generateMipmaps?: boolean;
3434
flipY?: boolean;
3535
}
3636

3737
/**
38-
* Image (converted from Quarks, normalized URL)
38+
* Image
3939
*/
4040
export interface IImage {
4141
uuid: string;
42-
url: string; // Normalized URL (ready for use)
42+
url: string;
4343
}
4444

4545
/**
@@ -58,7 +58,7 @@ export interface IGeometryIndex {
5858
}
5959

6060
/**
61-
* Geometry Data (converted from Quarks, left-handed coordinate system)
61+
* Geometry Data
6262
*/
6363
export interface IGeometryData {
6464
attributes: {
@@ -71,14 +71,14 @@ export interface IGeometryData {
7171
}
7272

7373
/**
74-
* Geometry (converted from Quarks, ready for Babylon.js)
74+
* Geometry
7575
*/
7676
export interface IGeometry {
7777
uuid: string;
7878
type: "PlaneGeometry" | "BufferGeometry";
7979
// For PlaneGeometry
8080
width?: number;
8181
height?: number;
82-
// For BufferGeometry (already converted to left-handed)
82+
// For BufferGeometry
8383
data?: IGeometryData;
8484
}

tools/src/effect/types/rotations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Value } from "./values";
22

33
/**
4-
* rotation types (converted from Quarks)
4+
* rotation types
55
*/
66
export interface IEulerRotation {
77
type: "Euler";

tools/src/effect/types/shapes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Value } from "./values";
22

33
/**
4-
* shape configuration (converted from Quarks)
4+
* shape configuration
55
*/
66
export interface IShape {
77
type: string;

tools/src/effect/types/values.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* value types (converted from Quarks)
2+
* value types
33
*/
44
export interface IConstantValue {
55
type: "ConstantValue";

0 commit comments

Comments
 (0)