Unity.ts - クラス

Web ページでは、まず unitySample という名前空間を作成します。この名前空間には、いくつかのインターフェイスと class が含まれています。このセクションは unitySample の class をカバーします。

In This Section

RenderCommand

RenderCommand class は、WebGL を適切に使用できるようにします。

    // WebGL class for rendering command
    class RenderCommand {
        visible: boolean;
        vtx: [WebGLBuffer, number]; // Vertex buffer and length
        idx: [WebGLBuffer, number]; // Index buffer and length
        tex: any; // Texture ID.
        img: any; // HTML image used for the texture (async load).
    }

unityController

unityController は、適切にコンテンツを表示し、ページ上のすべてのアクションを処理します。この class は、このヘルプドキュメントの中で最も重要なものであるため、いくつかのセクションに分けて説明します。

unity.ts ファイルでは、各セクションの冒頭部に、セクション名を含む、分かりやすいコメントが記述されています。