BLUE
PHP 7.4.33
Path:
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/three/src/nodes/code
Run
Logout
Edit File
Size: 1.27 KB
Close
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/three/src/nodes/code/ExpressionNode.js
Text
Base64
import Node from '../core/Node.js'; import { nodeProxy } from '../tsl/TSLCore.js'; /** * This class can be used to implement basic expressions in shader code. * Basic examples for that are `return`, `continue` or `discard` statements. * * @augments Node */ class ExpressionNode extends Node { static get type() { return 'ExpressionNode'; } /** * Constructs a new expression node. * * @param {string} [snippet=''] - The native code snippet. * @param {string} [nodeType='void'] - The node type. */ constructor( snippet = '', nodeType = 'void' ) { super( nodeType ); /** * The native code snippet. * * @type {string} * @default '' */ this.snippet = snippet; } generate( builder, output ) { const type = this.getNodeType( builder ); const snippet = this.snippet; if ( type === 'void' ) { builder.addLineFlowCode( snippet, this ); } else { return builder.format( `( ${ snippet } )`, type, output ); } } } export default ExpressionNode; /** * TSL function for creating an expression node. * * @tsl * @function * @param {string} [snippet=''] - The native code snippet. * @param {string} [nodeType='void'] - The node type. * @returns {ExpressionNode} */ export const expression = /*@__PURE__*/ nodeProxy( ExpressionNode );
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 6
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
CodeNode.js
3.39 KB
lrw-r--r--
2025-03-28 11:04:38
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ExpressionNode.js
1.27 KB
lrw-r--r--
2025-03-28 11:04:38
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
FunctionCallNode.js
2.89 KB
lrw-r--r--
2025-03-28 11:04:38
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
FunctionNode.js
3.35 KB
lrw-r--r--
2025-03-28 11:04:38
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ScriptableNode.js
13.12 KB
lrw-r--r--
2025-03-28 11:04:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ScriptableValueNode.js
4.75 KB
lrw-r--r--
2025-03-28 11:04:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).