threepipe
Version:
A modern 3D viewer framework built on top of three.js, written in TypeScript, designed to make creating high-quality, modular, and extensible 3D experiences on the web simple and enjoyable.
74 lines • 2.72 kB
TypeScript
import { AViewerPluginSync, ThreeViewer } from '../../viewer';
import { PickingPlugin } from './PickingPlugin';
import { JSUndoManager } from 'ts-browser-helpers';
import { PivotControls } from '../../three/controls/PivotControls';
import { ICamera, IObject3D, IWidget } from '../../core';
/**
* PivotControlsPlugin adds drei-style pivot controls to the viewer.
* Unlike TransformControls which shows one mode at a time, PivotControls
* displays all handles simultaneously: translation arrows, plane sliders,
* rotation arcs, and scaling spheres.
*
* Integrates with PickingPlugin for object selection and UndoManagerPlugin
* for undo/redo support.
*
* @category Plugins - Interaction
*/
export declare class PivotControlsPlugin extends AViewerPluginSync {
static readonly PluginType = "PivotControlsPlugin";
enabled: boolean;
setDirty(): void;
constructor(enabled?: boolean);
toJSON: any;
dependencies: (typeof PickingPlugin)[];
pivotControls: PivotControls2 | undefined;
protected _isInteracting: boolean;
protected _viewerListeners: {
preFrame: () => void;
};
private _transformState;
undoManager?: JSUndoManager;
private _multi;
onAdded(viewer: ThreeViewer): void;
onRemove(viewer: ThreeViewer): void;
private _mainCameraChange;
}
/**
* Extended PivotControls implementing threepipe's IWidget interface.
*/
export declare class PivotControls2 extends PivotControls implements IWidget, IObject3D {
isWidget: true;
assetType: "widget";
setDirty: any;
refreshUi: any;
object: IObject3D | undefined;
constructor(camera: ICamera, canvas: HTMLCanvasElement);
space: 'world' | 'local';
gizmoScale: number;
fixed: boolean;
depthTest: boolean;
annotations: boolean;
translationSnap: number | null;
rotationSnap: number | null;
scaleSnap: number | null;
uniformScaleEnabled: boolean;
disableAxes: boolean;
disableSliders: boolean;
disableRotations: boolean;
disableScaling: boolean;
private _onVisibilityChange;
private _onRebuild;
/**
* @deprecated use object directly
*/
get modelObject(): this;
traverse: (callback: (object: IObject3D) => void) => void;
traverseVisible: (callback: (object: IObject3D) => void) => void;
traverseAncestors: (callback: (object: IObject3D) => void) => void;
getObjectById: (id: number) => IObject3D | undefined;
getObjectByName: (name: string) => IObject3D | undefined;
getObjectByProperty: (name: string, value: string) => IObject3D | undefined;
parent: IObject3D | null;
children: IObject3D[];
}
//# sourceMappingURL=../../src/plugins/interaction/PivotControlsPlugin.d.ts.map