Skip to content
Merged
Prev Previous commit
Next Next commit
Update material.md
  • Loading branch information
machenmusik authored and ngokevin committed Oct 18, 2017
commit a451ab439c6f062f16a1e19f2b69dc082830ba11
9 changes: 9 additions & 0 deletions docs/components/material.md
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,15 @@ Finally, here is the HTML markup to put it all together:
* [Live demo](https://aframe-simpler-shader.glitch.me/)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the Glitch demos can be listed in the examples array in the header:

examples:
  - title: Grid Glitch Shader
    url: https://glitch.com/edit/#!/aframe-simpler-shader?path=client/shader-grid-glitch.js:1:0

For ease of copy/pasting, I'd remove the GLSLify build step and use multiline strings.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was that way originally (using GLSL-ify) so I left it that way; you can see that the new one I added as walkthrough does, in fact, use multi-line strings. Are you asking to make changes to the existing example instances that will retroactively alter documentation for prior versions?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remix the Glitch and not alter the old one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI - current examples header looks pretty unattractive, and no other good examples to follow?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a data structure, it gets rendered underneath the table of contents as a list. I think there are two Glitches you listed, can add more as we go.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checked, there are more than two. Good list!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated the Glitches I made, just the page and script, no more extraneous server and files

* [Remix this on Glitch](https://glitch.com/edit/#!/aframe-simpler-shader)

![5093034e-97f2-40dc-8cb9-28ca75bfd75b-8043-00000dbc2e00268d](https://cloud.githubusercontent.com/assets/1848368/24825516/abb98abe-1bd4-11e7-8262-93d3efb6056f.gif)

***

For a more advanced example, [try realtime vertex displacement](https://glitch.com/edit/#!/aframe-displacement-registershader).

![b19320eb-802a-462a-afcd-3d0dd9480aee-861-000004c2a8504498](https://cloud.githubusercontent.com/assets/1848368/24825518/b52e5bf6-1bd4-11e7-8eb2-9a9c1ff82ce9.gif)


## Register a Custom Component Using THREE Material

For those cases where the `registerShader` API lacks needed functionality
Expand Down