-
-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from vue-gl/lens-flare
Add the new texture component. Resolves #42 .
- Loading branch information
Showing
34 changed files
with
782 additions
and
353 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[Home](..) > [References](.) > [Components](.#components) > [Textures](.#textures) > |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,3 +63,6 @@ layout: reference | |
|
||
## Scenes | ||
* [VglScene](vgl-scene) | ||
|
||
## Textures | ||
* [VglTexture](vgl-texture) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
layout: reference | ||
--- | ||
{% include breadcrumbs/textures.md %} VglTexture | ||
# VglTexture `<vgl-texture>` | ||
A texture to apply to a surface or as a reflection or refraction map, corresponding [THREE.Texture](https://threejs.org/docs/index.html#api/textures/Texture). | ||
## Properties | ||
* {% include prop.md name="src" type="string" %} - The path or URL to the file. This can also be a Data URI. | ||
|
||
## Example usage | ||
```html | ||
<vgl-renderer antialias style="width: 300px; height: 150px;"> | ||
<vgl-scene> | ||
<vgl-plane-geometry name="plane" width=512 height=512></vgl-plane-geometry> | ||
<vgl-texture src="path/to/image.jpg" name="texture"></vgl-texture> | ||
<vgl-mesh-standard-material name="std" map="texture"></vgl-mesh-standard-material> | ||
<vgl-mesh geometry="plane" material="std"></vgl-mesh> | ||
<vgl-ambient-light color="#ffeecc"></vgl-ambient-light> | ||
<vgl-directional-light position="0 1 2"></vgl-directional-light> | ||
</vgl-scene> | ||
<vgl-perspective-camera orbit-position="700 1 0.5"></vgl-perspective-camera> | ||
</vgl-renderer> | ||
``` | ||
<div class="vgl-example"><iframe class="vgl-example__content" srcdoc=" | ||
<style> | ||
body { | ||
margin: 0; | ||
overflow: hidden; | ||
} | ||
.vgl-canvas { | ||
height: 100vh; | ||
} | ||
</style> | ||
<vgl-renderer antialias class='vgl-canvas'> | ||
<vgl-scene> | ||
<vgl-plane-geometry name='plane' width=512 height=512></vgl-plane-geometry> | ||
<vgl-texture src='../img/shimoguri.jpg' name='texture'></vgl-texture> | ||
<vgl-mesh-standard-material name='std' map='texture'></vgl-mesh-standard-material> | ||
<vgl-mesh geometry='plane' material='std'></vgl-mesh> | ||
<vgl-ambient-light color='#ffeecc'></vgl-ambient-light> | ||
<vgl-directional-light position='0 1 2'></vgl-directional-light> | ||
</vgl-scene> | ||
<vgl-perspective-camera orbit-position='700 1 0.5'></vgl-perspective-camera> | ||
</vgl-renderer> | ||
<script src='https://unpkg.com/vue/dist/vue.min.js'></script> | ||
<script src='https://unpkg.com/three/build/three.min.js'></script> | ||
<script src='../js/vue-gl.js'></script> | ||
<script> | ||
Object.keys(VueGL).forEach(function(name) { | ||
Vue.component(name, VueGL[name]); | ||
}); | ||
const vm = new Vue({ | ||
el: '.vgl-canvas' | ||
}); | ||
</script> | ||
"></iframe></div> | ||
<script src="https://unpkg.com/srcdoc-polyfill@1.0.0/srcdoc-polyfill.min.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.