Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

thinknathan/tsd-xmath-types

Repository files navigation

xMath Types

@types/tsd-xmath

Chat with us!

TypeScript types for thejustinwalsh's defold-xmath, a Defold Math eXtention Library that avoids allocations.

For use with TS-Defold and TypeScriptToLua.

The documentation comments are copied from Defold's vmath library with some modifications; they may not be 100% accurate to xmath's implementation.

Installation

  1. Create a TS-Defold project
  2. Add defold-xmath to your Defold project
  3. Import these types
yarn add git+https://git@github.com/thinknathan/tsd-xmath-types.git#^1.0.0 -D
# or
npm install git+https://git@github.com/thinknathan/tsd-xmath-types.git#^1.0.0 --save-dev
  1. Add tsd-xmath to types in tsconfig.json
{
	"compilerOptions": {
		"types": [
+			"tsd-xmath",
		],
	}
}
  1. Add node_modules/@types to typeRoots in tsconfig.json if it's not already there
{
	"compilerOptions": {
		"typeRoots": [
+			"node_modules/@types",
		],
	}
}

TypeScript ❤️ Defold

License

MIT

Comments are adapted from Defold's code comments.