Coder Social home page Coder Social logo

three.js's Introduction

three.js

Three.js引擎最后Release

微信小游戏开发文档

关于在小游戏中使用Three.js的详细步骤文章

来自QQ群 117844722 的群友 毒药的药 分享

将此行代码(各个Three.js的版本对应行数不同,所以无法提供具体行数,请善用文本搜索功能)

var version = parseFloat( /^WebGL\ ([0-9])/.exec( gl.getParameter( gl.VERSION ) )[ 1 ] );
//改为(方案二选一)
var version = 1.
//或
var version = parseFloat( /^(WebGL|OpenGL ES)\ ([0-9])/.exec( gl.getParameter( gl.VERSION ) )[ 1 ] );

将出现多处的

document.createElementNS('http://www.w3.org/1999/xhtml','canvas');
document.createElementNS('http://www.w3.org/1999/xhtml','img');
//替换为
document.createElement('canvas');
document.createElement('img');

即可在真机微信端预览。

实测Three.js的r88、r89可用。

提示: 请搭配 weapp-adapter 使用

使用方法:

require('./path/weapp-adapter')
import * as THREE from './path/three.js'

three.js's People

Contributors

threewx avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.