arcanumcube 0.1.0

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/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License
2
+
3
+ Copyright (c) 2024 mawxiwtz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ “Software”), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,48 @@
1
+ # Arcanum Cube
2
+
3
+ Arcanum Cube is a cube puzzle module written in Typescript. Supports creation and manipulation of WebGL mesh groups.
4
+
5
+ ## Usage
6
+
7
+ 1. import Three.js and arcanumcube
8
+
9
+ ```
10
+ import * as THREE from 'three';
11
+ import * as ARCCUBE from 'arcanumcube';
12
+ ```
13
+
14
+ 2. create a cube object
15
+
16
+ ```
17
+ const arccube = new ARCCUBE.WebGLArcanumCube();
18
+ await arccube.init();
19
+ const arccubeGroup = arccube.getGroup();
20
+ arccubeGroup.position.set(0, 0, 0);
21
+ scene.add(arccubeGroup);
22
+
23
+ renderer.setAnimationLoop((time) => {
24
+ :
25
+
26
+ // animate twisting
27
+ arccube.updateTweens();
28
+
29
+ renderer.render(scene, camera);
30
+ });
31
+ ```
32
+
33
+ 3. operations
34
+
35
+ ```
36
+ // scramble 30 steps
37
+ arccube.scramble(30);
38
+ // twist 'U' direction
39
+ arccube.tweenTwist('U');
40
+ // reset
41
+ arccube.reset();
42
+ ```
43
+
44
+ ## License
45
+
46
+ Released under the MIT license
47
+
48
+ Copyright (c) 2024 mawxiwtz