Kaynağa Gözat

Fix line helpers

master
Palash Bansal 11 ay önce
ebeveyn
işleme
6eee8f73e9
No account linked to committer's email address

+ 2
- 1
src/three/widgets/CameraHelper2.ts Dosyayı Görüntüle

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,

+ 3
- 2
src/three/widgets/DirectionalLightHelper2.ts Dosyayı Görüntüle



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.

+ 3
- 2
src/three/widgets/PointLightHelper2.ts Dosyayı Görüntüle



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()

+ 3
- 2
src/three/widgets/SpotLightHelper2.ts Dosyayı Görüntüle



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()
} }

Loading…
İptal
Kaydet