Skip to content

feat: consider plugin-system #32

Description

@bigmistqke

As suggested by @gleamish and continuing on issue #24 maybe it would be interesting to consider a plugin-system to enrich what is contained in useThree and how the props of T are resolved.

API I had in mind:

// solid-three.ts
import { createT, Interactivity } from "solid-three"
import { DreiPlugin } from "solid-drei"
import { BoxGeometry, Mesh, MeshBasicMaterial } from "three"

export const { Canvas, T, extend } = createT({ BoxGeometry, Mesh, MeshBasicMaterial }, [DreiPlugin, Interactivity])

// app.ts
import { Canvas, T } from "./solid-three.ts"
import { render } from "solid-js/web"

render(() => <Canvas><T.Mesh onClick={console.log}><T.BoxGeometry/><T.MeshBasicMaterial/></T.Mesh></Canvas>, document.getElementById('app'))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestnextIssues related to next pre-release

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions