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. Scrapy系列教程(6)------怎样避免被禁

    避免被禁止(ban) 有些网站实现了特定的机制,以一定规则来避免被爬虫爬取. 与这些规则打交道并不easy,须要技巧,有时候也须要些特别的基础. 假设有疑问请考虑联系 商业支持 . 以下是些处理这些网 ...

  2. java中File的delete()方法删除文件失败的原因

    java中File的delete()方法删除文件失败的原因 学习了:http://hujinfan.iteye.com/blog/1266387 的确是忘记关闭了: 引用原文膜拜一下: 一般来说 ja ...

  3. 使用gridlayout布局后,因某些原因又删除,并整理文件夹结构时,Unable to resolve target &#39;android-7&#39;

    出现的问题 [2013-01-11 10:52:39 - gridlayout_v7] Unable to resolve target 'android-7' 事由:在一次做九宫格时.误使用了gri ...

  4. Redis命令-HyperLogLog

    HyperLogLog数据结构简单介绍 能够看http://www.cnblogs.com/ysuzhaixuefei/p/4052110.html  博客,介绍的相对照较清晰. HyperLogLo ...

  5. 2016.03.02,英语,《Vocabulary Builder》Unit 03

    ambi/amphi: 指on both sides或者around的意思,ambi-来自拉丁语,amphi-来自希腊语.ambidextrous:[ˌæmbi'dekstrəs] adj. 两手俱利 ...

  6. No changes detected or App 'blog' could not be found. Is it in INSTALLED_APPS?

    出现该问题的原因: django没有在setting.py的配置文件中找到app内容,需要增加app的名称 E:\PycharmProjects\Mysite>python manage.py ...

  7. Python笔记(四)

    # -*- coding:utf-8 -*- # 控制语句 # if...else... print "********************1********************** ...

  8. C#将内容导出到Word到指定模板

    昨天做了下导入导出Excel文件,今天研究了下导出Word文件. 从网上找了半天才找到了一个能导出到指定模板的,在这里总结下. 导出模板原理就是利用的替换占位符. 我这里先建立好了一个模板, 接下来写 ...

  9. Android DrawerLayout设置左右侧滑菜单为全屏

    我们可以在MainActivity中获取屏幕宽度后动态赋值给侧滑菜单. 在oncreate时 DisplayMetrics metric = new DisplayMetrics(); getWind ...

  10. Android 蓝牙4.0的连接和通讯

    1.加入权限 <uses-sdk android:minSdkVersion=" android:targetSdkVersion="/> <uses-featu ...