Sha256: 2402f46ab43f189973fdc0246a8dacb179004be35d6b6ac6eee672e963a7d4f4
Contents?: true
Size: 667 Bytes
Versions: 13
Compression:
Stored size: 667 Bytes
Contents
Jax.Material.Texture = Jax.Class.create(Jax.Material, { initialize: function($super, texture) { this.texture = Jax.Material.Texture.normalizeTexture(texture); $super({shader:"texture"}); }, setVariables: function(context, mesh, options, vars) { vars.texture('Texture', this.texture, context); vars.set('TextureScaleX', this.texture.options.scale_x || this.texture.options.scale || 1); vars.set('TextureScaleY', this.texture.options.scale_y || this.texture.options.scale || 1); } }); Jax.Material.Texture.normalizeTexture = function(tex) { if (tex.isKindOf && tex.isKindOf(Jax.Texture)) return tex; return new Jax.Texture(tex); };
Version data entries
13 entries across 13 versions & 1 rubygems