File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
src/components/components Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -41,8 +41,15 @@ export default class PropertyRow extends React.Component {
4141 props . componentname === 'material' &&
4242 ( props . name === 'envMap' || props . name === 'src' ) ;
4343 let type = props . schema . type ;
44- if ( props . componentname === 'animation' && props . name === 'loop' ) {
45- // fix wrong number type for animation loop property
44+ if (
45+ ( props . componentname === 'animation' ||
46+ props . componentname . startsWith ( 'animation__' ) ) &&
47+ props . name === 'loop'
48+ ) {
49+ // The loop property can be a boolean for an infinite loop or a number to set the number of iterations.
50+ // It's auto detected as number because the default value is 0, but for most use case we want an infinite loop
51+ // so we're forcing the type to boolean. In the future we could create a custom widget to allow user to choose
52+ // between infinite loop and number of iterations.
4653 type = 'boolean' ;
4754 }
4855
You can’t perform that action at this time.
0 commit comments