arcanumcube 0.1.2 → 0.1.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.
- package/README.md +4 -1
- package/dist/cjs/{arcanumcube.cjs → arcanumcube.js} +18 -8
- package/dist/cjs/core.js +733 -0
- package/dist/esm/arcanumcube.module.js +18 -8
- package/dist/esm/arcanumcube.module.min.js +3 -3
- package/dist/esm/core.module.js +686 -0
- package/dist/esm/core.module.min.js +4 -0
- package/dist/types/webgl.d.ts +7 -4
- package/package.json +15 -4
package/dist/types/webgl.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export type TwistOptions = {
|
|
|
7
7
|
onStart?: (self: WebGLArcanumCube) => void;
|
|
8
8
|
onTwisted?: (self: WebGLArcanumCube, twist: Twist, step: number, total: number) => void;
|
|
9
9
|
onComplete?: (self: WebGLArcanumCube) => void;
|
|
10
|
+
onSolved?: (self: WebGLArcanumCube) => void;
|
|
10
11
|
};
|
|
11
12
|
type WebGLSticker = Sticker & {
|
|
12
13
|
mesh?: THREE.Mesh;
|
|
@@ -52,7 +53,6 @@ export type WebGLArcanumCubeConfig = {
|
|
|
52
53
|
envMap?: THREE.Texture;
|
|
53
54
|
showSelectedCube: boolean;
|
|
54
55
|
showTwistGroup: boolean;
|
|
55
|
-
autoReset: boolean;
|
|
56
56
|
enableCoreLight: boolean;
|
|
57
57
|
coreLightColor: THREE.ColorRepresentation;
|
|
58
58
|
coreLightIntensity: number;
|
|
@@ -61,7 +61,7 @@ export type WebGLArcanumCubeConfig = {
|
|
|
61
61
|
twistOptions?: TwistOptions;
|
|
62
62
|
};
|
|
63
63
|
/** Arcanum Cube object for WebGL class */
|
|
64
|
-
declare class WebGLArcanumCube extends ArcanumCube {
|
|
64
|
+
export declare class WebGLArcanumCube extends ArcanumCube {
|
|
65
65
|
/** config */
|
|
66
66
|
private _config;
|
|
67
67
|
/** cube objects matrix */
|
|
@@ -86,12 +86,16 @@ declare class WebGLArcanumCube extends ArcanumCube {
|
|
|
86
86
|
private _tweens;
|
|
87
87
|
/** light at the center of cube */
|
|
88
88
|
private _coreLights;
|
|
89
|
+
/** status of locking the twist */
|
|
90
|
+
private _lockTwist;
|
|
89
91
|
constructor(options?: Partial<WebGLArcanumCubeConfig>);
|
|
90
92
|
getGroup(): THREE.Group;
|
|
91
93
|
getCubeObjectList(): THREE.Group[];
|
|
92
94
|
init(): Promise<void>;
|
|
93
95
|
private _init;
|
|
94
96
|
setSkin(skin: Skin): Promise<void>;
|
|
97
|
+
lockTwist(flag: boolean): void;
|
|
98
|
+
isTwisting(): boolean;
|
|
95
99
|
reset(duration?: number): void;
|
|
96
100
|
selectedCube(): WebGLCube | undefined;
|
|
97
101
|
selectedSticker(): WebGLSticker | undefined;
|
|
@@ -117,5 +121,4 @@ declare class WebGLArcanumCube extends ArcanumCube {
|
|
|
117
121
|
setCoreLightColor(color: THREE.ColorRepresentation): void;
|
|
118
122
|
setCoreLightIntensity(intensity: number): void;
|
|
119
123
|
}
|
|
120
|
-
export
|
|
121
|
-
export { WebGLArcanumCube };
|
|
124
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arcanumcube",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Arcanum Cube",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,13 +14,18 @@
|
|
|
14
14
|
"LICENSE",
|
|
15
15
|
"README.md"
|
|
16
16
|
],
|
|
17
|
-
"main": "./dist/cjs/arcanumcube.
|
|
17
|
+
"main": "./dist/cjs/arcanumcube.js",
|
|
18
18
|
"module": "./dist/esm/arcanumcube.module.js",
|
|
19
19
|
"exports": {
|
|
20
20
|
".": {
|
|
21
21
|
"types": "./dist/types/arcanumcube.d.ts",
|
|
22
22
|
"import": "./dist/esm/arcanumcube.module.js",
|
|
23
|
-
"require": "./dist/cjs/arcanumcube.
|
|
23
|
+
"require": "./dist/cjs/arcanumcube.js"
|
|
24
|
+
},
|
|
25
|
+
"./core": {
|
|
26
|
+
"types": "./dist/types/core.d.ts",
|
|
27
|
+
"import": "./dist/esm/core.module.js",
|
|
28
|
+
"require": "./dist/cjs/core.js"
|
|
24
29
|
}
|
|
25
30
|
},
|
|
26
31
|
"scripts": {
|
|
@@ -54,5 +59,11 @@
|
|
|
54
59
|
"ts-jest": "^29.2.5",
|
|
55
60
|
"typedoc": "^0.27.6",
|
|
56
61
|
"typescript": "^5.7.3"
|
|
57
|
-
}
|
|
62
|
+
},
|
|
63
|
+
"keywords": [
|
|
64
|
+
"rubiks-cube",
|
|
65
|
+
"puzzle",
|
|
66
|
+
"three",
|
|
67
|
+
"webgl"
|
|
68
|
+
]
|
|
58
69
|
}
|