arcanumcube 0.1.4 → 0.2.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/README.md CHANGED
@@ -4,11 +4,11 @@ Arcanum Cube Arcanum Cube is a WebGL cube puzzle module written in TypeScript. Y
4
4
 
5
5
  ## Demo Page
6
6
 
7
- - [Example1](https://mawxiwtz.github.io/arcanumcube/) \
8
- Rotation only
7
+ - [Example1](https://mawxiwtz.github.io/arcanumcube/) \
8
+ Rotation only
9
9
 
10
- - [Example2](https://mawxiwtz.github.io/arcanumcube-demo/) \
11
- Demo of playing and solving with AI
10
+ - [Example2](https://mawxiwtz.github.io/arcanumcube-demo/) \
11
+ Demo of playing and solving with AI
12
12
 
13
13
  ## Installation
14
14
 
@@ -20,16 +20,22 @@ npm install arcanumcube
20
20
 
21
21
  ## Usage
22
22
 
23
- 1. import Three.js and arcanumcube
23
+ 1. install dependencies
24
24
 
25
25
  ```
26
+ npm install arcanumcube
27
+ ```
28
+
29
+ 2. import Three.js and arcanumcube
30
+
31
+ ```ts
26
32
  import * as THREE from 'three';
27
33
  import * as ARCCUBE from 'arcanumcube';
28
34
  ```
29
35
 
30
- 2. create a cube object
36
+ 3. create a cube object
31
37
 
32
- ```
38
+ ```ts
33
39
  const scene = new THREE.Scene();
34
40
  :
35
41
  const arccube = new ARCCUBE.WebGLArcanumCube();
@@ -43,19 +49,19 @@ renderer.setAnimationLoop((time) => {
43
49
  :
44
50
 
45
51
  // animate twisting
46
- arccube.updateTweens();
52
+ arccube.update();
47
53
 
48
54
  renderer.render(scene, camera);
49
55
  });
50
56
  ```
51
57
 
52
- 3. operations
58
+ 4. operations
53
59
 
54
- ```
60
+ ```ts
55
61
  // scramble 30 steps
56
62
  arccube.scramble(30);
57
63
  // twist 'U' direction
58
- arccube.tweenTwist('U');
64
+ arccube.easingTwist('U');
59
65
  // reset
60
66
  arccube.reset();
61
67
  ```