- 输出
function Foo() {
getName = function() {alert(1)};
return this;
}
Foo.getName = function() {alert(2)};
Foo.prototype.getName = function() {alert(3)};
var getName = function() {alert(4)};| const formatTime = (ms: number): TimeSplitted => { | |
| if (!ms || ms <= 0) { | |
| return { day: 0, hour: 0, min: 0, second: 0 } | |
| } | |
| const total = ~~(ms / 1000) | |
| const day = ~~(total / DAY) | |
| const hour = ~~((total % DAY) / HOUR) | |
| const min = ~~((total % HOUR) / MIN) | |
| const second = ~~(total % MIN) |
| const scale = 20 | |
| const inc = 0.1 | |
| let cols | |
| let rows | |
| let yOff | |
| let xOff | |
| let zOff = 0 | |
| let fr | |
| let flowField = [] |
| window.onload = function() { | |
| const playground = document.querySelector('#scene') | |
| const app = new PIXI.Application({ | |
| width: 512, | |
| height: 512, | |
| autoDensity: true, | |
| transparent: true, | |
| resolution: 1, | |
| }) |