* Constructs a new 3D object.
()
| 67 | * Constructs a new 3D object. |
| 68 | */ |
| 69 | constructor() { |
| 70 | |
| 71 | super(); |
| 72 | |
| 73 | /** |
| 74 | * This flag can be used for type testing. |
| 75 | * |
| 76 | * @type {boolean} |
| 77 | * @readonly |
| 78 | * @default true |
| 79 | */ |
| 80 | this.isObject3D = true; |
| 81 | |
| 82 | /** |
| 83 | * The ID of the 3D object. |
| 84 | * |
| 85 | * @name Object3D#id |
| 86 | * @type {number} |
| 87 | * @readonly |
| 88 | */ |
| 89 | Object.defineProperty( this, 'id', { value: _object3DId ++ } ); |
| 90 | |
| 91 | /** |
| 92 | * The UUID of the 3D object. |
| 93 | * |
| 94 | * @type {string} |
| 95 | * @readonly |
| 96 | */ |
| 97 | this.uuid = generateUUID(); |
| 98 | |
| 99 | /** |
| 100 | * The name of the 3D object. |
| 101 | * |
| 102 | * @type {string} |
| 103 | */ |
| 104 | this.name = ''; |
| 105 | |
| 106 | /** |
| 107 | * The type property is used for detecting the object type |
| 108 | * in context of serialization/deserialization. |
| 109 | * |
| 110 | * @type {string} |
| 111 | * @readonly |
| 112 | */ |
| 113 | this.type = 'Object3D'; |
| 114 | |
| 115 | /** |
| 116 | * A reference to the parent object. |
| 117 | * |
| 118 | * @type {?Object3D} |
| 119 | * @default null |
| 120 | */ |
| 121 | this.parent = null; |
| 122 | |
| 123 | /** |
| 124 | * An array holding the child 3D objects of this instance. |
| 125 | * |
| 126 | * @type {Array<Object3D>} |
nothing calls this directly
no test coverage detected