{"size": 916, "ext": "js", "max_stars_repo_path": "packages/mapray/src/gltf/TextureInfo.js", "max_stars_repo_name": "sony/mapray-js", "max_stars_repo_stars_event_min_datetime": "2019-02-01T11:13:18.000Z", "max_stars_repo_stars_event_max_datetime": "2021-09-22T17:25:40.000Z", "max_issues_repo_path": "packages/mapray/src/gltf/TextureInfo.js", "max_issues_repo_name": "sony/mapray-js", "max_issues_repo_issues_event_min_datetime": "2019-02-13T08:36:30.000Z", "max_issues_repo_issues_event_max_datetime": "2021-08-12T12:40:21.000Z", "max_forks_repo_path": "packages/mapray/src/gltf/TextureInfo.js", "max_forks_repo_name": "sony/mapray-js", "max_forks_repo_forks_event_min_datetime": "2019-02-12T09:41:46.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-25T16:55:55.000Z"}
{"max_stars_count": 88, "max_issues_count": 112, "max_forks_count": 10, "avg_line_length": 18.32, "max_line_length": 83, "alphanum_fraction": 0.5644104803}
import Texture from "./Texture";


/**
 * glTF の textureInfo に対応
 * @memberof mapray.gltf
 * @private
 */
class TextureInfo {

    /**
     * 初期化
     * @param {object}              jtexinfo  テクスチャ情報
     * @param {mapray.gltf.Context} ctx       読み込みコンテキスト
     */
    constructor( jtexinfo, ctx )
    {
        // specification/2.0/schema/textureInfo.schema.json

        this._texture  = new Texture( ctx, jtexinfo.index );
        this._texCoord = (jtexinfo.texCoord !== undefined) ? jtexinfo.texCoord : 0;
    }


    /**
     * 参照するテクスチャを取得
     * @type {mapray.gltf.Texture}
     */
    get texture() { return this._texture; }


    /**
     * 参照するテクスチャを設定
     * @type {mapray.gltf.Texture}
     */
    set texture( value ) { this._texture = value; }


    /**
     * テクスチャ座標のインデックス
     * @type {number}
     * @readonly
     */
    get texCoord() { return this._texCoord; }

}


export default TextureInfo;
