UNPKG

@polygonjs/polygonjs

Version:

node-based WebGL 3D engine https://polygonjs.com

40 lines (39 loc) 1.52 kB
"use strict"; import { GlobalsJsBaseController } from "./_Base"; import { GlobalsJsBaseControllerType } from "./Common"; const VARIABLE_CONFIG_DEFAULT_BY_NAME = { position: "vec3( position )" }; export class GlobalsJsGeometryHandler extends GlobalsJsBaseController { type() { return GlobalsJsBaseControllerType.GEOMETRY; } handleGlobalsNode(globals_node, output_name, linesController) { const connection_point = globals_node.io.outputs.namedOutputConnectionPointsByName(output_name); if (!connection_point) { return; } const jsType = connection_point.type(); this.handleGlobalVar(globals_node, output_name, jsType, linesController); } handleGlobalVar(globals_node, output_name, jsType, linesController) { } static variable_config_default(variable_name) { return VARIABLE_CONFIG_DEFAULT_BY_NAME[variable_name]; } variable_config_default(variable_name) { return GlobalsJsGeometryHandler.variable_config_default(variable_name); } // variable_config_required_definitions(variable_name:string):DefinitionBaseConfig[]{ // return null // } readAttribute(node, jsType, attribName, linesController) { return GlobalsJsGeometryHandler.readAttribute(node, jsType, attribName, linesController); } static readAttribute(node, jsType, attribName, linesController) { return void 0; } handle_attribute_node(node, jsType, attribName, linesController) { return GlobalsJsGeometryHandler.readAttribute(node, jsType, attribName, linesController); } }