@vived/app 2.21.0 → 2.21.3
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.
|
@@ -12,28 +12,48 @@ export declare enum WorkplaneShape {
|
|
|
12
12
|
UNKNOWN = 2
|
|
13
13
|
}
|
|
14
14
|
export interface WorkPlane {
|
|
15
|
+
/**
|
|
16
|
+
* The transform node for the work plane
|
|
17
|
+
*/
|
|
15
18
|
transform: TransformNode;
|
|
19
|
+
/**
|
|
20
|
+
* Unique scene identifier for the work plane
|
|
21
|
+
* Default is "workplane"
|
|
22
|
+
*/
|
|
16
23
|
id: string;
|
|
24
|
+
/**
|
|
25
|
+
* The work plane units
|
|
26
|
+
*/
|
|
17
27
|
units: WorkPlaneUnits;
|
|
18
28
|
/**
|
|
19
|
-
* The conversion rate from world units (meters) to workspace units
|
|
29
|
+
* The conversion rate from world units (meters) to workspace units. This is set by setting the work plane units
|
|
20
30
|
*/
|
|
21
31
|
conversionFactor: number;
|
|
32
|
+
/**
|
|
33
|
+
* The shape of the work plane. This is set by calling either setWorkplaneSize or setWorkplaneRadius
|
|
34
|
+
*/
|
|
22
35
|
workplaneShape: WorkplaneShape;
|
|
36
|
+
/**
|
|
37
|
+
* Should the work plane be shown
|
|
38
|
+
*/
|
|
23
39
|
showWorkPlane: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Readonly. Set when setWorkplaneRadius is called
|
|
42
|
+
* If the work plane radius has been set, this will return the radius. Otherwise it is undefined
|
|
43
|
+
*/
|
|
24
44
|
workPlaneRadius?: number;
|
|
45
|
+
/**
|
|
46
|
+
* Readonly. Set when setWorkplaneSize has been called
|
|
47
|
+
* If the work plane size has been set this will return the size. Otherwise it will return undefined
|
|
48
|
+
*/
|
|
25
49
|
workPlaneSize?: Vector2;
|
|
26
50
|
/**
|
|
27
|
-
* Sets the
|
|
28
|
-
*
|
|
29
|
-
* when the app starts.
|
|
30
|
-
* @param radius The radius of the work plane in work plane units
|
|
51
|
+
* Sets the planer dimensions of the work plane. Call this if your workplane is a rectangle and it will limits the picks accordingly
|
|
52
|
+
* @param size The size of the work plane in work plane units
|
|
31
53
|
*/
|
|
32
54
|
setWorkplaneSize: (size: Vector2) => void;
|
|
33
55
|
/**
|
|
34
56
|
* Sets the radius of the work plane. Call this if your workplane is a circle and it will limits the picks accordingly
|
|
35
|
-
* Note this will not notify observers of a change so this should be set
|
|
36
|
-
* when the app starts.
|
|
37
57
|
* @param radius The radius of the work plane in work plane units
|
|
38
58
|
*/
|
|
39
59
|
setWorkplaneRadius: (radius: number) => void;
|
|
@@ -76,11 +76,13 @@ class Color {
|
|
|
76
76
|
* @returns True if Color A === Color B
|
|
77
77
|
*/
|
|
78
78
|
static Equal(a, b) {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
let areEqual = true;
|
|
80
|
+
for (let index = 0; index < 4; index++) {
|
|
81
|
+
if (a.array[index] !== b.array[index]) {
|
|
82
|
+
areEqual = false;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return areEqual;
|
|
84
86
|
}
|
|
85
87
|
/**
|
|
86
88
|
* Return the r value as a percent
|