Docs for Version: 1.0a
Show:
Module: Resource

Shader class

Constructor

Shader

(
  • vertexSource
  • fragmentSource
  • addons
)

Parameters:

  • vertexSource String

    Source of vertex shader

  • fragmentSource String

    Source of fragment shader

  • addons String

    additional attributes

Item Index

Methods

draw

()

Draw with this shader

fromFile

(
  • vertexUrl
  • fragmentUrl
)

Loads shader from .fs files

Parameters:

  • vertexUrl String
  • fragmentUrl String

uniforms

(
  • uniforms
)

Set shader uniforms

Parameters:

  • uniforms Dict

    Dictionary of uniforms of shader