当前位置:网站首页>Games202 operation 0 - environment building process & solving problems encountered
Games202 operation 0 - environment building process & solving problems encountered
2022-07-01 19:04:00 【flashinggg】
Catalog
2 Installing a plug-in Live Server
4 Open the job frame to view the model
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead
Homework 0 The model does not show
1 download Visual Studio Code
Click the link directly to download and install :
Download Visual Studio Code - Mac, Linux, Windows
2 Installing a plug-in Live Server
open VS Code -> Extensions -> Search for Live Server -> Click on install Can be installed
Digression :VS Code The installed plug-ins can be found in C disc -> Users -> user name -> .vscode Found in the folder .
3 Node.js
Click the link to download and install Node.js:
Download | Node.js (nodejs.org)
(1)Win+R Call up the operation column and enter cmd:
Or search directly in the search box cmd Fine :
(2) Enter the following command :
npm install http-server -g
The appearance of the above interface means install succeed , If The error report appears WARN, The following part talks about the solution , You can go and have a look directly .
4 Open the job frame to view the model
(1) stay VS Code choice Open new fold And choose an assignment 0 Folder , Open it as follows :
(2) Right click index.html File and select Open with Live Server:
You can successfully open the contents of the job framework , It includes : A character model and A light source moving around the model .
If you open it, there is a black screen or there is only a light source without a model , There are solutions to the following problems .
solve the problem
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead
This question will be input npm install http-server -g when , If the following error message appears :
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
First , Guarantee npm Updated to the latest version . after , Find us to install Noder.js Folder , I installed it to D disc , Just follow your save path ,
And open them separately npm and npm.cmd These two documents .
Files can be directly dragged into the just installed VS Code You can open it in .
ctrl+H Search separately and locate
prefix -g
npm as follows :
npm.cmd as follows :
Here's the key step , Separate prefix -g Replace with the following code :( Note that the replacement here is best entered manually !)
prefix --location=global
After replacement npm and npm.cmd As follows :
ctrl+s Save separately and close the file , Proceed again cmd Input npm install http-server -g, You'll find what just happened WARN It disappeared .
Homework 0 The model does not show
Homework 0 Only light source / Homework 0 The model does not show / Homework 0 Black screen ... And so on, you can try the next solution :
What I started with was the problem of black screen , Light source and model have nothing , Only the operation bar in the upper right corner
This can be found in the displayed browser , Press F12 You can pop up the browser background Console Interface :
See the hint :
Uncaught ReferenceError: mat4 is not defined
Let's go back to VS Code Open frame , Observe index.html Documents can be found , in the light of mat4 It is this sentence :
I think this link is loading mat4 Part of :https://cdnjs.cloudflare.com/ajax/libs/gl-matrix/2.8.1/gl-matrix-min.js
I find , I can't open this link inside , Even if the ladder is hung, it cannot be opened ... So I came up with a rough solution , Direct download gl-matrix-min.js The document is added to the frame , It should be able to solve .
After searching, I found that someone uploaded this file github:gl-matrix-min.js · GitHub
Click in and download directly , And drag the corresponding file in the file into VS Code Just inside , I put it on src Next :
It's not finished yet , You also need to put the original code just :
<script src="https://cdnjs.cloudflare.com/ajax/libs/gl-matrix/2.8.1/gl-matrix-min.js"
integrity="sha512-zhHQR0/H5SEBL3Wn6yYSaTTZej12z0hVZKOv3TwCUXT1z5qeqGcXJLLrbERYRScEDDpYIJhPC1fk31gqR783iQ=="
crossorigin="anonymous" defer> </script>
Replace with :
<script src="src/gl-matrix-min.js" defer> </script>
After doing the above ,ctrl+s preservation , Refresh the results page , The model can be found and displayed , And the error report is eliminated .
If the model is not fully displayed , There was only one 202, Refresh a few more times and it will come out .
边栏推荐
- R语言epiDisplay包ordinal.or.display函数获取有序logistic回归模型的汇总统计信息(变量对应的优势比及其置信区间、以及假设检验的p值)、write.csv函数保存csv
- 毕业总结
- R语言ggplot2可视化:可视化折线图、使用labs函数为折线图添加自定义的Y轴标签信息(customize y axis label)
- Taiaisu M source code construction, peak store app premium consignment source code sharing
- Qfile read / write file operation in QT
- C language learning notes: type definition typedef and declaration external CSDN creation punch in
- linux下清理系统缓存并释放内存
- bean的生命周期核心步骤总结
- Qt中的QFile读写文件操作
- Regular expression
猜你喜欢
Summary of the core steps in the life cycle of beans
实例讲解将Graph Explorer搬上JupyterLab
搭建一个通用监控告警平台,架构上需要有哪些设计
After studying 11 kinds of real-time chat software, I found that they all have these functions
Go Technology Daily (2022-02-14) - go language slice interview real questions 8 consecutive questions
Lumiprobe lumizol RNA extraction reagent solution
毕业季 | 华为专家亲授面试秘诀:如何拿到大厂高薪offer?
What designs are needed in the architecture to build a general monitoring and alarm platform
Viewing technological changes through Huawei Corps (VI): smart highway
Lumiprobe bifunctional crosslinker sulfo cyanine 5 bis NHS ester
随机推荐
linux下清理系统缓存并释放内存
Three simple methods of ES6 array de duplication
R语言使用epiDisplay包的dotplot函数通过点图的形式可视化不同区间数据点的频率、使用pch参数自定义指定点图数据点的形状
力扣每日一题-第32天-1232. 缀点成线
Qt中的QFile读写文件操作
ETL development of data warehouse (IV)
记一次 .NET 差旅管理后台 CPU 爆高分析
毕业总结
Mipi interface, DVP interface and CSI interface of camera [easy to understand]
2020,最新手机号码手机验证正则表达式,持续更新
Create your own NFT collections and publish a Web3 application to show them (Introduction)
LiveData postValue会“丢”数据
Graduation summary
11. Users, groups, and permissions (1)
R language uses the transmute function of dplyr package to calculate the moving window mean value of the specified data column in dataframe data, and uses ggplot2 package to visualize the line graph b
Viewing the whole ecology of Tiktok from a macro perspective
Halcon image calibration enables subsequent image processing to become the same as the template image
GameFramework食用指南
Why do independent website sellers start to do social media marketing? The original customer conversion rate can be improved so much!
Li Kou daily question - Day 32 -1232 Dotted line