function makeKineticCanvas(){ var mainCanvas = new Kinetic.Stage({ container: 'kineticCanvas', width: $('#kineticCanvas').width(), height: $('#kineticCanvas').height() }); return mainCanvas; } 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'; }
# | 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/drawFuncs.js | |||||
#3 | 8354 | Joe Robinson |
Added source files. Use 'npm install' to get necessary node_modules (socket.io, prettyjson, express). |
||
#2 | 8351 | Joe Robinson | Delete old file system for project. | ||
#1 | 8339 | Joe Robinson | Added early file versions. |