|
@@ -583,8 +583,11 @@ declare module "babylonjs-inspector/components/actionTabs/tabs/propertyGrids/ani
|
|
|
import * as React from "react";
|
|
|
import { Vector2 } from 'babylonjs/Maths/math.vector';
|
|
|
interface IAnchorSvgPointProps {
|
|
|
- point: Vector2;
|
|
|
+ control: Vector2;
|
|
|
anchor: Vector2;
|
|
|
+ active: boolean;
|
|
|
+ type: string;
|
|
|
+ index: string;
|
|
|
}
|
|
|
export class AnchorSvgPoint extends React.Component<IAnchorSvgPointProps> {
|
|
|
constructor(props: IAnchorSvgPointProps);
|
|
@@ -594,48 +597,98 @@ declare module "babylonjs-inspector/components/actionTabs/tabs/propertyGrids/ani
|
|
|
declare module "babylonjs-inspector/components/actionTabs/tabs/propertyGrids/animations/keyframeSvgPoint" {
|
|
|
import * as React from "react";
|
|
|
import { Vector2 } from 'babylonjs/Maths/math.vector';
|
|
|
+ export interface IKeyframeSvgPoint {
|
|
|
+ keyframePoint: Vector2;
|
|
|
+ rightControlPoint: Vector2 | null;
|
|
|
+ leftControlPoint: Vector2 | null;
|
|
|
+ id: string;
|
|
|
+ }
|
|
|
interface IKeyframeSvgPointProps {
|
|
|
- point: Vector2;
|
|
|
+ keyframePoint: Vector2;
|
|
|
+ leftControlPoint: Vector2 | null;
|
|
|
+ rightControlPoint: Vector2 | null;
|
|
|
+ id: string;
|
|
|
}
|
|
|
export class KeyframeSvgPoint extends React.Component<IKeyframeSvgPointProps> {
|
|
|
constructor(props: IKeyframeSvgPointProps);
|
|
|
render(): JSX.Element;
|
|
|
}
|
|
|
}
|
|
|
+declare module "babylonjs-inspector/components/actionTabs/tabs/propertyGrids/animations/svgDraggableArea" {
|
|
|
+ import * as React from "react";
|
|
|
+ import { Vector2 } from 'babylonjs/Maths/math.vector';
|
|
|
+ import { IKeyframeSvgPoint } from "babylonjs-inspector/components/actionTabs/tabs/propertyGrids/animations/keyframeSvgPoint";
|
|
|
+ interface ISvgDraggableAreaProps {
|
|
|
+ keyframeSvgPoints: IKeyframeSvgPoint[];
|
|
|
+ updatePosition: (updatedKeyframe: IKeyframeSvgPoint, index: number) => void;
|
|
|
+ }
|
|
|
+ export class SvgDraggableArea extends React.Component<ISvgDraggableAreaProps> {
|
|
|
+ private _active;
|
|
|
+ private _isCurrentPointControl;
|
|
|
+ private _currentPointIndex;
|
|
|
+ private _draggableArea;
|
|
|
+ constructor(props: ISvgDraggableAreaProps);
|
|
|
+ dragStart(e: React.TouchEvent<SVGSVGElement>): void;
|
|
|
+ dragStart(e: React.MouseEvent<SVGSVGElement, MouseEvent>): void;
|
|
|
+ drag(e: React.TouchEvent<SVGSVGElement>): void;
|
|
|
+ drag(e: React.MouseEvent<SVGSVGElement, MouseEvent>): void;
|
|
|
+ dragEnd(e: React.TouchEvent<SVGSVGElement>): void;
|
|
|
+ dragEnd(e: React.MouseEvent<SVGSVGElement, MouseEvent>): void;
|
|
|
+ getMousePosition(e: React.TouchEvent<SVGSVGElement>): Vector2 | undefined;
|
|
|
+ getMousePosition(e: React.MouseEvent<SVGSVGElement, MouseEvent>): Vector2 | undefined;
|
|
|
+ render(): JSX.Element;
|
|
|
+ }
|
|
|
+}
|
|
|
declare module "babylonjs-inspector/components/actionTabs/tabs/propertyGrids/animations/animationCurveEditorComponent" {
|
|
|
import * as React from "react";
|
|
|
import { Animation } from 'babylonjs/Animations/animation';
|
|
|
import { Vector2 } from 'babylonjs/Maths/math.vector';
|
|
|
import { EasingFunction } from 'babylonjs/Animations/easing';
|
|
|
import { IAnimationKey } from 'babylonjs/Animations/animationKey';
|
|
|
+ import { IKeyframeSvgPoint } from "babylonjs-inspector/components/actionTabs/tabs/propertyGrids/animations/keyframeSvgPoint";
|
|
|
+ import { Scene } from "babylonjs/scene";
|
|
|
+ import { IAnimatable } from 'babylonjs/Animations/animatable.interface';
|
|
|
interface IAnimationCurveEditorComponentProps {
|
|
|
close: (event: any) => void;
|
|
|
+ playOrPause: () => void;
|
|
|
title: string;
|
|
|
animations: Animation[];
|
|
|
entityName: string;
|
|
|
+ scene: Scene;
|
|
|
+ entity: IAnimatable;
|
|
|
}
|
|
|
export class AnimationCurveEditorComponent extends React.Component<IAnimationCurveEditorComponentProps, {
|
|
|
+ animations: Animation[];
|
|
|
+ animationName: string;
|
|
|
+ animationTargetProperty: string;
|
|
|
isOpen: boolean;
|
|
|
selected: Animation;
|
|
|
currentPathData: string | undefined;
|
|
|
- anchorPoints: {
|
|
|
- point: Vector2;
|
|
|
- anchor: Vector2;
|
|
|
- }[] | null;
|
|
|
- keyframes: Vector2[] | null;
|
|
|
+ svgKeyframes: IKeyframeSvgPoint[] | undefined;
|
|
|
}> {
|
|
|
- private _anchorPoints;
|
|
|
- private _keyframes;
|
|
|
+ readonly _heightScale: number;
|
|
|
+ private _newAnimations;
|
|
|
+ private _svgKeyframes;
|
|
|
+ private _frames;
|
|
|
+ private _isPlaying;
|
|
|
constructor(props: IAnimationCurveEditorComponentProps);
|
|
|
+ handleNameChange(event: React.ChangeEvent<HTMLInputElement>): void;
|
|
|
+ handlePropertyChange(event: React.ChangeEvent<HTMLInputElement>): void;
|
|
|
+ addAnimation(event: React.MouseEvent<HTMLDivElement>): void;
|
|
|
+ addKeyFrame(event: React.MouseEvent<SVGSVGElement>): void;
|
|
|
+ updateKeyframe(keyframe: Vector2, index: number): void;
|
|
|
getAnimationProperties(animation: Animation): {
|
|
|
easingType: string | undefined;
|
|
|
easingMode: number | undefined;
|
|
|
};
|
|
|
getPathData(animation: Animation): string;
|
|
|
- curvePath(keyframes: IAnimationKey[], data: string, heightScale: number, middle: number, easingFunction: EasingFunction): string;
|
|
|
- linearInterpolation(keyframes: IAnimationKey[], data: string, heightScale: number, middle: number): string;
|
|
|
- setAnchorPoint(point: Vector2, anchor: Vector2): void;
|
|
|
- setKeyframePoint(point: Vector2): void;
|
|
|
+ drawAllFrames(initialKey: IAnimationKey, endKey: IAnimationKey, easingFunction: EasingFunction): void;
|
|
|
+ curvePath(keyframes: IAnimationKey[], data: string, middle: number, easingFunction: EasingFunction): string;
|
|
|
+ renderPoints(updatedSvgKeyFrame: IKeyframeSvgPoint, index: number): void;
|
|
|
+ linearInterpolation(keyframes: IAnimationKey[], data: string, middle: number): string;
|
|
|
+ setKeyframePointLinear(point: Vector2, index: number): void;
|
|
|
+ setKeyframePoint(controlPoints: Vector2[], index: number, keyframesCount: number): void;
|
|
|
+ isAnimationPlaying(): void;
|
|
|
selectAnimation(animation: Animation): void;
|
|
|
interpolateControlPoints(p0: Vector2, p1: Vector2, u: number, p2: Vector2, v: number, p3: Vector2): Vector2[] | undefined;
|
|
|
render(): JSX.Element;
|
|
@@ -3381,8 +3434,11 @@ declare module INSPECTOR {
|
|
|
}
|
|
|
declare module INSPECTOR {
|
|
|
interface IAnchorSvgPointProps {
|
|
|
- point: BABYLON.Vector2;
|
|
|
+ control: BABYLON.Vector2;
|
|
|
anchor: BABYLON.Vector2;
|
|
|
+ active: boolean;
|
|
|
+ type: string;
|
|
|
+ index: string;
|
|
|
}
|
|
|
export class AnchorSvgPoint extends React.Component<IAnchorSvgPointProps> {
|
|
|
constructor(props: IAnchorSvgPointProps);
|
|
@@ -3390,8 +3446,17 @@ declare module INSPECTOR {
|
|
|
}
|
|
|
}
|
|
|
declare module INSPECTOR {
|
|
|
+ export interface IKeyframeSvgPoint {
|
|
|
+ keyframePoint: BABYLON.Vector2;
|
|
|
+ rightControlPoint: BABYLON.Vector2 | null;
|
|
|
+ leftControlPoint: BABYLON.Vector2 | null;
|
|
|
+ id: string;
|
|
|
+ }
|
|
|
interface IKeyframeSvgPointProps {
|
|
|
- point: BABYLON.Vector2;
|
|
|
+ keyframePoint: BABYLON.Vector2;
|
|
|
+ leftControlPoint: BABYLON.Vector2 | null;
|
|
|
+ rightControlPoint: BABYLON.Vector2 | null;
|
|
|
+ id: string;
|
|
|
}
|
|
|
export class KeyframeSvgPoint extends React.Component<IKeyframeSvgPointProps> {
|
|
|
constructor(props: IKeyframeSvgPointProps);
|
|
@@ -3399,34 +3464,69 @@ declare module INSPECTOR {
|
|
|
}
|
|
|
}
|
|
|
declare module INSPECTOR {
|
|
|
+ interface ISvgDraggableAreaProps {
|
|
|
+ keyframeSvgPoints: IKeyframeSvgPoint[];
|
|
|
+ updatePosition: (updatedKeyframe: IKeyframeSvgPoint, index: number) => void;
|
|
|
+ }
|
|
|
+ export class SvgDraggableArea extends React.Component<ISvgDraggableAreaProps> {
|
|
|
+ private _active;
|
|
|
+ private _isCurrentPointControl;
|
|
|
+ private _currentPointIndex;
|
|
|
+ private _draggableArea;
|
|
|
+ constructor(props: ISvgDraggableAreaProps);
|
|
|
+ dragStart(e: React.TouchEvent<SVGSVGElement>): void;
|
|
|
+ dragStart(e: React.MouseEvent<SVGSVGElement, MouseEvent>): void;
|
|
|
+ drag(e: React.TouchEvent<SVGSVGElement>): void;
|
|
|
+ drag(e: React.MouseEvent<SVGSVGElement, MouseEvent>): void;
|
|
|
+ dragEnd(e: React.TouchEvent<SVGSVGElement>): void;
|
|
|
+ dragEnd(e: React.MouseEvent<SVGSVGElement, MouseEvent>): void;
|
|
|
+ getMousePosition(e: React.TouchEvent<SVGSVGElement>): BABYLON.Vector2 | undefined;
|
|
|
+ getMousePosition(e: React.MouseEvent<SVGSVGElement, MouseEvent>): BABYLON.Vector2 | undefined;
|
|
|
+ render(): JSX.Element;
|
|
|
+ }
|
|
|
+}
|
|
|
+declare module INSPECTOR {
|
|
|
interface IAnimationCurveEditorComponentProps {
|
|
|
close: (event: any) => void;
|
|
|
+ playOrPause: () => void;
|
|
|
title: string;
|
|
|
animations: BABYLON.Animation[];
|
|
|
entityName: string;
|
|
|
+ scene: BABYLON.Scene;
|
|
|
+ entity: BABYLON.IAnimatable;
|
|
|
}
|
|
|
export class AnimationCurveEditorComponent extends React.Component<IAnimationCurveEditorComponentProps, {
|
|
|
+ animations: BABYLON.Animation[];
|
|
|
+ animationName: string;
|
|
|
+ animationTargetProperty: string;
|
|
|
isOpen: boolean;
|
|
|
selected: BABYLON.Animation;
|
|
|
currentPathData: string | undefined;
|
|
|
- anchorPoints: {
|
|
|
- point: BABYLON.Vector2;
|
|
|
- anchor: BABYLON.Vector2;
|
|
|
- }[] | null;
|
|
|
- keyframes: BABYLON.Vector2[] | null;
|
|
|
+ svgKeyframes: IKeyframeSvgPoint[] | undefined;
|
|
|
}> {
|
|
|
- private _anchorPoints;
|
|
|
- private _keyframes;
|
|
|
+ readonly _heightScale: number;
|
|
|
+ private _newAnimations;
|
|
|
+ private _svgKeyframes;
|
|
|
+ private _frames;
|
|
|
+ private _isPlaying;
|
|
|
constructor(props: IAnimationCurveEditorComponentProps);
|
|
|
+ handleNameChange(event: React.ChangeEvent<HTMLInputElement>): void;
|
|
|
+ handlePropertyChange(event: React.ChangeEvent<HTMLInputElement>): void;
|
|
|
+ addAnimation(event: React.MouseEvent<HTMLDivElement>): void;
|
|
|
+ addKeyFrame(event: React.MouseEvent<SVGSVGElement>): void;
|
|
|
+ updateKeyframe(keyframe: BABYLON.Vector2, index: number): void;
|
|
|
getAnimationProperties(animation: BABYLON.Animation): {
|
|
|
easingType: string | undefined;
|
|
|
easingMode: number | undefined;
|
|
|
};
|
|
|
getPathData(animation: BABYLON.Animation): string;
|
|
|
- curvePath(keyframes: BABYLON.IAnimationKey[], data: string, heightScale: number, middle: number, easingFunction: BABYLON.EasingFunction): string;
|
|
|
- linearInterpolation(keyframes: BABYLON.IAnimationKey[], data: string, heightScale: number, middle: number): string;
|
|
|
- setAnchorPoint(point: BABYLON.Vector2, anchor: BABYLON.Vector2): void;
|
|
|
- setKeyframePoint(point: BABYLON.Vector2): void;
|
|
|
+ drawAllFrames(initialKey: BABYLON.IAnimationKey, endKey: BABYLON.IAnimationKey, easingFunction: BABYLON.EasingFunction): void;
|
|
|
+ curvePath(keyframes: BABYLON.IAnimationKey[], data: string, middle: number, easingFunction: BABYLON.EasingFunction): string;
|
|
|
+ renderPoints(updatedSvgKeyFrame: IKeyframeSvgPoint, index: number): void;
|
|
|
+ linearInterpolation(keyframes: BABYLON.IAnimationKey[], data: string, middle: number): string;
|
|
|
+ setKeyframePointLinear(point: BABYLON.Vector2, index: number): void;
|
|
|
+ setKeyframePoint(controlPoints: BABYLON.Vector2[], index: number, keyframesCount: number): void;
|
|
|
+ isAnimationPlaying(): void;
|
|
|
selectAnimation(animation: BABYLON.Animation): void;
|
|
|
interpolateControlPoints(p0: BABYLON.Vector2, p1: BABYLON.Vector2, u: number, p2: BABYLON.Vector2, v: number, p3: BABYLON.Vector2): BABYLON.Vector2[] | undefined;
|
|
|
render(): JSX.Element;
|