Sha256: 9f3981cf2124cf600cafe8f7355e5610560b9b866df2a02f26a701fade0016b5

Contents?: true

Size: 787 Bytes

Versions: 11

Compression:

Stored size: 787 Bytes

Contents

Jax.Material.<%=class_name%> = Jax.Class.create(Jax.Material, {
  initialize: function($super, options) {
    options = Jax.Util.normalizeOptions(options, {
      shader: "<%=file_name%>",

      // You can specify default options (see +manifest.yml+) here.
    });

    $super(options);
  },
  
  setAttributes: function(context, mesh, options, vars) {
    vars.set({
      mvMatrix: context.getModelViewMatrix(),
      nMatrix:  context.getNormalMatrix(),
      pMatrix:  context.getProjectionmatrix(),
      
      VERTEX_POSITION:  mesh.getVertexBuffer(),
      VERTEX_COLOR:     mesh.getColorBuffer(),
      VERTEX_NORMAL:    mesh.getNormalBuffer(),
      VERTEX_TEXCOORDS: mesh.getTextureCoordsBuffer()
    });
      
    // vars.texture('Texture', this.texture, context);
  }
});

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
jax-2.0.12 templates/shader_material.js.erb
jax-2.0.11 templates/shader_material.js.erb
jax-2.0.10 templates/shader_material.js.erb
jax-2.0.9 templates/shader_material.js.erb
jax-2.0.8 templates/shader_material.js.erb
jax-2.0.7 templates/shader_material.js.erb
jax-2.0.6 templates/shader_material.js.erb
jax-2.0.5 templates/shader_material.js.erb
jax-2.0.4 templates/shader_material.js.erb
jax-2.0.3 templates/shader_material.js.erb
jax-2.0.2 templates/shader_material.js.erb