Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d03e5cd

Browse files
committed
refactor(soba/staging): use pierced props for spot light volumetric mesh
1 parent c2ad7a6 commit d03e5cd

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

libs/soba/staging/src/lib/spot-light.ts

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,18 @@ const defaultVolumetricMeshOptions: NgtsVolumetricMeshOptions = {
4646
selector: 'ngts-volumetric-mesh',
4747
template: `
4848
<ngt-mesh #mesh [geometry]="geometry()" [raycast]="null">
49-
<ngt-primitive *args="[material]" attach="material">
50-
<ngt-value attach="uniforms.opacity.value" [rawValue]="opacity()" />
51-
<ngt-value attach="uniforms.lightColor.value" [rawValue]="color()" />
52-
<ngt-value attach="uniforms.attenuation.value" [rawValue]="attenuation()" />
53-
<ngt-value attach="uniforms.anglePower.value" [rawValue]="anglePower()" />
54-
<ngt-value attach="uniforms.depth.value" [rawValue]="depthBuffer()" />
55-
<ngt-value attach="uniforms.cameraNear.value" [rawValue]="camera.near()" />
56-
<ngt-value attach="uniforms.cameraFar.value" [rawValue]="camera.far()" />
57-
<ngt-value
58-
attach="uniforms.resolution.value"
59-
[rawValue]="depthBuffer() ? [size.width() * dpr(), size.height() * dpr()] : [0, 0]"
60-
/>
61-
</ngt-primitive>
49+
<ngt-primitive
50+
*args="[material]"
51+
attach="material"
52+
[uniforms.opacity.value]="opacity()"
53+
[uniforms.lightColor.value]="color()"
54+
[uniforms.attenuation.value]="attenuation()"
55+
[uniforms.anglePower.value]="anglePower()"
56+
[uniforms.depth.value]="depthBuffer()"
57+
[uniforms.cameraNear.value]="camera.near()"
58+
[uniforms.cameraFar.value]="camera.far()"
59+
[uniforms.resolution.value]="depthBuffer() ? [size.width() * dpr(), size.height() * dpr()] : [0, 0]"
60+
/>
6261
</ngt-mesh>
6362
`,
6463
schemas: [CUSTOM_ELEMENTS_SCHEMA],

0 commit comments

Comments
 (0)