import React, {
Component} from 'react';
import CryptoJS from 'crypto-js';
import qs from 'querystring';
import * as THREE from "three";
import {
OrbitControls} from "three/examples/jsm/controls/OrbitControls";
// import {GLTFLoader} from "three/examples/jsm/loaders/GLTFLoader";
//加载mmd的物理模型
// import {MMDLoader} from "three/examples/jsm/loaders/MMDLoader";
//引入 外框线
// import {OutlineEffect} from "three/examples/jsm/effects/OutlineEffect";
//动画
// import {MMDAnimationHelper} from "three/examples/jsm/animation/MMDAnimationHelper";
//加载 物理引擎
// window.Ammo().then(res=>{window.Ammo=res})
// const clock=new THREE.Clock()
class light extends Component {
ready:false
constructor(args) {
super(args);
this.state={
width:window.innerWidth,
height:window.innerHeight,
count:0
}
}
render() {
return (
<div className={
'three-canvas'}>
</div>
);
}
componentDidMount() {
if(this.state.count===0){
this.init()
// eslint-disable-next-line react/no-direct-mutation-state
this.state.count++
const key = "abc"; //后端给出的密钥
const iv = '3'; //后端给出的密钥偏移量
threejs的点光源+环境光
最新推荐文章于 2024-03-31 19:12:48 发布