Tresjs / tres

Declarative ThreeJS using Vue Components

Home Page:https://tresjs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

v-layer directive

JaimeTorrealba opened this issue · comments

Description

As a developer using Tres I would like to have an easy and fast way to add or remove layers to my instances.

Suggested solution

My suggestion is something like:

We should accept an array too

And of course other methods like: disable, test (maybe with a console.log), toggle

For more info, check:
https://threejs.org/docs/index.html?q=layers#api/en/core/Layers

Alternative

Any other alternative is considered

Additional context

As we discuss, you can achieve this by using template ref, but sometimes is just too much code, this Issue will could improve the UX

Following the directives pattern (to make our user easier)

Validations