[ReactVR] Render Custom 3D Objects Using the Model Component in React VR
2023-09-14 09:00:50 时间
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);
相关文章
- PythonOCC 3D图形库学习—创建立方体模型
- CSS 3D - rotate旋转90度看不到的原理 和 解决方法
- Solidworks如何在自定义的基准面上创建3D草图
- 【u106】3D模型
- 在SAP UI中使用纯JavaScript显示产品主数据的3D模型视图
- js 3D旋转效果
- 【回答问题】ChatGPT上线了!给我推荐20个比较流行的3D点云分割模型
- 3D数学--学习笔记(五岁以下儿童):总结一些概念(避免遗忘!)
- 3D游戏引擎设计与实现(7)
- 3D游戏引擎设计与实现(14)
- 3D游戏从入门到精通-33
- 3D游戏从入门到精通-12
- 【三】3D匹配Matching之曲面匹配Surface—Based——read_surface_model()/write_surface_model()算子