Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Port to pex-context using geom-builder #1

Open
vorg opened this issue Jan 5, 2018 · 0 comments
Open

Port to pex-context using geom-builder #1

vorg opened this issue Jan 5, 2018 · 0 comments

Comments

@vorg
Copy link
Member

vorg commented Jan 5, 2018

var axis = require('pex-helpers/axis')()
var solidColor = require('pex-materials/solid-color')

var drawAxis = {
  pipeline: ctx.pipeline({
    vert: solidColor.vert,
    frag: solidColor.frag
  }),
  attributes: {
    aPosition: ctx.vertexBuffer(axis.positions),
    aColors: ctx.vertexBuffer(axis.colors)
  },
  indices: ctx.indexBuffer(axis.cells),
  uniforms: {
    uProjectionMatrix: camera.projectionMatrix,
    uViewMatrix: camera.viewMatrix,    
    uModelMatrix: mat4.translate(mat4.create(), [1, 0, 0])
  }
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant