polygonjs-engine
Version:
node-based webgl 3D engine https://polygonjs.com
81 lines (80 loc) • 5.69 kB
TypeScript
import { Constructor } from '../../../../types/GlobalTypes';
import { TypedObjNode } from '../_Base';
import { Matrix4 } from 'three/src/math/Matrix4';
import { SetParamsFromMatrixOptions } from '../../../../core/Transform';
import { Object3D } from 'three/src/core/Object3D';
import { NodeParamsConfig } from '../../utils/params/ParamsConfig';
interface TransformedParamConfigDefaultParams {
matrixAutoUpdate?: boolean;
}
export declare function TransformedParamConfig<TBase extends Constructor>(Base: TBase, default_params?: TransformedParamConfigDefaultParams): {
new (...args: any[]): {
transform: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../poly/ParamType").ParamType.FOLDER>;
/** @param toggle on to keep world position when adding a parent or removing from one */
keepPosWhenParenting: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../poly/ParamType").ParamType.BOOLEAN>;
/** @param rotation order */
rotationOrder: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../poly/ParamType").ParamType.INTEGER>;
/** @param translate */
t: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../poly/ParamType").ParamType.VECTOR3>;
/** @param rotation */
r: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../poly/ParamType").ParamType.VECTOR3>;
/** @param scale */
s: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../poly/ParamType").ParamType.VECTOR3>;
/** @param scale */
scale: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../poly/ParamType").ParamType.FLOAT>;
/** @param set for the matrix to be updated every frame */
matrixAutoUpdate: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../poly/ParamType").ParamType.BOOLEAN>;
updateTransformFromObject: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../poly/ParamType").ParamType.BUTTON>;
tlookAt: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../poly/ParamType").ParamType.BOOLEAN>;
lookAtPos: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../poly/ParamType").ParamType.VECTOR3>;
up: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../poly/ParamType").ParamType.VECTOR3>;
};
} & TBase;
declare const TransformedParamsConfig_base: {
new (...args: any[]): {
transform: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../poly/ParamType").ParamType.FOLDER>;
/** @param toggle on to keep world position when adding a parent or removing from one */
keepPosWhenParenting: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../poly/ParamType").ParamType.BOOLEAN>;
/** @param rotation order */
rotationOrder: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../poly/ParamType").ParamType.INTEGER>;
/** @param translate */
t: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../poly/ParamType").ParamType.VECTOR3>;
/** @param rotation */
r: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../poly/ParamType").ParamType.VECTOR3>;
/** @param scale */
s: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../poly/ParamType").ParamType.VECTOR3>;
/** @param scale */
scale: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../poly/ParamType").ParamType.FLOAT>;
/** @param set for the matrix to be updated every frame */
matrixAutoUpdate: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../poly/ParamType").ParamType.BOOLEAN>;
updateTransformFromObject: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../poly/ParamType").ParamType.BUTTON>;
tlookAt: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../poly/ParamType").ParamType.BOOLEAN>;
lookAtPos: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../poly/ParamType").ParamType.VECTOR3>;
up: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../poly/ParamType").ParamType.VECTOR3>;
};
} & typeof NodeParamsConfig;
declare class TransformedParamsConfig extends TransformedParamsConfig_base {
}
export declare class TransformedObjNode extends TypedObjNode<Object3D, TransformedParamsConfig> {
readonly transform_controller: TransformController;
}
export declare class TransformController {
private node;
constructor(node: TransformedObjNode);
initializeNode(): void;
private _cook_main_without_inputs_when_dirty_bound;
private _cook_main_without_inputs_when_dirty;
update(): void;
update_transform_with_matrix(matrix?: Matrix4): void;
private _core_transform;
private _update_matrix_from_params_with_core_transform;
private _apply_look_at;
set_params_from_matrix(matrix: Matrix4, options?: SetParamsFromMatrixOptions): void;
static update_node_transform_params_if_required(node: TransformedObjNode, new_parent_object: Object3D): void;
private _keep_pos_when_parenting_m_object;
private _keep_pos_when_parenting_m_new_parent_inv;
update_node_transform_params_if_required(new_parent_object: Object3D): void;
update_node_transform_params_from_object(update_matrix?: boolean): void;
static PARAM_CALLBACK_update_transform_from_object(node: TransformedObjNode): void;
}
export {};