🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
Latest typescript Activity
![Drawing Box and Sphere Cannon-ES Colliders with WebGL and TypeScript](https://uploads.gamedev.net/blogs/monthly_2022_08/large.d36823236a2346d894ebb653aa5c4078.DrawingBoxAndSphereCollidersWithCannonES.png)
The CannonDebugger class I got here: https://github.com/pmndrs/cannon-es/issues/152#issuecomment-1202788163
- Sandbox: https://codesandbox.io/s/cannon-es-box-sphere-debugger-webgl-ts-9co3qr (toggle the preview to see the result: Ctrl+Shift+D)
- GitHub: https://github.com/8Observer8/cannon-es-box-sphere-…
Hi, I wanted to share the multiplayer game framework I've been working on, Hathora: https://github.com/hathora/hathora
Hathora makes it easier to developer multiplayer games with built in state synchronization, prototyping interface, and authentication. See more at https://docs.hathora.dev/#/
My vi…
This is my template in TypeScript that shows how to write unit-tests with mocks and spies: https://github.com/8Observer8/person-service-mocha-sinon-ts I wrote a short instruction in the README.md file. You can use Test-driven development:
Test-driven development (TDD) is a software development proc…
Solution:
const userData = { name: name };
(this.body as any).userData = userData;
function detectCollison(): void
{
const dispatcher = physicsWorld.getDispatcher();
const numManifolds = dispatcher.getNumManifolds();
for (let i = 0; i < numManifolds; i++)
{
const contactMa…
![I cannot migrate a simple example from cannon to cannon-es](https://user-images.githubusercontent.com/3908473/131516723-3b25b833-0fe6-40f6-90a4-52c89db76ef0.png)
Member
marcofugaro commented 23 hours agoIt does not work because that's a commonjs module. You need an umd module to make it work with RequireJS.
Cannon-es does not expose an umd module. Please use esmodules directly or alternatively use any bundler.
This answer was here: https://github.com/pmndrs/c…
![Usage of Planck.js with TypeScript (Planck.js is a port of Box2D Physics Engine)](https://uploads.gamedev.net/blogs/monthly_2021_01/large.317daa64030a4fac978c8db0d5b2c638.hello-planckjs-webgl10-ts_for-gamedev-blog.png)
My example shows how to use Ammo.js with TypeScript in Debug and Release modes: hello-planckjs-webgl10-ts
You should install these modules globally:
- npm i typescript -g
- npm i browserify -g
- npm i uglify-js -g
Install all packages from `package.json` using the command: `npm i`
Comment/Uncomment Debug/Relea…
![Usage of Ammo.js with TypeScript (Ammo.js is a port of Bullet Physics Engine)](https://uploads.gamedev.net/blogs/monthly_2021_01/large.0103c8d5147f474c80c7c82b6efe4600.hello-ammojs-webgl10-ts_for-gamedev-blog.png)
My example shows how to use Ammo.js with TypeScript in Debug and Release modes: hello-ammojs-webgl10-ts
You should install these modules globally:
- npm i typescript -g
- npm i browserify -g
- npm i uglify-js -g
Install all packages from `package.json` using the command: `npm i`
Comment/Uncomment Debug/Release…
![Triangle in OpenGL ES 2.0 (Qt5 C++, PyQt5) and WebGL 1.0 (TypeScript) for Desktop and Android](https://uploads.gamedev.net/blogs/monthly_2020_11/large.ce8c6c9a74ca4f4cab71bd37a96ed796.TriangleInOneFile_Qt5OpenGLES20Cpp_500x500.png)
- Added PyQt5 Example: https://rextester.com/LWYAU14361
Version in WebGL 1.0 (TypeScript)
Run by one click in a browser: https://plnkr.co/edit/gAfPR7ZIKjJXulDI?open=main.ts&preview
Version in OpenGL ES 2.0 (C++ Qt5)
Create a QWidget project (without “Generate form”). Delete the Widget class. Add the …
cocos creator, which has a similar node-component system, uses events to communicate between components of the same node. for all intents and purposes, it works well.
i'm using signals (https://www.npmjs.com/package/@robotlegsjs/signals) and ioc/di (https://www.npmjs.com/package/inversify) to implem…
![NoobTuts Pong. WebGL 1.0, TypeScript](https://uploads.gamedev.net/blogs/monthly_2019_12/234731b83cde49a4937c7783cbe320a7.pong2d-from-noobtuts_webgl10-typescript.png)
I rewrote the Pong game to WebGL 1.0 and TypeScript from the tutorial: https://noobtuts.com/cpp/2d-pong-game
I use a free hosting and sometimes my Node.js/Express server sleeps. Wait 10 second to wake up the server.
Run the release version in the browser: http://ivan8observer8.herokuapp.com/webgl10-t…
![Browserify TypeScript](https://uploads.gamedev.net/blogs/monthly_2021_12/large.12e637a2cde542bb87c42dfc6cd61f3f.TypeScript.png)
It is the most common problem for anyone who starts to study TS. They cannot include a few ".js" files after compilation to <script> tags in "index.html".
It is very simple in JS. You have two files in JS and you can include them in "index.html":
index.html
<html> <head> &nbs…