# HG changeset patch # User Drew Perttula # Date 2018-04-29 12:22:36 # Node ID b46f6977168b066bebcf1a6558566ac70d2e0f6e # Parent c8543026d6097b452702916bafbd63325c5c4ea8 start pixijs on timeline Ignore-this: 51ad366ddfeae2af2b621d714ff1f9c1 diff --git a/light9/web/lib/bower.json b/light9/web/lib/bower.json --- a/light9/web/lib/bower.json +++ b/light9/web/lib/bower.json @@ -38,6 +38,7 @@ "iron-resizable-behavior": "^2.1.0", "polymer": "2.6.0", "paper-slider": "~2.0.6", - "iron-ajax": "~2.1.3" + "iron-ajax": "~2.1.3", + "paper-styles": "^2.1.0" } } diff --git a/light9/web/timeline/timeline.coffee b/light9/web/timeline/timeline.coffee --- a/light9/web/timeline/timeline.coffee +++ b/light9/web/timeline/timeline.coffee @@ -280,6 +280,27 @@ Polymer @zoomFlattened = ko.toJS(@zoom) ko.computed(updateZoomFlattened.bind(@)) ready: -> + + stage = new PIXI.Container(); + + renderer = PIXI.autoDetectRenderer(300,200, { + backgroundColor: 0xff6060, + }); + + @$.rows.appendChild(renderer.view); + graphics = new PIXI.Graphics(); + + graphics.beginFill(0xFF3300); + graphics.lineStyle(4, 0xffd900, 1); + + graphics.moveTo(50,50); + graphics.lineTo(250, 50); + graphics.lineTo(100, 100); + graphics.lineTo(50, 50); + graphics.endFill(); + + stage.addChild(graphics); + renderer.render(stage); onGraph: -> U = (x) => @graph.Uri(x) diff --git a/makefile b/makefile --- a/makefile +++ b/makefile @@ -51,7 +51,11 @@ bin/node: bower: node_modules/bower/bin/bower bin/node cd light9/web/lib; nodejs ../../../node_modules/bower/bin/bower install + # pixi is fetched with npm + ln -s ../../../node_modules/pixi.js light9/web/lib/ + cd light9/web/lib/N3.js; npm install; PATH=../../../../bin:$(PATH) npm run browser + cd light9/web/lib/d3; PATH=../../../../bin:$(PATH) npm install bin/ascoltami2: gst_packages link_to_sys_packages diff --git a/package.json b/package.json --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "dependencies": { "bower": "^1.8.0", "chai": "^3.5.0", - "mocha": "^2.5.3" + "mocha": "^2.5.3", + "pixi.js": "^4.7.3" }, "devDependencies": { "mocha": "^2.5.3"