import type { ComponentTypeEnum } from '../../definitions/ComponentType'; import { type CompositionTypeEnum } from '../../definitions/CompositionType'; import type { Engine } from '../../system/Engine'; import { AbstractShaderNode } from '../core/AbstractShaderNode'; import { Socket } from '../core/Socket'; /** * A shader node that computes the sine function of its input value. * This node accepts a single input value and outputs the sine of that value. * The computation is performed in shader code (GLSL/WGSL) and supports * scalar, vector2, vector3, and vector4 input types. * * @example * ```typescript * // Create a sine node for a scalar float value * const sinNode = new SinShaderNode(CompositionType.Scalar, ComponentType.Float); * * // Create a sine node for a vec3 float value * const sinVec3Node = new SinShaderNode(CompositionType.Vec3, ComponentType.Float); * ``` */ export declare class SinShaderNode extends AbstractShaderNode { /** * Creates a new SinShaderNode instance with the specified composition and component types. * The node will have one input socket named 'value' and one output socket named 'outValue', * both configured with the provided types. * * @param compositionType - The composition type (Scalar, Vec2, Vec3, Vec4) that defines the structure of the input/output data * @param componentType - The component type (Float, Int, etc.) that defines the data type of each component */ constructor(compositionType: CompositionTypeEnum, componentType: ComponentTypeEnum); /** * Gets the input socket for the value to compute the sine of. * This is the socket where the input value should be connected. * * @returns The input socket that accepts the value for sine computation */ getSocketInputValue(): Socket; /** * Gets the output socket that provides the computed sine value. * This socket outputs the result of the sine function applied to the input value. * * @returns The output socket containing the sine computation result */ getSocketOutput(): Socket; /** * Gets the appropriate shader function name based on the current rendering approach and input type. * For WebGPU, returns a type-specific function name (e.g., '_sinF32', '_sinVec2f'). * For WebGL, returns the base function name '_sin'. * * This method ensures that the correct shader function is called based on the * composition type and the target graphics API. * * @param engine - The engine instance * @returns The shader function name to use in the generated shader code * @throws {Error} Throws an error if the composition type is not implemented for WebGPU */ getShaderFunctionNameDerivative(engine: Engine): string; }