From 2acc88261fe950acfdd042a23e534259a09cded8 Mon Sep 17 00:00:00 2001 From: ericrius1 Date: Thu, 28 Jan 2016 13:14:36 -0800 Subject: [PATCH] added particles --- examples/edit.js | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/examples/edit.js b/examples/edit.js index 900eaf8e82..b68468c049 100644 --- a/examples/edit.js +++ b/examples/edit.js @@ -183,7 +183,8 @@ var toolBar = (function() { newTextButton, newWebButton, newZoneButton, - newPolyVoxButton; + newPolyVoxButton, + newParticleButton function initialize() { toolBar = new ToolBar(0, 0, ToolBar.VERTICAL, "highfidelity.edit.toolbar", function(windowDimensions, toolbar) { @@ -321,6 +322,20 @@ var toolBar = (function() { visible: false }); + newParticleButton = toolBar.addTool({ + imageURL: toolIconUrl + "polyvox.svg", + subImage: { + x: 0, + y: 0, + width: 256, + height: 256 + }, + width: toolWidth, + height: toolHeight, + alpha: 0.9, + visible: false + }); + that.setActive(false); } @@ -367,6 +382,7 @@ var toolBar = (function() { toolBar.showTool(newWebButton, doShow); toolBar.showTool(newZoneButton, doShow); toolBar.showTool(newPolyVoxButton, doShow); + toolBar.showTool(newParticleButton, doShow); }; var RESIZE_INTERVAL = 50; @@ -623,6 +639,11 @@ var toolBar = (function() { return true; } + if (newParticleButton === toolBar.clicked(clickedOverlay)) { + print("EBL: NEW PARTICLES"); + Script.load('particle_explorer/particleExplorer.js'); + } + return false; };