Skip to content

format

typescript
Bounds.max

class: Bounds

description

The maximum value of the bounding box (always equal to the sum of the center and the extents of the bounding box).

This method is used to get the position of the bounding box in order to fit game objects or elements in the scene.

parameter

param_nametypedescription

reture

typedescription
Vector3The maximum value of the bounding box.

code example

typescript
let bounds = new Bounds(new Vector3(1, 1, 1), new Vector3(1, 1, 1));
let max = bounds.max;//Get max
bounds.max = new Vector3(2, 2, 2);//Set max