Home | History | Annotate | Download | only in resources

Lines Matching refs:Dimensions

25   this.dimensions = Runner.defaultDimensions;
116 * Default dimensions.
277 if (this.dimensions.WIDTH < DEFAULT_WIDTH) {
278 var mobileSpeed = speed * this.dimensions.WIDTH / DEFAULT_WIDTH *
301 this.canvas = createCanvas(this.containerEl, this.dimensions.WIDTH,
302 this.dimensions.HEIGHT, Runner.classes.PLAYER);
310 this.horizon = new Horizon(this.canvas, this.images, this.dimensions,
315 this.images.TEXT_SPRITE, this.dimensions.WIDTH);
352 * Adjust game space dimensions on resize.
362 this.dimensions.WIDTH = this.outerContainerEl.offsetWidth - padding * 2;
366 this.canvas.width = this.dimensions.WIDTH;
367 this.canvas.height = this.dimensions.HEIGHT;
371 this.distanceMeter.calcXPos(this.dimensions.WIDTH);
378 this.containerEl.style.width = this.dimensions.WIDTH + 'px';
379 this.containerEl.style.height = this.dimensions.HEIGHT + 'px';
388 this.gameOverPanel.updateDimensions(this.dimensions.WIDTH);
406 'to { width: ' + this.dimensions.WIDTH + 'px }' +
414 this.containerEl.style.width = this.dimensions.WIDTH + 'px';
449 this.canvasCtx.clearRect(0, 0, this.dimensions.WIDTH,
450 this.dimensions.HEIGHT);
671 this.dimensions);
859 * @param {!Object} dimensions Canvas dimensions.
862 function GameOverPanel(canvas, textSprite, restartImg, dimensions) {
865 this.canvasDimensions = dimensions;
873 * Dimensions used in the panel.
876 GameOverPanel.dimensions = {
888 * Update the panel dimensions.
903 var dimensions = GameOverPanel.dimensions;
908 var textSourceX = dimensions.TEXT_X;
909 var textSourceY = dimensions.TEXT_Y;
910 var textSourceWidth = dimensions.TEXT_WIDTH;
911 var textSourceHeight = dimensions.TEXT_HEIGHT;
913 var textTargetX = Math.round(centerX - (dimensions.TEXT_WIDTH / 2));
915 var textTargetWidth = dimensions.TEXT_WIDTH;
916 var textTargetHeight = dimensions.TEXT_HEIGHT;
918 var restartSourceWidth = dimensions.RESTART_WIDTH;
919 var restartSourceHeight = dimensions.RESTART_HEIGHT;
920 var restartTargetX = centerX - (dimensions.RESTART_WIDTH / 2);
940 restartTargetX, restartTargetY, dimensions.RESTART_WIDTH,
941 dimensions.RESTART_HEIGHT);
1089 * @param {Object} dimensions
1093 function Obstacle(canvasCtx, type, obstacleImg, dimensions,
1101 this.dimensions = dimensions;
1139 this.xPos = this.dimensions.WIDTH - this.width;
1616 DistanceMeter.dimensions = {
1677 this.x = canvasWidth - (DistanceMeter.dimensions.DEST_WIDTH *
1688 var sourceWidth = DistanceMeter.dimensions.WIDTH;
1689 var sourceHeight = DistanceMeter.dimensions.HEIGHT;
1690 var sourceX = DistanceMeter.dimensions.WIDTH * value;
1692 var targetX = digitPos * DistanceMeter.dimensions.DEST_WIDTH;
1694 var targetWidth = DistanceMeter.dimensions.WIDTH;
1695 var targetHeight = DistanceMeter.dimensions.HEIGHT;
1709 DistanceMeter.dimensions.WIDTH;
1938 this.dimensions = HorizonLine.dimensions;
1939 this.sourceXPos = [0, this.dimensions.WIDTH];
1950 * Horizon line dimensions.
1953 HorizonLine.dimensions = {
1962 * Set the source dimensions of the horizon line.
1966 for (var dimension in HorizonLine.dimensions) {
1970 HorizonLine.dimensions[dimension] * 2;
1974 dimensions[dimension];
1976 this.dimensions[dimension] = HorizonLine.dimensions[dimension];
1979 this.xPos = [0, HorizonLine.dimensions.WIDTH];
1980 this.yPos = HorizonLine.dimensions.YPOS;
1987 return Math.random() > this.bumpThreshold ? this.dimensions.WIDTH : 0;
1997 this.dimensions.WIDTH, this.dimensions.HEIGHT);
2002 this.dimensions.WIDTH, this.dimensions.HEIGHT);
2015 this.xPos[line2] = this.xPos[line1] + this.dimensions.WIDTH;
2017 if (this.xPos[line1] <= -this.dimensions.WIDTH) {
2018 this.xPos[line1] += this.dimensions.WIDTH * 2;
2019 this.xPos[line2] = this.xPos[line1] - this.dimensions.WIDTH;
2045 this.xPos[1] = HorizonLine.dimensions.WIDTH;
2056 * @param {object} dimensions Canvas dimensions.
2060 function Horizon(canvas, images, dimensions, gapCoefficient) {
2064 this.dimensions = dimensions;
2146 (this.dimensions.WIDTH - lastCloud.xPos) > lastCloud.cloudGap &&
2184 this.dimensions.WIDTH) {
2205 obstacleImg, this.dimensions, this.gapCoefficient, currentSpeed));
2232 this.dimensions.WIDTH));