File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 fix scale (use world unit)
1818 </ label >
1919 < br >
20+ < label >
21+ < input type ="checkbox " id ="useRapier2d " checked >
22+ use rapier2d
23+ </ label >
24+ < br >
2025 < label >
2126 < input type ="checkbox " id ="fixScalePixel ">
2227 fix scale (use pixel unit)
97102 const fixScalePixel = document . getElementById ( 'fixScalePixel' ) . checked ;
98103 const fixFixture = document . getElementById ( 'fixFixture' ) . checked ;
99104 const moveUpHalfDepth = document . getElementById ( 'moveUpHalfDepth' ) . checked ;
100-
105+ const useRapier2d = document . getElementById ( 'useRapier2d' ) . checked ;
101106 const reader = new FileReader ( ) ;
102107
103108 const { fixScale, removeUnwantedProperties, fixFixture : fixFixtureFn } = window . fixes ;
118123 prefixParts . push ( 'fixed_scale(pixel_unit)' ) ;
119124 }
120125
126+ if ( useRapier2d ) {
127+ obj . physicsEngine = 'rapier2d' ;
128+ obj . clientPhysicsEngine = 'rapier2d' ;
129+ }
130+
121131 // Apply fixture fix if checked
122132 if ( fixFixture ) {
123133 obj = fixFixtureFn ( obj , moveUpHalfDepth ) ;
You can’t perform that action at this time.
0 commit comments