Skip to content

Commit

Permalink
TransformControls: Add min/max constraints. (#1332)
Browse files Browse the repository at this point in the history
  • Loading branch information
Methuselah96 authored Nov 4, 2024
1 parent c7ed337 commit 85f9126
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions types/three/examples/jsm/controls/TransformControls.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ export interface TransformControlsEventMap {
"showX-changed": { value: unknown };
"showY-changed": { value: unknown };
"showZ-changed": { value: unknown };
"minX-changed": { value: unknown };
"maxX-changed": { value: unknown };
"minY-changed": { value: unknown };
"maxY-changed": { value: unknown };
"minZ-changed": { value: unknown };
"maxZ-changed": { value: unknown };
"worldPosition-changed": { value: unknown };
"worldPositionStart-changed": { value: unknown };
"worldQuaternion-changed": { value: unknown };
Expand Down Expand Up @@ -116,6 +122,36 @@ declare class TransformControls extends Controls<TransformControlsEventMap> {
*/
showZ: boolean;

/**
* The minimum allowed X position during translation. Default is `-Infinity`.
*/
minx: number;

/**
* The maximum allowed X position during translation. Default is `Infinity`.
*/
maxX: number;

/**
* The minimum allowed Y position during translation. Default is `-Infinity`.
*/
minY: number;

/**
* The maximum allowed Y position during translation. Default is `Infinity`.
*/
maxY: number;

/**
* The minimum allowed Z position during translation. Default is `-Infinity`.
*/
minZ: number;

/**
* The maximum allowed Z position during translation. Default is `Infinity`.
*/
maxZ: number;

/**
* Creates a new instance of TransformControls.
* @param camera The camera of the rendered scene.
Expand Down

0 comments on commit 85f9126

Please sign in to comment.