changeset 1703:b46f6977168b

start pixijs on timeline Ignore-this: 51ad366ddfeae2af2b621d714ff1f9c1
author Drew Perttula <drewp@bigasterisk.com>
date Sun, 29 Apr 2018 12:22:36 +0000
parents c8543026d609
children 0f8ea7c08f33
files light9/web/lib/bower.json light9/web/timeline/timeline.coffee makefile package.json
diffstat 4 files changed, 29 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/light9/web/lib/bower.json	Sun Apr 29 12:21:39 2018 +0000
+++ b/light9/web/lib/bower.json	Sun Apr 29 12:22:36 2018 +0000
@@ -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"
   }
 }
--- a/light9/web/timeline/timeline.coffee	Sun Apr 29 12:21:39 2018 +0000
+++ b/light9/web/timeline/timeline.coffee	Sun Apr 29 12:22:36 2018 +0000
@@ -280,6 +280,27 @@
       @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)
--- a/makefile	Sun Apr 29 12:21:39 2018 +0000
+++ b/makefile	Sun Apr 29 12:22:36 2018 +0000
@@ -51,7 +51,11 @@
 
 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
--- a/package.json	Sun Apr 29 12:21:39 2018 +0000
+++ b/package.json	Sun Apr 29 12:22:36 2018 +0000
@@ -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"