@@ -11,26 +11,26 @@ import { injectBox, injectPlane } from 'angular-three-cannon/services';
1111 standalone : true ,
1212 template : `
1313 <ngt-mesh [ref]="planeApi.ref" [receiveShadow]="true">
14- <ngt-plane-geometry *args="[1000, 1000] " />
14+ <ngt-plane-geometry *args="planeArgs " />
1515 <ngt-mesh-standard-material color="#171717" />
1616 </ngt-mesh>
1717 ` ,
1818 imports : [ NgtArgs ] ,
1919 schemas : [ CUSTOM_ELEMENTS_SCHEMA ] ,
2020} )
2121export class Plane {
22- Math = Math ;
2322 @Input ( ) position : Triplet = [ 0 , 0 , 0 ] ;
23+ planeArgs = [ 1000 , 1000 ] ;
2424
25- planeApi = injectPlane ( ( ) => ( { mass : 0 , position : this . position , args : [ 1000 , 1000 ] } ) ) ;
25+ planeApi = injectPlane ( ( ) => ( { mass : 0 , position : this . position , args : this . planeArgs } ) ) ;
2626}
2727
2828@Component ( {
2929 selector : 'app-box' ,
3030 standalone : true ,
3131 template : `
3232 <ngt-mesh [ref]="boxApi.ref" [receiveShadow]="true" [castShadow]="true">
33- <ngt-box-geometry *args="[2, 2, 2] " />
33+ <ngt-box-geometry *args="boxArgs " />
3434 <ngt-mesh-standard-material [roughness]="0.5" color="#575757" />
3535 </ngt-mesh>
3636 ` ,
@@ -39,8 +39,9 @@ export class Plane {
3939} )
4040export class Box {
4141 @Input ( ) position : Triplet = [ 0 , 0 , 0 ] ;
42+ boxArgs : Triplet = [ 2 , 2 , 2 ] ;
4243
43- boxApi = injectBox ( ( ) => ( { mass : 10000 , position : this . position , args : [ 2 , 2 , 2 ] } ) ) ;
44+ boxApi = injectBox ( ( ) => ( { mass : 10000 , position : this . position , args : this . boxArgs } ) ) ;
4445}
4546
4647@Component ( {
0 commit comments