| const geometry = new LineSegmentsGeometry() | const geometry = new LineSegmentsGeometry() | ||||
| const material = new LineMaterial2({ | const material = new LineMaterial2({ | ||||
| color: 0xffffff, | color: 0xffffff, | ||||
| linewidth: 0.005, // in world units with size attenuation, pixels otherwise | |||||
| linewidth: 5, // in world units with size attenuation, pixels otherwise | |||||
| vertexColors: true, | vertexColors: true, | ||||
| worldUnits: false, | |||||
| dashed: false, | dashed: false, | ||||
| alphaToCoverage: true, | alphaToCoverage: true, |
| this.material = new LineMaterial2({ | this.material = new LineMaterial2({ | ||||
| color: 0xff0000, | color: 0xff0000, | ||||
| linewidth: 0.005, // in world units with size attenuation, pixels otherwise | |||||
| linewidth: 5, // in world units with size attenuation, pixels otherwise | |||||
| vertexColors: false, | vertexColors: false, | ||||
| worldUnits: false, | |||||
| dashed: false, | dashed: false, | ||||
| alphaToCoverage: true, | alphaToCoverage: true, | ||||
| this.lightPlane.material = this.material | this.lightPlane.material = this.material | ||||
| this.targetLine.material = this.material | this.targetLine.material = this.material | ||||
| this.material.color.set(this.color ?? this.light.color) | this.material.color.set(this.color ?? this.light.color) | ||||
| this.material.linewidth = this.lineWidth * 0.001 | |||||
| this.material.linewidth = this.lineWidth | |||||
| this.targetLine.lookAt(this._v2) | this.targetLine.lookAt(this._v2) | ||||
| this.targetLine.scale.z = this.light.intensity / 3. | this.targetLine.scale.z = this.light.intensity / 3. |
| this.material = new LineMaterial2({ | this.material = new LineMaterial2({ | ||||
| color: 0xff0000, | color: 0xff0000, | ||||
| linewidth: 0.005, // in world units with size attenuation, pixels otherwise | |||||
| linewidth: 5, // in world units with size attenuation, pixels otherwise | |||||
| vertexColors: false, | vertexColors: false, | ||||
| worldUnits: false, | |||||
| dashed: false, | dashed: false, | ||||
| alphaToCoverage: true, | alphaToCoverage: true, | ||||
| if (!this.light || !this.lightSphere) return | if (!this.light || !this.lightSphere) return | ||||
| this.material.color.set(this.color ?? this.light.color) | this.material.color.set(this.color ?? this.light.color) | ||||
| this.material.linewidth = this.lineWidth * 0.001 | |||||
| this.material.linewidth = this.lineWidth | |||||
| this.lightSphere.scale.setScalar(this.size) | this.lightSphere.scale.setScalar(this.size) | ||||
| super.update() | super.update() |
| this.material = new LineMaterial2({ | this.material = new LineMaterial2({ | ||||
| color: 0xff0000, | color: 0xff0000, | ||||
| linewidth: 0.005, // in world units with size attenuation, pixels otherwise | |||||
| linewidth: 5, // in world units with size attenuation, pixels otherwise | |||||
| vertexColors: false, | vertexColors: false, | ||||
| worldUnits: false, | |||||
| dashed: false, | dashed: false, | ||||
| alphaToCoverage: true, | alphaToCoverage: true, | ||||
| this.cone.lookAt(this._v1) | this.cone.lookAt(this._v1) | ||||
| this.material.color.set(this.color ?? this.light.color) | this.material.color.set(this.color ?? this.light.color) | ||||
| this.material.linewidth = this.lineWidth * 0.001 | |||||
| this.material.linewidth = this.lineWidth | |||||
| super.update() | super.update() | ||||
| } | } |