Open mikebolt opened 8 years ago
When you call, for example, cube.twist('F15'), then perform another twist, sometimes you get this error:
cube.twist('F15')
Uncaught TypeError: Cannot read property 'getRotation' of undefined
Here's the context:
var slice = this.slicesDictionary[ twist.command ], rotation = twist.degrees, radians = rotation.degreesToRadians(), duration = Math.abs( radians - slice.getRotation() ) / ( Math.PI * 0.5 ) * this.twistDuration;
It might be a good idea to disallow partial twists if they pose serious problems for other parts of the code.
When you call, for example,
cube.twist('F15')
, then perform another twist, sometimes you get this error:Here's the context:
It might be a good idea to disallow partial twists if they pose serious problems for other parts of the code.