mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-15 22:58:31 +02:00
add examples for setting model scale and translation
This commit is contained in:
parent
2f14b265a8
commit
758c1e0817
1 changed files with 15 additions and 2 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue