Fix incorrect default entity properties in Create

This commit is contained in:
Ryan Huffman 2018-10-22 18:29:27 -07:00
parent a4adf2c716
commit d7dce456b2

View file

@ -299,7 +299,6 @@ function checkEditPermissionsAndUpdate() {
const DEFAULT_ENTITY_PROPERTIES = { const DEFAULT_ENTITY_PROPERTIES = {
All: { All: {
collisionless: true,
description: "", description: "",
rotation: { x: 0, y: 0, z: 0, w: 1 }, rotation: { x: 0, y: 0, z: 0, w: 1 },
collidesWith: "static,dynamic,kinematic,otherAvatar", collidesWith: "static,dynamic,kinematic,otherAvatar",
@ -344,12 +343,22 @@ const DEFAULT_ENTITY_PROPERTIES = {
}, },
Text: { Text: {
text: "Text", text: "Text",
dimensions: {
x: 0.65,
y: 0.3,
z: 0.01
},
textColor: { red: 255, green: 255, blue: 255 }, textColor: { red: 255, green: 255, blue: 255 },
backgroundColor: { red: 0, green: 0, blue: 0 }, backgroundColor: { red: 0, green: 0, blue: 0 },
lineHeight: 0.06, lineHeight: 0.06,
faceCamera: false, faceCamera: false,
}, },
Zone: { Zone: {
dimensions: {
x: 10,
y: 10,
z: 10
},
flyingAllowed: true, flyingAllowed: true,
ghostingAllowed: true, ghostingAllowed: true,
filter: "", filter: "",
@ -359,7 +368,8 @@ const DEFAULT_ENTITY_PROPERTIES = {
intensity: 1.0, intensity: 1.0,
direction: { direction: {
x: 0.0, x: 0.0,
y: Math.PI / 4, y: -0.707106769084930, // 45 degrees
z: 0.7071067690849304
}, },
castShadows: true castShadows: true
}, },
@ -376,7 +386,7 @@ const DEFAULT_ENTITY_PROPERTIES = {
hazeColor: { hazeColor: {
red: 128, red: 128,
green: 154, green: 154,
blue: 129 blue: 179
}, },
hazeBackgroundBlend: 0, hazeBackgroundBlend: 0,
hazeEnableGlare: false, hazeEnableGlare: false,
@ -389,7 +399,6 @@ const DEFAULT_ENTITY_PROPERTIES = {
bloomMode: "inherit" bloomMode: "inherit"
}, },
Model: { Model: {
modelURL: "",
collisionShape: "none", collisionShape: "none",
compoundShapeURL: "", compoundShapeURL: "",
animation: { animation: {
@ -413,9 +422,14 @@ const DEFAULT_ENTITY_PROPERTIES = {
shapeType: "box", shapeType: "box",
collisionless: true, collisionless: true,
modelURL: IMAGE_MODEL, modelURL: IMAGE_MODEL,
textures: JSON.stringify({ "tex.picture": DEFAULT_IMAGE }) textures: JSON.stringify({ "tex.picture": "" })
}, },
Web: { Web: {
dimensions: {
x: 1.6,
y: 0.9,
z: 0.01
},
sourceUrl: "https://highfidelity.com/", sourceUrl: "https://highfidelity.com/",
dpi: 30, dpi: 30,
}, },
@ -462,14 +476,15 @@ const DEFAULT_ENTITY_PROPERTIES = {
spinFinish: 0, spinFinish: 0,
spinSpread: 0, spinSpread: 0,
rotateWithEntity: false, rotateWithEntity: false,
azimuthStart: 0, polarStart: 0,
azimuthFinish: 0, polarFinish: 0,
polarStart: -Math.PI, azimuthStart: -Math.PI,
polarFinish: Math.PI azimuthFinish: Math.PI
}, },
Light: { Light: {
color: { red: 255, green: 255, blue: 255 }, color: { red: 255, green: 255, blue: 255 },
intensity: 5.0, intensity: 5.0,
dimensions: DEFAULT_LIGHT_DIMENSIONS,
falloffRadius: 1.0, falloffRadius: 1.0,
isSpotlight: false, isSpotlight: false,
exponent: 1.0, exponent: 1.0,
@ -874,14 +889,12 @@ var toolBar = (function () {
addButton("newLightButton", function () { addButton("newLightButton", function () {
createNewEntity({ createNewEntity({
type: "Light", type: "Light",
dimensions: DEFAULT_LIGHT_DIMENSIONS,
isSpotlight: false, isSpotlight: false,
color: { color: {
red: 150, red: 150,
green: 150, green: 150,
blue: 150 blue: 150
}, },
constantAttenuation: 1, constantAttenuation: 1,
linearAttenuation: 0, linearAttenuation: 0,
quadraticAttenuation: 0, quadraticAttenuation: 0,
@ -893,23 +906,6 @@ var toolBar = (function () {
addButton("newTextButton", function () { addButton("newTextButton", function () {
createNewEntity({ createNewEntity({
type: "Text", type: "Text",
dimensions: {
x: 0.65,
y: 0.3,
z: 0.01
},
backgroundColor: {
red: 64,
green: 64,
blue: 64
},
textColor: {
red: 255,
green: 255,
blue: 255
},
text: "some text",
lineHeight: 0.06
}); });
}); });
@ -922,76 +918,18 @@ var toolBar = (function () {
addButton("newWebButton", function () { addButton("newWebButton", function () {
createNewEntity({ createNewEntity({
type: "Web", type: "Web",
dimensions: {
x: 1.6,
y: 0.9,
z: 0.01
},
sourceUrl: "https://highfidelity.com/"
}); });
}); });
addButton("newZoneButton", function () { addButton("newZoneButton", function () {
createNewEntity({ createNewEntity({
type: "Zone", type: "Zone",
dimensions: {
x: 10,
y: 10,
z: 10
}
}); });
}); });
addButton("newParticleButton", function () { addButton("newParticleButton", function () {
createNewEntity({ createNewEntity({
type: "ParticleEffect", type: "ParticleEffect",
isEmitting: true,
emitterShouldTrail: true,
color: {
red: 200,
green: 200,
blue: 200
},
colorSpread: {
red: 0,
green: 0,
blue: 0
},
colorStart: {
red: 200,
green: 200,
blue: 200
},
colorFinish: {
red: 0,
green: 0,
blue: 0
},
emitAcceleration: {
x: -0.5,
y: 2.5,
z: -0.5
},
accelerationSpread: {
x: 0.5,
y: 1,
z: 0.5
},
emitRate: 5.5,
emitSpeed: 0,
speedSpread: 0,
lifespan: 1.5,
maxParticles: 10,
particleRadius: 0.25,
radiusStart: 0,
radiusFinish: 0.1,
radiusSpread: 0,
alpha: 0,
alphaStart: 1,
alphaFinish: 0,
polarStart: 0,
polarFinish: 0,
textures: "https://content.highfidelity.com/DomainContent/production/Particles/wispy-smoke.png"
}); });
}); });