我正在尝试运行,npm run dev但出现以下错误:
sh: 1: cross-env: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the @ development script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/shanmaseen/.npm/_logs/2019-02-22T16_32_08_191Z-debug.log
npm ERR! code ELIFECYCLE
npm …Run Code Online (Sandbox Code Playgroud) 如果您使用百分比(或视口单位)的宽度和高度的一个已知问题<body>是,当移动键盘由于输入而调用时,任何百分比/视口元素的大小都会改变。
我已经搜索了很多有关此问题的内容,没有任何帮助。
我发现答案之一是根据新的视口调整布局: 由于键盘的原因,移动视口的大小发生了变化
但这并不实际。
有人知道如何在网络上操作手机键盘吗?
经过一番测试后,我发现我将在答案中列出一个hack,如果有更好的方法,请告诉:)
我正在实现 WebRTC 对等调用,它在所有浏览器中运行良好,除非 chrome 是调用初始化程序(调用邀请函数)。
如果 chrome 是呼叫初始值设定项,则 ICE 连接状态更改为已连接并且视频出现在另一个对等点中,则会发生错误“DOMException:“无法在稳定状态下创建答案””,并且视频停止传输到另一个对等点。
如果接收器也是 chrome,则错误显示“无法在 'RTCPeerConnection' 上执行 'createAnswer':PeerConnection 无法在 has-remote-offer 或 have-local-pranswer 以外的状态下创建答案。”
这些是 handleVideoOfferMsg 函数和 handleGetUserMediaError 函数(触发错误)代码:
function handleVideoOfferMsg(msg) {
// debugger;
// $("#ring")[0].play();
var localStream = null;
targetUsername = msg.from;
// Call createPeerConnection() to create the RTCPeerConnection.
log("Starting to accept invitation from " + targetUsername);
createPeerConnection();
// We need to set the remote description to the received SDP offer
// so that our local WebRTC layer knows how to talk to …Run Code Online (Sandbox Code Playgroud) 所以我在编辑器中导入了一个 FBX 对象,它看起来如下:
完美,这正是我所期待的!
但是当我制作场景并导入相同的对象时,它看起来像这样:
Waymore 更暗,但为什么呢!
即使我使用与两者强度相同的直射光!
这些是我的编辑器对象:
这是我额外的简单代码:
var scene = new THREE.Scene();
scene.background = new THREE.Color( 0x9A9A9A );
var camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
var renderer = new THREE.WebGLRenderer();
renderer.setSize( window.innerWidth, window.innerHeight );
document.body.appendChild( renderer.domElement );
camera.position.z = 5;
var controls = new THREE.OrbitControls( camera, renderer.domElement );
//controls.update() must be called after any manual changes to the camera's transform
camera.position.set( 0, 20, 100 );
controls.update();
var directionalLight = new THREE.DirectionalLight( 0xffffff, …Run Code Online (Sandbox Code Playgroud)