加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
index.html 4.39 KB
一键复制 编辑 原始数据 按行查看 历史
‘JOKER’ 提交于 2024-03-26 10:40 . init
<!DOCTYPE html>
<html>
<head>
<title>Product</title>
<!--http://www.html5rocks.com/en/mobile/mobifying/-->
<meta name="viewport"
content="width=device-width,user-scalable=no,initial-scale=1, minimum-scale=1,maximum-scale=1"/>
<!--https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html-->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="format-detection" content="telephone=no">
<!-- force webkit on 360 -->
<meta name="renderer" content="webkit"/>
<meta name="force-rendering" content="webkit"/>
<!-- force edge on IE -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="msapplication-tap-highlight" content="no">
<!-- force full screen on some browser -->
<meta name="full-screen" content="yes"/>
<meta name="x5-fullscreen" content="true"/>
<meta name="360-fullscreen" content="true"/>
<!-- force screen orientation on some browser -->
<meta name="screen-orientation" content=""/>
<meta name="x5-orientation" content="">
<!--fix fireball/issues/3568 -->
<!--<meta name="browsermode" content="application">-->
<meta name="x5-page-mode" content="app">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8" />
<link rel="icon" href="https://ai3d.huilan.com/favicon.ico" type="image/x-icon">
<!-- layui -->
<script src="./vendor/layui/layui.js"></script>
<link rel="stylesheet" href="./vendor/layui/css/layui.css">
<link href="./main.css" rel="stylesheet" type="text/css">
<script src="./vendor/require.js" data-main="./engine/main">
</script>
<script>
require.config({
paths:{"model":'./main'
}});
require(['ModleViewEngine'], function (ModleViewEngine, moduleB, moduleC){
// some code here
ModleViewEngine.main();
});
</script>
<script type="module" src="./main.js"></script>
<!---->
<!-- 移动端调试工具 -->
<script src="./vconsole.min.js"></script>
<script>
function getUrlParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]); return null;
}
// open web debugger console
if (typeof VConsole !== 'undefined'&&getUrlParam('debug')) {
window.vConsole = new VConsole();
}
</script>
<style>
</style>
</head>
<body>
<!--弹出3d产品或盲盒-->
<div id="obj-container-product" >
<!-- Our <canvas> will be inserted here -->
<!-- <div id="closeviewer" class="closeviewer" >
<span id="bt1" class="close" type="button">×</span>
</div> -->
<!-- <div id="productback" class="productback" >
<img id="productname" src="./res/products/names/联想天骄平板电脑.png" class="productname">
<div id="btnbuy" class="btnbuy" >
</div>
<div id="btnback" class="btnback" >
</div>
</div> -->
<script type="x-shader/x-vertex" id="vertexShader">
varying vec3 vWorldPosition;
void main() {
vec4 worldPosition = modelMatrix * vec4( position, 1.0 );
vWorldPosition = worldPosition.xyz;
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
}
</script>
<script type="x-shader/x-fragment" id="fragmentShader">
uniform vec3 topColor;
uniform vec3 skylineColor;
uniform vec3 bottomColor;
uniform float offset;
uniform float exponent;
uniform vec3 skyCenter;
varying vec3 vWorldPosition;
void main() {
vec3 position = vec3(vWorldPosition.x - skyCenter.x, vWorldPosition.y - skyCenter.y, vWorldPosition.z - skyCenter.z);
float h = normalize( position + offset ).y;
vec3 color;
if (h > 0.0) {
color = mix( skylineColor, topColor, max( pow( max( h, 0.0 ), exponent ), 0.0 ) );
} else {
color = mix( skylineColor, bottomColor, max( pow( max( -h, 0.0 ), exponent ), 0.0 ) );
}
gl_FragColor = vec4(color , 1.0 );
}
</script>
<div id="canvasContainer" class="canvasContainer">
<div id="loader" class="progress-bar stripes">
<span style="width: 0%"></span>
</div>
</div>
</div>
</body>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化