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

Download

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.

Download

Working with the sample project

After downloading, try the following procedure to work with the sample project:
  1. Observe that the file app.ts references to the WebGL APIs.
  2. 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.
  3. Compile and run the project. A sample animation opens in the browser.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy