ソースを参照

Fix line helpers

master
Palash Bansal 11ヶ月前
コミット
6eee8f73e9
コミッターのメールアドレスに関連付けられたアカウントが存在しません

+ 2
- 1
src/three/widgets/CameraHelper2.ts ファイルの表示

@@ -32,8 +32,9 @@ export class CameraHelper2 extends ACameraHelperWidget {
const geometry = new LineSegmentsGeometry()
const material = new LineMaterial2({
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,
worldUnits: false,

dashed: false,
alphaToCoverage: true,

+ 3
- 2
src/three/widgets/DirectionalLightHelper2.ts ファイルの表示

@@ -32,8 +32,9 @@ export class DirectionalLightHelper2 extends ALightHelperWidget {

this.material = new LineMaterial2({
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,
worldUnits: false,

dashed: false,
alphaToCoverage: true,
@@ -96,7 +97,7 @@ export class DirectionalLightHelper2 extends ALightHelperWidget {
this.lightPlane.material = this.material
this.targetLine.material = this.material
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.scale.z = this.light.intensity / 3.

+ 3
- 2
src/three/widgets/PointLightHelper2.ts ファイルの表示

@@ -30,8 +30,9 @@ export class PointLightHelper2 extends ALightHelperWidget {

this.material = new LineMaterial2({
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,
worldUnits: false,

dashed: false,
alphaToCoverage: true,
@@ -70,7 +71,7 @@ export class PointLightHelper2 extends ALightHelperWidget {
if (!this.light || !this.lightSphere) return

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)

super.update()

+ 3
- 2
src/three/widgets/SpotLightHelper2.ts ファイルの表示

@@ -47,8 +47,9 @@ export class SpotLightHelper2 extends ALightHelperWidget {

this.material = new LineMaterial2({
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,
worldUnits: false,

dashed: false,
alphaToCoverage: true,
@@ -100,7 +101,7 @@ export class SpotLightHelper2 extends ALightHelperWidget {
this.cone.lookAt(this._v1)

this.material.color.set(this.color ?? this.light.color)
this.material.linewidth = this.lineWidth * 0.001
this.material.linewidth = this.lineWidth

super.update()
}

読み込み中…
キャンセル
保存