import Type from "./Type"; import Updater from "./Updater"; import Curve from "./Curve"; import BindingBlock from "./BindingBlock"; import Binder from "./Binder"; /** * アニメーションパラメータ設定のヘルパークラス */ declare class EasyBindingBlock extends BindingBlock { private _entries; private _bounds; private _descendant_unbinders; /** */ constructor(); /** * アニメーション可能パラメータを追加 * * 識別子を id としてアニメーション可能なパラメータを登録する。 * * types にはこのパラメータに結合可能なアニメーション関数の 1 つまたはそれ以上の型を配列で与える。 * * types に 2 つ以上の型が存在するときは type_solver に型を決定する関数を指定しなければならない。 * 1 つしか型が存在しないとき type_solver は無視されるので null を与えてもよい。 * * setter は実際のパラメータに値を設定する関数である。 * * id に対応するパラメータがすでに結合されている場合はその結合が解除される。 * * @param id パラメータ ID * @param types サポートする型のリスト * @param type_solver 型決定関数 * @param setter パラメータ設定関数 * * @see [[BindingBlock.Parameter]] */ addEntry(id: string, types: Type[], type_solver: EasyBindingBlock.TypeSolver | null, setter: Binder.Setter): void; /** * 子孫の結合を解除するための関数を追加 * * @param unbinder 子孫の結合を解除するための関数 * * @see [[BindingBlock.unbindAllRecursively]] */ addDescendantUnbinder(unbinder: EasyBindingBlock.DescendantUnbinder): void; /** */ enumSupportedParameters(): BindingBlock.Parameter[]; /** */ isBound(id: string): boolean; /** */ getBoundUpdater(id: string): Updater | undefined; /** */ getBoundCurve(id: string): Curve | undefined; /** */ bind(id: string, updater: Updater, curve: Curve): void; /** */ unbind(id: string): void; /** */ unbindAll(): void; /** */ unbindAllRecursively(): void; } declare namespace EasyBindingBlock { /** * パラメータ情報 * * @memberof mapray.animation.EasyBindingBlock */ class Entry { types: Type[]; type_solver?: EasyBindingBlock.TypeSolver; setter: Binder.Setter; /** * @param types サポートする型のリスト * @param type_solver 型決定関数 * @param setter パラメータ設定関数 */ constructor(types: Type[], type_solver: EasyBindingBlock.TypeSolver | null, setter: Binder.Setter); } /** * 型決定関数 * * ここで説明する types と setter は [[EasyBindingBlock.addEntry addEntry()]] * の引数、curve は [[EasyBindingBlock.bind bind()]] の引数である。 * * types と curve がサポートする型から、setter 関数に渡されるパラメータの型 (curve から得る関数値の型も同じ) * を決定して返す。 * * この関数は types に含まれる型、かつ curve がサポートする型以外は返さない。そのような型が決定できなければ * null を返す。 * * この関数は types に複数の型を指定したときに、bind() の呼び出しのタイミングで呼び出される。types * に 1 つの型しか存在しないときは呼び出されない。 * * @param curve * * @see [[EasyBindingBlock.addEntry]] * @see [[EasyBindingBlock.bind]] * @see [[Curve.isTypeSupported]] * @see [[Binder.Setter]] */ type TypeSolver = (curve: Curve) => Type | null; /** * 子孫の結合を解除するための関数 * * 一般的な実装では、直接の子オブジェクトの animation.unbindAllRecursively() を呼び出す。 * * @see [[EasyBindingBlock.addDescendantUnbinder]] * @see [[BindingBlock.unbindAllRecursively]] */ type DescendantUnbinder = () => void; } export default EasyBindingBlock; //# sourceMappingURL=EasyBindingBlock.d.ts.map