diff options
| author | Adam Harvey <adam@ahprojects.com> | 2019-06-06 06:22:03 -0500 |
|---|---|---|
| committer | Adam Harvey <adam@ahprojects.com> | 2019-06-06 06:22:03 -0500 |
| commit | c287cbc3ebec4b6f9ffb455cbb58335f7684d998 (patch) | |
| tree | d4bb6189b98e9095e6b29b8d016778cdcc8f4d0f /site/public/assets/demo/cloud/README.md | |
| parent | f227833124adb7e0d871f702220de687d74d663c (diff) | |
| parent | 8b4827e78a66c5f58cb52900483000896464f97f (diff) | |
fixing merge, hopefully
Diffstat (limited to 'site/public/assets/demo/cloud/README.md')
| -rw-r--r-- | site/public/assets/demo/cloud/README.md | 109 |
1 files changed, 0 insertions, 109 deletions
diff --git a/site/public/assets/demo/cloud/README.md b/site/public/assets/demo/cloud/README.md deleted file mode 100644 index de6e882e..00000000 --- a/site/public/assets/demo/cloud/README.md +++ /dev/null @@ -1,109 +0,0 @@ -# THREE.TextSprite - -`class THREE.TextSprite extends THREE.Sprite` - -An instance of `TextSprite` automatically computes the optimal font size depending on the distance to the camera and the size of the renderer canvas. - -## demo - -[Try it out!](https://seregpie.github.io/THREE.TextSprite/) - -## dependencies - -- [THREE.TextTexture](https://github.com/SeregPie/THREE.TextTexture) - -## setup - -### npm - -```shell -npm install three.textsprite -``` - -### ES module - -```javascript -import TextSprite from 'three.textsprite'; -``` - -### browser - -```html -<script src="https://unpkg.com/three"></script> -<script src="https://unpkg.com/three.texttexture"></script> -<script src="https://unpkg.com/three.textsprite"></script> -``` - -The class `TextSprite` will be available under the namespace `THREE`. - -## members - -``` -.constructor({ - material, - maxFontSize, - minFontSize, - redrawInterval, - textSize, - texture, -}) -``` - -| argument | description | -| ---: | :--- | -| `material` | The parameters to pass to the constructor of [`SpriteMaterial`](https://threejs.org/docs/index.html#api/materials/SpriteMaterial). | -| `texture` | The parameters to pass to the constructor of [`TextTexture`](https://github.com/SeregPie/THREE.TextTexture). | - -```javascript -let sprite = new THREE.TextSprite({ - material: { - color: 0xffbbff, - fog: true, - }, - redrawInterval: 250, - textSize: 10, - texture: { - text: 'Carpe Diem', - fontFamily: 'Arial, Helvetica, sans-serif', - }, -}); -scene.add(sprite); -``` - ---- - -`.isTextSprite = true` - -Used to check whether this is an instance of `TextSprite`. - -You should not change this, as it is used internally for optimisation. - ---- - -`.textSize = 1` - -The size of the text. - ---- - -`.redrawInterval = 1` - -The minimum time that must elapse before the canvas is redrawn. If 0, the canvas is redrawn immediately whenever `TextSprite` is rendered, otherwise the redrawing is deferred. - ---- - -`.minFontSize = 0` - -The minimum font size. - ---- - -`.maxFontSize = Infinity` - -The maximum font size. - ---- - -`.dispose()` - -Disposes the texture and the material. |
