当前位置:网站首页>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 .
边栏推荐
- Summary of cases of players' disconnection and reconnection in Huawei online battle service
- Lumiprobe lumizol RNA extraction reagent solution
- Graduation season | Huawei experts teach the interview secret: how to get a high paying offer from a large factory?
- 宏观视角看抖音全生态
- 毕业季 | 华为专家亲授面试秘诀:如何拿到大厂高薪offer?
- Prices of Apple products rose across the board in Japan, with iphone13 up 19%
- 用GSConv+Slim Neck改进Yolov5,将性能提升到极致!
- Evaluation of 6 red, yellow and black list cameras: who is the safest? Who has good picture quality? From now on, let you no longer step on thunder
- Taiaisu M source code construction, peak store app premium consignment source code sharing
- Clean up system cache and free memory under Linux
猜你喜欢

How does factor analysis calculate weights?

Prices of Apple products rose across the board in Japan, with iphone13 up 19%

为什么独立站卖家都开始做社交媒体营销?原来客户转化率能提高这么多!

洞态在某互联⽹⾦融科技企业的最佳落地实践

华为游戏初始化init失败,返回错误码907135000

搭建一个通用监控告警平台,架构上需要有哪些设计

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

Lumiprobe non fluorescent alkyne EU (5-ethynyluridine)

Image acquisition and playback of coaxpress high speed camera based on pxie interface

Li Kou daily question - Day 32 -589 N × Preorder traversal of tree
随机推荐
如何运营好技术相关的自媒体?
Leetcode-83 delete duplicate elements in the sorting linked list
【AGC】如何解决事件分析数据本地和AGC面板中显示不一致的问题?
R语言epiDisplay包ordinal.or.display函数获取有序logistic回归模型的汇总统计信息(变量对应的优势比及其置信区间、以及假设检验的p值)、write.csv函数保存csv
Summary of the core steps in the life cycle of beans
OpenAI|视频预训练 (VPT):基于观看未标记的在线视频的行动学习
AI 训练速度突破摩尔定律;宋舒然团队获得RSS 2022最佳论文奖
Viewing the whole ecology of Tiktok from a macro perspective
数据仓库(四)之ETL开发
实现一个Prometheus exporter
Leetcode-128 longest continuous sequence
Lumiprobe biomolecular quantification - qudye Protein Quantification Kit
磁盘的基本知识和基本命令
Principal component calculation weight
app发版后的缓存问题
6款红黄黑榜摄像头评测:谁最安全?谁画质好?从此让你不再踩雷
Golang error handling
解决方案:可以ping别人,但是别人不能ping我
The R language uses the tablestack function of epidisplay package to make statistical summary tables (descriptive statistics based on the grouping of target variables, hypothesis testing, etc.). If th
Write an open source, convenient and fast database document query and generation tool with WPF