dynamicshader.com
  • Dynamic Shader
  • videos
  • code
  • Purchase
Picture
Picture
Note: The Dynamic Shader does not support the use of image sheets

----- Connect to the Dynamic Shader Plug-in -----


local dynamic_shader = require ("plugin.dynamic_shader")


----- Add objects  to the Dynamic Shader  -----

local object = display.newImageRect( "art/object.png", 200, 200 ) 
object.x = display.contentCenterX 
object.y = display.contentCenterY
------------------------------
object.shaderInfo = {
     map1 = "art/object.png",
     map2 = "art/object_n.png"
​}
------------------------------
dynamic_shader.addObject(object)



----- Add a light source  to the Dynamic Shader  -----

local light = display.newCircle( 350, 200, 50 )
local colorTable = {1, 1, 1}
light:setFillColor( colorTable )
dynamic_shader.setLightColor( colorTable )
dynamic_shader.addLight(light)



----- Start the Dynamic Shader  -----

dynamic_shader.start() 


----- build.settings  -----

settings =
{
      plugins =
      {
             ["plugin.dynamic_shader"] = { publisherId = "com.sporkfin"}
      },

​ }
Picture
Site powered by Weebly. Managed by pair Domains
  • Dynamic Shader
  • videos
  • code
  • Purchase