| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 var api = {}; | 5 var api = {}; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Enumeration of scene update commands. | 8 * Enumeration of scene update commands. |
| 9 * @enum {number} | 9 * @enum {number} |
| 10 * @const | 10 * @const |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 * Abstract fill base class. | 133 * Abstract fill base class. |
| 134 * @abstract | 134 * @abstract |
| 135 */ | 135 */ |
| 136 api.Fill = class { | 136 api.Fill = class { |
| 137 constructor(type) { | 137 constructor(type) { |
| 138 this.properties = {}; | 138 this.properties = {}; |
| 139 this.properties['fillType'] = type; | 139 this.properties['fillType'] = type; |
| 140 } | 140 } |
| 141 } | 141 } |
| 142 | 142 |
| 143 api.NoFill = class extends api.Fill { |
| 144 constructor() { |
| 145 super(api.FillType.NONE); |
| 146 } |
| 147 } |
| 148 |
| 143 api.Sprite = class extends api.Fill { | 149 api.Sprite = class extends api.Fill { |
| 144 constructor(pixelX, pixelY, pixelWidth, pixelHeight) { | 150 constructor(pixelX, pixelY, pixelWidth, pixelHeight) { |
| 145 super(api.FillType.SPRITE); | 151 super(api.FillType.SPRITE); |
| 146 this.properties['copyRectX'] = pixelX; | 152 this.properties['copyRectX'] = pixelX; |
| 147 this.properties['copyRectY'] = pixelY; | 153 this.properties['copyRectY'] = pixelY; |
| 148 this.properties['copyRectWidth'] = pixelWidth; | 154 this.properties['copyRectWidth'] = pixelWidth; |
| 149 this.properties['copyRectHeight'] = pixelHeight; | 155 this.properties['copyRectHeight'] = pixelHeight; |
| 150 } | 156 } |
| 151 } | 157 } |
| 152 | 158 |
| (...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 if ('updateTab' in dict) { | 668 if ('updateTab' in dict) { |
| 663 this.onUpdateTab(dict['updateTab']); | 669 this.onUpdateTab(dict['updateTab']); |
| 664 } | 670 } |
| 665 if ('removeTab' in dict) { | 671 if ('removeTab' in dict) { |
| 666 this.onRemoveTab(dict['removeTab']); | 672 this.onRemoveTab(dict['removeTab']); |
| 667 } | 673 } |
| 668 | 674 |
| 669 this.onCommandHandlerFinished() | 675 this.onCommandHandlerFinished() |
| 670 } | 676 } |
| 671 }; | 677 }; |
| OLD | NEW |