Sha256: f06c111b5ffe32f75d8cf0cd244c8fe41b10a919e1df8e759722449bcfb5da71

Contents?: true

Size: 724 Bytes

Versions: 11

Compression:

Stored size: 724 Bytes

Contents

Jax.Material['<%=class_name%>'] = Jax.Class.create Jax.Material,
  initialize: ($super, options) ->
    options = Jax.Util.normalizeOptions options,
      # You can specify default options (see +manifest.yml+) here.
      shader: "<%=file_name%>"
    
    $super options
  
  setVariables: (context, mesh, options, vars) ->
    # vars.texture 'Texture', this.texture, context

    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()

Version data entries

11 entries across 11 versions & 1 rubygems

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