Animate CC provides a TypeScript definition file for the WebGL runtime API. You can reference this file in the TypeScript project that you have created in an IDE such as Visual Studio. Adding this file to your project allows you to use the WebGL runtime API from your Typescript project, along with the code-hinting, formatting, error checking, and other features that your IDE provides.
TypeScript definition file
The following ZIP file contains the TypeScript definition file flwebgl-0.2.d.ts.
Atsisiųsti
Sample project
To get you started, here is a sample TypeScript project that uses the WebGL runtime API. The file contains a sample Visual Studio project and the other required files to compile and run the project.
Atsisiųsti
Working with the sample project
- Observe that the file app.ts references to the WebGL APIs.
- Make sure that IIS Express (that Visual Studio uses) can serve json files. If necessary, add the line <mimemap fileextension=".json" mimetype="application/json"> along with the other mime type entries in the file \Documents\IISExpress\config\applicationhost.config.
- Compile and run the project. A sample animation opens in the browser.