Sha256: ae419ac2d8e64bc73ed533446505ffcd31e647afb45401b094625b4f58bd92e1
Contents?: true
Size: 937 Bytes
Versions: 2
Compression:
Stored size: 937 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 setUniforms: ($super, context, mesh, options, uniforms) -> $super context, mesh, options, uniforms uniforms.set 'mvMatrix', context.getModelViewMatrix() uniforms.set 'nMatrix', context.getNormalMatrix() uniforms.set 'pMatrix', context.getProjectionMatrix() # uniforms.texture 'Texture', this.texture, context setAttributes: ($super, context, mesh, options, attributes) -> attributes.set 'VERTEX_POSITION', mesh.getVertexBuffer() attributes.set 'VERTEX_COLOR', mesh.getColorBuffer() attributes.set 'VERTEX_NORMAL', mesh.getNormalBuffer() attributes.set 'VERTEX_TEXCOORDS', mesh.getTextureCoordsBuffer()
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
jax-2.0.1 | templates/shader_material.js.coffee.erb |
jax-2.0.0 | templates/shader_material.js.coffee.erb |