From 758c1e0817e167aa6298b53375bba552e1ef6c39 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Tue, 4 Feb 2014 20:28:11 -0800 Subject: [PATCH] add examples for setting model scale and translation --- examples/particleModelExample.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/examples/particleModelExample.js b/examples/particleModelExample.js index e95cc0c2bf..2f36445d1a 100644 --- a/examples/particleModelExample.js +++ b/examples/particleModelExample.js @@ -11,7 +11,7 @@ var count = 0; var stopAfter = 100; -var modelProperties = { +var modelPropertiesA = { position: { x: 1, y: 1, z: 1 }, velocity: { x: 0.5, y: 0, z: 0.5 }, gravity: { x: 0, y: 0, z: 0 }, @@ -21,6 +21,18 @@ var modelProperties = { lifetime: 20 }; +var modelPropertiesB = { + position: { x: 1, y: 1.5, z: 1 }, + velocity: { x: 0.5, y: 0, z: 0.5 }, + gravity: { x: 0, y: 0, z: 0 }, + damping: 0, + radius : 0.25, + modelURL: "https://s3-us-west-1.amazonaws.com/highfidelity-public/meshes/newInvader16x16.svo", + modelScale: 450, + modelTranslation: { x: -1.3, y: -1.3, z: -1.3 }, + lifetime: 20 +}; + var ballProperties = { position: { x: 1, y: 0.5, z: 1 }, velocity: { x: 0.5, y: 0, z: 0.5 }, @@ -31,7 +43,8 @@ var ballProperties = { lifetime: 20 }; -var modelParticleID = Particles.addParticle(modelProperties); +var modelAParticleID = Particles.addParticle(modelPropertiesA); +var modelBParticleID = Particles.addParticle(modelPropertiesB); var ballParticleID = Particles.addParticle(ballProperties); function endAfterAWhile() {