React VR isn't limited to simple 3D primitives. By using the <Model/> Component we can place a complex 3D models into our scene.

import React from 'react';
import {
AppRegistry,
asset,
Pano,
Text,
View,
Image,
Model,
Sphere,
PointLight,
AmbientLight,
DirectionalLight,
} from 'react-vr'; export default class app extends React.Component {
render() {
return (
<View>
<DirectionalLight
intensity={5}
style={{
transform: [{translateZ: -1}]
}}
/>
<Model
source={{
obj: asset('girl.obj')
}}
style={{
color: 'white',
transform: [{translate: [0, -10, -30]}]
}}
lit
/>
</View>
);
}
}; AppRegistry.registerComponent('app', () => app);

[ReactVR] Render Custom 3D Objects Using the Model Component in React VR的更多相关文章

  1. [ReactVR] Animate Text, Images, Views, and 3D Elements Using the Animated Library in React VR

    Motion is an important aspect of a complete immersive experience, therefor we are going to look into ...

  2. [ReactVR] Add Shapes Using 3D Primitives in React VR

    React VR ships with a handful of 3D primitives. We'll importprimitives like <Sphere/>, <Box ...

  3. #学习笔记# VALSE 2019.01.09 朱俊彦 --- Learning to Synthesize Images, Videos, and 3D Objects

    视频类型:VALSE-webinar 报告时间:2019年01月09日 报告人:MIT朱俊彦 报告题目:Learning to Synthesize Images, Videos, and 3D Ob ...

  4. [ReactVR] Add Lighting Using Light Components in React VR

    In order to illuminate a scene containing 3D objects a lighting setup is required. In this lesson we ...

  5. [ReactVR] Start a Virtual Reality Project Using the React VR CLI

    We will learn how to set up a React VR project, run the development mode with hot reloading, and tak ...

  6. React报错之Objects are not valid as a React child

    正文从这开始~ 总览 当我们尝试在JSX代码中,直接渲染对象或者数组时,会产生"Objects are not valid as a React child"错误.为了解决该错误, ...

  7. AngularJs学习笔记--Understanding the Model Component

    原版地址:http://docs.angularjs.org/guide/dev_guide.mvc.understanding_model 在angular文档讨论的上下文中,术语“model”可以 ...

  8. 3D objects key rendering steps

    Key steps of Rendering objects: 1 Create objects’ meshes, which we can use C++’s vector container to ...

  9. render函数data参数中的model选项

    官方文档没有说, 但是编译v-model时, 是有model这个选项的, 例如: _c('el-input', { attrs: { "placeholder": "手机 ...

随机推荐

  1. [Android]RecyclerView的简单演示样例

    去年google的IO上就展示了一个新的ListView.它就是RecyclerView. 下面是官方的说明,我英语能力有限,只是我大概这么理解:RecyclerView会比ListView更具有拓展 ...

  2. SSD纠错码向LDPC码演变

    作者:Stephen Bates SSD控制器芯片中採用的纠错编码(ECCs)的类型正在发生一场演变.相信很多这篇博文的读者对此都有所了解.传统上採用的纠错码是基于群变换的博斯-查德胡里-霍昆格母(B ...

  3. Hadoop问题记录:Wrong FS: hdfs://hp5-249:9000/, expected: file:///

    一般在对文件操作的时候可能出现这个问题,可能是打开文件的时候出错,也可能是对文件夹进行遍历的时候出问题. 出现这样的问题通常是在eclipse中执行hadoop的时候出现,直接切换到shell下发送命 ...

  4. 超高性能管线式HTTP请求(实践·原理·实现)

    超高性能管线式HTTP请求(实践·原理·实现) 一.总结 一句话总结:实际pipe早就被http1.1所支持,并且大部分nginx服务器也支持并开启了这一功能. pipe之所以能比常规请求方式性能高出 ...

  5. [jzoj 3175] 数树数 解题报告 (树链剖分)

    interlinkage: https://jzoj.net/senior/#main/show/3175 description: 给定一棵N 个节点的树,标号从1~N.每个点有一个权值.要求维护两 ...

  6. 2016 提高组c++ 错题

    需重做 树的重心 链表 计算机基础知识 无线通讯技术: 蓝牙,wifi,GPRS 现在常用的无线通信技术:FM调频广播(用于收音机): 2G.3G移动通信技术(中国移动.中国联通.中国电信正在运营的网 ...

  7. Navicat 连接 Mysql 报2059错误的原因以及解决方法

    MySQL的8.0.*版本使用的是caching_sha2_password验证方式,而Navicat Premium 12还不支持该种方式.解决方案: 1,降低mysql的版本 2,设置mysql支 ...

  8. BZOJ 4516 后缀数组+ST+set

    写了一半 没了啊啊啊 重新写的 思路: 先不考虑后缀自动机 (我不会啊) 那这道题只能用后缀数组了 先把原串倒一下 后缀->前缀 相当于每回在前面加了一个字母 求不同的子串个数 首先 正常的求子 ...

  9. log4j:WARN Please initialize the log4j system properly.解决方案

    在使用quarz任务调度框架时的错误,实际上这个问题很常见,并不影响程序的使用,只是缺少日志输出,完整错误信息: log4j:WARN No appenders could be found for ...

  10. 基于XMPP利用openfire简单的即时通讯

    功能的实现结果:能够使自己编写客户端与spark客户端信息通讯,将接受到的信息更新到textview上. 1.下载openfire并安装.设置域名,添加用户 2.下载安装spark客户端 3.jar包 ...