Skip to content

Support for vecN to vecN trigonometric functions #2046

@chamchi0809

Description

@chamchi0809

I think trigonometric functions(sin, cos, tan) type should be this

interface TriGFunction {
  (x: FloatOrNumber): Node<"float">;
  (x: Node<"vec2">): Node<"vec2">;
  (x: Node<"vec3">): Node<"vec3">;
  (x: Node<"vec4">): Node<"vec4">;
}

current one is this

export const sin: (x: FloatOrNumber) => Node<"float">;

cuz I think it's doing per-component operations for vectors

https://threejsroadmap.com/blog/10-noise-functions-for-threejs-tsl-shaders
in this article, he is using vec2 with sin node.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions