Merge branch 'master' into feature/bootstrap3
This commit is contained in:
commit
ec37e4b7af
3 changed files with 17 additions and 15 deletions
|
@ -1,6 +1,7 @@
|
|||
nguage: node_js
|
||||
language: node_js
|
||||
node_js:
|
||||
- 0.10
|
||||
|
||||
before_script:
|
||||
- "npm install"
|
||||
- export DISPLAY=:99.0
|
||||
|
@ -11,3 +12,4 @@ before_script:
|
|||
|
||||
script:
|
||||
- "./node_modules/.bin/karma start --browsers Firefox --single-run"
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ describe 'Camera (Surface point of view)', ->
|
|||
testAngles = [0, Math.PI / 4, null, Math.PI / 2]
|
||||
testFOVs = [Math.PI / 6, Math.PI / 3, Math.PI / 2, Math.PI]
|
||||
|
||||
it 'handles lots of different cases correctly', ->
|
||||
xit 'handles lots of different cases correctly', ->
|
||||
for wop in testWops
|
||||
for size in testCanvasSizes
|
||||
for zoom in testZooms
|
||||
|
@ -115,7 +115,7 @@ describe 'Camera (Surface point of view)', ->
|
|||
expect(cam.x2z).toBeGreaterThan 9001
|
||||
expect(cam.z2y).toBeCloseTo 0
|
||||
|
||||
it 'works at default angle of asin(0.75) ~= 48.9 degrees', ->
|
||||
xit 'works at default angle of asin(0.75) ~= 48.9 degrees', ->
|
||||
cam = new Camera 100, 100, 100 * Camera.MPP, 100 * Camera.MPP, testLayer, 1
|
||||
angle = 1 / Math.cos angle
|
||||
expect(cam.angle).toBeCloseTo angle
|
||||
|
@ -123,7 +123,7 @@ describe 'Camera (Surface point of view)', ->
|
|||
expect(cam.x2z).toBeGreaterThan 9001
|
||||
expect(cam.z2y).toBeCloseTo 0
|
||||
|
||||
it 'works at 2x zoom, 90 degrees', ->
|
||||
xit 'works at 2x zoom, 90 degrees', ->
|
||||
cam = new Camera 100, 100, 100 * Camera.MPP, 100 * Camera.MPP, testLayer, 2, null, Math.PI / 2
|
||||
checkCameraPos cam
|
||||
wop = x: 5, y: 2.5, z: 7
|
||||
|
@ -143,7 +143,7 @@ describe 'Camera (Surface point of view)', ->
|
|||
cap = cam.worldToCanvas wop
|
||||
expectPositionsEqual cap, {x: 0, y: 50}
|
||||
|
||||
it 'works at 2x zoom, 30 degrees', ->
|
||||
xit 'works at 2x zoom, 30 degrees', ->
|
||||
cam = new Camera 100, 100, 100 * Camera.MPP, 2 * 100 * Camera.MPP, testLayer, 2, null, Math.PI / 6
|
||||
expect(cam.x2y).toBeCloseTo 1
|
||||
expect(cam.x2z).toBeGreaterThan 9001
|
||||
|
@ -172,7 +172,7 @@ describe 'Camera (Surface point of view)', ->
|
|||
cam = new Camera 100, 63.041494, 100 * Camera.MPP, 63.041494 * Camera.MPP, testLayer, 2, null, null, Math.PI / 3
|
||||
checkCameraPos cam
|
||||
|
||||
it 'works on a surface wider than it is tall, 30 degrees, default viewing upper left corner', ->
|
||||
xit 'works on a surface wider than it is tall, 30 degrees, default viewing upper left corner', ->
|
||||
cam = new Camera 100, 100, 200 * Camera.MPP, 2 * 50 * Camera.MPP, testLayer, 1, {x: 0, y: 0}, Math.PI / 6
|
||||
checkCameraPos cam
|
||||
expect(cam.zoom).toBeCloseTo 2
|
||||
|
|
|
@ -22,7 +22,7 @@ describe('World', ->
|
|||
result = validator(goal)
|
||||
expect(result.valid).toBe(true)
|
||||
|
||||
it('handles kill goal', ->
|
||||
xit('handles kill goal', ->
|
||||
gm = new GoalManager()
|
||||
gm.setGoals([killGoal])
|
||||
gm.worldGenerationWillBegin()
|
||||
|
@ -42,7 +42,7 @@ describe('World', ->
|
|||
expect(goalStates.killguy.keyFrame).toBe(20)
|
||||
)
|
||||
|
||||
it('handles save goal', ->
|
||||
xit('handles save goal', ->
|
||||
gm = new GoalManager()
|
||||
gm.setGoals([saveGoal])
|
||||
gm.worldGenerationWillBegin()
|
||||
|
@ -65,7 +65,7 @@ describe('World', ->
|
|||
expect(goalStates.saveguy.keyFrame).toBe('end')
|
||||
)
|
||||
|
||||
it 'handles getToLocation', ->
|
||||
xit 'handles getToLocation', ->
|
||||
gm = new GoalManager()
|
||||
gm.setGoals([getToLocGoal])
|
||||
gm.worldGenerationWillBegin()
|
||||
|
@ -85,7 +85,7 @@ describe('World', ->
|
|||
expect(goalStates.id.arrived.Potato).toBe(true)
|
||||
expect(goalStates.id.keyFrame).toBe(10)
|
||||
|
||||
it 'handles keepFromLocation', ->
|
||||
xit 'handles keepFromLocation', ->
|
||||
gm = new GoalManager()
|
||||
gm.setGoals([keepFromLocGoal])
|
||||
gm.worldGenerationWillBegin()
|
||||
|
@ -105,7 +105,7 @@ describe('World', ->
|
|||
expect(goalStates.id.arrived.Potato).toBe(false)
|
||||
expect(goalStates.id.keyFrame).toBe('end')
|
||||
|
||||
it 'handles leaveOffSide', ->
|
||||
xit 'handles leaveOffSide', ->
|
||||
gm = new GoalManager()
|
||||
gm.setGoals([leaveMapGoal])
|
||||
gm.worldGenerationWillBegin()
|
||||
|
@ -125,7 +125,7 @@ describe('World', ->
|
|||
expect(goalStates.id.left.Yall).toBe(true)
|
||||
expect(goalStates.id.keyFrame).toBe(10)
|
||||
|
||||
it 'handles keepFromLeavingOffSide', ->
|
||||
xit 'handles keepFromLeavingOffSide', ->
|
||||
gm = new GoalManager()
|
||||
gm.setGoals([stayMapGoal])
|
||||
gm.worldGenerationWillBegin()
|
||||
|
@ -145,7 +145,7 @@ describe('World', ->
|
|||
expect(goalStates.id.left.Yall).toBe(false)
|
||||
expect(goalStates.id.keyFrame).toBe('end')
|
||||
|
||||
it 'handles getItem', ->
|
||||
xit 'handles getItem', ->
|
||||
gm = new GoalManager()
|
||||
gm.setGoals([getItemGoal])
|
||||
gm.worldGenerationWillBegin()
|
||||
|
@ -165,7 +165,7 @@ describe('World', ->
|
|||
expect(goalStates.id.collected.Grabby).toBe(true)
|
||||
expect(goalStates.id.keyFrame).toBe(10)
|
||||
|
||||
it 'handles keepFromGettingItem', ->
|
||||
xit 'handles keepFromGettingItem', ->
|
||||
gm = new GoalManager()
|
||||
gm.setGoals([keepItemGoal])
|
||||
gm.worldGenerationWillBegin()
|
||||
|
@ -183,4 +183,4 @@ describe('World', ->
|
|||
goalStates = gm.getGoalStates()
|
||||
expect(goalStates.id.status).toBe('success')
|
||||
expect(goalStates.id.collected.Grabby).toBe(false)
|
||||
expect(goalStates.id.keyFrame).toBe('end'))
|
||||
expect(goalStates.id.keyFrame).toBe('end'))
|
||||
|
|
Reference in a new issue