An open API service indexing awesome lists of open source software.

https://github.com/royalicing/goldenorb

Framework-agnostic web components
https://github.com/royalicing/goldenorb

Last synced: 5 months ago
JSON representation

Framework-agnostic web components

Awesome Lists containing this project

README

          

# GoldenOrb

**TODO: Add description**

## Installation

If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `golden_orb` to your list of dependencies in `mix.exs`:

```elixir
def deps do
[
{:golden_orb, "~> 0.1.0"}
]
end
```

Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at .

## WebGL2 Shaders

```elixir
defmodule ShaderA do
uniform r: Vec2, t: F32

uniform do
# uniform vec2 r;
@r Vec2
# uniform float t;
@t F32
end

#global do
# export do
# # out vec4 fragColor;
# @fragColor Vec4
# end
#end

main(frag: Vec4) :: Vec4 do
# vec2 st = gl_FragCoord.xy/r.xy;
st = @gl_FragCoord.xy / @r.xy
# st.x *= r.x/r.y;
st.x = st.x * (@r.x / @r.y)

# vec3 color = vec3(0.);
# local(color = vec3(0))
var!(color) = vec3(0)
color = vec3(st.x, st.y, abs(sin(t)))

vec4(color, 1.0)
end
end
```