mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 13:43:49 +02:00
reverted protocol change for images
This commit is contained in:
parent
576d683d3b
commit
ceb621a521
8 changed files with 33 additions and 20 deletions
|
@ -350,7 +350,7 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
|
|||
CHECK_PROPERTY_CHANGE(PROP_AMBIENT_LIGHT_MODE, ambientLightMode);
|
||||
CHECK_PROPERTY_CHANGE(PROP_SKYBOX_MODE, skyboxMode);
|
||||
|
||||
CHECK_PROPERTY_CHANGE(PROP_IMAGE_URL, imageURL);
|
||||
//CHECK_PROPERTY_CHANGE(PROP_IMAGE_URL, imageURL);
|
||||
|
||||
CHECK_PROPERTY_CHANGE(PROP_SOURCE_URL, sourceUrl);
|
||||
CHECK_PROPERTY_CHANGE(PROP_VOXEL_VOLUME_SIZE, voxelVolumeSize);
|
||||
|
@ -593,9 +593,9 @@ QScriptValue EntityItemProperties::copyToScriptValue(QScriptEngine* engine, bool
|
|||
}
|
||||
|
||||
// Image only
|
||||
if (_type == EntityTypes::Image) {
|
||||
/*if (_type == EntityTypes::Image) {
|
||||
COPY_PROPERTY_TO_QSCRIPTVALUE(PROP_IMAGE_URL, imageURL);
|
||||
}
|
||||
}*/
|
||||
|
||||
// Web only
|
||||
if (_type == EntityTypes::Web) {
|
||||
|
@ -1144,7 +1144,7 @@ void EntityItemProperties::entityPropertyFlagsFromScriptValue(const QScriptValue
|
|||
ADD_PROPERTY_TO_MAP(PROP_VOXEL_SURFACE_STYLE, VoxelSurfaceStyle, voxelSurfaceStyle, uint16_t);
|
||||
ADD_PROPERTY_TO_MAP(PROP_NAME, Name, name, QString);
|
||||
ADD_PROPERTY_TO_MAP(PROP_SOURCE_URL, SourceUrl, sourceUrl, QString);
|
||||
ADD_PROPERTY_TO_MAP(PROP_IMAGE_URL, ImageURL, imageURL, QString);
|
||||
//ADD_PROPERTY_TO_MAP(PROP_IMAGE_URL, ImageURL, imageURL, QString);
|
||||
ADD_PROPERTY_TO_MAP(PROP_LINE_WIDTH, LineWidth, lineWidth, float);
|
||||
ADD_PROPERTY_TO_MAP(PROP_LINE_POINTS, LinePoints, linePoints, QVector<glm::vec3>);
|
||||
ADD_PROPERTY_TO_MAP(PROP_HREF, Href, href, QString);
|
||||
|
@ -1381,9 +1381,9 @@ OctreeElement::AppendState EntityItemProperties::encodeEntityEditPacket(PacketTy
|
|||
APPEND_ENTITY_PROPERTY(PROP_DPI, properties.getDPI());
|
||||
}
|
||||
|
||||
if (properties.getType() == EntityTypes::Image) {
|
||||
/*if (properties.getType() == EntityTypes::Image) {
|
||||
APPEND_ENTITY_PROPERTY(PROP_IMAGE_URL, properties.getImageURL());
|
||||
}
|
||||
}*/
|
||||
|
||||
if (properties.getType() == EntityTypes::Text) {
|
||||
APPEND_ENTITY_PROPERTY(PROP_TEXT, properties.getText());
|
||||
|
@ -1746,9 +1746,9 @@ bool EntityItemProperties::decodeEntityEditPacket(const unsigned char* data, int
|
|||
READ_ENTITY_PROPERTY_TO_PROPERTIES(PROP_DPI, uint16_t, setDPI);
|
||||
}
|
||||
|
||||
if (properties.getType() == EntityTypes::Image) {
|
||||
/*if (properties.getType() == EntityTypes::Image) {
|
||||
READ_ENTITY_PROPERTY_TO_PROPERTIES(PROP_IMAGE_URL, QString, setImageURL);
|
||||
}
|
||||
}*/
|
||||
|
||||
if (properties.getType() == EntityTypes::Text) {
|
||||
READ_ENTITY_PROPERTY_TO_PROPERTIES(PROP_TEXT, QString, setText);
|
||||
|
|
|
@ -67,7 +67,7 @@ class EntityItemProperties {
|
|||
friend class ParticleEffectEntityItem; // TODO: consider removing this friend relationship and use public methods
|
||||
friend class ZoneEntityItem; // TODO: consider removing this friend relationship and use public methods
|
||||
friend class WebEntityItem; // TODO: consider removing this friend relationship and use public methods
|
||||
friend class ImageEntityItem;
|
||||
//friend class ImageEntityItem;
|
||||
friend class LineEntityItem; // TODO: consider removing this friend relationship and use public methods
|
||||
friend class PolyVoxEntityItem; // TODO: consider removing this friend relationship and use public methods
|
||||
friend class PolyLineEntityItem; // TODO: consider removing this friend relationship and use public methods
|
||||
|
|
|
@ -42,8 +42,8 @@ enum EntityPropertyList {
|
|||
PROP_ANIMATION_ALLOW_TRANSLATION,
|
||||
PROP_RELAY_PARENT_JOINTS,
|
||||
|
||||
// for image
|
||||
PROP_IMAGE_URL,
|
||||
/*// for image
|
||||
PROP_IMAGE_URL,*/
|
||||
|
||||
// these properties are supported by the EntityItem base class
|
||||
PROP_REGISTRATION_POINT,
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "LineEntityItem.h"
|
||||
#include "PolyVoxEntityItem.h"
|
||||
#include "PolyLineEntityItem.h"
|
||||
#include "ImageEntityItem.h"
|
||||
//#include "ImageEntityItem.h"
|
||||
#include "ShapeEntityItem.h"
|
||||
|
||||
QMap<EntityTypes::EntityType, QString> EntityTypes::_typeToNameMap;
|
||||
|
@ -48,7 +48,7 @@ REGISTER_ENTITY_TYPE(Zone)
|
|||
REGISTER_ENTITY_TYPE(Line)
|
||||
REGISTER_ENTITY_TYPE(PolyVox)
|
||||
REGISTER_ENTITY_TYPE(PolyLine)
|
||||
REGISTER_ENTITY_TYPE(Image)
|
||||
//REGISTER_ENTITY_TYPE(Image)
|
||||
REGISTER_ENTITY_TYPE(Shape)
|
||||
REGISTER_ENTITY_TYPE_WITH_FACTORY(Box, ShapeEntityItem::boxFactory)
|
||||
REGISTER_ENTITY_TYPE_WITH_FACTORY(Sphere, ShapeEntityItem::sphereFactory)
|
||||
|
@ -91,9 +91,6 @@ EntityItemPointer EntityTypes::constructEntityItem(EntityType entityType, const
|
|||
EntityItemPointer newEntityItem = NULL;
|
||||
EntityTypeFactory factory = NULL;
|
||||
if (entityType >= 0 && entityType <= LAST) {
|
||||
if (getEntityTypeName(entityType) == "Image") {
|
||||
entityType = getEntityTypeFromName("Web");
|
||||
}
|
||||
factory = _factories[entityType];
|
||||
}
|
||||
if (factory) {
|
||||
|
|
|
@ -48,7 +48,7 @@ public:
|
|||
Line,
|
||||
PolyVox,
|
||||
PolyLine,
|
||||
Image,
|
||||
//Image,
|
||||
Shape,
|
||||
LAST = Shape
|
||||
} EntityType;
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
/* NOT IN USE
|
||||
|
||||
#include <QtCore/QJsonDocument>
|
||||
|
||||
#include <ByteCountCoding.h>
|
||||
|
@ -127,14 +129,16 @@ QString ImageEntityItem::getImageURL() const {
|
|||
});
|
||||
}
|
||||
|
||||
/*void ImageEntityItem::computeShapeInfo(ShapeInfo& info) {
|
||||
void ImageEntityItem::computeShapeInfo(ShapeInfo& info) {
|
||||
// This will be called whenever DIRTY_SHAPE flag (set by dimension change, etc)
|
||||
// is set.
|
||||
|
||||
EntityItem::computeShapeInfo(info);
|
||||
}*/
|
||||
}
|
||||
|
||||
// This value specifies how the shape should be treated by physics calculations.
|
||||
ShapeType ImageEntityItem::getShapeType() const {
|
||||
return _collisionShapeType;
|
||||
}
|
||||
|
||||
*/
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
/* NOT IN USE
|
||||
|
||||
#ifndef hifi_ImageEntityItem_h
|
||||
#define hifi_ImageEntityItem_h
|
||||
|
||||
|
@ -60,3 +62,5 @@ protected:
|
|||
};
|
||||
|
||||
#endif // hifi_ImageEntityItem_h
|
||||
|
||||
*/
|
||||
|
|
|
@ -540,7 +540,7 @@ var toolBar = (function () {
|
|||
});
|
||||
});
|
||||
|
||||
// for image button
|
||||
/*// for image button
|
||||
addButton("newImageButton", "web-01.svg", function () {
|
||||
print("new image message is received");
|
||||
createNewEntity({
|
||||
|
@ -548,6 +548,14 @@ var toolBar = (function () {
|
|||
dimensions: DEFAULT_DIMENSIONS,
|
||||
imageURL: "https://hifi-content.s3.amazonaws.com/elisalj/image_entity/dog.jpg"
|
||||
});
|
||||
});*/
|
||||
addButton("newImageButton", "web-01.svg", function () {
|
||||
createNewEntity({
|
||||
type: "Model",
|
||||
dimensions: DEFAULT_DIMENSIONS,
|
||||
modelURL: "http://hifi-content.s3.amazonaws.com/alan/dev/Test/snapshot.fbx",
|
||||
textures: JSON.stringify({ "tex.picture": "https://hifi-content.s3.amazonaws.com/elisalj/image_entity/dog.jpg" })
|
||||
});
|
||||
});
|
||||
|
||||
addButton("newWebButton", "web-01.svg", function () {
|
||||
|
|
Loading…
Reference in a new issue