最終更新:2021-03-11 (木) 17:59:20 (1112d)
three.js/スプライト
クラス
THREE.Sprite
sprite.scale scale.set(x,y,z) sprite.position position.set(x,y,0)
THREE.SpriteMaterial
material.map テクスチャ null material.alphaMap null material.color white material.rotation 0
例
//const map = new THREE.TextureLoader().load( 'sprite.png' ); //const material = new THREE.SpriteMaterial( { map: map } ); const material = new THREE.SpriteMaterial({ map: new THREE.TextureLoader().load("sprite.png"), }); const sprite = new THREE.Sprite( material ); scene.add( sprite );