- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我可以通过存储 api 上传我的 3d 模型。但我无法从存储 api 获取 .data3d.buffer。我发现 .data3d.buffer 是 aframe 加载 3d 模型所必需的。如何通过存储 api 获取 .data3d.buffer??
最佳答案
如果你有存储 key ,你可以直接从storage.3d.io
下载模型。
例子:
io3d.storage.put(myFile).then(function (storageKey) {
console.log('the data3d.buffer is now at', 'https://storage.3d.io' + storageKey)
})
请注意,该文件将有一个 .gz.data3d.buffer
,因为浏览器将在下载时解压缩打包的 Assets 。您可能必须删除 .gz
才能直接使用该文件。
Storage API可以直接使用,但是会自动帮你把二进制文件解析成JSON。
要在 A-Frame 中使用模型,您只需要存储 key (在浏览器中):
io3d.storage.put(myFile).then(function (storageKey) {
var model = document.createElement('a-entity')
model.setAttribute('io3d-data3d', 'key: ' + storageKey)
document.querySelector('a-scene').appendChild(model)
})
关于archilogic - 如何通过存储 API 从我上传的 3d 模型中获取 .data3d.buffer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46459928/
我期望 new Buffer(buffer.toString()) 始终是逐字节相等的。但是,我遇到的情况并非如此。 首先,这是一个真实的案例: var buf1 = new Buffer(32);
我有用于记录数据的 Protocol Buffer 。 message Message { required double val1 = 1; optional int val2 =
请注意以下简单程序(基于 protobuf-net 项目 v1 wiki 中的示例): using System.Collections.Generic; using System.Diagnosti
在 Protocol Buffer 中,有没有办法让消息包含嵌套消息的集合?例如,消息主管可能有一个员工集合以及主管的姓名和部门。 最佳答案 是的。您使用 repeated领域; message Em
我想知道 Protocol Buffer 在解析流时如何处理损坏的数据。有没有办法知道数据是否已损坏。 Protocol Buffer 是否提供任何内置的数据完整性检查机制? 谢谢, 最佳答案 没有任
Protocol Buffer 如何处理类型版本控制? 例如,当我需要随时间更改类型定义时?就像添加和删除字段一样。 最佳答案 Google 设计的 protobuf 对版本控制非常宽容: 意外数据要
我尝试阅读 Protobuf 文档,但无法想象它可以用于许多用例。我想知道一些实际的 Protocol Buffer 性能改进用例。 谢谢 最佳答案 Protocol buffers 是一个序列化库,
给定 Protocol Buffer 模式和一些数据, Protocol Buffer 序列化是否跨库和语言具有确定性? 基本上,无论使用什么库,我是否可以保证相同的数据总是以相同的方式(直到字节)序
我正在使用一个示例 UWP C++/CX 程序,该程序创建两个 UDP 网络通信线程,它们使用 Windows::Storage::Streams::DataWriter 相互发送数据。和 Windo
我正在使用以下代码 int lenSend = odl->ByteSize(); char* buf = (char *)malloc(lenSend); odl->SerializeToArray(
Protocol Buffer 文档警告说...... You should never add behaviour to the generated classes by inheriting fr
我有一个定义如下的原型(prototype)模式, message User { int64 id = 1; bool email_subscribed = 2; bool sms_
我试图了解 Protocol Buffer 编码方法,将消息转换为二进制(或十六进制)格式时,我无法理解嵌入消息的编码方式。 我猜可能和内存地址有关,但我找不到准确的关系。 这是我所做的。 第 1 步
我需要序列化和反序列化一系列与字节流之间的 Protocol Buffer 消息。有一些预先确定的消息类型。编码类型信息的推荐方法是什么,以便我的应用程序可以知道它应该读取哪种类型? 最佳答案 最常见
与GSON相比, Protocol Buffer (protobuf)的优缺点是什么? 在什么情况下,protobuf比GSON更合适? 对于一个非常笼统的问题,我感到抱歉。 最佳答案 json(通过
message Person { required Empid = 1 [default = 100]; required string name = 2 [default = "Raju"]
我正在研究一个小型设备,该设备具有相当大的一组配置参数(~100 KB),这些参数是从 PC 软件生成的。过去,我们将参数存储在二进制文件中并将它们加载到数据结构中。维护有点烦人(不同的语言,确保结构
来自Encoding - Protocol Buffers - Google Code上的“签名类型”: ZigZag encoding maps signed integers to unsigne
我正在使用 Protocol Buffer ,一切正常。除了我不明白的事实 - 为什么我需要 proto 中的编号标签文件 : message SearchRequest { required s
Protocol Buffer 的吸引人的功能之一是它允许您扩展消息定义,而不会破坏使用较旧定义的代码。对于枚举according to the documentation: a field with
我是一名优秀的程序员,十分优秀!