Documentation ¶
Index ¶
- Constants
- Variables
- func Unmarshal(data []byte) (interface{}, error)
- func Write(doc *Document, w io.Writer, path string) error
- type BlendShapeBind
- type BlendShapeGroup
- type BlendShapeMaster
- type BlendShapeMaterialValue
- type Bone
- type Document
- type FirstPerson
- type Humanoid
- type MaterialProperty
- type Metadata
- type Quaternion
- type SecondaryAnimation
- type SecondaryAnimationBoneGroup
- type SecondaryAnimationCollider
- type SecondaryAnimationColliderGroup
- type VRM
Constants ¶
View Source
const ExtensionName = "VRM"
Variables ¶
View Source
var ExporterVersion = "modelconv-v0.2"
ExporterVersion
View Source
var RequiredBones = []string{
"hips", "spine", "chest", "neck", "head",
"leftUpperArm", "leftLowerArm", "leftHand",
"rightUpperArm", "rightLowerArm", "rightHand",
"leftUpperLeg", "leftLowerLeg", "leftFoot",
"rightUpperLeg", "rightLowerLeg", "rightFoot",
}
RequiredBones for Humanoid
Functions ¶
Types ¶
type BlendShapeBind ¶ added in v0.2.4
type BlendShapeGroup ¶
type BlendShapeGroup struct { Name string `json:"name"` PresetName string `json:"presetName"` Binds []*BlendShapeBind `json:"binds"` MaterialValues []*BlendShapeMaterialValue `json:"materialValues,omitempty"` }
type BlendShapeMaster ¶
type BlendShapeMaster struct {
BlendShapeGroups []*BlendShapeGroup `json:"blendShapeGroups"`
}
type BlendShapeMaterialValue ¶ added in v0.2.4
type Document ¶ added in v0.2.1
func (*Document) IsExtentionUsed ¶ added in v0.2.1
func (*Document) ValidateBones ¶ added in v0.2.1
type FirstPerson ¶
type FirstPerson struct { FirstPersonBone int `json:"firstPersonBone,omitempty"` FirstPersonBoneOffset map[string]float64 `json:"firstPersonBoneOffset,omitempty"` MeshAnnotations []interface{} `json:"meshAnnotations,omitempty"` LookAtTypeName string `json:"lookAtTypeName,omitempty"` LookAtHorizontalInner map[string]interface{} `json:"lookAtHorizontalInner,omitempty"` LookAtHorizontalOuter map[string]interface{} `json:"lookAtHorizontalOuter,omitempty"` LookAtVerticalDown map[string]interface{} `json:"lookAtVerticalDown,omitempty"` LookAtVerticalUp map[string]interface{} `json:"lookAtVerticalUp,omitempty"` }
type MaterialProperty ¶
type MaterialProperty struct { Name string `json:"name"` Shader string `json:"shader"` RenderQueue int `json:"renderQueue"` FloatProperties map[string]float64 `json:"floatProperties"` VectorProperties map[string][]float64 `json:"vectorProperties"` TextureProperties map[string]uint32 `json:"textureProperties"` KeywordMap map[string]bool `json:"keywordMap"` TagMap map[string]string `json:"tagMap"` }
func NewMaterialProperty ¶ added in v0.2.4
func NewMaterialProperty(name string) *MaterialProperty
type Metadata ¶
type Metadata struct { Title string `json:"title"` Version string `json:"version"` Author string `json:"author"` Contact string `json:"contactInformation"` Texture *int `json:"texture,omitempty"` AllowedUserName string `json:"allowedUserName,omitempty"` ViolentUssageName string `json:"violentUssageName,omitempty"` SexualUssageName string `json:"sexualUssageName,omitempty"` CommercialUssageName string `json:"commercialUssageName,omitempty"` OtherPermissionURL string `json:"otherPermissionUrl,omitempty"` LicenseName string `json:"licenseName"` OtherLicenseURL string `json:"otherLicenseUrl"` }
type Quaternion ¶ added in v0.3.0
type SecondaryAnimation ¶
type SecondaryAnimation struct { BoneGroups []*SecondaryAnimationBoneGroup `json:"boneGroups,omitempty"` ColliderGroups []*SecondaryAnimationColliderGroup `json:"colliderGroups,omitempty"` }
type SecondaryAnimationBoneGroup ¶
type SecondaryAnimationBoneGroup struct { Comment string `json:"comment"` Stiffiness float64 `json:"stiffiness"` GravityPower float64 `json:"gravityPower"` GravityDir map[string]float64 `json:"gravityDir,omitempty"` DragForce float64 `json:"dragForce"` HitRadius float64 `json:"hitRadius"` Center int `json:"center"` Bones []int `json:"bones"` ColliderGroups []int `json:"colliderGroups,omitempty"` }
type SecondaryAnimationCollider ¶ added in v0.2.4
type SecondaryAnimationColliderGroup ¶ added in v0.2.4
type SecondaryAnimationColliderGroup struct { Node uint32 `json:"node"` Colliders []*SecondaryAnimationCollider `json:"colliders"` }
type VRM ¶ added in v0.2.1
type VRM struct { Meta Metadata `json:"meta"` Humanoid Humanoid `json:"humanoid"` FirstPerson *FirstPerson `json:"firstPerson,omitempty"` BlendShapeMaster BlendShapeMaster `json:"blendShapeMaster,omitempty"` SecondaryAnimation *SecondaryAnimation `json:"secondaryAnimation,omitempty"` MaterialProperties []*MaterialProperty `json:"materialProperties"` ExporterVersion string `json:"exporterVersion"` }
func (*VRM) CheckRequiredBones ¶ added in v0.2.1
Click to show internal directories.
Click to hide internal directories.