Beispiel #1
0
        void RegisterMeshWithoutLightmap(MeshContainer n)
        {
            AbstractGeometryElem geo = null;

            if (n.Mesh.name == "Sphere")
            {
                geo = new SphereBufferGeometryElem(n);
            }
            else if (n.Mesh.name == "Cylinder")
            {
                geo = new CylinderBufferGeometryElem(n);
            }
            else if (n.Mesh.name == "Quad")
            {
                geo = new QuadBufferGeometry(n);
                //} else if(n.Mesh.name == "Cube") {
                //    geo = new BoxBufferGeometryElem(n);
            }
            else
            {
                geo = new BufferGeometryElem(n, false, Vector4.zero);
            }
            geo.Uuid = "geo-" + n.InstanceId;
            root.SharedNodeTable.Add(geo, n.InstanceId);
        }
        public AFrameNode Create(QuadBufferGeometry el)
        {
            var node = new AFrameNode("a-plane");

            node.AddAttribute("width", el.Width);
            node.AddAttribute("height", el.Height);
            return(node);
        }
        public void Visit(QuadBufferGeometry el)
        {
            using (var scope = new JsonScopeObjectWriter(writer)) {
                scope.WriteKeyValue("uuid", el.Uuid);
                scope.WriteKeyValue("type", el.Type);

                scope.WriteKeyValue("width", el.Width);
                scope.WriteKeyValue("height", el.Height);
            }
        }
Beispiel #4
0
 public void Visit(QuadBufferGeometry el)
 {
     Node = factory.Create(el);
 }