We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
//加载cube const geometry = new THREE.BoxBufferGeometry(0.2, 0.2, 0.2); /* This doesn't work on iOS because of Uint8ClampedArray bug: https://developers.weixin.qq.com/community/develop/doc/000408d4f304e038c20e4a00a51400 / / const rgbaData = new Uint8ClampedArray([ 255,255,255,0, 0,0,0,0, 0,0,0,0, 255,255,255,0 ]);*/
const rgbaData = new Uint8Array([ 255,255,255,0, 0,0,0,0, 0,0,0,0, 255,255,255,0 ]);
const texture = new THREE.DataTexture(rgbaData,2,2); texture.needsUpdate = true;
const material = new THREE.MeshBasicMaterial({ map: texture });
const mesh = new THREE.Mesh(geometry, material); mainModel = mesh; scene.add(mesh);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
//加载cube
const geometry = new THREE.BoxBufferGeometry(0.2, 0.2, 0.2);
/* This doesn't work on iOS because of Uint8ClampedArray bug:
https://developers.weixin.qq.com/community/develop/doc/000408d4f304e038c20e4a00a51400
/
/
const rgbaData = new Uint8ClampedArray([
255,255,255,0,
0,0,0,0,
0,0,0,0,
255,255,255,0
]);*/
const rgbaData = new Uint8Array([
255,255,255,0,
0,0,0,0,
0,0,0,0,
255,255,255,0
]);
const texture = new THREE.DataTexture(rgbaData,2,2);
texture.needsUpdate = true;
const material = new THREE.MeshBasicMaterial({ map: texture });
const mesh = new THREE.Mesh(geometry, material);
mainModel = mesh;
scene.add(mesh);
The text was updated successfully, but these errors were encountered: