Skip to content

Commit

Permalink
change rack noise
Browse files Browse the repository at this point in the history
  • Loading branch information
tailuge committed Mar 9, 2024
1 parent b92acb2 commit a8453c2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions dist/diagram.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/controller/rules/snooker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export class Snooker implements Rules {
const min = new Vector3(Rack.baulk - Rack.sixth, -Rack.sixth)
return target.clamp(min, max)
}
return new Vector3(Rack.baulk, -Rack.sixth / 3, 0)
return new Vector3(Rack.baulk, -Rack.sixth / 2.6, 0)
}

switchPlayer() {
Expand Down
4 changes: 2 additions & 2 deletions src/utils/rack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { R } from "../model/physics/constants"
import { Table } from "../model/table"

export class Rack {
static readonly noise = R * 0.025
static readonly noise = R * 0.023
static readonly gap = 2 * R + 2 * Rack.noise
static readonly up = new Vector3(0, 0, -1)
static readonly spot = new Vector3(-TableGeometry.X / 2, 0.0, 0)
Expand Down Expand Up @@ -140,7 +140,7 @@ export class Rack {
static snooker() {
const balls: Ball[] = []
const dy = TableGeometry.Y / 4
balls.push(Rack.cueBall(Rack.jitter(new Vector3(Rack.baulk, -dy / 1.9, 0))))
balls.push(Rack.cueBall(Rack.jitter(new Vector3(Rack.baulk, -dy * 0.5, 0))))

const colours = Rack.snookerColourPositions()
balls.push(new Ball(Rack.jitter(colours[0]), 0xeede36))
Expand Down

0 comments on commit a8453c2

Please sign in to comment.