Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
c8d5da7
vrm1.0 support
tatsuya-ogawa Jan 26, 2026
6c880bd
Update Example/VisionExample/VisionExampleApp.swift
tatsuya-ogawa Jan 31, 2026
85a140f
displayName
tatsuya-ogawa Jan 31, 2026
b6a0b7f
displayName
tatsuya-ogawa Jan 31, 2026
04b327f
Update Example/VisionExample/ContentView.swift
tatsuya-ogawa Jan 31, 2026
7e8607f
materialName
tatsuya-ogawa Jan 31, 2026
0ea686a
SpringBone
tatsuya-ogawa Jan 31, 2026
445e5f6
revert Sources/VRMKit/VRM/Node.swift
tatsuya-ogawa Jan 31, 2026
b66fe1c
revert Sources/VRMKit/VRM/VRM1.swift
tatsuya-ogawa Jan 31, 2026
6371170
Revert "revert Sources/VRMKit/VRM/VRM1.swift"
tatsuya-ogawa Jan 31, 2026
51d4ff6
Revert "revert Sources/VRMKit/VRM/Node.swift"
tatsuya-ogawa Jan 31, 2026
4b5e8fd
fix test
tatsuya-ogawa Jan 31, 2026
58c01fa
fix BlendShape
tatsuya-ogawa Feb 1, 2026
c058dd8
Merge branch 'main' of github.com:tatsuya-ogawa/VRMKit into feature/v…
tatsuya-ogawa Feb 2, 2026
d8b23bd
fix comment
tatsuya-ogawa Feb 2, 2026
8b9b966
remove comments
tatsuya-ogawa Feb 2, 2026
d1cb5f3
fix comment
tatsuya-ogawa Feb 2, 2026
9451a52
mac example
tatsuya-ogawa Feb 2, 2026
dee4292
add testcase
tatsuya-ogawa Feb 2, 2026
e51ea67
remove unnecessary comment
tatsuya-ogawa Feb 2, 2026
84d9113
SwiftTesting
tatsuya-ogawa Feb 3, 2026
6abaf87
revert VRM1Tests.swift
tatsuya-ogawa Feb 3, 2026
9dd2db8
Revert "revert VRM1Tests.swift"
tatsuya-ogawa Feb 3, 2026
9876270
refactor testcase
tatsuya-ogawa Feb 3, 2026
4e407c4
allowedUserName
tatsuya-ogawa Feb 3, 2026
775d164
texture transform
tatsuya-ogawa Feb 3, 2026
cfb1b65
fix build error
tatsuya-ogawa Feb 3, 2026
141fb79
add example build pipeline
tatsuya-ogawa Feb 3, 2026
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
Prev Previous commit
Next Next commit
remove comments
  • Loading branch information
tatsuya-ogawa committed Feb 2, 2026
commit 8b9b966be2fb6929eaa97dac6a456b09e18a9369
27 changes: 1 addition & 26 deletions Sources/VRMKit/VRM/VRMMigration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
licenseName: vrm1.licenseUrl,
otherLicenseUrl: vrm1.otherLicenseUrl
)
// Note: 'allowedUserName' mapping from `avatarPermission` needs details.
// VRM1: onlyAuthor, onlySeparatelyLicensedPerson, everyone.
// VRM0: OnlyAuthor, ExplicitlyLicensedPerson, Everyone.
}
}

Expand All @@ -34,27 +31,7 @@
guard let label = child.label,
let humanBone1 = child.value as? VRM1.Humanoid.HumanBones.HumanBone?,
let node = humanBone1?.node else { continue }

// Normalize bone names. VRM1 property names mostly match VRM0 bone names in `HumanBone.bone` string.
// Exceptions:
// VRM1 `chest` is usually `upperChest` in Unity HumanBodyBones (or VRM0 `upperChest`?), wait.
// VRM 0.x: spine, chest, upperChest.
// VRM 1.0: spine, chest, upperChest.
// The mapping should be direct for most.
// VRM1 `thumbMetacarpal` -> VRM0 `xxxThumbProximal`?
// User requested: "follows existing interface".
// So we need to map VRM1 bone structure to VRM0 `HumanBone` list.

let boneName = label

// Map bone names if necessary
// Example: VRM1 'leftThumbMetacarpal' -> ?
// Let's assume direct mapping for now and refine if specific bones fail.
// The `VRM.Humanoid.HumanBone` struct expects `bone` string.

// Note: VRM 1.0 `humanBones` struct usage in `VRM1.swift` uses property names like `leftUpperLeg`.
// VRM 0.x `HumanBone` expects string literals that generally match these camelCase names.

bones.append(HumanBone(bone: boneName, node: node, useDefaultValues: true))
}

Expand Down Expand Up @@ -139,9 +116,7 @@
addGroup(name: "Blink", presetName: "blink", expression: preset.blink)
addGroup(name: "Blink_L", presetName: "blink_l", expression: preset.blinkLeft)
addGroup(name: "Blink_R", presetName: "blink_r", expression: preset.blinkRight)

// ... LookUps etc. (Populate basic presets if needed, but for now we assume common ones cover most usage)


self.init(blendShapeGroups: groups)
}
}
Expand Down Expand Up @@ -348,7 +323,7 @@

// Map MToon parameters to VRM 0.x MaterialProperty
var floatProperties: [String: Double] = [:]
var keywordMap: [String: Bool] = [:]

Check warning on line 326 in Sources/VRMKit/VRM/VRMMigration.swift

View workflow job for this annotation

GitHub Actions / Test package (iOS)

variable 'keywordMap' was never mutated; consider changing to 'let' constant

Check warning on line 326 in Sources/VRMKit/VRM/VRMMigration.swift

View workflow job for this annotation

GitHub Actions / Test package (xrOS)

variable 'keywordMap' was never mutated; consider changing to 'let' constant

Check warning on line 326 in Sources/VRMKit/VRM/VRMMigration.swift

View workflow job for this annotation

GitHub Actions / Test package (watchOS)

variable 'keywordMap' was never mutated; consider changing to 'let' constant
var textureProperties: [String: Int] = [:]
var vectorProperties: [String: [Double]] = [:] // VRM0.x expects [Double] (array of 4)

Expand Down
Loading