wht html标签,index.html

require_once "jssdk.php";

$jssdk = new JSSDK("wx409a5223727cfbde", "3750cb321b4965883f1ccbe1fc945f8d");

$signPackage = $jssdk->GetSignPackage();

?>

闪耀世界的苏州穹幕

html, body {

-ms-touch-action: none;

background: #888888;

padding: 0;

border: 0;

margin: 0;

height: 100%;

}

/**

* Example Vertex Shader

* Sets the position of the vertex by setting gl_Position

*/

// Set the precision for data types used in this shader

precision highp float;

precision highp int;

// Default THREE.js uniforms available to both fragment and vertex shader

// Default uniforms provided by ShaderFrog.

uniform float time;

// Default attributes provided by THREE.js. Attributes are only available in the

// vertex shader. You can pass them to the fragment shader using varyings

attribute vec2 uv2;

// Examples of variables passed from vertex to fragment shader

varying vec3 vPosition;

varying vec3 vNormal;

varying vec2 vUv;

varying vec2 vUv2;

void main() {

// To pass variables to the fragment shader, you assign them here in the

// main function. Traditionally you name the varying with vAttributeName

vNormal = normal;

vUv = uv;

vUv2 = uv2;

vPosition = position;

// This sets the position of the vertex in 3d space. The correct math is

// provided below to take into account camera and object data.

gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );

}

// console.log('hahahahahah!!!!!!!!!!!!!')

precision highp float;

precision highp int;

uniform sampler2D iChannel0;

uniform vec2 resolution;

uniform float time;

uniform float angle;

varying vec2 vUv;

const float PI = 3.141592658;

const float TAU = 2.0 * PI;

const float sections = 16.0;

void main()

{

vec2 pos = vec2(vUv.xy - 0.5 * resolution.xy) / resolution.y;

float rad = length(pos);

float angle = atan(pos.y, pos.x)+angle;

float ma = mod(angle, TAU / sections);

ma = abs(ma - PI / sections);

float x = cos(ma) * rad;

float y = sin(ma) * rad;

float time = time / 30.0;

gl_FragColor = texture2D(iChannel0, vec2(x - time, y - time));

}

float Tile1D(float p, float a)

{

p -= 4.0 * a * floor(p / 4.0 * a);

p -= 2. * max(p - 2.0 * a, 0.0);

return p;

}

suolue.jpg

data-entry-class="Main"

data-orientation="landscape"

data-scale-mode="noBorder"

data-frame-rate="60"

data-content-width="1136"

data-content-height="740"

data-show-paint-rect="false"

data-multi-fingered="2"

data-show-fps="false" data-show-log="false"

data-show-fps-style="x:0,y:0,size:12,textColor:0xffffff,bgAlpha:0.9">

/**

* {

* "renderMode":, //引擎渲染模式,"canvas" 或者 "webgl"

* "audioType": "" //使用的音频类型,0:默认,1:qq audio,2:web audio,3:audio

* "antialias": //WebGL模式下是否开启抗锯齿,true:开启,false:关闭,默认为false

* }

**/

wx.config({

debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。

appId: '<?php echo $signPackage["appId"];?>',

timestamp: '<?php echo $signPackage["timestamp"];?>',

nonceStr: '<?php echo $signPackage["nonceStr"];?>',

signature: '<?php echo $signPackage["signature"];?>',

jsApiList: ['onMenuShareAppMessage','onMenuShareTimeline']

});

wx.ready(function () {

wx.onMenuShareAppMessage({

title: '闪耀世界的苏州穹幕', // 分享标题

desc: '全球第三座天钻,绽放苏州', // 分享描述

link: 'http://www.yixuanhudong.com/ZH/ZH_WHT/index.php', // 分享链接

imgUrl: 'http://www.yixuanhudong.com/ZH/ZH_WHT/suolue.jpg',

type: 'link', // 分享类型,music、video或link,不填默认为link

success: function () {

alert("分享成功!");

},

cancel: function () {

// 用户取消分享后执行的回调函数

}

});

wx.onMenuShareTimeline({

title: '闪耀世界的苏州穹幕', // 分享标题

link: 'http://www.yixuanhudong.com/ZH/ZH_WHT/index.php', // 分享链接

imgUrl: 'http://www.yixuanhudong.com/ZH/ZH_WHT/suolue.jpg', // 分享图标

success: function () {

// 用户确认分享后执行的回调函数

},

cancel: function () {

// 用户取消分享后执行的回调函数

}

});

wx.error(function (res) {

// config信息验证失败会执行error函数,如签名过期导致验证失败

});

});

var audio;

document.addEventListener("WeixinJSBridgeReady", playMusic, false);

function playMusic() {

audio = document.getElementById('sound_bg');

audio.play();

// audio.pause();

}

function MusicOnOff(bl, id) {

if (bl) {

audio = document.getElementById('sound_bg')

if (audio) {

audio.play();

audio.volume = 1;

}

}

else {

audio = document.getElementById('sound_bg')

if (audio) {

audio.pause();

audio.volume = 0;

}

}

}

threeInit();

egret.runEgret({renderMode:"webgl", audioType:0});

一键复制

编辑

Web IDE

原始数据

按行查看

历史

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值