当前位置:网站首页>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 -gnpm 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=globalAfter 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 .
边栏推荐
- ES6数组方法find()、findIndex()的总结「建议收藏」
- R language uses follow up of epidisplay package Plot function visualizes the longitudinal follow-up map of multiple ID (case) monitoring indicators, and uses n.of The lines parameter specifies the num
- The best landing practice of cave state in an Internet ⽹⾦ financial technology enterprise
- Solution: you can ping others, but others can't ping me
- How to realize the applet in its own app to realize continuous live broadcast
- 精耕渠道共谋发展 福昕携手伟仕佳杰开展新产品培训大会
- R语言epiDisplay包ordinal.or.display函数获取有序logistic回归模型的汇总统计信息(变量对应的优势比及其置信区间、以及假设检验的p值)、write.csv函数保存csv
- Leetcode-83 删除排序链表中重复的元素
- 字节跳动数据平台技术揭秘:基于 ClickHouse 的复杂查询实现与优化
- 2020, the regular expression for mobile phone verification of the latest mobile phone number is continuously updated
猜你喜欢

Navicat premium 15 permanent cracking and 2021 latest idea cracking (valid for personal testing)

Halcon图片标定,使得后续图片处理过后变成与模板图片一样

Leetcode-83 删除排序链表中重复的元素

Lumiprobe lumizol RNA extraction reagent solution

Three. JS learning - basic operation of camera (learn from)

前4A高管搞代运营,拿下一个IPO

宏观视角看抖音全生态

AI training speed breaks Moore's law; Song shuran's team won the RSS 2022 Best Paper Award

How to use the low code platform of the Internet of things for personal settings?

微服务大行其道的今天,Service Mesh是怎样一种存在?
随机推荐
[quick application] win7 system cannot run and debug projects using Huawei ide
Lefse analysis
Leetcode-83 delete duplicate elements in the sorting linked list
Image acquisition and playback of coaxpress high speed camera based on pxie interface
Docker deploy mysql8.0
字节跳动数据平台技术揭秘:基于 ClickHouse 的复杂查询实现与优化
2020,最新手机号码手机验证正则表达式,持续更新
Go language self-study series | go language data type
linux下清理系统缓存并释放内存
6款红黄黑榜摄像头评测:谁最安全?谁画质好?从此让你不再踩雷
ES6 summary "suggestions collection" of array methods find(), findindex()
Huawei cloud experts explain the new features of gaussdb (for MySQL)
Usage and underlying implementation principle of PriorityQueue
Li Kou daily question - Day 32 -1232 Dotted line
用GSConv+Slim Neck改进Yolov5,将性能提升到极致!
JS find the next adjacent element of the number in the array
The R language cartools package divides the data, the scale function scales the data, the KNN function of the class package constructs the k-nearest neighbor classifier, and the table function calcula
R语言ggplot2可视化:可视化折线图、使用labs函数为折线图添加自定义的Y轴标签信息(customize y axis label)
数据仓库(四)之ETL开发
搭建一個通用監控告警平臺,架構上需要有哪些設計