Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
avvy
three.js
Commits
3d07bacf
Unverified
Commit
3d07bacf
authored
1 year ago
by
sunag
Committed by
GitHub
1 year ago
Browse files
Options
Download
Email Patches
Plain Diff
CondNode: Fix duplicate conditional (#27828)
parent
d0b43f2f
master
dev
dev-162
dev-165
dev-169
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/jsm/nodes/math/CondNode.js
+10
-0
examples/jsm/nodes/math/CondNode.js
with
10 additions
and
0 deletions
+10
-0
examples/jsm/nodes/math/CondNode.js
View file @
3d07bacf
...
...
@@ -41,11 +41,21 @@ class CondNode extends Node {
const
type
=
this
.
getNodeType
(
builder
);
const
context
=
{
tempWrite
:
false
};
const
nodeData
=
builder
.
getDataFromNode
(
this
);
if
(
nodeData
.
nodeProperty
!==
undefined
)
{
return
nodeData
.
nodeProperty
;
}
const
{
ifNode
,
elseNode
}
=
this
;
const
needsOutput
=
output
!==
'
void
'
;
const
nodeProperty
=
needsOutput
?
property
(
type
).
build
(
builder
)
:
''
;
nodeData
.
nodeProperty
=
nodeProperty
;
const
nodeSnippet
=
contextNode
(
this
.
condNode
/*, context*/
).
build
(
builder
,
'
bool
'
);
builder
.
addFlowCode
(
`\n
${
builder
.
tab
}
if (
${
nodeSnippet
}
) {\n\n`
).
addFlowTab
();
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help