function drawObjectTest(kineticCanvas, scale){ var layer1 = new Kinetic.Layer(); var layer2 = new Kinetic.Layer(); var imageObj = new Image(); imageObj.onload = function() { var testImage = new Kinetic.Image( { x: kineticCanvas.getWidth() / 2, y: kineticCanvas.getHeight() / 2, image: imageObj, width: 256 * scale, height: 256 * scale }); testImage.setOffset({ x: testImage.getWidth() / 2, y: testImage.getHeight() / 2 }); layer1.add(testImage); kineticCanvas.add(layer1); }; imageObj.src = 'main/img/databaseIcon1.png'; var imageObj2 = new Image(); imageObj2.onload = function() { var testImage2 = new Kinetic.Image( { x: kineticCanvas.getWidth() * 3 / 4, y: kineticCanvas.getHeight() / 2, image: imageObj, width: 256 * scale, height: 256 * scale }); testImage2.setOffset({ x: testImage2.getWidth() / 2, y: testImage2.getHeight() / 2 }); layer2.add(testImage2); kineticCanvas.add(layer2); }; imageObj2.src = 'main/img/databaseIcon1.png'; } function createBackboneTestApp(){ var Watcher = { Collections: {}, Models: {}, Views: {} } Watcher.Router = new (Backbone.Router.extend({ }))(); return Watcher; } function createKineticLayerView(Stage){ }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 8356 | Joe Robinson |
Refactored files, old service version can be deleted. Improved base service structure. |
||
//guest/joe_robinson/Watcher/main/scripts/test.js | |||||
#1 | 8354 | Joe Robinson |
Added source files. Use 'npm install' to get necessary node_modules (socket.io, prettyjson, express). |