摘要:
// 双击控制全屏他和退出全屏 window.addEventListener("dblclick", () => { const fullScreenElement = document.fullscreenElement if (!fullScreenElement) { // 用画布对象进入全 阅读全文
摘要:
<template> <div class="home"> <div id="threeContainer" class="threeContainer"></div> </div> </template> <script> import * as THREE from 'three' import 阅读全文
摘要:
<template> <div class="home"> <div id="threeContainer" class="threeContainer"></div> </div> </template> <script> import * as THREE from 'three' import 阅读全文
摘要:
// init方法最后面 // 设置时钟 this.clock = new THREE.Clock() this.render() // 渲染函数 render () { // 物体会沿着x轴一直循环运动 // this.cube.position.x += 0.01 // this.cube.ro 阅读全文
摘要:
// 渲染函数 render (time) { // 物体会沿着x轴一直循环运动 // this.cube.position.x += 0.01 // this.cube.rotation.x += 0.1 let t = (time / 1000) % 5 this.cube.position.x 阅读全文
摘要:
<template> <div class="home"> <div id="threeContainer" class="threeContainer"></div> </div> </template> <script> import * as THREE from 'three' import 阅读全文
摘要:
我就不贴的代码了 前面有基础代码 // 添加坐标轴辅助器 const axesHelper = new THREE.AxesHelper( 5 ) this.scene.add( axesHelper ) 阅读全文
摘要:
<template> <div class="home"> <div id="threeContainer" class="threeContainer"></div> </div> </template> <script> import * as THREE from 'three' import 阅读全文
摘要:
<template> <div class="home"> <div id="threeContainer" class="threeContainer"></div> </div> </template> <script> import * as THREE from 'three' export 阅读全文