Skip to content

Conversation

@sunag
Copy link
Collaborator

@sunag sunag commented Mar 29, 2023

Description

Convert common math objects to nodes if used in parameters.

Example 1

const randomPosition = range( new THREE.Vector3( - 2, 3, - 2 ), new THREE.Vector3( 2, 5, 2 ) );

//  is the same that

const randomPosition = range( vec3( - 2, 3, - 2 ), vec3( 2, 5, 2 ) );

Example 2

const randomColors = range( new THREE.Color( 0x000000 ), new THREE.Color( 0xFFFFFF ) );

//  is the same that

const randomColors = range( color( 0x000000 ), color( 0xFFFFFF ) );

@sunag sunag added this to the r151 milestone Mar 29, 2023
@sunag sunag merged commit 5d3ed22 into mrdoob:dev Mar 29, 2023
@sunag sunag deleted the dev-convert-native-to-nodes-arguments branch March 29, 2023 11:04
@Methuselah96 Methuselah96 mentioned this pull request Apr 25, 2023
37 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant