move render function into graphics.js
adding resource objects