最后
资料过多,篇幅有限
开源分享:【大厂前端面试题解析+核心总结学习笔记+真实项目实战+最新讲解视频】
自古成功在尝试。不尝试永远都不会成功。勇敢的尝试是成功的一半。
console.log(THREE)
const state = reactive({
controls:null
})
const render = () =>{
//1.创建场景
scene = new THREE.Scene();
//场景创建背景色
const sceneLoader = new THREE.TextureLoader();
const sceneColorTexture = sceneLoader.load("./1008.png");
scene.background = sceneColorTexture
//2.创建相机
camera = new THREE.PerspectiveCamera(35,window.innerWidth/window.innerHeight,0.1,1000);
//设置相机位置
camera.position.set(0,0,10);
scene.add(camera);
//3.定义材质贴图
const textureLoader = new THREE.TextureLoader();
const doorColorTexture = textureLoader.load("./1002.png");
//4.添加物体
const cubeGeometry = new THREE.ConeGeometry(1,2,32);
//材质
const basicMaterial = new THREE.MeshBasicMaterial({
map:doorColorTexture
})
cube = new THREE.Mesh(cubeGeometry,basicMaterial);
scene.add(cube);
//5.初始化渲染器
renderer = new THREE.WebGLRenderer();
//设置渲染器尺寸大小
renderer.setSize(window.innerWidth,window.innerHeight);
//将webgl渲染的canvas内容添加到div
let container = document.getElementById('container');
container.appendChild(renderer.domElement);
//使用渲染器 通过相机将场景渲染出来
renderer.render(scene,camera);
console.log(OrbitControls);
state.controls = new OrbitControls(camera,renderer.domElement);
}
const animate = () => {
requestAnimationFrame(animate);
renderer.render(scene,camera);
}
onMounted(()=>{
render()
animate()
})
return {
...toRefs(state)
};
},
})
前端框架
前端框架太多了,真的学不动了,别慌,其实对于前端的三大马车,Angular、React、Vue 只要把其中一种框架学明白,底层原理实现,其他两个学起来不会很吃力,这也取决于你以后就职的公司要求你会哪一个框架了,当然,会的越多越好,但是往往每个人的时间是有限的,对于自学的学生,或者即将面试找工作的人,当然要选择一门框架深挖原理。
以 Vue 为例,我整理了如下的面试题。
如果你觉得对你有帮助,可以戳这里获取:【大厂前端面试题解析+核心总结学习笔记+真实项目实战+最新讲解视频】
析+核心总结学习笔记+真实项目实战+最新讲解视频】](https://bbs.csdn.net/forums/4304bb5a486d4c3ab8389e65ecb71ac0)**