* Constructs a new view helper. * * @param {Camera} camera - The camera whose transformation should be visualized. * @param {HTMLElement} [domElement] - The DOM element that is used to render the view.
( camera, domElement )
| 37 | * @param {HTMLElement} [domElement] - The DOM element that is used to render the view. |
| 38 | */ |
| 39 | constructor( camera, domElement ) { |
| 40 | |
| 41 | super(); |
| 42 | |
| 43 | /** |
| 44 | * This flag can be used for type testing. |
| 45 | * |
| 46 | * @type {boolean} |
| 47 | * @readonly |
| 48 | * @default true |
| 49 | */ |
| 50 | this.isViewHelper = true; |
| 51 | |
| 52 | /** |
| 53 | * The camera whose transformation is visualized. It can be reassigned at |
| 54 | * any time to rebind the helper to a different camera. |
| 55 | * |
| 56 | * @type {Camera} |
| 57 | */ |
| 58 | this.camera = camera; |
| 59 | |
| 60 | /** |
| 61 | * Whether the helper is currently animating or not. |
| 62 | * |
| 63 | * @type {boolean} |
| 64 | * @readonly |
| 65 | * @default false |
| 66 | */ |
| 67 | this.animating = false; |
| 68 | |
| 69 | /** |
| 70 | * The helper's center point. |
| 71 | * |
| 72 | * @type {Vector3} |
| 73 | */ |
| 74 | this.center = new Vector3(); |
| 75 | |
| 76 | /** |
| 77 | * Controls the position of the helper in the viewport. |
| 78 | * Use `top`/`bottom` for vertical positioning and `left`/`right` for horizontal. |
| 79 | * If `left` is `null`, `right` is used. If `top` is `null`, `bottom` is used. |
| 80 | * |
| 81 | * @type {{top: number|null, right: number, bottom: number, left: number|null}} |
| 82 | */ |
| 83 | this.location = { |
| 84 | top: null, |
| 85 | right: 0, |
| 86 | bottom: 0, |
| 87 | left: null |
| 88 | }; |
| 89 | |
| 90 | const color1 = new Color( '#ff4466' ); |
| 91 | const color2 = new Color( '#88ff44' ); |
| 92 | const color3 = new Color( '#4488ff' ); |
| 93 | const color4 = new Color( '#000000' ); |
| 94 | |
| 95 | const options = {}; |
| 96 |
nothing calls this directly
no test coverage detected