This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // game.rotation: 画布的旋转角度,可简化为landscape | portrait | |
| Object.defineProperties(phaser.Input.Pointer.prototype, { | |
| x: { | |
| get() { | |
| return config.landscape ? this.position.y / this.manager.bounds.width * this.manager.bounds.height : this.position.x | |
| }, | |
| set(v) { | |
| this.position.x = v |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const | |
| gulp = require('gulp'), | |
| autoprefixer = require('gulp-autoprefixer'), | |
| sass = require('gulp-sass'), | |
| minify = require('gulp-minify-css') | |
| gulp.task('default', function() { | |
| gulp.src('bootstrap.scss') | |
| .pipe(sass()) | |
| .pipe(autoprefixer()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PIXI.interaction.InteractionManager.prototype.mapPositionToPoint = function(point, x, y) { | |
| let rect | |
| // IE 11 fix | |
| if (!this.interactionDOMElement.parentElement) { | |
| rect = {x: 0, y: 0, width: 0, height: 0} | |
| } else { | |
| rect = this.interactionDOMElement.getBoundingClientRect() | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const resize = () => { | |
| let | |
| w = window.innerWidth, | |
| h = window.innerHeight, | |
| l, t | |
| // 横屏 | |
| if (window.innerWidth / window.innerHeight >= 1) { | |
| view.style.transform = 'rotate(0)' | |
| window.GAME_ROTATE = 0 | |
| if (window.innerWidth / window.innerHeight >= GAME_RATIO) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| INCLUDEPATH += "D:\portable\vs\vc\include" \ | |
| "D:\portable\vs\sdk\Include\shared" \ | |
| "D:\portable\vs\sdk\Include\ucrt" \ | |
| "D:\portable\vs\sdk\Include\um" \ | |
| "D:\portable\vs\sdk\Include\winrt" | |
| LIBS += -L"D:\portable\vs\vc\lib\amd64" \ | |
| -L"D:\portable\vs\sdk\Lib\um\x64" \ | |
| -L"D:\portable\vs\sdk\Lib\ucrt\x64" |
NewerOlder