Comments (6)
That syntax is awful, not as clear what is happening there.
from phaser.
Yes, probably but if you don't use the parts of the language why use typescript? Then use only plain Javascript
from phaser.
What matters most is what happens in the resulting JS. I'm quite sure both approaches will yield almost identical code, but will double check.
from phaser.
Typescript generates exactly the same code but using var _this = this
instead of var that = this
from phaser.
That's what I figured, but thanks for testing it. In that case I think I'll leave it as it is. It's actually the only place in the whole code base I use "this = that" notation, everywhere else is thick arrow.
from phaser.
var that = this is actually easier to read than typescripts implementation 😃
from phaser.
Related Issues (20)
- 'Link Shader failed' with Phaser 3.70.0 with a very small % of users HOT 1
- Proposal for Enhanced Integration of matter.js Physics Engine HOT 6
- tilemap `addTilesetImage` from spritesheet created via `addSpriteSheetFromAtlas` renders wrong
- Pixel distortion / shifting when using setDepth() HOT 2
- Factory.staticBody wrong return type description (body instead of staticbody) HOT 1
- Video bug that happens when the video is loaded but the play isnt triggered and the user switches tabs.
- Matter.js - Ignored Restitution on Static Bodies with Physics Configuration HOT 1
- Repeated Pointer Events in Phaser with Overlapping HTML Elements
- Enabling Light2D pipeline incorrectly shifts sprite, only if x or y position is odd
- DOM Object Visibility Incompatible with Nested Containers
- Scaling Tween on Phaser 3.70 not smooth compared to Phaser 3.60 HOT 1
- weightedPick sometimes returns undefined HOT 2
- Audio set to loop infinitely stops, when next loop triggers while switched to another tab.
- When using setOrigin() on a Phaser.GameObjects.Group each object origin is adjusted instead of setting the an origin for the group HOT 3
- Phaser3 crashes on Android (Google Chrome) when using createLayer (Tilemap) HOT 1
- Some PostFX Shaders creating a freak frame at shader activation and persistent issues on game resize for Phaser.Scale.NONE / Phaser.Scale.RESIZE HOT 2
- fx wipe example click back to menu trigger "TypeError: Cannot read properties of undefined (reading 'sys')" HOT 1
- Normal maps not working with some initial image rotation HOT 2
- Replacing old twitter logo with new icon HOT 1
- createFromTiles should take into account flip/rotation from tiled
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phaser.