Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSL: return, Continue, Break - 1/2 #27726

Merged
merged 1 commit into from
Feb 12, 2024
Merged

TSL: return, Continue, Break - 1/2 #27726

merged 1 commit into from
Feb 12, 2024

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented Feb 11, 2024

Related issue: #27542, #27542 (comment), #27668 (comment)

Description

  • return statement in TSL functions, if the layout is applied.
  • Continue, Break statements in the current loop.
  • return statement in TSL functions, if the layout is not applied.
  • Continue, Break statements in a selected loop.

/cc @RenaudRohlinger @Mugen87 @LeviPesin

TSL:

const absolute = tslFn( ( { value } ) => {

	If( value.lessThan( 0 ), () => {

		return value.negate();

	} );

	return value;

} ).setLayout( {
	name: 'absolute',
	type: 'float',
	inputs: [
		{ name: 'value', type: 'float' },
	]
} );
@sunag sunag added this to the r162 milestone Feb 11, 2024
@sunag sunag marked this pull request as ready for review February 12, 2024 15:25
@sunag sunag merged commit e1c78d4 into mrdoob:dev Feb 12, 2024
11 checks passed
@sunag sunag deleted the dev-if-return branch February 12, 2024 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant