JavaScript
语言:
JaveScriptBabelCoffeeScript
确定
var width = window.innerWidth,
height = window.innerHeight / 2;
var size = 128;
var canvas = document.getElementById('canvas'),
ctx = canvas.getContext('2d');
var camera, scene, renderer, geometry, texture, mesh;
function changeCanvas() {
ctx.font = '16pt Arial';
ctx.fillStyle = 'orange';
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.fillStyle = 'white';
ctx.fillRect(10, 10, canvas.width - 20, canvas.height - 20);
ctx.fillStyle = 'black';
ctx.textAlign = "center";
ctx.textBaseline = "middle";
ctx.fillText("踏得网", canvas.width / 2, canvas.height / 2);
}
function init() {