44 Component ,
55 ElementRef ,
66 afterNextRender ,
7+ booleanAttribute ,
78 effect ,
89 input ,
910 output ,
@@ -25,7 +26,7 @@ import { Group } from 'three';
2526 <ngt-plane-geometry *args="[8, 8]" />
2627 <ngt-mesh-basic-material color="#ffb385" />
2728 </ngt-mesh>
28- <ngt-mesh [ receiveShadow]="true" >
29+ <ngt-mesh receiveShadow>
2930 <ngt-plane-geometry *args="[8, 8]" />
3031 <ngt-shadow-material color="lightsalmon" />
3132 </ngt-mesh>
@@ -48,11 +49,11 @@ export class Plane {
4849 selector : 'app-compound-body' ,
4950 template : `
5051 <ngt-group #group>
51- <ngt-mesh [ castShadow]="true" >
52+ <ngt-mesh castShadow>
5253 <ngt-box-geometry *args="boxSize" />
5354 <ngt-mesh-normal-material />
5455 </ngt-mesh>
55- <ngt-mesh [ castShadow]="true" [position]="[1, 0, 0]">
56+ <ngt-mesh castShadow [position]="[1, 0, 0]">
5657 <ngt-sphere-geometry *args="[sphereRadius, 16, 16]" />
5758 <ngt-mesh-normal-material />
5859 </ngt-mesh>
@@ -68,7 +69,7 @@ export class CompoundBody {
6869
6970 position = input < Triplet > ( [ 0 , 0 , 0 ] ) ;
7071 rotation = input < Triplet > ( [ 0 , 0 , 0 ] ) ;
71- isTrigger = input ( false ) ;
72+ isTrigger = input ( false , { transform : booleanAttribute } ) ;
7273 mass = input ( 12 ) ;
7374
7475 positionChanged = output < Triplet > ( ) ;
@@ -111,7 +112,7 @@ export class CompoundBody {
111112 template : `
112113 <ngt-color attach="background" *args="['#f6d186']" />
113114 <ngt-hemisphere-light [intensity]="0.35" />
114- <ngt-spot-light [position]="[5, 5, 5]" [angle]="0.3" [penumbra]="1" [intensity]="2" [ castShadow]="true" >
115+ <ngt-spot-light [position]="[5, 5, 5]" [angle]="0.3" [penumbra]="1" [intensity]="2" castShadow>
115116 <ngt-vector2 *args="[1028, 1028]" attach="shadow.mapSize" />
116117 </ngt-spot-light>
117118
@@ -130,7 +131,7 @@ export class CompoundBody {
130131 }
131132
132133 @if (copy()) {
133- <app-compound-body [ isTrigger]="true" [mass]="0" [position]="position" [rotation]="rotation" />
134+ <app-compound-body isTrigger [mass]="0" [position]="position" [rotation]="rotation" />
134135 }
135136 </ngtc-physics>
136137 ` ,
0 commit comments