Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion packages/three-mmd-r3f/src/hooks/use-mmd.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
import type { MMDLoaderPlugin } from '@moeru/three-mmd'

import { MMDLoader } from '@moeru/three-mmd'
import { useLoader } from '@react-three/fiber'

const useMMD = (path: string) => useLoader(MMDLoader, path)
const useMMD = (path: string, plugins?: MMDLoaderPlugin[]) => useLoader(
MMDLoader,
path,
(loader) => {
plugins?.forEach(
p => loader.register(p),
)
},

Comment thread
kwaa marked this conversation as resolved.
Outdated
)

// eslint-disable-next-line @masknet/no-top-level
useMMD.preload = (path: string) =>
Expand Down
2 changes: 1 addition & 1 deletion packages/three-mmd/src/materials/mmd-toon-material.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
UniformsUtils,
} from 'three'

import { MMDToonShader } from '../shaders/mmd-toon-shader'
import { MMDToonShader } from '../loaders/shaders/mmd-toon-shader'

export class MMDToonMaterial extends ShaderMaterial {
combine: number
// TODO: emissive declared in MaterialJSON but not where can be

Check warning on line 15 in packages/three-mmd/src/materials/mmd-toon-material.ts

View workflow job for this annotation

GitHub Actions / check

Complete the task associated to this "TODO" comment
// found under ShaderMaterial nor Material, but mentioned as
// https://github.com/mrdoob/three.js/issues/28336, setting
// emissive for colored textures was required.
Expand Down
Loading
Loading