Dies ist das Repository meines kleinen Portfolios.
Im Hintergrund läuft eine Planetensimulation, geschrieben in JavaScript und Three.js.
Die zu sehenden Texturen stammen von:
https://www.solarsystemscope.com/textures/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
684 B
51 lines
684 B
import { InputNode } from '../core/InputNode.js'; |
|
|
|
class BoolNode extends InputNode { |
|
|
|
constructor( value ) { |
|
|
|
super( 'b' ); |
|
|
|
this.value = Boolean( value ); |
|
|
|
} |
|
|
|
generateReadonly( builder, output, uuid, type/*, ns, needsUpdate */ ) { |
|
|
|
return builder.format( this.value, type, output ); |
|
|
|
} |
|
|
|
copy( source ) { |
|
|
|
super.copy( source ); |
|
|
|
this.value = source.value; |
|
|
|
return this; |
|
|
|
} |
|
|
|
toJSON( meta ) { |
|
|
|
let data = this.getJSONNode( meta ); |
|
|
|
if ( ! data ) { |
|
|
|
data = this.createJSONNode( meta ); |
|
|
|
data.value = this.value; |
|
|
|
if ( this.readonly === true ) data.readonly = true; |
|
|
|
} |
|
|
|
return data; |
|
|
|
} |
|
|
|
} |
|
|
|
BoolNode.prototype.nodeType = 'Bool'; |
|
|
|
export { BoolNode };
|
|
|