最終更新:2021-03-11 (木) 17:59:20 (1148d)  

three.js/スプライト
Top / three.js / スプライト

クラス

THREE.Sprite

  • sprite.scalescale.set(x,y,z)
    sprite.positionposition.set(x,y,0)

THREE.SpriteMaterial

  • material.mapテクスチャnull
    material.alphaMapnull
    material.colorwhite
    material.rotation0

  • //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 );

関連